:root {
  --green-950: #082e21;
  --green-900: #0b3d2c;
  --green-700: #166534;
  --green-100: #dcfce7;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --paper: #fbfaf7;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #6b7280;
  --line: #e7e5e4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 10px 30px rgba(28, 25, 23, 0.06);
  --max: 1560px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-700);
}

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

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green-900);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(clamp(16px, 4vw, 40px), calc((100% - var(--max)) / 2 + clamp(16px, 4vw, 40px)));
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-900);
  text-decoration: none;
}

.brand-mark {
  display: block;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.cart-button:hover {
  border-color: #d6d3d1;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

/* Hero */
.hero {
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(255, 255, 255, 0.1), transparent 65%),
    radial-gradient(700px 380px at 95% 10%, rgba(180, 83, 9, 0.22), transparent 60%),
    var(--green-900);
  color: #f7f3e8;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 34px) clamp(16px, 4vw, 40px) clamp(22px, 3vw, 38px);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8e6d2;
}

.hero h1 {
  margin: 0;
  max-width: 34ch;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lede {
  margin: 12px 0 0;
  max-width: 54ch;
  color: #d8e8dd;
  font-size: clamp(14px, 1.8vw, 16px);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: #f7f3e8;
  color: var(--green-950);
}

.button.primary:hover {
  background: #fff;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-button {
  background: none;
  border: 0;
  padding: 4px 6px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button:hover {
  background: #f5f5f4;
  border-color: var(--line);
}

/* Catalog */
.catalog {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 38px) clamp(16px, 4vw, 40px) 56px;
}

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.catalog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 26px);
  letter-spacing: -0.01em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search {
  flex: 1 1 240px;
  min-width: 200px;
}

.search input {
  width: min(260px, 70vw);
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search input::placeholder {
  color: #a8a29e;
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: -4px 0 12px;
}

.search-hints .chip {
  padding: 6px 12px;
  font-size: 12.5px;
}

.list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin: 0 0 14px;
}

.sort-control,
.stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.sort-control select {
  padding: 7px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
}

.stock-toggle {
  cursor: pointer;
}

.stock-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--green-900);
}

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

