/* ============================================
   Húnar — Children's Store
   Design system built on OpenProps
   ============================================ */

/* --- Tokens --- */
:root {
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Warm, nurturing palette */
  --sand: #f6f1eb;
  --sand-light: #faf8f5;
  --cream: #fdfcfa;
  --clay: #e8ddd2;
  --bark: #3d3229;
  --bark-light: #5c4f42;
  --sage: #8a9a7b;
  --sage-soft: #e8ede4;
  --blush: #d4a09a;
  --blush-soft: #f3e4e1;
  --sky: #92b4c8;
  --sky-soft: #deeaf1;
  --honey: #d4a843;
  --honey-soft: #f5ecd4;
  --coral: #c76b5a;

  --text: var(--bark);
  --text-muted: var(--bark-light);
  --surface: var(--cream);
  --surface-alt: var(--sand);
  --border: var(--clay);
  --accent: var(--sage);

  --max-w: 1280px;
  --gap: clamp(1rem, 3vw, 2rem);
  --gap-lg: clamp(2rem, 6vw, 5rem);
  --radius: 12px;
  --radius-sm: 6px;
  --radius-full: 100px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul { list-style: none; padding: 0; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.75em;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  background: var(--bark);
  color: var(--cream);

  &:hover {
    background: var(--bark-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px oklch(0.3 0.02 50 / 0.2);
  }

  &.secondary {
    background: transparent;
    color: var(--bark);
    border: 1.5px solid var(--border);

    &:hover {
      border-color: var(--bark);
      transform: translateY(-1px);
    }
  }
}

input {
  font: inherit;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Plain button reset for contextual buttons --- */
.hamburger,
.icon-btn,
.mobile-menu-close,
.search-close,
.cart-item-remove,
.pdp-thumb,
.wishlist-btn,
.quick-add,
.filter-toggle,
.pdp-variant-btn,
.qty-btn,
.mobile-nav button,
.qty-selector button,
.filter-sheet-header button,
.discount-input-row button,
.filter-tabs button {
  padding: 0;
  border-radius: 0;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: normal;
  white-space: normal;
  background: none;
  color: inherit;
  display: revert;
  gap: 0;
  transform: none;
  box-shadow: none;

  &:hover {
    transform: none;
    box-shadow: none;
  }
}

/* --- Button-styled links (CTA contexts) --- */
.hero-actions a,
.editorial-content > a,
.cart-empty > a,
.empty-state > a,
.error-actions > a,
.error-page > a,
.confirmation-actions > a,
.checkout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.75em;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  background: var(--bark);
  color: var(--cream);
  text-decoration: none;

  &:hover {
    background: var(--bark-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px oklch(0.3 0.02 50 / 0.2);
  }

  &.secondary {
    background: transparent;
    color: var(--bark);
    border: 1.5px solid var(--border);

    &:hover {
      border-color: var(--bark);
      background: transparent;
      box-shadow: none;
    }
  }
}

/* --- Announcement bar --- */
[role="banner"][aria-label="Tilboð"] {
  background: var(--bark);
  color: var(--sand);
  text-align: center;
  padding: 0.5rem var(--gap);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Header --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-block-end: 1px solid var(--border);

  & .header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.75rem var(--gap);
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  & .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  & .logo-mark {
    font-size: 1.25rem;
    color: var(--sage);
  }

  & .logo-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.02em;
  }

  & nav {
    flex: 1;
    display: flex;
    justify-content: center;

    & ul {
      display: flex;
      gap: 0.25rem;
    }

    & a {
      display: block;
      padding: 0.5rem 0.75rem;
      font-size: 0.875rem;
      font-weight: 500;
      border-radius: var(--radius-sm);
      transition: background 0.2s;

      &:hover {
        background: var(--surface-alt);
      }
    }
  }

  & .header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  & .icon-btn {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;

    &:hover { background: var(--surface-alt); }
  }

  & .cart-btn {
    position: relative;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;

    &:hover { background: var(--surface-alt); }
  }

  & .cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--sage);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
  }
}

/* --- Main spacing --- */
main {
  & > section {
    max-width: var(--max-w);
    margin-inline: auto;
    padding: var(--gap-lg) var(--gap);
  }
}

