/* ========================================================================== */
/* 01. DESIGN TOKENS AND RESET                                                */
/* ========================================================================== */
:root {
  --ink: #232622;
  --ink-soft: #414741;
  --muted: #6f766f;
  --canvas: #f1f0ec;
  --canvas-deep: #e4e5df;
  --paper: rgba(255, 255, 255, 0.68);
  --paper-strong: rgba(255, 255, 255, 0.84);
  --line: rgba(45, 52, 46, 0.12);
  --line-light: rgba(255, 255, 255, 0.66);
  --sage: #8f9c8e;
  --sage-deep: #687568;
  --mist: #cfd8d4;
  --stone: #d9d1c5;
  --sand: #e6ddcf;
  --shadow-sm: 0 12px 30px rgba(48, 55, 49, 0.08);
  --shadow-md: 0 24px 60px rgba(48, 55, 49, 0.13);
  --shadow-lg: 0 38px 100px rgba(37, 44, 39, 0.17);
  --radius-sm: 16px;
  --radius-md: 26px;
  --radius-lg: 42px;
  --max: 1240px;
  --font-body: "DM Sans", sans-serif;
  --font-display: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(207, 216, 212, 0.72), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(230, 221, 207, 0.78), transparent 36rem),
    linear-gradient(145deg, #f7f6f2 0%, var(--canvas) 48%, #e9ece8 100%);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(rgba(42, 48, 43, 0.13) 0.6px, transparent 0.6px);
  background-size: 14px 14px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
  z-index: -2;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.035em; }
button, a { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,.77), rgba(255,255,255,.48));
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  backdrop-filter: blur(22px) saturate(120%);
}
.ambient { position: fixed; border-radius: 50%; filter: blur(7px); pointer-events: none; z-index: -1; opacity: .55; }
.ambient-one { width: 28rem; height: 28rem; right: -10rem; top: 7rem; background: rgba(199, 212, 204, .56); animation: floatAmbient 15s ease-in-out infinite alternate; }
.ambient-two { width: 24rem; height: 24rem; left: -8rem; bottom: 3rem; background: rgba(226, 215, 199, .68); animation: floatAmbient 18s ease-in-out infinite alternate-reverse; }

/* ========================================================================== */
/* 02. GLOBAL CONTROLS                                                        */
/* ========================================================================== */
.primary-button, .secondary-button, .quiet-button, .bag-button, .icon-button, .menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.primary-button {
  padding: .85rem 1.25rem;
  color: white;
  background: linear-gradient(135deg, var(--ink-soft), var(--sage-deep));
  border: 0;
  box-shadow: 0 13px 26px rgba(63, 74, 66, .24);
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 17px 34px rgba(63, 74, 66, .31); }
.secondary-button, .quiet-button {
  padding: .8rem 1.15rem;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
}
.secondary-button:hover, .quiet-button:hover { transform: translateY(-2px); background: rgba(255,255,255,.86); }
.quiet-button { box-shadow: none; border-color: var(--line); }
.danger-button { color: #5f3535; border-color: rgba(95,53,53,.2); background: rgba(246,235,233,.75); }
.eyebrow { margin-bottom: .85rem; font-size: .74rem; font-weight: 700; letter-spacing: .16em; color: var(--sage-deep); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.7rem); }
.section-heading p { max-width: 35rem; margin: .8rem 0 0; color: var(--muted); }
.section-link { color: var(--sage-deep); font-weight: 700; white-space: nowrap; }
.section-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.empty-state { max-width: 720px; margin: 4rem auto; padding: 4rem 2rem; border-radius: var(--radius-lg); text-align: center; }
.empty-state span { display: block; margin-bottom: 1rem; font-size: 2.4rem; }
.empty-state h1, .empty-state h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
.empty-state p { color: var(--muted); }

