/* Mandi's Curvy Closet & More — bright, fresh, modern.
   Teal + pink, clean cards, mobile-first. The whole page scrolls:
   there is intentionally NO sticky header (no sticky positioning
   anywhere in this file). Overlays below are dialogs, not headers. */

:root {
  --bg: #fdfdfb;
  --surface: #ffffff;
  --ink: #1d2b2b;
  --ink-soft: #44605e;
  --teal: #0e7c74;
  --teal-dark: #0a5f59;
  --teal-soft: #e0f4f1;
  --pink: #e5458c;
  --pink-dark: #c22e72;
  --pink-soft: #fde9f2;
  --line: #dcebe8;
  --shadow: 0 2px 10px rgba(14, 90, 84, .10);
  --amber-bg: #fff3d6;
  --amber-ink: #8a5b00;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-dark); }
button { font: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.fine { font-size: .86rem; color: var(--ink-soft); }

/* ---------- Header (scrolls away with the page — NOT sticky) ---------- */
.shop-head { background: var(--teal); color: #fff; padding: 28px 0 22px; }
.shop-head h1 {
  margin: 0;
  font-family: "Dancing Script", "Segoe Script", cursive;
  font-size: clamp(2.5rem, 6.8vw, 3.7rem);
  line-height: 1.15;
  font-weight: 700;
}
.shop-head .headline {
  margin: 10px 0 0;
  font-size: clamp(1.3rem, 3.6vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
}
.shop-head .headline .hl { font-weight: 800; white-space: nowrap; box-shadow: inset 0 -.26em 0 var(--pink); }
.shop-head .tagline { margin: 6px 0 0; font-size: clamp(.98rem, 2.6vw, 1.12rem); font-weight: 600; color: #d8f5f0; }
.head-facts { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.fact {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: .92rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
a.fact:hover { background: rgba(255, 255, 255, .28); }

/* ---------- Info strip ---------- */
.info-strip { background: var(--pink-soft); border-bottom: 3px solid var(--pink); }
.info-strip .wrap { padding-top: 14px; padding-bottom: 14px; }
.info-strip p { margin: 0 0 6px; font-size: .98rem; }
.info-strip p:last-child { margin-bottom: 0; }

/* ---------- Loyalty ---------- */
.loyalty { background: var(--teal-soft); border-bottom: 1px solid var(--line); }
.loyalty .wrap { padding-top: 18px; padding-bottom: 18px; text-align: center; }
.loyalty h2 { margin: 0 0 6px; font-size: 1.25rem; color: var(--teal-dark); }
.loyalty p { margin: 0 0 10px; }
.loyalty p:last-child { margin-bottom: 0; }
.loyalty-btn {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 22px;
}
.loyalty-btn:hover { background: var(--pink-dark); }

/* ---------- Toolbar: search, cart, category chips ---------- */
.toolbar { background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 0 10px; }
.search-row { display: flex; gap: 10px; align-items: stretch; }
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  min-width: 0;
}
.search-box:focus-within { border-color: var(--teal); }
.search-icon { flex: none; font-size: 1rem; }
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: 11px 0;
}
.cart-btn {
  flex: none;
  border: 0;
  border-radius: 12px;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}
.cart-btn:hover { background: var(--pink-dark); }
.cart-count {
  display: inline-block;
  min-width: 1.5em;
  background: #fff;
  color: var(--pink-dark);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: .85em;
  font-weight: 800;
  text-align: center;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 2px 2px; }
.chip {
  flex: none;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { border-color: var(--teal); }
.chip.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip-count { opacity: .75; font-weight: 700; font-size: .85em; }
.result-count { font-size: .9rem; color: var(--ink-soft); font-weight: 600; margin: 8px 2px 0; }

/* ---------- Catalog grid ---------- */
.cat-section { padding: 26px 0 4px; }
.cat-title { margin: 0 0 14px; font-size: 1.35rem; font-weight: 800; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cat-count { font-size: .85rem; font-weight: 600; color: var(--ink-soft); background: var(--teal-soft); border-radius: 999px; padding: 2px 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.card-media { aspect-ratio: 4 / 3; background: var(--teal-soft); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media.placeholder { display: flex; align-items: center; justify-content: center; color: var(--teal-dark); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.photo-count {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(9, 43, 40, .8); color: #fff;
  font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px;
  pointer-events: none;
}
.card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-name { margin: 0; font-size: .98rem; line-height: 1.3; font-weight: 650; }
.card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.price { font-size: 1.22rem; font-weight: 800; color: var(--teal-dark); }
.sku { font-size: .78rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.stock { font-size: .83rem; font-weight: 600; color: var(--ink-soft); }
.stock.low { align-self: flex-start; background: var(--amber-bg); color: var(--amber-ink); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.fulfill-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fulfill-badge { border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.fulfill-badge.ships { background: var(--teal-soft); color: var(--teal-dark); }
.fulfill-badge.pickup { background: var(--amber-bg); color: var(--amber-ink); }
.ship-fee { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.add-btn {
  margin-top: auto;
  display: block;
  text-align: center;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  font-size: .98rem;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.add-btn:hover { background: var(--pink-dark); }
.add-btn.in-cart { background: var(--teal); }
.add-btn:focus-visible, .chip:focus-visible, .search-box input:focus-visible,
.checkout-btn:focus-visible, .continue-btn:focus-visible, .qty-btn:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.no-results { display: none; text-align: center; padding: 44px 16px; color: var(--ink-soft); }
.no-results.show { display: block; }
.no-results strong { display: block; font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; }
.catalog-error { color: var(--pink-dark); font-weight: 700; text-align: center; padding: 24px 0; }

/* ---------- Visit note + footer ---------- */
.visit-note {
  margin: 30px 0 4px;
  background: var(--pink-soft);
  border: 2px solid var(--pink);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
}
.visit-note h2 { margin: 0 0 8px; font-size: clamp(1.25rem, 3.6vw, 1.6rem); font-weight: 800; color: var(--pink-dark); }
.visit-note p { margin: 0 auto 8px; max-width: 62ch; font-size: 1rem; }
.visit-note p:last-child { margin-bottom: 0; }
.visit-note .visit-facts { font-weight: 700; color: var(--teal-dark); }
footer { margin-top: 44px; background: var(--teal); color: #eafaf7; }
footer .wrap { padding-top: 24px; padding-bottom: 26px; }
footer h2 { margin: 0 0 8px; font-size: 1.15rem; color: #fff; }
footer p { margin: 0 0 6px; font-size: .95rem; }
footer a { color: #fff; font-weight: 700; }
footer .fine { color: #cdeee9; }

/* ---------- Item detail overlay (dialog) ---------- */
.detail-overlay, .cart-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 30, 28, .62);
  display: flex; align-items: flex-end; justify-content: center;
}
.detail-overlay[hidden], .cart-overlay[hidden] { display: none; }
.detail-sheet {
  background: var(--surface); color: var(--ink);
  width: 100%; max-width: 640px;
  max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  border-radius: 18px 18px 0 0;
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .3);
}
@media (min-width: 640px) {
  .detail-overlay, .cart-overlay { align-items: center; padding: 20px; }
  .detail-sheet { border-radius: 18px; }
}
.detail-top, .cart-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 2px; }
.cart-head h2 { margin: 0; font-size: 1.3rem; padding-left: 8px; }
.detail-close {
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; width: 42px; height: 42px;
  font-size: 1.2rem; cursor: pointer; line-height: 1; flex: none;
}
.detail-close:hover { border-color: var(--pink); color: var(--pink-dark); }
.gal { position: relative; background: var(--teal-soft); }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: center; }
.gal-slide img { width: 100%; height: min(56vh, 470px); object-fit: contain; display: block; }
.gal-slide.placeholder { display: flex; align-items: center; justify-content: center; height: min(56vh, 470px); color: var(--teal-dark); font-weight: 700; }
.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(9, 43, 40, .72); color: #fff; font-size: 1.35rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.gal-btn:hover { background: rgba(9, 43, 40, .9); }
.gal-btn.prev { left: 10px; }
.gal-btn.next { right: 10px; }
.gal-count {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  background: rgba(9, 43, 40, .78); color: #fff;
  font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 3px 10px;
}
.gal-dots { display: flex; gap: 7px; justify-content: center; padding: 10px 8px 2px; flex-wrap: wrap; }
.gal-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); border: 0; padding: 0; cursor: pointer; }
.gal-dot.on { background: var(--pink); }
.detail-body { padding: 14px 18px 0; }
.detail-name { margin: 0 0 8px; font-size: 1.32rem; line-height: 1.25; font-weight: 750; }
.detail-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.detail-meta .price { font-size: 1.5rem; }
.detail-body .stock { margin-top: 2px; }
.detail-body .fulfill-row { margin-top: 8px; }
.detail-desc { margin: 12px 0 0; font-size: .99rem; }
.detail-body .add-btn { margin-top: 16px; padding: 13px 12px; font-size: 1.05rem; width: 100%; }
.detail-qty { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.detail-qty label { font-weight: 700; }
.detail-qty select { font: inherit; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }

/* ---------- Cart overlay (dialog) ---------- */
.cart-sheet {
  background: var(--surface); color: var(--ink);
  width: 100%; max-width: 560px;
  max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  border-radius: 18px 18px 0 0;
  padding: 6px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .3);
}
@media (min-width: 640px) {
  .cart-sheet { border-radius: 18px; }
}
.fulfill-pick { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0 14px; }
.fulfill-label { display: block; font-weight: 800; margin-bottom: 8px; }
.fulfill-opt {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; padding: 6px 0; cursor: pointer;
}
.fulfill-opt input { width: 18px; height: 18px; accent-color: var(--teal); }
.fulfill-pick .fine { margin: 6px 0 0; }
.cart-empty { text-align: center; color: var(--ink-soft); padding: 24px 8px; }
.cart-empty strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.cart-line:first-child { border-top: 0; }
.cart-thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; background: var(--teal-soft); }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { margin: 0; font-weight: 700; font-size: .98rem; line-height: 1.3; }
.cart-line-meta { margin: 2px 0 0; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.cart-line-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.qty-ctl { display: flex; align-items: center; gap: 2px; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-btn {
  border: 0; background: var(--surface); color: var(--teal-dark);
  width: 34px; height: 34px; font-size: 1.15rem; font-weight: 800; cursor: pointer; line-height: 1;
}
.qty-btn:hover { background: var(--teal-soft); }
.qty-num { min-width: 2ch; text-align: center; font-weight: 800; }
.cart-line-total { font-weight: 800; color: var(--teal-dark); white-space: nowrap; }
.cart-remove { border: 0; background: none; color: var(--pink-dark); font-weight: 700; font-size: .85rem; cursor: pointer; padding: 4px 0; }
.cart-summary { border-top: 2px solid var(--line); padding-top: 12px; margin-top: 6px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: .98rem; }
.sum-row .free { color: var(--teal-dark); font-weight: 800; }
.sum-row.total { font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.sum-note { font-size: .86rem; color: var(--ink-soft); margin: 6px 0 0; }
.cart-error {
  background: #fde9f2; color: var(--pink-dark);
  border: 2px solid var(--pink);
  border-radius: 10px; padding: 10px 12px;
  font-weight: 700; margin: 12px 0 0;
}
.cart-error[hidden] { display: none; }
.checkout-btn {
  display: block; width: 100%;
  margin-top: 14px;
  background: var(--pink); color: #fff;
  border: 0; border-radius: 12px;
  padding: 14px 12px; font-size: 1.08rem; font-weight: 800; cursor: pointer;
}
.checkout-btn:hover { background: var(--pink-dark); }
.checkout-btn:disabled { opacity: .6; cursor: wait; }
.cart-fine { text-align: center; margin: 8px 0 0; }
.continue-btn {
  display: block; width: 100%;
  margin-top: 10px;
  background: var(--teal-soft); color: var(--teal-dark);
  border: 0; border-radius: 12px;
  padding: 11px 12px; font-weight: 700; cursor: pointer;
}
.continue-btn:hover { background: var(--teal); color: #fff; }
