/* ============================================================================
   COSMONAT LOBNA — SHOP LAYER
   Hero, values, catalogue, cart drawer, checkout, map, 404.
   No transitions, no animations, no hover effects. (House rule.)
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Announcement bar
   ------------------------------------------------------------------------ */
.announce {
  background: var(--palm-700);
  color: var(--on-primary);
  text-align: center;
  font-size: 0.82rem;
  padding: 8px var(--s-4);
  letter-spacing: 0.02em;
}
.announce[hidden] { display: none; }

.demo-bar {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
  font-size: 0.8rem;
  padding: 7px var(--s-4);
}
.demo-bar[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   2. Hero
   ------------------------------------------------------------------------ */
.hero {
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-9) 0;
}
.hero-copy .display-1 { margin: var(--s-3) 0 var(--s-4); }
.hero-copy .lead { max-width: 46ch; }
.hero-copy .btn-row { margin-top: var(--s-6); }

.hero-figure {
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: var(--s-3);
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-caption {
  margin-top: var(--s-3);
  font-size: 0.78rem;
  color: var(--ink-500);
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 0 var(--s-1);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-6); padding: var(--s-7) 0; }
}

/* ---------------------------------------------------------------------------
   3. Values strip
   ------------------------------------------------------------------------ */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.value {
  padding: var(--s-6) var(--s-5);
  border-inline-end: 1px solid var(--line);
}
.value:last-child { border-inline-end: 0; }
.value-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--terra-600);
  display: block;
  margin-bottom: var(--s-2);
}
.value h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.value p { font-size: 0.9rem; color: var(--ink-500); }
@media (max-width: 800px) {
  .values { grid-template-columns: 1fr; }
  .value { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .value:last-child { border-bottom: 0; }
}

/* ---------------------------------------------------------------------------
   4. Catalogue toolbar — filter tabs + search
   ------------------------------------------------------------------------ */
.shop-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.tab {
  padding: 9px 18px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-700);
}
.tab.is-active {
  background: var(--palm-700);
  border-color: var(--palm-700);
  color: var(--on-primary);
  font-weight: 600;
}
.search-box { position: relative; min-width: 250px; }
.search-box .input { padding-inline-start: 38px; }
.search-box svg {
  position: absolute;
  inset-inline-start: 13px;
  top: 50%;
  margin-top: -8px;
  width: 16px; height: 16px;
  color: var(--ink-300);
  pointer-events: none;
}
.result-count { font-size: 0.84rem; color: var(--ink-500); margin-bottom: var(--s-5); }

/* ---------------------------------------------------------------------------
   5. Product grid
   ------------------------------------------------------------------------ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .product-grid { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-media {
  position: relative;
  background: var(--sand-100);
  border-bottom: 1px solid var(--line);
}
.card-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.card-media .badge {
  position: absolute;
  top: var(--s-3);
  inset-inline-start: var(--s-3);
}
.card-media .badge--out {
  inset-inline-start: auto;
  inset-inline-end: var(--s-3);
  background: var(--ink-700);
  border-color: var(--ink-700);
  color: var(--white);
}
.card-body {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.card-cat {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-600);
  font-weight: 600;
}
html[lang="ar"] .card-cat { letter-spacing: 0; }
.card-title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink-900);
}
html[lang="ar"] .card-title { font-size: 1.05rem; font-weight: 700; }
.card-desc {
  font-size: 0.855rem;
  color: var(--ink-500);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: auto;
  padding-top: var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.card-price {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--palm-700);
  white-space: nowrap;
}
.card-price s { color: var(--ink-300); font-weight: 400; font-size: 0.85rem; margin-inline-start: 6px; }

.state-block {
  padding: var(--s-8) var(--s-5);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-500);
}

/* skeletons (static, no shimmer animation) */
.skeleton-card {
  border: 1px solid var(--line);
  background: var(--white);
}
.skeleton-media { aspect-ratio: 1 / 1; background: var(--sand-200); }
.skeleton-line {
  height: 12px;
  background: var(--sand-200);
  margin: 12px 16px;
  border-radius: 2px;
}
.skeleton-line.short { width: 45%; }