/* ========================================================================== */
/* 03. HEADER AND NAVIGATION                                                  */
/* ========================================================================== */
.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: min(calc(100% - 28px), var(--max));
  min-height: 72px;
  margin: 14px auto 0;
  padding: .72rem .8rem .72rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-radius: 999px;
}
.brand { display: inline-flex; align-items: center; gap: .75rem; width: max-content; font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: white; background: linear-gradient(145deg, #444a44, #8b988b); box-shadow: 0 9px 20px rgba(48,55,49,.24); font-size: .78rem; letter-spacing: .08em; }
.main-nav { display: flex; align-items: center; gap: 1.65rem; }
.main-nav a { color: var(--muted); font-size: .9rem; font-weight: 600; }
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: .45rem; }
.icon-button, .menu-button { padding: .62rem .78rem; border: 0; background: transparent; font-size: .82rem; }
.icon-button:hover, .menu-button:hover { background: rgba(255,255,255,.66); }
.count-link span, .bag-button span { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 .3rem; border-radius: 99px; font-size: .7rem; }
.count-link span { background: rgba(104,117,104,.12); }
.bag-button { padding: .68rem .72rem .68rem 1rem; color: white; background: var(--ink); font-size: .84rem; }
.bag-button span { background: rgba(255,255,255,.16); }
.menu-button { display: none; }

/* ========================================================================== */
/* 04. HOME HERO                                                              */
/* ========================================================================== */
#app { min-height: 68vh; }
.hero { width: min(calc(100% - 28px), var(--max)); margin: 2rem auto 0; }
.hero-card {
  position: relative;
  min-height: min(720px, calc(100vh - 125px));
  padding: clamp(2rem, 7vw, 6.4rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: clamp(28px, 5vw, 58px);
  background: #303631;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(27,31,28,.86) 2%, rgba(35,40,36,.42) 55%, rgba(35,40,36,.1)), linear-gradient(0deg, rgba(23,27,24,.62), transparent 55%); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(.48) contrast(.92) brightness(.96); transform: scale(1.015); animation: heroBreathe 16s ease-in-out infinite alternate; }
.hero-copy { max-width: 720px; color: white; animation: riseIn .85s ease both; }
.hero-copy .eyebrow { color: #d7ded8; }
.hero-copy h1 { margin-bottom: 1.25rem; font-size: clamp(3.4rem, 9vw, 7.3rem); line-height: .93; letter-spacing: -.07em; }
.hero-copy p { max-width: 37rem; margin-bottom: 2rem; color: rgba(255,255,255,.77); font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-actions .primary-button { color: var(--ink); background: rgba(255,255,255,.92); }
.hero-actions .secondary-button { color: white; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); backdrop-filter: blur(14px); }
.hero-note { position: absolute; right: 3rem; top: 3rem; width: 165px; padding: 1.1rem; border-radius: 24px; color: white; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(18px); box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.hero-note strong { display: block; font-family: var(--font-display); font-size: 1.8rem; }
.hero-note small { color: rgba(255,255,255,.7); }

/* ========================================================================== */
/* 05. HOME SECTIONS                                                          */
/* ========================================================================== */
.content-section { width: min(calc(100% - 40px), var(--max)); margin: clamp(5rem, 11vw, 9rem) auto; }
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding: 1px; overflow: hidden; border-radius: var(--radius-md); }
.trust-strip article { padding: 1.45rem 1.6rem; background: rgba(255,255,255,.44); }
.trust-strip strong { display: block; font-family: var(--font-display); }
.trust-strip span { color: var(--muted); font-size: .85rem; }
.store-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.2rem; }
.store-card {
  position: relative;
  grid-column: span 4;
  min-height: 320px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255,255,255,.72), var(--store-tone, rgba(207,216,212,.54)));
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.store-card:nth-child(1), .store-card:nth-child(5) { grid-column: span 5; }
.store-card:nth-child(2), .store-card:nth-child(4) { grid-column: span 4; }
.store-card:nth-child(3) { grid-column: span 3; }
.store-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -65px; top: -65px; background: rgba(255,255,255,.44); filter: blur(2px); transition: transform .5s ease; }
.store-card:hover { transform: translateY(-8px) rotateX(1deg); box-shadow: var(--shadow-lg); }
.store-card:hover::before { transform: scale(1.2) translate(-10px, 10px); }
.store-rank { position: relative; display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.store-monogram { position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.76); box-shadow: var(--shadow-md); font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; }
.store-card h3 { position: relative; margin: 0 0 .5rem; font-size: 1.7rem; }
.store-card p { position: relative; margin: 0; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.product-card { min-width: 0; }
.product-visual {
  position: relative;
  aspect-ratio: 4/5;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255,255,255,.7), var(--product-tone, var(--mist)));
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: var(--shadow-sm);
  transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s ease;
}
.product-card:hover .product-visual { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.product-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.product-card:hover .product-visual img { transform: scale(1.045); }
.garment-shape { width: 58%; height: 58%; background: linear-gradient(145deg, rgba(54,60,55,.96), rgba(100,111,101,.92)); clip-path: polygon(22% 0, 38% 8%, 62% 8%, 78% 0, 100% 18%, 85% 38%, 75% 29%, 77% 100%, 23% 100%, 25% 29%, 15% 38%, 0 18%); filter: drop-shadow(0 28px 26px rgba(44,50,45,.23)); transition: transform .45s ease; }
.product-card:hover .garment-shape { transform: translateY(-5px) rotate(-1.2deg) scale(1.025); }
.product-badges { position: absolute; inset: 1rem 1rem auto; display: flex; justify-content: space-between; gap: .5rem; }
.product-badges span { padding: .42rem .65rem; border-radius: 99px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); font-size: .68rem; font-weight: 700; }
.wish-button { position: absolute; right: 1rem; bottom: 1rem; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.74); border-radius: 50%; background: rgba(255,255,255,.65); box-shadow: var(--shadow-sm); cursor: pointer; backdrop-filter: blur(12px); }
.wish-button.active { color: white; background: var(--sage-deep); }
.product-info { padding: 1rem .2rem 0; }
.product-info small { color: var(--muted); }
.product-title-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: .25rem; }
.product-title-row h3 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.product-title-row strong { font-size: .9rem; white-space: nowrap; }
.story-panel { display: grid; grid-template-columns: 1fr 1fr; min-height: 500px; overflow: hidden; border-radius: var(--radius-lg); }
.story-panel > div { padding: clamp(2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; }
.story-panel h2 { font-size: clamp(2.5rem, 6vw, 5rem); }
.story-panel p { max-width: 35rem; color: var(--muted); }
.story-art { position: relative; background: linear-gradient(145deg, var(--mist), var(--sand)); overflow: hidden; }
.story-art::before, .story-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.46); box-shadow: var(--shadow-lg); }
.story-art::before { width: 280px; height: 280px; top: 12%; left: 14%; }
.story-art::after { width: 180px; height: 180px; bottom: 10%; right: 11%; }
.story-art span { position: relative; z-index: 2; display: grid; place-items: center; width: 180px; height: 180px; margin: auto; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--ink-soft), var(--sage)); box-shadow: var(--shadow-lg); font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; }

