:root {
  --bg: #f6f0e8;
  --bg-deep: #e9dece;
  --surface: rgba(255, 250, 244, 0.9);
  --surface-strong: #fffdf9;
  --surface-dark: #1f1b17;
  --ink: #1d1915;
  --muted: #6c645a;
  --line: #dbcbb7;
  --accent: #c89648;
  --accent-strong: #9b6a20;
  --accent-soft: rgba(200, 150, 72, 0.12);
  --danger: #b44d45;
  --success: #236b45;
  --shadow-lg: 0 26px 60px rgba(53, 37, 21, 0.14);
  --shadow-md: 0 16px 35px rgba(53, 37, 21, 0.1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

body[data-theme="dark"] {
  --bg: #0f1218;
  --bg-deep: #171c24;
  --surface: rgba(24, 28, 37, 0.9);
  --surface-strong: #1b212b;
  --surface-dark: #f4efe7;
  --ink: #f4efe7;
  --muted: #acb3be;
  --line: #313846;
  --accent: #79c0a5;
  --accent-strong: #9fe0c7;
  --accent-soft: rgba(121, 192, 165, 0.14);
  --danger: #ff8f82;
  --success: #8fe0b7;
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 35px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  color-scheme: light;
  font-family: "Outfit", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(200, 150, 72, 0.14), transparent 28%),
    radial-gradient(circle at right center, rgba(31, 27, 23, 0.08), transparent 24%),
    linear-gradient(180deg, #f9f4ed 0%, var(--bg) 55%, var(--bg-deep) 100%);
}

body[data-theme="dark"] {
  color-scheme: dark;
  background:
    radial-gradient(circle at top left, rgba(121, 192, 165, 0.16), transparent 24%),
    radial-gradient(circle at right center, rgba(14, 21, 31, 0.55), transparent 28%),
    linear-gradient(180deg, #0b0f14 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 203, 183, 0.78);
  backdrop-filter: blur(18px);
  background: rgba(249, 244, 237, 0.82);
}

.footer-note {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 38rem;
}

body[data-theme="dark"] .site-header {
  border-bottom-color: rgba(49, 56, 70, 0.9);
  background: rgba(11, 15, 20, 0.82);
}

.nav-bar,
.hero-grid,
.band-grid,
.story-grid,
.feature-grid,
.checkout-grid,
.footer-grid,
.admin-layout,
.dashboard-grid,
.product-manager-grid,
.admin-panels,
.catalog-grid {
  display: grid;
  gap: 1.5rem;
}

.nav-bar,
.footer-grid {
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-dark), #453625);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

body[data-theme="dark"] .brand-glyph {
  background: linear-gradient(135deg, #dfe9e5, #95cab5);
  color: #10151c;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong,
h1,
h2,
h3,
.stats-card strong,
.price {
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy small,
.nav-links,
.footer-links,
.hero-text,
.story-copy,
.feature-card p,
.product-copy p,
.inventory-chip,
.form-help,
.status-message,
.empty-state p,
.table-empty,
.muted {
  color: var(--muted);
}

.nav-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.cart-button,
.theme-toggle,
.icon-button,
.button,
.ghost-button,
.danger-button {
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cart-button,
.theme-toggle,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-button,
.theme-toggle {
  gap: 0.8rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  background: var(--surface-strong);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border-color: var(--line);
}

.button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  font-weight: 600;
}

.button:hover,
.ghost-button:hover,
.danger-button:hover,
.cart-button:hover,
.theme-toggle:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--surface-dark);
  color: #fff;
}

body[data-theme="dark"] .button-primary {
  color: #10151c;
}

.button-secondary,
.ghost-button {
  background: transparent;
  border-color: var(--line);
}

.danger-button {
  background: rgba(180, 77, 69, 0.08);
  border-color: rgba(180, 77, 69, 0.22);
  color: var(--danger);
}

.eyebrow,
.mini-label,
.panel-label,
.chip,
.inventory-chip,
.status-pill {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
}

.eyebrow,
.mini-label,
.panel-label {
  color: var(--accent-strong);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.98;
  margin: 0.3rem 0 1rem;
  max-width: 12ch;
}

h2 {
  margin: 0.3rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

h3 {
  margin: 0;
  font-size: 1.35rem;
}

.hero-section,
.section {
  padding: 4.5rem 0;
}

.hero-grid,
.checkout-grid,
.story-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.hero-actions,
.hero-pills,
.stats-grid,
.form-actions,
.admin-credentials,
.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-pills,
.product-meta,
.inline-field {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-pills li,
.product-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(219, 203, 183, 0.82);
}

body[data-theme="dark"] .hero-pills li,
body[data-theme="dark"] .product-meta li,
body[data-theme="dark"] .filter-shell,
body[data-theme="dark"] .control-shell,
body[data-theme="dark"] .summary-shell,
body[data-theme="dark"] .stats-grid,
body[data-theme="dark"] .catalog-item,
body[data-theme="dark"] .cart-item {
  background: rgba(29, 35, 46, 0.88);
  border-color: rgba(49, 56, 70, 0.95);
}

body[data-theme="dark"] select,
body[data-theme="dark"] option,
body[data-theme="dark"] .filter-shell select,
body[data-theme="dark"] .control-shell select {
  background: #1b212b;
  color: #f4efe7;
}

.hero-pills li::before,
.product-meta li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero-panel,
.announcement-band,
.feature-card,
.product-card,
.checkout-form,
.receipt-card,
.cart-drawer,
.stats-card,
.admin-card,
.list-card,
.auth-card,
.empty-state {
  background: var(--surface);
  border: 1px solid rgba(219, 203, 183, 0.82);
  box-shadow: var(--shadow-lg);
}

body[data-theme="dark"] .hero-panel,
body[data-theme="dark"] .announcement-band,
body[data-theme="dark"] .feature-card,
body[data-theme="dark"] .product-card,
body[data-theme="dark"] .checkout-form,
body[data-theme="dark"] .receipt-card,
body[data-theme="dark"] .cart-drawer,
body[data-theme="dark"] .stats-card,
body[data-theme="dark"] .admin-card,
body[data-theme="dark"] .list-card,
body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .empty-state {
  border-color: rgba(49, 56, 70, 0.95);
  background: rgba(20, 24, 32, 0.92);
}

.hero-panel,
.feature-card,
.product-card,
.checkout-form,
.receipt-card,
.stats-card,
.admin-card,
.list-card,
.auth-card,
.empty-state {
  border-radius: var(--radius-xl);
}

.hero-panel,
.stats-card,
.admin-card,
.list-card,
.auth-card,
.receipt-card {
  padding: 1.6rem;
}

.hero-metrics {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.hero-metrics article {
  padding: 1rem 0;
  border-top: 1px solid rgba(219, 203, 183, 0.8);
}

.hero-metrics strong {
  display: block;
  font-size: 1.8rem;
}

.announcement-band {
  border-radius: var(--radius-xl);
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.band-grid {
  grid-template-columns: repeat(3, 1fr);
  padding: 1.2rem 1.4rem;
}

.story-copy {
  display: grid;
  gap: 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.filter-shell,
.control-shell,
.summary-shell,
.stats-grid,
.catalog-item,
.cart-item {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(219, 203, 183, 0.82);
}

.filter-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
}

.control-shell {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
}

.filter-shell select,
.control-shell input,
.control-shell select,
.admin-form input,
.admin-form textarea,
.admin-form select,
.checkout-form input,
.checkout-form textarea,
.auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0.9rem 1rem;
}

.filter-shell select {
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 10rem;
}

.control-shell input,
.control-shell select {
  border: 0;
  background: transparent;
  padding: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.product-card {
  overflow: hidden;
}

.product-image-shell {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, rgba(200, 150, 72, 0.28) 0%, var(--surface-strong) 100%);
}

.product-image-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(31, 27, 23, 0.8);
  color: #fff;
}

body[data-theme="dark"] .product-badge {
  background: rgba(223, 233, 229, 0.92);
  color: #10151c;
}

.product-copy {
  padding: 1.35rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.price {
  margin: 0.5rem 0;
  font-size: 1.8rem;
}

.inventory-chip {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
}

.feature-grid,
.dashboard-grid {
  grid-template-columns: repeat(3, 1fr);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-card {
  padding: 1.5rem;
}

.category-link-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.8rem;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.category-tile-image {
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, rgba(200, 150, 72, 0.22) 0%, var(--surface-strong) 100%);
}

.category-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile-copy {
  display: grid;
  gap: 0.15rem;
}

.category-link-card h3 {
  font-size: 1.05rem;
  line-height: 1.05;
}

.category-link-card p {
  margin: 0;
}

.checkout-grid {
  align-items: start;
}

.checkout-form {
  padding: 1.5rem;
  display: grid;
  gap: 0.8rem;
}

.receipt-card {
  margin-top: 1.4rem;
}

.summary-shell {
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.3rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.summary-line + .summary-line {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(219, 203, 183, 0.82);
}

.status-message {
  min-height: 1.5rem;
  margin: 0;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--danger);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(26rem, 100%);
  height: 100vh;
  padding: 1.2rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transform: translateX(100%);
  transition: transform 200ms ease;
}

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

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(29, 25, 21, 0.38);
}

.cart-drawer-header,
.catalog-item-header,
.list-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cart-items,
.catalog-list,
.order-list {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  overflow: auto;
  padding-right: 0.2rem;
}

.cart-item,
.catalog-item {
  display: grid;
  gap: 1rem;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.cart-item {
  grid-template-columns: 4.5rem 1fr;
}

.cart-item img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.cart-item-actions,
.quantity-shell {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.quantity-shell button {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.cart-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(219, 203, 183, 0.82);
}

.empty-state {
  padding: 2rem;
  text-align: center;
}

.admin-body .site-header {
  position: relative;
}

.admin-main {
  padding: 2.5rem 0 4rem;
}

.admin-layout {
  grid-template-columns: 0.95fr 1.05fr;
  align-items: start;
}

.auth-card {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem;
}

.auth-card form,
.admin-form {
  display: grid;
  gap: 0.8rem;
}

.image-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  min-height: 12rem;
}

.image-preview img {
  width: 100%;
  max-height: 18rem;
  object-fit: cover;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.admin-credentials {
  margin: 1rem 0 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.dashboard-grid {
  margin-bottom: 1rem;
}

.stats-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.25rem;
}

.product-manager-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
}

.admin-card,
.list-card {
  display: grid;
  gap: 1rem;
}

.compact-card {
  padding: 1rem;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.catalog-grid {
  gap: 1rem;
}

.catalog-item {
  grid-template-columns: 6rem 1fr;
}

.catalog-item img {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.chip {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 27, 23, 0.08);
}

body[data-theme="dark"] .chip {
  background: rgba(121, 192, 165, 0.18);
}

.table-empty {
  text-align: center;
  padding: 1.2rem;
}

@media (max-width: 1080px) {
  .product-grid,
  .feature-grid,
  .category-grid,
  .dashboard-grid,
  .band-grid,
  .catalog-toolbar,
  .product-manager-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-grid,
  .story-grid,
  .checkout-grid,
  .admin-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .nav-bar {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.9rem;
    padding: 0.85rem 0;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong,
  .brand-copy small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.55rem 0.8rem;
    font-size: 0.95rem;
    padding-top: 0.15rem;
  }

  .header-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
  }

  .theme-toggle,
  .cart-button {
    width: auto;
    min-height: 2.7rem;
    padding: 0.6rem 0.85rem;
  }

  .theme-toggle span,
  .cart-button span,
  .cart-button strong {
    font-size: 0.92rem;
  }

  .product-grid,
  .feature-grid,
  .dashboard-grid,
  .band-grid,
  .category-grid,
  .catalog-toolbar,
  .catalog-item,
  .product-manager-grid,
  .inline-field {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .category-link-card {
    padding: 0.7rem;
  }

  .category-link-card h3 {
    font-size: 0.98rem;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .cart-button,
  .button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  .hero-actions,
  .hero-pills,
  .footer-links,
  .stats-grid,
  .admin-credentials,
  .list-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 100%;
  }
}
