:root {
  --ink: #151821;
  --muted: #657084;
  --line: #d9dee8;
  --paper: #f8fafc;
  --surface: #ffffff;
  --accent: #0f8f78;
  --accent-dark: #0a6758;
  --gold: #d8a737;
  --coral: #d95f4f;
  --shadow: 0 18px 60px rgba(19, 24, 33, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  align-items: center;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-weight: 650;
}

.nav a:hover {
  color: var(--ink);
}

.cart-toggle,
.primary-action,
.secondary-action,
.cart-summary button,
.product-card button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.cart-toggle {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
}

.cart-toggle strong {
  background: var(--gold);
  border-radius: 999px;
  color: var(--ink);
  min-width: 26px;
  padding: 3px 8px;
}

.hero {
  background:
    linear-gradient(120deg, rgba(21, 24, 33, 0.82), rgba(15, 143, 120, 0.76)),
    url("https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #fff;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  min-height: 620px;
  padding: 80px 5vw 58px;
}

.hero-copy {
  align-self: center;
  max-width: 730px;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.92;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  margin-bottom: 0;
}

h3 {
  font-size: 20px;
}

.hero-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.6;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action {
  align-items: center;
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
}

.primary-action {
  background: var(--gold);
  color: var(--ink);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #fff;
}

.hero-panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.hero-panel div {
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  padding: 22px;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.74);
}

.section {
  padding: 76px 5vw;
}

.section-heading {
  margin-bottom: 28px;
}

.toolbar {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(240px, 420px) 1fr;
  margin-bottom: 28px;
}

.search-box {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.search-box input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 48px;
  padding: 0 14px;
}

.segments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segments button {
  background: #edf2f7;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 0 14px;
}

.segments button.is-active {
  background: #e1f4f0;
  border-color: var(--accent);
  color: var(--accent-dark);
}

.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(19, 24, 33, 0.06);
}

.product-media {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e7f4f1, #f7ead2);
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.product-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-icon {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  font-size: 48px;
  font-weight: 900;
  height: 112px;
  justify-content: center;
  margin: 24px;
  width: 112px;
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.product-meta {
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  text-transform: uppercase;
}

.price-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.price-row strong {
  font-size: 22px;
}

.stock {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.product-card button,
.cart-summary button,
.admin-form button {
  background: var(--accent);
  color: #fff;
  min-height: 44px;
}

.product-card button:hover,
.cart-summary button:hover,
.admin-form button:hover {
  background: var(--accent-dark);
}

.feature-band {
  background: #11151d;
  color: #fff;
}

.feature-band .section-heading h2 {
  color: #fff;
}

.module-grid,
.admin-grid {
  margin-bottom: 18px;
}

.admin-console {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
}

.admin-form,
.admin-login,
.admin-session,
.orders-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.admin-login,
.admin-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-login h3,
.admin-login button,
.admin-login p,
.admin-form h3,
.admin-form .wide,
.admin-form button {
  grid-column: 1 / -1;
}

.admin-login label,
.admin-form label,
.checkout-form label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.admin-login input,
.admin-form input,
.admin-form textarea,
.checkout-form input,
.checkout-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  resize: vertical;
}

.admin-login button,
.admin-session button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
}

.admin-login p {
  color: var(--coral);
  font-weight: 750;
  min-height: 22px;
}

.admin-session {
  align-items: center;
  display: flex;
  gap: 16px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.admin-session div {
  display: grid;
  gap: 4px;
}

.admin-session span {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-heading h3 {
  margin-bottom: 0;
}

.panel-heading button {
  background: #edf2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 0 12px;
}

.order-list {
  display: grid;
  gap: 12px;
  max-height: 440px;
  overflow: auto;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.order-card header,
.order-card footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.order-card small {
  color: var(--muted);
  font-weight: 800;
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.checkout-form button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-grid article,
.metric,
.workflow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.module-grid article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.module-grid p,
.workflow,
.metric span {
  color: var(--muted);
}

.module-grid p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.metric {
  display: grid;
  gap: 12px;
}

.metric strong {
  font-size: 28px;
}

.workflow {
  grid-column: span 2;
}

.workflow ul {
  line-height: 1.8;
  margin-bottom: 0;
  padding-left: 20px;
}

.cart-drawer {
  background: #fff;
  bottom: 0;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 440px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(105%);
  transition: transform 180ms ease;
  width: min(92vw, 440px);
  z-index: 40;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-header,
.cart-summary {
  border-bottom: 1px solid var(--line);
  padding: 22px;
}

.cart-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.cart-header h2 {
  font-size: 28px;
}

.cart-header button {
  background: #edf2f7;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  height: 38px;
  width: 38px;
}

.cart-items {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 18px 22px;
}

.cart-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.cart-line footer,
.cart-summary div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.cart-line button {
  background: transparent;
  border: 0;
  color: var(--coral);
  cursor: pointer;
  font-weight: 800;
  padding: 0;
}

.cart-summary {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.cart-summary p {
  color: var(--accent-dark);
  font-weight: 700;
  min-height: 24px;
}

.scrim {
  background: rgba(17, 21, 29, 0.42);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 30;
}

.scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 980px) {
  .hero,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .module-grid,
  .admin-grid,
  .admin-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 620px;
    padding-top: 48px;
  }

  .product-grid,
  .module-grid,
  .admin-grid,
  .admin-console,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .workflow {
    grid-column: auto;
  }
}