/* ========================================================================== */
/* 06. CATALOGUE, STORE AND PRODUCT PAGES                                     */
/* ========================================================================== */
.page-hero { width: min(calc(100% - 40px), var(--max)); margin: clamp(4rem, 8vw, 7rem) auto 2rem; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; }
.page-hero h1 { margin-bottom: .8rem; font-size: clamp(3.1rem, 9vw, 7rem); }
.page-hero p { max-width: 42rem; color: var(--muted); font-size: 1.08rem; }
.filter-row { width: min(calc(100% - 40px), var(--max)); margin: 0 auto 2rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.filter-row button { padding: .7rem 1rem; border: 1px solid var(--line-light); border-radius: 99px; background: rgba(255,255,255,.48); cursor: pointer; }
.filter-row button.active { color: white; background: var(--ink-soft); box-shadow: var(--shadow-sm); }
.catalogue-section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto 7rem; }
.store-page-banner { width: min(calc(100% - 28px), var(--max)); min-height: 440px; margin: 2rem auto 4rem; padding: clamp(2rem, 7vw, 5rem); display: flex; align-items: flex-end; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--mist), var(--sand)); box-shadow: var(--shadow-lg); overflow: hidden; position: relative; }
.store-page-banner::after { content: attr(data-mark); position: absolute; right: 5%; top: -7%; color: rgba(255,255,255,.34); font: 800 clamp(10rem, 27vw, 24rem)/1 var(--font-display); }
.store-page-banner div { position: relative; z-index: 2; max-width: 710px; }
.store-page-banner h1 { font-size: clamp(3.5rem, 10vw, 8rem); }
.store-page-banner p { max-width: 42rem; font-size: 1.1rem; color: var(--ink-soft); }
.product-detail { width: min(calc(100% - 40px), var(--max)); margin: 3rem auto 7rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.product-detail-visual { aspect-ratio: 4/5; border-radius: var(--radius-lg); }
.product-detail-copy { position: sticky; top: 115px; padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius-md); }
.product-detail-copy h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.product-detail-price { font-size: 1.25rem; font-weight: 700; }
.product-detail-copy > p { color: var(--muted); }
.option-group { margin: 1.5rem 0; }
.option-group > span { display: block; margin-bottom: .65rem; font-size: .78rem; font-weight: 700; letter-spacing: .08em; }
.option-list { display: flex; flex-wrap: wrap; gap: .55rem; }
.option-list label { cursor: pointer; }
.option-list input { position: absolute; opacity: 0; }
.option-list span { display: block; padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.54); }
.option-list input:checked + span { color: white; background: var(--ink-soft); }
.detail-actions { display: grid; grid-template-columns: 1fr auto; gap: .7rem; margin-top: 1.6rem; }
.detail-actions button { min-height: 52px; }