/* --- Section heads --- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-block-end: var(--gap);
  gap: 1rem;

  & h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
  }

  & p {
    color: var(--text-muted);
    font-size: 0.9375rem;
  }

  & .section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    white-space: nowrap;

    &:hover { color: var(--text); }
  }
}

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--gap-lg);
  min-height: 70vh;
  padding-block: var(--gap-lg) !important;
}

.hero-content {
  & .hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage);
    margin-block-end: 1rem;
  }

  & h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-block-end: 1.5rem;
  }

  & .hero-sub {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 36ch;
    margin-block-end: 2rem;
  }

  & .hero-actions {
    display: flex;
    gap: 0.75rem;
  }
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-blob {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, var(--blush-soft) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, var(--sage-soft) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 80%, var(--sky-soft) 0%, transparent 50%),
    var(--sand);
  animation: blob-shift 12s ease-in-out infinite alternate;
}

@keyframes blob-shift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 50%; }
  100% { background-position: 100% 100%, 0% 0%, 80% 20%; }
}

/* --- Category grid --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  transition: all 0.4s var(--ease-out);

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px oklch(0.3 0.02 50 / 0.08);

    & .category-image { transform: scale(1.08); }
  }

  & .category-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: oklch(0.92 0.03 var(--hue));
    display: grid;
    place-items: center;
    margin-block-end: 1rem;
    transition: transform 0.4s var(--ease-spring);
    color: oklch(0.4 0.06 var(--hue));
  }

  & h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    margin-block-end: 0.25rem;
  }

  & p {
    font-size: 0.8125rem;
    color: var(--text-muted);
  }

  &.sale {
    background: var(--coral);
    color: white;

    & .category-image {
      background: oklch(0.95 0.04 20);
      color: var(--coral);
    }

    & p { color: oklch(0.9 0.02 20); }
  }
}

/* --- Product grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.product-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out);

  &:hover {
    transform: translateY(-4px);

    & .product-image { transform: scale(1.03); }
    & .quick-add { opacity: 1; transform: translateY(0); }
  }

  & .product-image {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-alt);
    transition: transform 0.5s var(--ease-out);
    position: relative;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }

  & .product-placeholder {
    width: 100%;
    height: 100%;
    background:
      radial-gradient(circle at 40% 50%, oklch(0.9 0.04 var(--hue)) 0%, transparent 70%),
      var(--sand);
  }

  & .sale-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--coral);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.75em;
    border-radius: var(--radius-full);
    z-index: 2;
  }

  & .product-info {
    padding: 0.75rem 0.25rem;
  }

  & .product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sage);
  }

  & h3 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-block: 0.125rem 0.25rem;
    line-height: 1.4;
  }

  & .product-price {
    font-size: 0.9375rem;
    font-weight: 600;

    & del {
      font-weight: 400;
      color: var(--text-muted);
      text-decoration: line-through;
    }

    & ins {
      text-decoration: none;
      color: var(--coral);
    }
  }

  & .quick-add {
    position: absolute;
    bottom: 5rem;
    left: 0.75rem;
    right: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bark);
    color: var(--cream);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s var(--ease-out);

    &:hover { background: var(--bark-light); }
  }
}

/* --- Editorial band --- */
.editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: center;
  background: var(--sage-soft);
  border-radius: var(--radius);
  padding: var(--gap-lg) !important;
  max-width: var(--max-w) !important;
  margin-inline: auto;
}

.editorial-content {
  & .editorial-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage);
    margin-block-end: 0.75rem;
  }

  & h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-block-end: 1rem;
  }

  & p {
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 40ch;
    margin-block-end: 1.5rem;
  }
}

.editorial-visual {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
}

.editorial-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 50%, oklch(0.88 0.05 var(--hue)) 0%, transparent 70%),
    var(--sand);
}

/* --- Brand strip --- */
.brands {
  border-block: 1px solid var(--border);
  padding: 2rem var(--gap) !important;
  max-width: none !important;
  overflow: hidden;
}

.brand-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;

  & span {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.2s;
  }

  & span[aria-hidden] {
    font-size: 0.625rem;
    color: var(--clay);
  }
}

/* --- Newsletter --- */
.newsletter {
  background: var(--bark);
  color: var(--sand);
  border-radius: var(--radius);
  max-width: var(--max-w) !important;
  margin-inline: auto;
}

.newsletter-inner {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;

  & h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 300;
    margin-block-end: 0.5rem;
  }

  & p {
    color: oklch(0.75 0.02 50);
    margin-block-end: 1.5rem;
    font-size: 0.9375rem;
  }

  & form {
    display: flex;
    gap: 0.5rem;
    background: oklch(0.25 0.02 50);
    border-radius: var(--radius-full);
    padding: 0.25rem;
  }

  & input[type="email"] {
    flex: 1;
    padding: 0.75rem 1.25rem;
    color: var(--sand);
    font-size: 0.875rem;

    &::placeholder { color: oklch(0.6 0.02 50); }
  }

  & button {
    background: var(--sage);

    &:hover { background: oklch(0.55 0.08 140); }
  }
}

/* --- Footer --- */
footer {
  background: var(--surface-alt);
  border-block-start: 1px solid var(--border);
  margin-block-start: var(--gap-lg);
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap) var(--gap);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--gap-lg);
}

.footer-brand {
  & .logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    display: block;
    margin-block-end: 0.75rem;
  }

  & p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 28ch;
    margin-block-end: 1.25rem;
  }

  & .social-links {
    display: flex;
    gap: 0.75rem;

    & a {
      color: var(--text-muted);
      transition: color 0.2s;

      &:hover { color: var(--text); }
    }
  }
}

footer nav {
  & h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-block-end: 1rem;
    color: var(--text);
  }

  & a {
    display: block;
    padding-block: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s;

    &:hover { color: var(--text); }
  }
}

.footer-payment {
  & h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-block-end: 0.75rem;
    color: var(--text);

    &:not(:first-child) { margin-block-start: 1.25rem; }
  }

  & .payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  & .payment-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375em 0.75em;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
  }
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--gap) var(--gap);
  border-block-start: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;

  & .lang-label {
    color: var(--text-muted);
  }

  & .lang-current {
    font-weight: 500;
    color: var(--text);
  }

  & .lang-option {
    all: unset;
    cursor: pointer;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;

    &:hover {
      color: var(--text);
    }
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;

    & .hero-visual { display: none; }
  }

  .editorial {
    grid-template-columns: 1fr;

    & .editorial-visual { aspect-ratio: 16/9; }
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
  }

  header nav { display: none; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }

  .newsletter-inner form {
    flex-direction: column;
    border-radius: var(--radius);
    padding: 0.5rem;
  }

  .pdp { grid-template-columns: 1fr; }
  .pdp-thumbnails { flex-direction: row; }
}

/* ============================================
   Category / Catalog page
   ============================================ */