/* ---------------------------------------------------------------------------
   6. About band
   ------------------------------------------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--s-8);
  align-items: center;
}
.about-grid img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border: 1px solid var(--line-strong); }
.about-copy p + p { margin-top: var(--s-4); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ---------------------------------------------------------------------------
   7. Map + contact
   ------------------------------------------------------------------------ */
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: var(--s-6);
  align-items: stretch;
}
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.contact-line { display: flex; gap: var(--s-3); align-items: flex-start; }
.contact-line svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--palm-600); }
.contact-line .label { margin-bottom: 2px; }
.contact-line p, .contact-line a { font-size: 0.92rem; margin: 0; }

.map-frame {
  border: 1px solid var(--line-strong);
  background: var(--sand-200);
  min-height: 340px;
  height: 100%;
  overflow: hidden;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
html[data-theme="dark"] .map-frame { background: var(--sand-200); }

.social-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: auto; padding-top: var(--s-2); }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-700);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.social-btn svg { width: 17px; height: 17px; }
.social-btn--fb { border-color: var(--fb-line); color: var(--fb-fg); background: var(--fb-bg); }
.social-btn--wa { border-color: var(--wa-line); color: var(--wa-fg); background: var(--wa-bg); }
.social-btn--ig { border-color: var(--ig-line); color: var(--ig-fg); background: var(--ig-bg); }

/* ---------------------------------------------------------------------------
   8. Cart drawer  (shown/hidden instantly — no slide animation)
   ------------------------------------------------------------------------ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 26, 0.45);
  z-index: 90;
}
.overlay[hidden] { display: none; }

.cart-panel {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  height: 100%;
  width: 420px;
  max-width: 100%;
  background: var(--off-white);
  border-inline-start: 1px solid var(--line-strong);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.cart-panel[hidden] { display: none; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.cart-head h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-700);
}
.icon-btn svg { width: 16px; height: 16px; }

.cart-body { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5); }

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:first-child { padding-top: 0; }
.cart-item img {
  width: 72px; height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--sand-100);
}
.cart-item-name { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.cart-item-price { font-size: 0.84rem; color: var(--ink-500); margin-top: 2px; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: var(--s-2); }
.cart-line-total { font-weight: 700; font-size: 0.92rem; color: var(--palm-700); white-space: nowrap; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.qty button {
  width: 30px; height: 30px;
  background: var(--white);
  border: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1;
}
.qty input {
  width: 38px;
  height: 30px;
  text-align: center;
  border: 0;
  border-inline: 1px solid var(--line);
  font-size: 0.88rem;
  background: var(--white);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--err-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-foot {
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: var(--s-4) var(--s-5) var(--s-5);
}
.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--ink-700);
  margin-bottom: 8px;
}
.total-line--grand {
  border-top: 1px solid var(--line);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink-900);
}
.cart-foot .btn { margin-top: var(--s-3); }
.cod-note {
  margin-top: var(--s-3);
  font-size: 0.78rem;
  color: var(--ink-500);
  text-align: center;
}

.cart-empty { text-align: center; padding: var(--s-8) var(--s-4); }
.cart-empty svg { width: 42px; height: 42px; color: var(--line-strong); margin: 0 auto var(--s-4); }

/* ---------------------------------------------------------------------------
   9. Checkout modal
   ------------------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: start center;
  padding: var(--s-5);
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--off-white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  margin: var(--s-5) 0;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.modal-head h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.modal-head p { font-size: 0.88rem; color: var(--ink-500); margin-top: 4px; }
.modal-body { padding: var(--s-6); }
.modal-foot {
  padding: var(--s-5) var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--white);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.fieldset { border: 0; padding: 0; margin: 0 0 var(--s-5); }
.fieldset legend {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--terra-600);
  margin-bottom: var(--s-4);
  padding: 0;
}
html[lang="ar"] .fieldset legend { letter-spacing: 0; }

.pay-box {
  border: 1px solid var(--palm-300);
  background: var(--palm-100);
  padding: var(--s-4);
  border-radius: var(--radius);
  display: flex;
  gap: var(--s-3);
}
.pay-box svg { width: 22px; height: 22px; color: var(--palm-700); flex: none; margin-top: 2px; }
.pay-box strong { display: block; font-size: 0.95rem; }
.pay-box p { font-size: 0.84rem; color: var(--ink-700); margin-top: 3px; }

.summary-list { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 11px var(--s-4);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.summary-row:last-child { border-bottom: 0; }
.summary-row--total { font-weight: 700; font-size: 1.02rem; background: var(--sand-100); }
.summary-qty { color: var(--ink-500); font-size: 0.82rem; }

.success-box { text-align: center; padding: var(--s-6) var(--s-4); }
.success-box svg { width: 46px; height: 46px; color: var(--palm-600); margin: 0 auto var(--s-4); }
.success-box h3 { font-family: var(--font-display); font-size: 1.7rem; margin-bottom: var(--s-3); }
.success-box p { color: var(--ink-500); max-width: 46ch; margin: 0 auto var(--s-4); }

/* ---------------------------------------------------------------------------
   10. Toast (static, no fade)
   ------------------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: var(--s-5);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 130;
  background: var(--chrome-bg);
  color: var(--chrome-fg);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 90vw;
  text-align: center;
}
.toast[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   10b. Floating WhatsApp button + free-delivery nudge
   ------------------------------------------------------------------------ */
