/* ================================================================
   KZE Organic Beauty — Shared Shell
   shell.css

   Shared across: homepage, shop, category, product, about, contact

   Contains:
   - Design tokens (:root)
   - CSS reset
   - Layout (.container, .section)
   - Primitive utilities (.label, .btn variants)
   - Announce bar
   - Page shell (.page-shell)
   - Full header
   - Breadcrumb + page intro
   - Section header
   - Collection grid + cards
   - Product listing grid + cards
   - Trust band
   - Full footer
   - Responsive shell rules
   ================================================================ */

/* ── Tokens ───────────────────────────────────────────────────── */

:root {
  --bg: #f5f0e8;
  --bg-soft: #fbf7f0;
  --surface-solid: #fffdfa;
  --text: #1a2e1a;
  --muted: #687266;
  --line: rgba(26, 46, 26, 0.12);
  --gold: #c9a84c;
  --gold-deep: #a78532;
  --green-mid: #2d4a2d;
  --green-light: #3a5a3a;
  --dark: #132113;
  --shadow: 0 24px 60px rgba(17, 27, 17, 0.14);
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --max-w: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.2, 0.9, 0.25, 1);
}

/* ── Reset ────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
ol { margin: 0; padding: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

p { margin: 0; color: var(--muted); }

@keyframes kze-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes kze-soft-scale-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Layout ───────────────────────────────────────────────────── */

.container {
  width: min(100%, var(--max-w));
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding: 5rem 0; }

/* ── Primitives ───────────────────────────────────────────────── */

.label {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding-left: 0.95rem;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
}

.label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.55rem;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease),
              color 180ms var(--ease), border-color 180ms var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 0.88; }

.btn:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-deep); }

.btn--success {
  background: var(--green-mid);
  color: #fff;
}

.btn--success:hover {
  background: var(--green-light);
}

.btn--ghost { border: 1px solid currentColor; color: var(--text); }
.btn--ghost:hover { background: var(--text); color: #fff; }

.btn--ghost-light {
  border: 1px solid currentColor;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.16); }

.btn--sm {
  min-height: 40px;
  padding: 0.6rem 1.1rem;
  font-size: 0.74rem;
}

/* ── Announce bar ─────────────────────────────────────────────── */

.announce-bar {
  position: relative;
  z-index: 20;
  padding: 0.8rem 1rem;
  background:
    linear-gradient(135deg, rgba(19, 33, 19, 0.95), rgba(45, 74, 45, 0.92)),
    #132113;
  color: #f8f2e9;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.announce-bar span {
  margin-inline: 0.5rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Page shell (interior pages — no hero background) ─────────── */

.page-shell {
  background: var(--bg);
  padding-bottom: 0.5rem;
}

/* ── Header ───────────────────────────────────────────────────── */

.header {
  position: relative;
  z-index: 5;
  padding-top: 1rem;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 108px;
  padding-inline: 1.4rem;
  background: #ffffff;
  border: 1px solid rgba(26, 46, 26, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 45px rgba(9, 18, 10, 0.08);
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft),
              border-color 220ms var(--ease-soft);
}

.header__logo,
.footer__logo {
  display: inline-flex;
  align-items: center;
}

.header__logo-image,
.footer__logo-image {
  flex: 0 0 auto;
  object-fit: contain;
}

.header__logo-image--header {
  width: 168px;
  height: 86px;
}

.footer__logo-image--footer {
  width: 124px;
  height: 124px;
  padding: 0.35rem;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.header__nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.header__nav-link,
.header__cart {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 150ms var(--ease);
}

.header__nav-link--active {
  color: var(--gold-deep);
  border-bottom: 1.5px solid var(--gold-deep);
  padding-bottom: 1px;
}

.header__nav-link:hover,
.header__cart:hover {
  color: var(--gold-deep);
}

.header__nav-link:focus-visible,
.header__cart:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 4px;
  border-radius: 4px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.header__cart svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.header__cart-label { display: none; }

.header__cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold-deep);
  color: #fffdfa;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(17, 27, 17, 0.14);
}

.header__cart-count[hidden] {
  display: none !important;
}

.header__burger {
  display: inline-flex;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 999px;
  background: rgba(26, 46, 26, 0.06);
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.header__burger:hover {
  transform: translateY(-1px);
  background: rgba(26, 46, 26, 0.1);
  box-shadow: 0 10px 22px rgba(9, 18, 10, 0.08);
}

.header__burger:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.header__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.header__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { opacity: 0; }
.header__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.header__mobile-nav {
  display: none;
  margin: 0 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(26, 46, 26, 0.12);
  border-radius: 24px;
  background: rgba(245, 240, 232, 0.96);
  backdrop-filter: blur(12px);
  transform-origin: top center;
}

.header__mobile-nav.is-open {
  display: grid;
  gap: 0.8rem;
  animation: kze-fade-up 320ms var(--ease-soft) both;
}

.header__mobile-link {
  padding: 0.75rem 0.25rem;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(26, 46, 26, 0.08);
  transition: color 150ms var(--ease);
}

.header__mobile-link:hover { color: var(--gold-deep); }
.header__mobile-link:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 4px;
  border-radius: 4px;
}
.header__mobile-link:last-child { border-bottom: 0; }

/* ── Breadcrumb ───────────────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.breadcrumb__link {
  color: var(--gold-deep);
  font-weight: 500;
}

.breadcrumb__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb__link:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

.breadcrumb__sep {
  color: var(--line);
  font-size: 0.9rem;
}

/* ── Page intro (interior hero replacement) ───────────────────── */