.category-hero {
  padding-block-end: 0 !important;

  & h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-block: 0.5rem;
  }

  & p {
    color: var(--text-muted);
    max-width: 55ch;
    line-height: 1.6;
  }
}

.breadcrumb ol {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  list-style: none;
  padding: 0;

  & li:not(:last-child)::after {
    content: "›";
    margin-inline-start: 0.5rem;
  }

  & a:hover { color: var(--text); }

  & [aria-current] {
    color: var(--text);
    font-weight: 500;
  }
}

.catalog {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--gap-lg);
  padding-block-start: var(--gap) !important;
}

.catalog aside {
  position: sticky;
  top: 5rem;
  align-self: start;
  padding-block-end: 2rem;
}

.filter-group {
  margin-block-end: 1.5rem;
  padding-block-end: 1.5rem;
  border-block-end: 1px solid var(--border);

  & h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-block-end: 0.75rem;
  }

  & label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-block: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;

    &:hover { color: var(--text); }
  }

  & input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;

    &:checked {
      background: var(--sage);
      border-color: var(--sage);
    }
  }

  & .filter-count {
    margin-inline-start: auto;
    font-size: 0.75rem;
    color: var(--clay);
  }
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--gap);
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--border);

  & .result-count {
    font-size: 0.875rem;
    color: var(--text-muted);
  }

  & .sort-select {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;

    & select {
      font: inherit;
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 0.375rem 0.75rem;
      background: var(--surface);
      cursor: pointer;
    }
  }
}

/* --- Mobile filter button (hidden on desktop) --- */
.filter-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;

  &:hover { border-color: var(--bark); }

  & .filter-count-badge {
    background: var(--sage);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    padding: 0 5px;
  }
}

/* --- Filter bottom sheet (mobile) --- */
/* filter-sheet-overlay: hidden by default, Datastar data-show toggles it */
.filter-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.filter-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 201;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  padding-bottom: env(safe-area-inset-bottom);
  pointer-events: none;

  &.open {
    transform: translateY(0);
    pointer-events: auto;
  }
}

.filter-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--clay);
  border-radius: 2px;
  margin: 8px auto 0;
}

.filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gap);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;

  & h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
  }

  & button {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sage);
    padding: 0.5rem;
  }
}

.filter-sheet-body {
  padding: var(--gap);
}

.filter-sheet-actions {
  padding: 0.75rem var(--gap);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--surface);
  display: flex;
  gap: 0.75rem;

  & button { flex: 1; justify-content: center; }
}

@media (max-width: 768px) {
  .catalog {
    grid-template-columns: 1fr;
  }

  .catalog aside {
    display: none;
  }

  .filter-toggle {
    display: inline-flex;
  }

  /* Datastar data-show / data-class handles visibility — no display override needed */

  .catalog-toolbar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* ============================================
   Product detail page (PDP)
   ============================================ */

.pdp-breadcrumb {
  padding-block-end: 0 !important;
  padding-block-start: var(--gap) !important;
}

.pdp {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.pdp-gallery {
  position: sticky;
  top: 5rem;
}

.pdp-main-image {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  margin-block-end: 0.75rem;

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  & .product-placeholder {
    width: 100%;
    height: 100%;
    background:
      radial-gradient(circle at 45% 45%, oklch(0.9 0.04 var(--hue)) 0%, transparent 60%),
      var(--sand);
  }
}

.pdp-thumbnails {
  display: flex;
  gap: 0.5rem;
}

.pdp-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  transition: border-color 0.2s;
  cursor: pointer;
  background: var(--surface-alt);

  &[aria-pressed="true"], &.active {
    border-color: var(--bark);
  }

  &:hover { border-color: var(--clay); }

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  & .product-placeholder {
    width: 100%;
    height: 100%;
    background:
      radial-gradient(circle at 50% 50%, oklch(0.9 0.04 var(--hue)) 0%, transparent 70%),
      var(--sand);
  }
}

.pdp-info {
  & .pdp-brand {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage);
    display: block;
    margin-block-end: 0.5rem;
    transition: color 0.2s;

    &:hover { color: var(--text); }
  }

  & h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-block-end: 0.25rem;
  }

  & .pdp-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-block-end: 1rem;
  }

  & .pdp-price {
    font-size: 1.5rem;
    font-weight: 600;
    margin-block-end: 1.5rem;
    padding-block-end: 1.5rem;
    border-block-end: 1px solid var(--border);
  }

  & .pdp-description {
    margin-block-end: 1.5rem;
    line-height: 1.7;
    color: var(--text-muted);

    & p + p { margin-block-start: 0.75rem; }
  }
}

.pdp-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  margin-block-end: 2rem;
  padding: 1.25rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);

  & dt {
    font-weight: 600;
    color: var(--text);
  }

  & dd { color: var(--text-muted); }
}

.pdp-actions {
  display: flex;
  gap: 0.75rem;
  margin-block-end: 1.5rem;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;

  & .qty-btn {
    width: 40px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 1.125rem;
    transition: background 0.2s;

    &:hover { background: var(--surface-alt); }
  }

  & input {
    width: 44px;
    height: 44px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-inline: 1px solid var(--border);
    -moz-appearance: textfield;

    &::-webkit-inner-spin-button,
    &::-webkit-outer-spin-button { display: none; }
  }
}

.pdp-add-btn {
  flex: 1;
  justify-content: center;
  font-size: 1rem;
  padding-block: 0.875rem;
}

.pdp-trust {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);

  & svg { color: var(--sage); flex-shrink: 0; }
}

/* ============================================
   Cart page
   ============================================ */