.wa-float {
  position: fixed;
  bottom: var(--s-5);
  inset-inline-end: var(--s-5);
  z-index: 80;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1B5E33;
  color: #FFFFFF;
  border: 1px solid #14522A;
  text-decoration: none;
}
.wa-float svg { width: 30px; height: 30px; }
html[data-theme="dark"] .wa-float { background: #2E7D46; border-color: #256B3A; }
@media (max-width: 560px) {
  .wa-float {
    width: 50px; height: 50px;
    bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
    inset-inline-end: var(--s-4);
  }
  .wa-float svg { width: 27px; height: 27px; }
}

.free-nudge {
  margin: 0 0 var(--s-3);
  padding: 9px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--sand-100);
  font-size: 0.82rem;
  color: var(--ink-700);
  text-align: center;
}
.free-nudge.is-reached {
  border-style: solid;
  background: var(--ok-bg);
  color: var(--ok-fg);
  border-color: var(--line-strong);
}

/* ---------------------------------------------------------------------------
   11. 404 page
   ------------------------------------------------------------------------ */
.page-404 {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: var(--s-9) var(--s-5);
  background: var(--sand-100);
}
.err-card {
  max-width: 640px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line-strong);
  padding: var(--s-8) var(--s-6);
}
.err-code {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 7.5rem);
  line-height: 1;
  color: var(--sand-500);
  font-weight: 600;
}
.err-card h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin: var(--s-3) 0 var(--s-4); }
.err-card p { color: var(--ink-500); max-width: 48ch; margin: 0 auto var(--s-6); }
.err-card .btn-row { justify-content: center; }
.err-divider { width: 56px; height: 2px; background: var(--terra-600); margin: 0 auto var(--s-5); }


/* ---------------------------------------------------------------------------
   12. Responsive — phone and tablet
   ------------------------------------------------------------------------ */

@media (max-width: 900px) {
  .hero-figure { padding: var(--s-2); }
  .map-frame, .map-frame iframe { min-height: 280px; }
  .contact-card { padding: var(--s-5); }
}