.chip {
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.chip:hover {
  border-color: #d6d3d1;
}

.chip[aria-pressed="true"] {
  background: var(--green-900);
  border-color: var(--green-900);
  color: #fff;
}

.status {
  min-height: 24px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.status:empty {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(28, 25, 23, 0.06), 0 16px 36px rgba(28, 25, 23, 0.09);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3efe6;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media img.is-artwork,
.cart-item img.is-artwork,
.related-card img.is-artwork,
.product-detail-media img.is-artwork {
  object-fit: contain;
  background: #f3efe6;
}

.card-media-link {
  display: block;
  width: 100%;
  height: 100%;
}

.fav-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #57534e;
  cursor: pointer;
}

.fav-button:hover {
  color: #b91c1c;
}

.fav-button.is-active {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.fav-button.is-active svg {
  fill: currentColor;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.low {
  background: var(--amber);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 14px 16px 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.card-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-900);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-brand::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.card-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.card-name a {
  color: inherit;
  text-decoration: none;
}

.card-name a:hover {
  text-decoration: underline;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0;
}

.size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.product-sizes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
}

.product-sizes .size-chip {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 14px;
}

.size-chip:hover {
  border-color: #d6d3d1;
}

.size-chip.is-active {
  background: var(--green-900);
  border-color: var(--green-900);
  color: #fff;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.price {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.price small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}

.add-button {
  padding: 9px 16px;
  border: 1px solid var(--green-900);
  border-radius: 999px;
  background: transparent;
  color: var(--green-900);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.add-button:hover:not(:disabled) {
  background: var(--green-900);
  color: #fff;
}

.add-button:disabled {
  border-color: var(--line);
  color: #a8a29e;
  cursor: not-allowed;
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px clamp(16px, 4vw, 40px) 48px;
  text-align: center;
  font-size: 14px;
}

.site-footer p {
  margin: 6px 0;
}

.muted {
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 10px 0 6px;
  font-size: 13px;
}

.footer-nav a {
  color: var(--green-700);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Cart */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 10, 9, 0.45);
  animation: fade 0.15s ease;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100dvh;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(28, 25, 23, 0.18);
  animation: slide-in 0.2s ease;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.cart-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.cart-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3efe6;
}

.cart-item-name {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.cart-item-price {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.stepper button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.stepper button:hover {
  background: #f5f5f4;
}

.stepper span {
  min-width: 22px;
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.remove-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.cart-empty {
  margin: 24px 0 8px;
  color: var(--muted);
  text-align: center;
}

.cart-item-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.cart-item-brand {
  color: var(--green-900);
  font-weight: 700;
}

.reorder {
  margin-top: 18px;
  padding: 14px;
  background: #fbfaf7;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.reorder-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reorder-button {
  width: 100%;
  padding: 10px 14px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 13.5px;
}

.reorder-button:hover {
  background: #c9f2d6;
}

.customer {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.customer label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.customer input,
.customer textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}

.cart-foot {
  padding: 16px 20px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--card);
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
}

.cart-total strong {
  font-size: 20px;
}

.button.checkout {
  width: 100%;
  background: var(--green-900);
  color: #fff;
}

.button.checkout:hover:not(:disabled) {
  background: var(--green-950);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  top: 84px;
  z-index: 70;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green-950);
  color: #fff;
  font-size: 14px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: fade 0.15s ease;
}

@keyframes slide-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .cart-panel {
    width: 100%;
    border-left: 0;
  }

  .catalog-head {
    align-items: stretch;
  }

  .toolbar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    flex: none;
    min-width: 0;
  }

  .search input {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Category navigation */
.catalog-head {
  margin-bottom: 16px;
}

.catalog-title {
  min-width: 0;
}

.view-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--green-700);
  text-decoration: underline;
}

.breadcrumb .sep {
  color: #d6d3d1;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.catalog-main {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 84px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tree-all,
.tree-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.tree-all:hover,
.tree-link:hover {
  background: #f5f4f0;
}

.tree-all.is-active,
.tree-link.is-active {
  background: var(--green-900);
  color: #fff;
}

.tree-brand {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.tree-all.is-active .count,
.tree-link.is-active .count {
  color: #c8e6d2;
}

.tree-label {
  min-width: 0;
}

.count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tree-list,
.tree-sublist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree-item {
  margin-top: 2px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tree-toggle {
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.tree-toggle:hover {
  background: #efeee9;
  color: var(--ink);
}

.tree-sublist {
  margin: 2px 0 6px 26px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.tree-link.sub {
  padding: 7px 10px;
  color: #44403c;
  font-size: 13.5px;
}

.tree-link.sub.is-active {
  color: #fff;
}

.mobile-cats {
  display: none;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.filter-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brandnav {
  margin-top: -2px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.brandnav .chip {
  padding: 6px 12px;
  font-size: 13px;
}

.card-name,
.dept-card h3,
.tree-label {
  overflow-wrap: anywhere;
}

/* Department cards */
.dept-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(28, 25, 23, 0.06), 0 16px 36px rgba(28, 25, 23, 0.09);
}

.dept-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: #f3efe6;
}

.dept-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.dept-card:hover .dept-media img {
  transform: scale(1.035);
}

.dept-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 12px 6px 4px;
}

.dept-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.2vw, 21px);
  line-height: 1.2;
}

.dept-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dept-subs {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dept-arrow {
  margin-top: auto;
  padding-top: 6px;
  color: var(--green-700);
  font-size: 13.5px;
  font-weight: 600;
}

.grid.dept-grid {
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
}

.brand-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.brand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(28, 25, 23, 0.06), 0 16px 36px rgba(28, 25, 23, 0.09);
}

.brand-card-initial {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  background: var(--green-900);
  border-radius: 50%;
  color: #f7f3e8;
  font-family: var(--serif);
  font-size: 19px;
}

.brand-card-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
}

.brand-card .dept-arrow {
  margin-top: auto;
}

.empty-action {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .mobile-cats {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-cats::-webkit-scrollbar {
    display: none;
  }

  .mobile-cats .chip {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 10px 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 16px;
    white-space: nowrap;
  }

  .header-actions {
    gap: 4px;
  }

  .cart-button {
    gap: 6px;
    padding: 7px 10px;
  }

  .grid:not(.dept-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    gap: 4px;
    padding: 10px 12px 12px;
  }

  .card-category {
    font-size: 10px;
  }

  .card-name {
    font-size: 14px;
  }

  .card-desc {
    font-size: 12.5px;
  }

  .card-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 8px;
  }

  .price {
    font-size: 14px;
  }

  .add-button {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
  }

  .dept-card {
    padding: 12px;
  }

  .dept-body {
    padding: 10px 4px 2px;
  }

  .subnav {
    gap: 6px;
  }

  .chip {
    padding: 7px 12px;
    font-size: 13px;
  }

  .brandnav .chip {
    font-size: 12.5px;
  }

  .breadcrumb {
    font-size: 12px;
  }
}

/* Saved items and list controls on small screens */
@media (max-width: 380px) {
  .site-header {
    padding: 10px 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .dept-card {
    gap: 6px;
    padding: 5px;
  }

  .dept-media {
    flex-basis: 40px;
    width: 40px;
  }

  .dept-card h3 {
    font-size: 13px;
  }

  .dept-count {
    font-size: 8px;
  }

  .brand-name {
    font-size: 15px;
  }

  .cart-button {
    padding: 6px 8px;
  }
}

@media (max-width: 560px) {
  .header-actions {
    gap: 4px;
  }

  .cart-button > span:not(.cart-count) {
    display: none;
  }

  .list-tools {
    justify-content: flex-start;
  }

  .sort-control select {
    max-width: 180px;
  }

  .size-chip {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12.5px;
  }

  .product-sizes .size-chip {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* Standalone product page (rendered by the Pages Function) */
.product-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px) 64px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}

.product-detail-media {
  overflow: hidden;
  background: #f3efe6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-detail-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.product-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-900);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-brand::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.product-detail-info h1 {
  margin: 6px 0 12px;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.product-detail-info .price {
  display: block;
  margin: 2px 0 14px;
  font-size: 24px;
}

.product-stock {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 4px 10px;
  background: #fee2e2;
  border-radius: 999px;
  color: #991b1b;
  font-size: 12.5px;
  font-weight: 600;
}

.product-stock-note {
  display: inline-block;
  margin-top: 4px;
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 600;
}

.product-detail-desc {
  max-width: 50ch;
  margin: 16px 0 0;
  color: #3f3a36;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 24px 0 10px;
}

.button.order {
  background: var(--green-900);
  color: #fff;
}

.button.order:hover {
  background: var(--green-950);
}

.button.secondary {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--green-900);
}

.save-button svg {
  flex: none;
}

.save-button.is-active {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.save-button.is-active svg {
  fill: currentColor;
}

.share-button svg {
  flex: none;
}

.product-cart-note {
  min-height: 20px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-policy {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.related {
  margin-top: clamp(30px, 5vw, 56px);
}

.related h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.related-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.related-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.related-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f3efe6;
}

.related-card-body {
  display: block;
  padding: 10px 12px 12px;
}

.related-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  color: var(--green-900);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.related-card-brand::before {
  content: "";
  width: 10px;
  height: 1.5px;
  background: var(--amber);
  border-radius: 2px;
}

.related-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.3;
}

.related-card .price {
  font-size: 14px;
}

.header-order {
  padding: 9px 16px;
  background: var(--green-900);
  color: #fff;
  font-size: 14px;
}

.header-order:hover {
  background: var(--green-950);
}

/* Static informational pages */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 40px) 64px;
}

.page h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.page h2 {
  margin: 32px 0 8px;
  font-family: var(--serif);
  font-size: 24px;
}

.page p,
.page li {
  color: #3f3a36;
}

.page .lede {
  color: var(--muted);
  font-size: 17px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.page .button.primary {
  background: var(--green-900);
  color: #fff;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
}

.page-nav a {
  color: var(--green-700);
  text-decoration: none;
}

.page-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 760px) {
  .product-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .page-nav {
    display: none;
  }

  .product-detail-info .price {
    font-size: 21px;
  }
}

/* Compact browsing: cut empty vertical space, not the content people need. */
@media (max-width: 560px) {
  .catalog {
    padding-top: 16px;
  }

  .catalog h2 {
    font-size: 24px;
  }

  .view-subtitle {
    display: none;
  }

  .catalog-head {
    gap: 10px;
    margin-bottom: 10px;
  }

  .breadcrumb {
    margin-bottom: 4px;
  }

  .search input {
    padding: 9px 12px;
  }

  .mobile-cats {
    margin-bottom: 8px;
  }

  .subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .subnav::-webkit-scrollbar {
    display: none;
  }

  .subnav > * {
    flex: 0 0 auto;
  }

  .status {
    margin: 2px 0 10px;
  }

  .list-tools {
    margin-bottom: 10px;
  }

  /* Departments: compact two-column rows with a small thumbnail. */
  .grid.dept-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dept-card {
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding: 7px;
  }

  .dept-media {
    flex: 0 0 46px;
    width: 46px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }

  .dept-media img {
    object-fit: contain;
  }

  .dept-body {
    min-width: 0;
    gap: 2px;
    padding: 0;
  }

  .dept-card h3 {
    font-size: 14px;
    line-height: 1.18;
  }

  .dept-count {
    font-size: 8.5px;
  }

  .dept-subs,
  .dept-arrow {
    display: none;
  }

  /* Product cards: no two-line descriptions on phones; the product page has them. */
  .card-body {
    gap: 4px;
    padding: 8px 10px 10px;
  }

  .card-desc {
    display: none;
  }

  .card-name {
    font-size: 13.5px;
  }

  .card-meta {
    gap: 4px;
  }

  .card-brand {
    font-size: 10.5px;
  }

  .card-category {
    font-size: 9px;
  }

  .card-foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
  }

  .price {
    font-size: 13.5px;
  }

  .add-button {
    width: auto;
    margin-left: auto;
    padding: 7px 12px;
    font-size: 12.5px;
  }

  /* Product page: bring the title and actions up sooner. */
  .product-page {
    padding: 16px 16px 40px;
  }

  .product-detail {
    gap: 16px;
  }

  .product-meta {
    margin-bottom: 4px;
  }

  .product-detail-info h1 {
    margin: 4px 0 8px;
    font-size: 26px;
  }

  .product-detail-desc {
    margin-top: 10px;
  }

  .product-actions {
    gap: 8px;
    margin: 16px 0 6px;
  }

  .related {
    margin-top: 24px;
  }
}

@media (max-width: 380px) {
  .dept-card {
    gap: 6px;
    padding: 5px;
  }

  .dept-media {
    flex-basis: 40px;
    width: 40px;
  }

  .dept-card h3 {
    font-size: 13px;
    overflow-wrap: break-word;
  }

  .dept-count {
    font-size: 8px;
  }
}

/* Direct WhatsApp contact, always visible without taking layout space. */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #25d366;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(11, 61, 44, 0.28);
}

.whatsapp-fab:hover {
  background: #1ebe5d;
}

.whatsapp-fab svg {
  flex: none;
  width: 20px;
  height: 20px;
}

@media (max-width: 560px) {
  .whatsapp-fab {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
  }

  .whatsapp-fab span {
    display: none;
  }

  .site-footer {
    padding-bottom: 84px;
  }
}

/* Six departments fit on one desktop row once the grid is wide enough. */
@media (min-width: 1200px) {
  .grid.dept-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