.cart-page {
  & h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-block: 0.5rem 1.5rem;
  }
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--gap-lg) var(--gap);
  min-height: 40vh;

  & svg {
    color: var(--clay);
    margin-block-end: 1.5rem;
  }

  & h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    margin-block-end: 0.5rem;
  }

  & p {
    color: var(--text-muted);
    margin-block-end: 1.5rem;
    max-width: 30ch;
  }
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--gap-lg);
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-block-end: 1px solid var(--border);

  &:first-child { padding-block-start: 0; }
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-alt);
}

.cart-item-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, oklch(0.9 0.04 var(--hue)) 0%, transparent 70%),
    var(--sand);
}

.cart-item-details {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.cart-item-brand {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
}

.cart-item-name {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-block: 0.125rem;
}

.cart-item-variant {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;

  & button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    transition: background 0.15s;

    &:hover:not(:disabled) { background: var(--surface-alt); }
    &:disabled { opacity: 0.3; cursor: not-allowed; }
  }

  & span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-inline: 1px solid var(--border);
  }
}

.cart-item-price {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.cart-item-remove {
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;

  &:hover { color: var(--coral); background: oklch(0.95 0.03 20); }
}

/* Cart summary sidebar */
.cart-summary {
  position: sticky;
  top: 5rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1.5rem;

  & h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-block-end: 1rem;
    padding-block-end: 1rem;
    border-block-end: 1px solid var(--border);
  }
}

.cart-totals {
  & > div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
  }

  & dt { color: var(--text-muted); }
  & dd { font-weight: 500; }
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  margin-block: 0.5rem;
  border-block-start: 1px solid var(--border);
  font-size: 1.125rem;
  font-weight: 600;
}

.free-shipping-bar {
  background: var(--honey-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-block: 0.75rem;

  & p {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-block-end: 0.5rem;
  }

  &.achieved {
    background: var(--sage-soft);
    & p { color: var(--sage); margin: 0; }
  }
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}

.cart-discount {
  margin-block: 1rem;

  & label {
    font-size: 0.8125rem;
    font-weight: 500;
    display: block;
    margin-block-end: 0.5rem;
  }
}

.discount-input-row {
  display: flex;
  gap: 0.5rem;

  & input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--surface);

    &:focus { border-color: var(--sage); outline: none; }
  }

  & button {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s;

    &:hover { border-color: var(--bark); }
  }
}

.cart-discount-applied {
  margin-block: 0.75rem;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem 0.375rem 0.75rem;
  background: var(--sage-light, #e8efe5);
  border: 1px solid var(--sage, #a3b899);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.discount-code {
  font-weight: 600;
  color: var(--bark, #5c4a3a);
}

.discount-amount {
  color: var(--success, #2d7a3a);
  font-weight: 500;
}

.discount-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;

  &:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--danger, #c53030);
  }
}

.discount-error {
  margin-block-start: 0.375rem;
  font-size: 0.8125rem;
  color: var(--danger, #c53030);
}

.checkout-btn {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-block-start: 0.5rem;
  padding: 0.875rem;
  font-size: 1rem;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-block-start: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;

  &:hover { color: var(--text); }
}

@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }

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

  .cart-item-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  .cart-item-actions {
    justify-content: space-between;
  }
}

/* --- PDP variant buttons --- */
.pdp-variants {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;

  & legend {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-block-end: 0.75rem;
    color: var(--text);
  }
}

.pdp-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdp-variant-btn {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;

  &:hover { border-color: var(--bark); }

  &.active, &[aria-pressed="true"] {
    border-color: var(--bark);
    background: var(--bark);
    color: var(--cream);
  }

  &:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
  }
}

.related-section {
  border-block-start: 1px solid var(--border);
  margin-block-start: var(--gap-lg);
}

/* active nav state */
[aria-current="page"] {
  background: var(--surface-alt);
  font-weight: 600 !important;
}

@media (max-width: 768px) {
  .pdp {
    grid-template-columns: 1fr;
  }

  .pdp-gallery {
    position: static;
  }
}

/* ============================================
   Brands listing page
   ============================================ */

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

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  transition: all 0.4s var(--ease-out);

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px oklch(0.3 0.02 50 / 0.08);

    & .category-image { transform: scale(1.08); }
  }

  & .category-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: oklch(0.92 0.03 var(--hue));
    display: grid;
    place-items: center;
    margin-block-end: 1rem;
    transition: transform 0.4s var(--ease-spring);
    color: oklch(0.4 0.06 var(--hue));
  }

  & h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    margin-block-end: 0.25rem;
  }

  & p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-block-end: 0.5rem;
  }
}

.brand-product-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sage);
}

@media (max-width: 480px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Brand detail page
   ============================================ */

.brand-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: center;
  padding-block-end: 0 !important;
}

.brand-hero-content {
  & h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-block: 0.5rem 1rem;
  }

  & .brand-description {
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 50ch;
    margin-block-end: 1.5rem;
  }
}

.brand-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.375rem 1.25rem;
  font-size: 0.875rem;
  padding: 1.25rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);

  & dt {
    font-weight: 600;
    color: var(--text);
  }

  & dd { color: var(--text-muted); }
}

.brand-hero-visual {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 768px) {
  .brand-hero {
    grid-template-columns: 1fr;
  }

  .brand-hero-visual {
    aspect-ratio: 16/9;
  }
}

/* ============================================
   Search page
   ============================================ */