.page-intro {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(201, 168, 76, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
}

.page-intro__content { max-width: 680px; }

.page-intro__content > * {
  opacity: 0;
  animation: kze-fade-up 760ms var(--ease-soft) forwards;
}

.page-intro__content > *:nth-child(1) { animation-delay: 100ms; }
.page-intro__content > *:nth-child(2) { animation-delay: 180ms; }
.page-intro__content > *:nth-child(3) { animation-delay: 260ms; }

.page-intro__h1 {
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.page-intro__desc {
  font-size: 1rem;
  max-width: 560px;
}

/* ── Section header ───────────────────────────────────────────── */

.section-header {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-header--left {
  margin-inline: 0;
  text-align: left;
}

.section-header h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin-bottom: 0.8rem;
  max-width: 17ch;
}

.section-header p {
  max-width: 42rem;
  margin-inline: auto;
}

.section-header--left p {
  margin-inline: 0;
  max-width: 38rem;
}

/* ── Collection grid + cards ──────────────────────────────────── */

.collections-section { padding-top: 4rem; }

.collection-grid {
  display: grid;
  gap: 1.25rem;
}

.collection-card {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 243, 0.92)),
    var(--surface-solid);
  box-shadow: 0 18px 45px rgba(21, 17, 12, 0.05);
  transition: transform 220ms var(--ease-soft), border-color 220ms var(--ease-soft),
              box-shadow 220ms var(--ease-soft), background-position 220ms var(--ease-soft);
}

.collection-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(167, 133, 50, 0.95), rgba(58, 90, 58, 0.65));
}

.collection-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 133, 50, 0.4);
  box-shadow: 0 22px 50px rgba(21, 17, 12, 0.08);
}

.collection-card__eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--gold-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.collection-card h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}

.collection-card p {
  font-size: 0.9rem;
  line-height: 1.55;
}

.collection-card__count {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.collection-card__count::after {
  content: ' \2192';
}

/* ── Product listing grid + cards ─────────────────────────────── */

.products-section { padding-top: 4.5rem; }

.product-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 240, 0.92)),
    var(--surface-solid);
  box-shadow: 0 18px 45px rgba(21, 17, 12, 0.05);
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft),
              border-color 220ms var(--ease-soft), background-position 220ms var(--ease-soft);
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(167, 133, 50, 0.95), rgba(201, 168, 76, 0.45));
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 133, 50, 0.28);
  box-shadow: 0 24px 56px rgba(21, 17, 12, 0.09);
}

.product-card__image-wrap {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee5da;
}

.product-card__image-wrap:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms var(--ease-soft), filter 260ms var(--ease-soft);
}

.product-card:hover .product-card__image-wrap img {
  transform: scale(1.035);
  filter: saturate(1.03);
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.2rem 1.2rem 0.7rem;
}

.product-card__name {
  margin-bottom: 0.15rem;
  font-size: 1.55rem;
}

.product-card__type {
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.product-card__price {
  margin-top: auto;
  padding-top: 0.35rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.product-card__footer {
  padding: 0 1.2rem 1.2rem;
}

.product-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text);
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.product-card__link:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.product-card__link:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.collection-card:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 4px;
}

/* ── Trust band ───────────────────────────────────────────────── */

.trust-band {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 249, 241, 0.92)),
    var(--surface-solid);
}

.trust-band__grid {
  display: grid;
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1rem 0.85rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft),
              background-color 220ms var(--ease-soft);
}

.trust-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px rgba(21, 17, 12, 0.06);
}

.trust-item__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.trust-item__text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Footer ───────────────────────────────────────────────────── */

.footer {
  padding: 4rem 0 2rem;
  background:
    linear-gradient(135deg, rgba(19, 33, 19, 0.95), rgba(45, 74, 45, 0.92)),
    #132113;
  color: #f6efe6;
}

.footer__top {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer__brand { max-width: 320px; }

.footer__tagline {
  margin-top: 1rem;
  color: rgba(255, 244, 231, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer__col-title {
  margin-bottom: 1rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__nav-list { display: grid; gap: 0.8rem; }

.footer__nav-link,
.footer__legal-link,
.footer__copyright {
  color: rgba(255, 244, 231, 0.72);
  font-size: 0.9rem;
}

.footer__nav-link:hover,
.footer__legal-link:hover {
  color: #f7dca0;
}

.footer__nav-link,
.footer__legal-link {
  transition: color 150ms var(--ease);
}

.footer__nav-link:focus-visible,
.footer__legal-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.footer__bottom {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }

  .header__nav { display: inline-flex; }
  .header__cart-label { display: inline; }
  .header__cart-count {
    position: static;
    top: auto;
    right: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    margin-left: 0.15rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--gold-deep);
    color: #fffdfa;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(17, 27, 17, 0.14);
  }
  .header__burger,
  .header__mobile-nav,
  .header__mobile-nav.is-open { display: none; }

  .page-intro { padding: 4.5rem 0 3rem; }

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

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

  .trust-band__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .trust-item { align-items: center; text-align: center; }
}

@media (min-width: 980px) {
  .section { padding: 6.5rem 0; }

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

@media (max-width: 767px) {
  .section { padding: 4.2rem 0; }

  .header__inner { min-height: 94px; }

  .header__logo-image--header {
    width: 140px;
    height: 72px;
  }

  .footer__logo-image--footer {
    width: 96px;
    height: 96px;
  }

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

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