@media (max-width: 720px) {
  /* the category tabs become a single swipeable row instead of stacking */
  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-4);
  }
  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    /* a scroll container inside a column flex parent sizes itself to its
       content unless the width is explicit — the +32px compensates the
       edge-bleed negative margins */
    width: calc(100% + (2 * var(--s-4)));
    min-width: 0;
    max-width: none;
    margin: 0 calc(var(--s-4) * -1);
    padding-inline: var(--s-4);
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .search-box { min-width: 0; width: 100%; }

  .modal { padding: 0; }
  .modal-card { margin: 0; min-height: 100%; border: 0; border-radius: 0; max-width: 100%; }
  .modal-head, .modal-foot { padding: var(--s-4) var(--s-5); }
  .modal-body { padding: var(--s-5); }
  .modal-foot { position: sticky; bottom: 0; }
  .modal-foot .btn { flex: 1 1 100%; }
  .success-box { padding: var(--s-5) 0; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
  .card-body { padding: var(--s-3); gap: 4px; }
  .card-title { font-size: 1rem; }
  .card-desc { display: none; }              /* keep phone cards scannable */
  .card-foot { padding-top: var(--s-3); flex-direction: column; align-items: stretch; gap: 8px; }
  .card-foot .btn { width: 100%; }
  .card-price { font-size: 1rem; }

  /* full-screen cart on a phone */
  .cart-panel { width: 100%; border-inline-start: 0; }
  .cart-head, .cart-body, .cart-foot { padding-inline: var(--s-4); }
  .cart-item { grid-template-columns: 58px 1fr; }
  .cart-item img { width: 58px; height: 58px; }
  .cart-item-right {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .qty button { width: 34px; height: 34px; }
  .qty input { height: 34px; }

  .values { border-top: 0; }
  .value { padding: var(--s-5) 0; }
  .hero-caption { flex-direction: column; gap: 2px; }
  .social-row { gap: var(--s-2); }
  .social-btn { flex: 1 1 calc(50% - var(--s-2)); justify-content: center; }
  .toast { inset-inline: var(--s-4); transform: none; bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
  .card-desc { display: -webkit-box; }
}


/* ---------------------------------------------------------------------------
   13. Product quick view
   ------------------------------------------------------------------------ */
.card-media, .card-title { cursor: pointer; }

.qv-card { max-width: 880px; position: relative; }
.qv-close {
  position: absolute;
  top: var(--s-3);
  inset-inline-end: var(--s-3);
  z-index: 5;
}
.qv-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}
.qv-media {
  position: relative;
  background: var(--sand-100);
  border-inline-end: 1px solid var(--line);
}
.qv-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.qv-badges {
  position: absolute;
  top: var(--s-3);
  inset-inline-start: var(--s-3);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qv-body {
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.qv-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
}
.qv-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--palm-700);
}
.qv-price s { color: var(--ink-300); font-weight: 400; font-size: 1rem; margin-inline-start: 8px; }
.qv-desc { font-size: 0.94rem; color: var(--ink-700); line-height: 1.65; }
.qv-qty-row { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.qv-qty-row .label { margin-bottom: 0; }
.qv-actions { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.qv-share { margin-top: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.qv-share-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.qv-share-row .social-btn { padding: 8px 13px; font-size: 0.8rem; }
.qv-share-row .social-btn svg { width: 15px; height: 15px; }

.qv-related { margin-top: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.qv-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.qv-mini {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0;
  overflow: hidden;
  text-align: start;
  cursor: pointer;
}
.qv-mini img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.qv-mini span {
  display: block;
  padding: 6px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* promo % badge */
.badge--promo {
  background: var(--terra-600);
  border-color: var(--terra-600);
  color: var(--on-terra);
}
.badge--new {
  background: var(--palm-700);
  border-color: var(--palm-700);
  color: var(--on-primary);
}
.card-media .badge-stack {
  position: absolute;
  top: var(--s-3);
  inset-inline-start: var(--s-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.card-media .badge-stack .badge { position: static; }

@media (max-width: 720px) {
  .qv-grid { grid-template-columns: 1fr; }
  .qv-media { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .qv-media img { max-height: 46vh; }
  .qv-body { padding: var(--s-5); }
  .qv-related-grid { grid-template-columns: repeat(4, 1fr); }
  .qv-actions .btn { width: 100%; }
}


/* ---------------------------------------------------------------------------
   14. Overflow hygiene — flex/grid children may never widen the page
   ------------------------------------------------------------------------ */
.qv-body, .qv-related-grid, .card-body, .hero-copy, .about-copy,
.contact-card, .cart-item > div, .footer-col, .value { min-width: 0; }
.qv-mini { min-width: 0; }
.qv-desc, .card-title, .cart-item-name, .qv-title { overflow-wrap: break-word; }


/* ---------------------------------------------------------------------------
   15. Gallery thumbs, ingredients blocks, favourites
   ------------------------------------------------------------------------ */
.qv-thumbs {
  position: absolute;
  bottom: var(--s-3);
  inset-inline-start: var(--s-3);
  inset-inline-end: var(--s-3);
  display: flex;
  gap: 6px;
}
.qv-thumbs button {
  width: 52px; height: 52px;
  padding: 0;
  border: 2px solid var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand-100);
  flex: none;
}
.qv-thumbs button.is-active { border-color: var(--terra-600); }
.qv-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.qv-info {
  border: 1px solid var(--line);
  background: var(--sand-100);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
}
.qv-info .label { margin-bottom: 4px; }
.qv-info p { font-size: 0.86rem; color: var(--ink-700); line-height: 1.6; margin: 0; }

.qv-add-row { display: flex; gap: var(--s-2); }
.qv-add-row .btn { flex: 1; }

/* heart buttons — filled state via aria-pressed, no hover effects */
.fav-btn {
  display: inline-grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-500);
  flex: none;
}
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] { color: #C0455A; border-color: #C0455A; }
.fav-btn[aria-pressed="true"] svg { fill: #C0455A; }
html[data-theme="dark"] .fav-btn[aria-pressed="true"] { color: #E08B9B; border-color: #7A4550; }
html[data-theme="dark"] .fav-btn[aria-pressed="true"] svg { fill: #E08B9B; }
.fav-btn--lg { width: 54px; min-height: 100%; }

.card-media .fav-btn {
  position: absolute;
  bottom: var(--s-3);
  inset-inline-end: var(--s-3);
  width: 38px; height: 38px;
  border-radius: 50%;
}
.card-media .fav-btn svg { width: 18px; height: 18px; }

.tab .tab-heart { color: #C0455A; }


/* ---------------------------------------------------------------------------
   16. Trust strip, uploaded logo
   ------------------------------------------------------------------------ */
.trust-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  padding: var(--s-3) var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--sand-100);
}
.trust-strip li {
  font-size: 0.78rem;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: 7px;
}
.trust-strip--co { margin-bottom: var(--s-5); }
@media (max-width: 420px) { .trust-strip { grid-template-columns: 1fr; } }


/* an uploaded logo replaces the drawn palm mark */
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--white);
  flex: none;
}
@media (max-width: 560px) { .brand-logo { width: 34px; height: 34px; } }


/* ---------------------------------------------------------------------------
   17. Cart recovery — saved basket, exit reminder, previous purchases
   ----------------------------------------------------------------------------
   House rule applies here too: no transition, no animation, no :hover state
   change. These three pieces appear and disappear, nothing slides or fades.
   ------------------------------------------------------------------------ */

/* --- strip under the header: "you left something in your basket" --------- */
.resume-strip {
  background: var(--sand-200);
  border-bottom: 1px solid var(--line-strong);
}
.resume-strip[hidden] { display: none; }

.resume-inner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 0;
}
.resume-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--palm-600);
}
.resume-icon svg { width: 17px; height: 17px; }
.resume-inner p {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.9rem;
  color: var(--ink-700);
}
.resume-actions {
  display: flex;
  gap: var(--s-2);
  flex: none;
}
@media (max-width: 620px) {
  .resume-inner { flex-wrap: wrap; }
  .resume-inner p { flex-basis: calc(100% - 44px); }
  .resume-actions { width: 100%; }
  .resume-actions .btn { flex: 1 1 0; }
}

/* --- previous purchases -------------------------------------------------- */
.section--recent {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: var(--s-8) 0;
}
.section--recent[hidden] { display: none; }

.recent-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.recent-head p { margin-top: var(--s-2); color: var(--ink-500); }
.recent-head .display-2 { margin-top: var(--s-2); }

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
}
.recent-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--off-white);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.recent-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--line-strong);
}
.recent-ref {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.recent-total { font-weight: 600; color: var(--ink-900); }

.recent-items {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  flex: 1 1 auto;
}
.recent-items li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.88rem;
  color: var(--ink-700);
}
.recent-items img,
.recent-noimg {
  width: 44px; height: 44px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sand-100);
}
.recent-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-qty { color: var(--ink-500); flex: none; }
.recent-again { align-self: flex-start; }
.recent-again[disabled] { opacity: 0.5; }