.search-hero {
  text-align: center;
  padding-block-end: 0 !important;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto;
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  transition: border-color 0.2s;

  &:focus-within {
    border-color: var(--bark);
  }

  & svg {
    flex-shrink: 0;
    color: var(--text-muted);
  }

  & input[type="search"] {
    flex: 1;
    padding: 0.625rem 0;
    font-size: 1.0625rem;
    color: var(--text);
    background: transparent;

    &::placeholder { color: var(--clay); }
    &::-webkit-search-cancel-button { display: none; }
  }
}

.search-empty {
  text-align: center;
  padding: var(--gap-lg) var(--gap);

  & svg {
    margin: 0 auto 1.5rem;
    color: var(--clay);
  }

  & h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    margin-block-end: 0.5rem;
  }

  & p {
    color: var(--text-muted);
    max-width: 40ch;
    margin: 0 auto 1.5rem;
  }
}

/* ============================================
   404 error page
   ============================================ */

.error-page {
  text-align: center;
  padding-block: var(--gap-lg) !important;

  & .error-display {
    font-family: var(--font-display);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 300;
    line-height: 1;
    color: var(--clay);
    letter-spacing: -0.04em;
    margin-block-end: 1rem;
  }

  & h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-block-end: 0.5rem;
  }

  & .error-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-block-end: 0.75rem;
  }

  & .error-message {
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 45ch;
    margin: 0 auto 2rem;
    line-height: 1.7;
  }

  & search {
    margin-block-end: 2rem;
    display: block;
  }

  & .error-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* ============================================
   Content pages (about, shipping, contact, etc.)
   ============================================ */

.content-page {

  & article {
    max-width: 72ch;
  }

  & article h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-block: 2.5rem 1rem;
  }

  & article h2:first-child {
    margin-block-start: 0;
  }

  & article h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-block: 1.5rem 0.5rem;
  }

  & article p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-block-end: 1rem;
  }

  & article ul,
  & article ol {
    color: var(--text-muted);
    line-height: 1.7;
    margin-block-end: 1rem;
    padding-inline-start: 1.5rem;
    list-style: disc;
  }

  & article ol {
    list-style: decimal;
  }

  & article li + li {
    margin-block-start: 0.375rem;
  }

  & article a {
    color: var(--sage);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 0.2s;

    &:hover { color: var(--text); }
  }

  & article small {
    color: var(--text-muted);
    font-size: 0.8125rem;
  }
}