/* ========================================================================== */
/* 07. CART, CHECKOUT AND ACCOUNT                                             */
/* ========================================================================== */
.commerce-layout { width: min(calc(100% - 40px), var(--max)); margin: 4rem auto 7rem; display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 2rem; align-items: start; }
.commerce-main, .order-summary, .account-panel { padding: clamp(1.25rem, 4vw, 2.4rem); border-radius: var(--radius-md); }
.commerce-main h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.cart-line { display: grid; grid-template-columns: 110px 1fr auto; gap: 1.2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.cart-thumb { aspect-ratio: 1; border-radius: var(--radius-sm); background: linear-gradient(145deg, var(--mist), var(--sand)); box-shadow: var(--shadow-sm); }
.cart-line h3 { margin-bottom: .3rem; }
.cart-line p, .cart-line small { color: var(--muted); }
.line-controls { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.line-controls button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.7); cursor: pointer; }
.remove-line { width: auto !important; padding: 0 .7rem; border-radius: 99px !important; }
.order-summary { position: sticky; top: 110px; }
.summary-line { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; color: var(--muted); }
.summary-total { margin-top: .7rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 1.12rem; }
.order-summary .primary-button { width: 100%; margin-top: 1.2rem; }
.stack-form { display: grid; gap: 1rem; }
.stack-form label { display: grid; gap: .42rem; color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.stack-form input, .stack-form select, .stack-form textarea, .field {
  width: 100%;
  min-height: 48px;
  padding: .8rem .95rem;
  color: var(--ink);
  background: rgba(255,255,255,.66);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(49,55,50,.04);
}
.stack-form textarea { min-height: 110px; resize: vertical; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .field:focus { border-color: rgba(104,117,104,.52); box-shadow: 0 0 0 4px rgba(143,156,142,.12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-message { min-height: 1.4rem; margin: 0; color: var(--sage-deep); font-size: .85rem; }
.account-layout { width: min(calc(100% - 40px), var(--max)); margin: 4rem auto 7rem; display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; }
.account-nav { padding: 1rem; border-radius: var(--radius-md); height: max-content; }
.account-nav button { width: 100%; padding: .8rem 1rem; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.account-nav button.active { background: rgba(255,255,255,.66); box-shadow: var(--shadow-sm); }
.account-panel h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.2rem; margin-top: .8rem; border: 1px solid var(--line-light); border-radius: var(--radius-sm); background: rgba(255,255,255,.42); }
.status-pill { display: inline-flex; align-items: center; width: max-content; padding: .36rem .62rem; border-radius: 99px; background: rgba(143,156,142,.16); color: var(--sage-deep); font-size: .68rem; font-weight: 700; text-transform: capitalize; }

/* ========================================================================== */
/* 08. SEARCH DIALOG AND TOASTS                                               */
/* ========================================================================== */
.search-dialog { width: min(calc(100% - 30px), 760px); max-height: 80vh; padding: 1.4rem; border: 0; border-radius: var(--radius-md); color: var(--ink); }
.search-dialog::backdrop { background: rgba(39,44,40,.35); backdrop-filter: blur(8px); }
.dialog-close-row { display: flex; justify-content: flex-end; }
.dialog-close-row button { border: 0; background: transparent; cursor: pointer; }
.search-dialog > label { display: block; margin: 1rem 0 .5rem; font: 700 clamp(1.7rem,5vw,3rem)/1.1 var(--font-display); }
.search-dialog > input { width: 100%; padding: 1rem 0; border: 0; border-bottom: 1px solid var(--line); outline: none; background: transparent; font-size: 1.1rem; }
.search-results { display: grid; gap: .6rem; margin-top: 1rem; overflow: auto; }
.search-result { display: grid; grid-template-columns: 52px 1fr auto; gap: .8rem; align-items: center; padding: .65rem; border-radius: 13px; }
.search-result:hover { background: rgba(255,255,255,.58); }
.search-result span:first-child { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--mist); font-weight: 700; }
.toast { position: fixed; z-index: 100; right: 1.2rem; bottom: 1.2rem; max-width: min(360px, calc(100% - 2.4rem)); padding: .9rem 1rem; border-radius: 16px; transform: translateY(130%); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

/* ========================================================================== */
/* 09. FOOTER                                                                 */
/* ========================================================================== */
.site-footer { width: min(calc(100% - 28px), var(--max)); margin: 0 auto 1rem; }
.footer-main { padding: clamp(1.6rem, 5vw, 3rem); display: grid; grid-template-columns: 1.4fr .55fr .55fr 1.2fr; gap: 2rem; border-radius: var(--radius-lg); }
.footer-main > div:first-child p { max-width: 22rem; margin-top: 1rem; color: var(--muted); }
.footer-main h2 { margin-bottom: .8rem; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-main > div:not(:first-child) { display: flex; flex-direction: column; gap: .55rem; }
.footer-main a:not(.brand) { color: var(--muted); font-size: .88rem; }
.newsletter-form div { display: flex; padding: .35rem; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--line-light); }
.newsletter-form input { min-width: 0; flex: 1; padding: .6rem .8rem; border: 0; outline: 0; background: transparent; }
.newsletter-form button { padding: .6rem .9rem; color: white; border: 0; border-radius: 99px; background: var(--ink-soft); cursor: pointer; }
.newsletter-form small { display: block; margin-top: .55rem; color: var(--muted); }
.footer-bottom { display: flex; justify-content: space-between; padding: 1.2rem .5rem .2rem; color: var(--muted); font-size: .76rem; }

/* ========================================================================== */
/* 10. AUTHENTICATION                                                         */
/* ========================================================================== */
.auth-body { display: grid; place-items: center; padding: 1rem; }
.auth-layout { width: min(100%, 1080px); min-height: calc(100vh - 2rem); display: grid; grid-template-columns: 1fr minmax(360px, 500px); align-items: center; gap: 4rem; }
.auth-brand { justify-self: center; font-size: clamp(2rem,5vw,4rem); }
.auth-brand .brand-mark { width: 70px; height: 70px; font-size: 1.1rem; }
.auth-card { padding: clamp(1.6rem,5vw,3.2rem); border-radius: var(--radius-lg); }
.auth-card h1 { margin-bottom: .7rem; font-size: clamp(2.7rem,6vw,4.4rem); }
.auth-intro > p:last-child { color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 1.7rem 0; padding: .3rem; border-radius: 14px; background: rgba(63,70,64,.06); }
.auth-tabs button { padding: .7rem; border: 0; border-radius: 11px; background: transparent; cursor: pointer; }
.auth-tabs button.active { background: rgba(255,255,255,.8); box-shadow: var(--shadow-sm); }
.quiet-link { display: inline-block; margin-top: 1.5rem; color: var(--muted); font-size: .85rem; }

/* ========================================================================== */
/* 11. ADMIN AND VENDOR PORTALS                                               */
/* ========================================================================== */
.portal-body { background: linear-gradient(145deg, #eef0ed, #e7e5df); }
.portal-gate { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 1rem; }
.portal-layout { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; gap: 1rem; padding: 1rem; }
.portal-sidebar { position: sticky; top: 1rem; height: calc(100vh - 2rem); padding: 1.2rem; display: flex; flex-direction: column; border-radius: var(--radius-md); }
.portal-sidebar > div:nth-child(2) { margin: 2rem 0 1.2rem; padding: 1rem; border-radius: 16px; background: rgba(255,255,255,.4); }
.portal-sidebar small { display: block; color: var(--muted); font-size: .65rem; letter-spacing: .12em; }
.portal-sidebar strong { display: block; margin-top: .25rem; overflow: hidden; text-overflow: ellipsis; }
.portal-sidebar nav { display: grid; gap: .35rem; }
.portal-sidebar nav button { padding: .75rem .9rem; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.portal-sidebar nav button:hover, .portal-sidebar nav button.active { background: rgba(255,255,255,.68); box-shadow: var(--shadow-sm); }
.portal-sidebar-bottom { margin-top: auto; display: grid; gap: .45rem; }
.portal-sidebar-bottom a, .portal-sidebar-bottom button { padding: .7rem .85rem; border: 0; border-radius: 12px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.portal-main { min-width: 0; padding: clamp(1rem,4vw,3rem); }
.portal-mobile-header { display: none; }
.dashboard-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.dashboard-header h1 { margin-bottom: .5rem; font-size: clamp(2.8rem,7vw,5rem); }
.dashboard-header p { max-width: 42rem; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.stat-card { padding: 1.35rem; border-radius: var(--radius-sm); background: rgba(255,255,255,.58); border: 1px solid var(--line-light); box-shadow: var(--shadow-sm); }
.stat-card span { color: var(--muted); font-size: .78rem; }
.stat-card strong { display: block; margin: .45rem 0; font: 700 clamp(1.5rem,3vw,2.2rem)/1 var(--font-display); }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; margin-top: 1rem; }
.dashboard-panel { padding: 1.35rem; border-radius: var(--radius-md); background: rgba(255,255,255,.55); border: 1px solid var(--line-light); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: 0; font-size: 1.35rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .75rem; color: var(--muted); font-size: .7rem; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.data-table td { padding: .85rem .75rem; border-top: 1px solid var(--line); font-size: .86rem; }
.data-table tbody tr:hover { background: rgba(255,255,255,.36); }
.table-scroll { overflow-x: auto; }
.table-action { padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.55); cursor: pointer; white-space: nowrap; }
.dashboard-form { max-width: 780px; }
.dashboard-form-actions { display: flex; gap: .7rem; margin-top: .5rem; }
.portal-alert { max-width: 620px; margin: 15vh auto; padding: 2rem; border-radius: var(--radius-md); text-align: center; }
.store-selector { max-width: 320px; }

/* ========================================================================== */
/* 12. LOADING AND MOTION                                                     */
/* ========================================================================== */
.loading-state { min-height: 65vh; display: grid; place-items: center; align-content: center; gap: 1rem; color: var(--muted); }
.loading-orbit { width: 42px; height: 42px; display: block; border: 2px solid rgba(104,117,104,.16); border-top-color: var(--sage-deep); border-radius: 50%; animation: spin .8s linear infinite; }
.reveal { animation: riseIn .6s ease both; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroBreathe { from { transform: scale(1.015); } to { transform: scale(1.07); } }
@keyframes floatAmbient { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-2rem,2rem,0) scale(1.1); } }

/* ========================================================================== */
/* 13. RESPONSIVE RULES                                                       */
/* ========================================================================== */
@media (max-width: 1050px) {
  .main-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; padding: 1rem; flex-direction: column; border-radius: 22px; background: rgba(248,248,245,.94); box-shadow: var(--shadow-md); backdrop-filter: blur(20px); }
  .main-nav.open { display: flex; }
  .site-header { grid-template-columns: 1fr auto; }
  .menu-button { display: inline-flex; }
  .header-actions .icon-button:nth-child(1), .header-actions .count-link { display: none; }
  .store-card, .store-card:nth-child(n) { grid-column: span 6; }
  .product-grid { grid-template-columns: repeat(3,1fr); }
  .footer-main { grid-template-columns: 1.2fr .7fr .7fr; }
  .newsletter-form { grid-column: 1 / -1; max-width: 520px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .hero-note { display: none; }
  .hero-card { min-height: 630px; }
  .trust-strip { grid-template-columns: 1fr; }
  .story-panel { grid-template-columns: 1fr; }
  .story-art { min-height: 330px; }
  .product-grid { grid-template-columns: repeat(2,1fr); }
  .product-detail, .commerce-layout, .account-layout { grid-template-columns: 1fr; }
  .product-detail-copy, .order-summary { position: static; }
  .account-nav { display: flex; overflow-x: auto; }
  .account-nav button { width: auto; white-space: nowrap; }
  .auth-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .auth-brand { margin: 1.5rem auto 0; font-size: 1.3rem; }
  .auth-brand .brand-mark { width: 45px; height: 45px; }
  .portal-layout { display: block; padding: .6rem; }
  .portal-sidebar { position: fixed; z-index: 50; inset: .6rem auto .6rem .6rem; width: min(290px, calc(100% - 1.2rem)); height: auto; transform: translateX(-110%); transition: transform .3s ease; }
  .portal-sidebar.open { transform: translateX(0); }
  .portal-main { padding: .3rem; }
  .portal-mobile-header { position: sticky; top: .6rem; z-index: 40; display: flex; justify-content: space-between; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 18px; }
  .portal-mobile-header button { border: 0; background: transparent; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-header { width: calc(100% - 16px); top: 8px; margin-top: 8px; padding-left: .72rem; }
  .brand > span:last-child { font-size: .9rem; }
  .header-actions #account-link { display: none; }
  .hero { width: calc(100% - 16px); margin-top: 1rem; }
  .hero-card { min-height: 590px; padding: 1.5rem; border-radius: 28px; }
  .hero-copy h1 { font-size: clamp(3.1rem,18vw,5rem); }
  .content-section, .page-hero, .filter-row, .catalogue-section, .product-detail, .commerce-layout, .account-layout { width: calc(100% - 24px); }
  .content-section { margin: 5rem auto; }
  .section-heading { align-items: start; flex-direction: column; }
  .store-card, .store-card:nth-child(n) { grid-column: 1 / -1; min-height: 280px; }
  .product-grid { gap: .8rem; }
  .product-info { font-size: .86rem; }
  .product-title-row { display: block; }
  .product-title-row strong { display: block; margin-top: .25rem; }
  .page-hero { display: block; }
  .page-hero h1 { font-size: 3.4rem; }
  .cart-line { grid-template-columns: 76px 1fr; }
  .cart-line > strong { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; border-radius: 28px; }
  .footer-main > div:first-child, .newsletter-form { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: .4rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .dashboard-header { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.portal-gate[hidden],
.portal-layout[hidden] {
  display: none !important;
}

/* =========================================================
   CUSTOMER ACCOUNT — SAVED ADDRESS CARDS
   ========================================================= */

.account-panel .order-card {
  align-items: center;
  gap: 1.5rem;
}

.account-panel .order-card > div:first-child {
  flex: 1;
  min-width: 0;
}

.account-panel .order-card > div:first-child > p {
  margin-bottom: 1rem;
}

/* Edit / Delete container */
.account-panel .line-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

/* Reset the generic table button styling */
.account-panel [data-edit-address],
.account-panel [data-delete-address] {
  appearance: none;
  min-width: 76px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

/* Edit */
.account-panel [data-edit-address] {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(27, 32, 29, 0.16);
  color: var(--ink, #202521);
}

.account-panel [data-edit-address]:hover {
  background: #ffffff;
  border-color: rgba(27, 32, 29, 0.35);
  transform: translateY(-1px);
}

/* Delete */
.account-panel [data-delete-address] {
  background: transparent;
  border: 1px solid rgba(27, 32, 29, 0.12);
  color: rgba(27, 32, 29, 0.62);
}

.account-panel [data-delete-address]:hover {
  background: rgba(27, 32, 29, 0.05);
  border-color: rgba(27, 32, 29, 0.28);
  color: var(--ink, #202521);
  transform: translateY(-1px);
}

/* Fix Saved / Default badge */
.account-panel .order-card .status-pill {
  flex: 0 0 auto;
  width: auto;
  min-width: 76px;
  height: auto;
  min-height: 38px;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

/* Active press */
.account-panel [data-edit-address]:active,
.account-panel [data-delete-address]:active {
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 650px) {
  .account-panel .order-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .account-panel .line-controls {
    width: 100%;
  }

  .account-panel [data-edit-address],
  .account-panel [data-delete-address] {
    flex: 1;
    min-width: 0;
    text-align: center;
  }

  .account-panel .order-card .status-pill {
    align-self: flex-start;
  }
}

/* =========================================================
   MOBILE HEADER — KEEP DESKTOP FEATURES AVAILABLE
   ========================================================= */

/*
   Existing responsive CSS hides:
   - search
   - Saved / Wishlist
   - Sign in / Account

   These overrides bring them back while keeping
   the compact mobile design.
*/

@media (max-width: 1050px) {

  /* Restore search */
  .header-actions .icon-button:nth-child(1) {
    display: inline-flex !important;
  }

  /* Restore Saved / Wishlist */
  .header-actions .count-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.48rem 0.58rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Make account link behave like a proper header control */
  .header-actions #account-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.48rem 0.58rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .header-actions #account-link:hover,
  .header-actions .count-link:hover,
  .header-actions .icon-button:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.66);
  }

  .header-actions {
    gap: 0.25rem;
  }
}


/* =========================================================
   PHONES
   ========================================================= */

@media (max-width: 600px) {

  /*
     Override the original:
     .header-actions #account-link { display: none; }
  */
  .header-actions #account-link {
    display: inline-flex !important;
  }

  .header-actions .count-link {
    display: inline-flex !important;
  }

  .header-actions .icon-button:nth-child(1) {
    display: inline-flex !important;
  }

  .site-header {
    grid-template-columns: auto 1fr;
    gap: 0.35rem;
    padding:
      0.55rem
      0.55rem
      0.55rem
      0.65rem;
  }

  .header-actions {
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.15rem;
  }

  .header-actions .icon-button,
  .header-actions #account-link,
  .header-actions .count-link,
  .header-actions .menu-button {
    min-height: 38px;
    padding: 0.42rem 0.48rem;
    font-size: 0.72rem;
  }

  /*
     Keep the number bubbles compact.
  */
  .header-actions .count-link span,
  .header-actions .bag-button span {
    min-width: 20px;
    height: 20px;
    padding: 0 0.25rem;
    font-size: 0.64rem;
  }

  /*
     Keep Bag compact enough to coexist
     with Account, Saved and Menu.
  */
  .header-actions .bag-button {
    min-height: 40px;
    padding:
      0.5rem
      0.55rem
      0.5rem
      0.7rem;
    gap: 0.35rem;
    font-size: 0.74rem;
  }

  .menu-button {
    min-width: 38px;
  }

  /*
     The navigation opened by the menu stays
     below the header instead of covering it.
  */
  .main-nav {
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 40;
  }

  .main-nav.open {
    display: flex;
  }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 470px) {

  /*
     On narrow phones, keep the KN logo but hide
     the text "Kompo Nation" to free horizontal
     space for actual functionality.
  */
  .site-header .brand > span:last-child {
    display: none;
  }

  .site-header .brand {
    gap: 0;
  }

  .site-header .brand-mark {
    width: 38px;
    height: 38px;
  }

  .header-actions {
    gap: 0.08rem;
  }

  .header-actions .icon-button,
  .header-actions #account-link,
  .header-actions .count-link,
  .header-actions .menu-button {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.69rem;
  }

  .header-actions .bag-button {
    padding-left: 0.58rem;
    padding-right: 0.48rem;
  }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 370px) {

  .site-header {
    width: calc(100% - 10px);
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .site-header .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.68rem;
  }

  .header-actions .icon-button,
  .header-actions #account-link,
  .header-actions .count-link,
  .header-actions .menu-button {
    min-height: 36px;
    padding-left: 0.32rem;
    padding-right: 0.32rem;
    font-size: 0.65rem;
  }

  .header-actions .bag-button {
    min-height: 36px;
    padding-left: 0.5rem;
    padding-right: 0.42rem;
    font-size: 0.67rem;
  }
}