@media (max-width: 620px) {
  .recent-head { flex-direction: column; align-items: flex-start; }
  .recent-again { align-self: stretch; text-align: center; }
}

/* --- one-time exit reminder ---------------------------------------------- */
.nudge {
  position: fixed;
  inset-inline: 0;
  bottom: var(--s-6);
  z-index: 120;
  display: flex;
  justify-content: center;
  padding: 0 var(--s-4);
  pointer-events: none;          /* only the card itself is clickable */
}
.nudge[hidden] { display: none; }

.nudge-card {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--palm-600);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: 0 10px 30px rgba(36, 31, 26, 0.16);
  text-align: center;
}
.nudge-mark {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: var(--s-3);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--sand-100);
  color: var(--palm-600);
}
.nudge-mark svg { width: 22px; height: 22px; }
.nudge-card h3 { font-family: var(--font-display); font-size: 1.5rem; }
.nudge-card p { margin-top: var(--s-2); font-size: 0.9rem; color: var(--ink-500); }
.nudge-summary {
  margin-top: var(--s-3) !important;
  font-weight: 600;
  color: var(--ink-900) !important;
}
.nudge-actions {
  margin-top: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.nudge-close {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
}
html[data-theme="dark"] .nudge-card { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }

@media (max-width: 560px) {
  .nudge { bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); }
}