/* --- Contact page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--gap-lg);
  align-items: start;
}

.contact-form {
  & fieldset {
    border: none;
    padding: 0;
  }

  & legend {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-block-end: 1.5rem;
  }
}

.form-field {
  margin-block-end: 1.25rem;

  & label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-block-end: 0.375rem;
  }

  & input,
  & textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.2s;

    &:focus {
      outline: none;
      border-color: var(--sage);
    }
  }

  & textarea {
    resize: vertical;
    min-height: 120px;
  }
}

.form-link {
  margin-block-start: 0.75rem;
  font-size: 0.875rem;

  & a {
    color: var(--sage);
    text-decoration: underline;
    text-underline-offset: 0.15em;

    &:hover { color: var(--text); }
  }
}

.contact-info {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 2rem;

  & h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-block-end: 1.5rem;
  }

  & dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.25rem;
    font-size: 0.9375rem;
  }

  & dt {
    font-weight: 600;
    color: var(--text);
  }

  & dd {
    color: var(--text-muted);
  }

  & a {
    color: var(--sage);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 0.2s;

    &:hover { color: var(--text); }
  }
}

/* --- Account page --- */
.account-grid {
  max-width: 720px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.account-card {
  & fieldset {
    border: none;
    padding: 0;
  }

  & legend {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-block-end: 1.5rem;
  }

  & button {
    width: 100%;
    justify-content: center;
    margin-block-start: 0.5rem;
  }
}

.account-divider {
  display: flex;
  align-items: center;
  writing-mode: vertical-lr;

  & span {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-block: 1rem;
    position: relative;

    &::before,
    &::after {
      content: "";
      position: absolute;
      left: 50%;
      width: 1px;
      height: 3rem;
      background: var(--border);
    }

    &::before { bottom: 100%; }
    &::after { top: 100%; }
  }
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-divider {
    writing-mode: horizontal-tb;
    justify-content: center;

    & span::before,
    & span::after {
      top: 50%;
      left: auto;
      width: 3rem;
      height: 1px;
    }

    & span::before { right: 100%; left: auto; }
    & span::after { left: 100%; }
    & span { padding-block: 0; padding-inline: 1rem; }
  }
}

/* ============================================
   MOBILE APP-LIKE EXPERIENCE
   ============================================ */

/* --- Hamburger (mobile only) --- */
.hamburger {
  display: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .hamburger { display: grid; place-items: center; }
}

/* --- Mobile bottom nav --- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.375rem 0 calc(0.375rem + env(safe-area-inset-bottom));
  justify-content: space-around;

  & a, & button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s;

    &[aria-current="page"], &:active {
      color: var(--sage);
    }
  }

  & .mobile-nav-badge {
    position: absolute;
    top: 0;
    right: 0.25rem;
    background: var(--coral);
    color: white;
    font-size: 0.5625rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 0 4px;
  }
}

@media (max-width: 768px) {
  .mobile-nav { display: flex; }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* --- Mobile menu overlay --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--surface);
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;

  &[aria-hidden="false"] {
    transform: translateX(0);
  }
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gap);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.mobile-menu-close {
  padding: 0.5rem;
}

.mobile-menu-nav {
  flex: 1;
  padding: 0.5rem 0;

  & a {
    display: flex;
    align-items: center;
    padding: 1rem var(--gap);
    font-size: 1.125rem;
    font-weight: 500;
    border-bottom: 1px solid oklch(0.95 0.01 50);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;

    &:active { background: var(--surface-alt); }

    &.sale-link { color: var(--coral); }
  }
}

.mobile-menu-footer {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  margin-top: auto;

  & a {
    display: block;
    padding: 0.625rem var(--gap);
    font-size: 0.875rem;
    color: var(--text-muted);
  }
}

/* --- Search overlay --- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--surface);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;

  &[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
  }
}

.search-overlay-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.search-overlay-header {
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.search-overlay-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  padding: 0.75rem 1rem;

  & svg {
    flex-shrink: 0;
    color: var(--text-muted);
  }

  & input {
    flex: 1;
    font-size: 1rem;
    color: var(--text);
    background: none;
    border: none;
    outline: none;

    &::placeholder { color: var(--text-muted); }
  }

  & .search-close {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sage);
    white-space: nowrap;
    padding: 0.25rem 0;
  }
}

.search-suggestions {
  padding: 1.5rem 0;
}

.search-section {
  margin-bottom: 2rem;

  & h3 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
  }
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;

  & a {
    padding: 0.5rem 1rem;
    background: var(--surface-alt);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;

    &:hover, &:active {
      background: var(--bark);
      color: var(--cream);
    }
  }
}

.search-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid oklch(0.95 0.01 50);
  font-size: 0.9375rem;
  font-weight: 500;

  & svg { color: var(--text-muted); }
}

/* --- Mobile-optimized header --- */
@media (max-width: 768px) {
  [role="banner"][aria-label="Tilboð"] {
    font-size: 0.6875rem;
    padding: 0.375rem var(--gap);
  }

  header .header-inner {
    padding: 0.5rem var(--gap);
  }

  header .logo img {
    height: 36px;
  }

  header .header-actions {
    margin-left: auto;
  }

  /* Hide cart count on mobile (shown in bottom nav) */
  header .cart-count { display: none; }
}

/* --- Touch-friendly interactions --- */
@media (pointer: coarse) {
  .product-card .quick-add {
    opacity: 1;
    transform: none;
    position: static;
    margin: 0 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
  }

  .category-card {
    padding: 1.5rem 0.75rem;
  }

  .filter-group label {
    padding-block: 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .filter-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  button, a, [role="button"] {
    min-height: 44px;
  }
}

/* --- Pull-to-refresh feel --- */
@media (max-width: 768px) {
  body {
    overscroll-behavior-y: contain;
  }

  main {
    min-height: 100svh;
  }
}

/* ============================================
   CONVERSION & RETENTION FEATURES
   ============================================ */

/* --- Sticky add-to-cart bar (product page mobile) --- */
.sticky-add-bar {
  display: none;
  position: fixed;
  bottom: calc(60px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.75rem var(--gap);
  gap: 0.75rem;
  align-items: center;

  & .sticky-price {
    font-weight: 600;
    font-size: 1.125rem;
    white-space: nowrap;
  }

  & button { flex: 1; justify-content: center; }
}

@media (max-width: 768px) {
  .sticky-add-bar { display: flex; }
}

/* --- Recently viewed strip --- */
.recently-viewed {
  border-top: 1px solid var(--border);
  padding: var(--gap) 0 !important;

  & .rv-track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;

    &::-webkit-scrollbar { display: none; }
  }

  & .rv-item {
    flex: 0 0 120px;
    scroll-snap-align: start;

    & .rv-image {
      aspect-ratio: 1;
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: var(--surface-alt);
      margin-bottom: 0.375rem;
    }

    & .rv-name {
      font-size: 0.75rem;
      font-weight: 500;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    & .rv-price {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
    }
  }
}

/* --- Wishlist heart button --- */
.wishlist-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px oklch(0.3 0.02 50 / 0.1);
  display: grid;
  place-items: center;
  transition: all 0.25s var(--ease-spring);

  & svg { transition: all 0.25s; }

  &:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px oklch(0.3 0.02 50 / 0.15);
  }

  &[aria-pressed="true"] svg {
    fill: var(--coral);
    stroke: var(--coral);
  }
}

/* --- Low stock urgency --- */
.stock-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--coral);
  margin-bottom: 1rem;

  &::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral);
    animation: pulse-dot 1.5s ease-in-out infinite;
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Social proof / reviews snippet --- */
.review-snippet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;

  & .stars {
    color: var(--honey);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
  }

  & .review-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
  }
}

/* --- Free shipping progress bar --- */
.shipping-progress {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;

  & .shipping-progress-text {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;

    & strong { color: var(--sage); }
  }

  & .shipping-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;

    & > span {
      display: block;
      height: 100%;
      background: var(--sage);
      border-radius: 2px;
      transition: width 0.5s var(--ease-out);
    }
  }
}

/* --- Notification toast --- */
.toast {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 400;
  background: var(--bark);
  color: var(--cream);
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 32px oklch(0.2 0.02 50 / 0.2);
  transform: translateX(120%);
  transition: transform 0.4s var(--ease-spring);

  &[aria-live] { transform: translateX(0); }

  & svg { color: var(--sage); flex-shrink: 0; }
}

@media (max-width: 768px) {
  .toast {
    top: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 1rem;
    right: 1rem;
  }
}