/* --- cookie notice ------------------------------------------------------- */
.cookie-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding: 10px max(var(--s-4), env(safe-area-inset-left, 0px))
           calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--chrome-bg);
  color: var(--chrome-fg);
  border-top: 1px solid var(--chrome-line);
}
.cookie-bar[hidden] { display: none; }

.cookie-bar p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--chrome-fg);
}
.cookie-bar a {
  color: var(--chrome-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-inline-start: 6px;
}
.cookie-actions {
  display: flex;
  gap: var(--s-2);
  flex: none;
}
.cookie-bar .btn--quiet {
  background: transparent;
  color: var(--chrome-fg);
  border-color: var(--chrome-muted);
}

/* While the notice is up, keep the floating WhatsApp button and the exit
   reminder clear of it. --cookie-h is the bar's measured height (consent.js),
   so this stays exact whatever the language or screen width. */
body.has-cookie-bar .wa-float { bottom: calc(var(--cookie-h, 76px) + var(--s-4)); }
body.has-cookie-bar .nudge    { bottom: calc(var(--cookie-h, 76px) + var(--s-5)); }

@media (max-width: 560px) {
  .cookie-bar { justify-content: flex-start; gap: var(--s-2); padding-inline: var(--s-4); }
  .cookie-bar p { flex: 1 1 100%; font-size: 0.78rem; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1 1 0; }
  body.has-cookie-bar .wa-float { bottom: calc(var(--cookie-h, 110px) + var(--s-3)); }
  body.has-cookie-bar .nudge    { bottom: calc(var(--cookie-h, 110px) + var(--s-4)); }
}