/* --- Mobile product grid: 2-col with swipe --- */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-card {
    & .product-image { aspect-ratio: 3/4; }
    & h3 { font-size: 0.8125rem; }
    & .product-price { font-size: 0.8125rem; }
    & .product-brand { font-size: 0.6875rem; }
  }

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

    & .category-card {
      padding: 1.25rem 0.5rem;
    }
  }

  /* Hero mobile */
  .hero {
    min-height: 50svh;
    padding-block-start: 1rem !important;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  /* PDP mobile */
  .pdp-gallery {
    margin-inline: calc(var(--gap) * -1);
    border-radius: 0;
  }

  .pdp-main-image {
    border-radius: 0;
    aspect-ratio: 1;
  }

  .pdp-thumbnails {
    padding-inline: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    &::-webkit-scrollbar { display: none; }
  }

  .pdp-thumb {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .pdp-actions {
    position: static;
  }

  /* Editorial mobile */
  .editorial {
    padding: var(--gap) !important;
    gap: var(--gap);
  }

  .editorial-content h2 {
    font-size: 2rem;
  }

  /* Section heads mobile */
  .section-head {
    flex-wrap: wrap;

    & h2 { font-size: 1.375rem; }
    & p { display: none; }
  }

  /* Brand strip: horizontal scroll */
  .brand-track {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: var(--gap);

    &::-webkit-scrollbar { display: none; }
  }

  /* Newsletter mobile */
  .newsletter-inner {
    & h2 { font-size: 1.5rem; }
  }

  /* Footer mobile: simplified */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    padding: var(--gap);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- iOS safe areas --- */
@supports (padding: env(safe-area-inset-bottom)) {
  .mobile-nav {
    padding-bottom: calc(0.375rem + env(safe-area-inset-bottom));
  }
}

/* --- Smooth scroll snap for horizontal scrolling --- */
.product-grid-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;

  &::-webkit-scrollbar { display: none; }

  & .product-card {
    flex: 0 0 calc(45vw - 1rem);
    scroll-snap-align: start;
  }
}

@media (min-width: 769px) {
  .product-grid-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    overflow: visible;

    & .product-card { flex: auto; }
  }
}

/* ============================================
   Checkout page
   ============================================ */

/* --- Checkout step indicator --- */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 0 2rem;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.15s;

  &.active {
    color: var(--bark);

    & .step-number {
      background: var(--bark);
      color: white;
      border-color: var(--bark);
    }
  }

  &.completed {
    color: var(--sage-dark, #6b8c5e);

    & .step-number {
      background: var(--sage);
      color: white;
      border-color: var(--sage);
    }

    &:hover { color: var(--bark); }
  }
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-divider {
  width: 2rem;
  height: 1px;
  background: var(--border);
  margin: 0 0.5rem;
}

/* --- Checkout layout --- */
.checkout-page {
  max-width: 1080px;
  margin: 0 auto;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
}

/* --- Checkout form --- */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-section {
  padding: 1.75rem 0;
  border-block-end: 1px solid var(--border);

  &:first-child { padding-block-start: 0; }
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-block-end: 1.25rem;
  color: var(--bark);
}

.checkout-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-block-end: 0.375rem;
  color: var(--text-muted);
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9375rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;

  &:focus {
    border-color: var(--sage);
    outline: none;
    box-shadow: 0 0 0 3px var(--sage-soft);
  }

  &::placeholder { color: var(--text-muted); opacity: 0.5; }
}

.field { margin-block-end: 1rem; }
.field:last-child { margin-block-end: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block-end: 1rem;

  &:last-child { margin-block-end: 0; }
}

/* --- Shipping options --- */
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shipping-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;

  &:hover { border-color: var(--bark-light); }

  &:has(input:checked) {
    border-color: var(--sage);
    background: var(--sage-soft);
  }

  & input[type="radio"] {
    width: auto;
    accent-color: var(--sage);
    margin: 0;
  }
}

.shipping-option-content {
  flex: 1;

  & strong {
    display: block;
    font-size: 0.9375rem;
    margin-block-end: 0.125rem;
  }

  & span {
    font-size: 0.8125rem;
    color: var(--text-muted);
  }
}

/* --- Gift card input --- */
.gift-card-input {
  margin-block-end: 1.25rem;

  & input {
    max-width: 280px;
  }
}

.gift-card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gift-card-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Payment methods --- */
.payment-methods {
  padding: 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.payment-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-block-end: 0.75rem;
}

.payment-badges {
  display: flex;
  gap: 0.5rem;

  & span {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25em 0.625em;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
  }
}

/* --- Submit button --- */
.checkout-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  margin-block-start: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.checkout-error {
  color: var(--coral);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  background: color-mix(in oklch, var(--coral), transparent 92%);
  border-radius: var(--radius-sm);
  margin-block-start: 0.5rem;
}

.checkout-secure {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-block-start: 0.75rem;
  letter-spacing: 0.02em;
}

/* --- Order summary sidebar --- */
.checkout-summary {
  position: sticky;
  top: 2rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1.5rem;

  & h2 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    margin-block-end: 1.25rem;
    padding-block-end: 1rem;
    border-block-end: 1px solid var(--border);
  }
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-block-end: 1rem;
  margin-block-end: 1rem;
  border-block-end: 1px solid var(--border);
}

.summary-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.summary-item-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 50%, oklch(0.9 0.04 var(--hue)) 0%, transparent 70%), var(--sand);
}

.summary-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.summary-item-name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
}

.summary-item-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.summary-item-price {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.summary-totals {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.375rem 0;
  font-size: 0.8125rem;

  & dt { color: var(--text-muted); }
  & dd { font-weight: 500; }

  &.discount {
    & dd { color: var(--success, #2d7a3a); }
  }

  &.total {
    font-size: 1.0625rem;
    font-weight: 700;
    padding-block-start: 0.875rem;
    margin-block-start: 0.5rem;
    border-block-start: 1px solid var(--border);

    & dt { color: var(--text); }
  }
}

@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }
  .checkout-steps { padding: 1rem 0 1.5rem; }
  .step-label { display: none; }
}

/* ============================================
   Confirmation page
   ============================================ */

.confirmation-page {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.confirmation-hero {
  padding: var(--gap-lg) 0 var(--gap);
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage);
  display: grid;
  place-items: center;
  margin: 0 auto 1.5rem;
}

.confirmation-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  margin-block-end: 0.5rem;
}

.confirmation-order-number {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-block-end: 0.5rem;
}

.confirmation-details {
  text-align: left;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-block: 1.5rem;
}

.confirmation-items {
  margin-block-end: 1rem;
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-block-end: 1px solid var(--border);

  &:last-child { border: none; }
}

.confirmation-item-name {
  font-weight: 500;
  font-size: 0.9375rem;
}

.confirmation-item-qty {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.confirmation-item-price {
  font-weight: 600;
  font-size: 0.9375rem;
}

.confirmation-total {
  display: flex;
  justify-content: space-between;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--border);
  font-size: 1.125rem;
  font-weight: 600;
}

.confirmation-delivery {
  background: var(--sage-soft);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-block: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;

  & strong { color: var(--sage); }
}

.confirmation-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-block-start: 1.5rem;
}

/* ============================================
   Content pages (about, shipping, contact, terms)
   ============================================ */

.content-page {
  & h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-block: 0.5rem;
  }
}

.content-lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 55ch;
  margin-block-end: 1rem;
}

.content-article {
  max-width: 720px;

  & h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-block: 2rem 0.75rem;
  }

  & h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-block: 1.5rem 0.5rem;
  }

  & p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-block-end: 1rem;
  }

  & ul, & ol {
    color: var(--text-muted);
    line-height: 1.7;
    padding-inline-start: 1.5rem;
    margin-block-end: 1rem;
  }

  & li { margin-block-end: 0.375rem; }
}

/* Contact two-column */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.contact-form {
  & label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-block-end: 0.375rem;
  }

  & input, & textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9375rem;
    background: var(--surface);
    transition: border-color 0.15s;

    &:focus {
      border-color: var(--sage);
      outline: none;
      box-shadow: 0 0 0 3px var(--sage-soft);
    }
  }

  & textarea { min-height: 120px; resize: vertical; }
}

.contact-info {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1.5rem;

  & h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-block-end: 1rem;
  }

  & dl {
    & dt {
      font-size: 0.8125rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--text);
      margin-block-start: 1rem;

      &:first-child { margin-block-start: 0; }
    }

    & dd {
      color: var(--text-muted);
      font-size: 0.9375rem;
      margin-block-start: 0.25rem;
    }
  }
}

/* Shipping info page */
.shipping-options-list {
  & dt {
    font-weight: 600;
    font-size: 1rem;
    margin-block-start: 1.25rem;

    &:first-child { margin-block-start: 0; }
  }

  & dd {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-block-start: 0.25rem;
  }
}

.info-box {
  background: var(--sage-soft);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.9375rem;
  margin-block: 1rem;

  & strong { color: var(--sage); }
}

/* Empty state (reusable) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--gap-lg) var(--gap);

  & p {
    color: var(--text-muted);
    margin-block-end: 1rem;
  }
}

/* Category hero content wrapper */
.category-hero-content {
  /* no special styles needed, just a container */
}

/* Catalog main content area */
.catalog-main {
  min-width: 0;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Gift Card Purchase Page
   ============================================ */

.giftcard-page {
  max-width: 1200px;
  margin-inline: auto;
  padding: 2rem var(--gap);
}

.giftcard-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-block-start: 2rem;
}

.giftcard-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.giftcard-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.6 / 1;
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark, #3a5a3a) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.15);
  position: relative;
  overflow: hidden;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgb(255 255 255 / 0.1) 0%, transparent 60%);
    pointer-events: none;
  }
}

.giftcard-card-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.giftcard-card-label {
  font-size: 0.875rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.giftcard-card-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  text-align: right;
}

.giftcard-form {
  & h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-block-end: 0.25rem;
  }

  & .giftcard-subtitle {
    color: var(--text-muted);
    margin-block-end: 2rem;
    font-size: 1.0625rem;
  }

  & label {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-block-end: 1rem;

    & > span {
      font-size: 0.8125rem;
      font-weight: 500;
      color: var(--text-muted);
    }
  }

  & input, & textarea {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.15s;

    &:focus {
      outline: none;
      border-color: var(--sage);
    }
  }

  & textarea { resize: vertical; }
}

.giftcard-amounts {
  border: none;
  padding: 0;
  margin-block-end: 1.5rem;

  & legend {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-block-end: 0.75rem;
  }
}

.giftcard-amount-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-block-end: 0.75rem;
}

.giftcard-amount-btn {
  padding: 0.75rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;

  &:hover {
    border-color: var(--sage);
    color: var(--sage);
  }

  &.active {
    border-color: var(--sage);
    background: var(--sage-soft);
    color: var(--sage);
    font-weight: 600;
  }
}

.giftcard-custom {
  & input {
    max-width: 200px;
  }
}

.giftcard-recipient {
  margin-block-end: 1.5rem;
}

@media (max-width: 768px) {
  .giftcard-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .giftcard-visual {
    padding: 1rem 0;
  }

  .giftcard-amount-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
