/* Shop page — works with the markup that shop.js builds. Loaded after site.css. */
.shop-hero { padding-bottom: clamp(24px, 4vw, 40px); }
.shop-status:not(:empty) { display: inline-flex; margin: 8px 0 0; padding: 8px 14px; border-radius: 999px; border: 1px solid rgb(226 184 92 / 60%); background: #fff7e3; color: var(--gold-deep); font: 600 .74rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.catalog-toolbar { position: sticky; top: var(--header-h); z-index: 40; background: rgb(247 242 231 / 88%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-block: 1px solid var(--line); }
.catalog-toolbar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 12px; }
.categories { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.categories::-webkit-scrollbar { display: none; }
.categories .chip { flex: none; }
.categories .chip[aria-current] { color: #fff; background: var(--leaf); border-color: var(--leaf); }
.filters { display: flex; gap: 8px; flex: none; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filters input, .filters select { min-height: 42px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 .88rem/1 var(--body); }
.filters input { width: 250px; padding: 0 16px 0 40px; }
.filters select { padding: 0 34px 0 16px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2395a0c2' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
.filters select option { background: #fff; color: var(--ink); }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--garden); box-shadow: 0 0 0 3px rgb(60 138 95 / 18%); }
@media (max-width: 1000px) {
  .catalog-toolbar .container { flex-direction: column; align-items: stretch; }
  .filters input { width: 100%; }
  .filters .search-field { flex: 1; }
}

.product-count { margin: 26px 0 16px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.product-count:focus { outline: none; }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 22px); }
@media (max-width: 1120px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .products { grid-template-columns: 1fr; } }

.product { position: relative; display: flex; flex-direction: column; padding: 10px; border-radius: var(--radius); border: 1px solid transparent; background: linear-gradient(180deg, var(--surface), rgb(255 253 248 / 88%)) padding-box, linear-gradient(140deg, rgb(226 184 92 / 65%), var(--line) 35%, var(--line) 65%, rgb(60 138 95 / 50%)) border-box; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.product:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -28px rgb(21 55 42 / 45%); }
.family-media { background: var(--plate); border-radius: calc(var(--radius) - 8px); overflow: hidden; }
.family-media img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
.product:hover .family-media img { transform: scale(1.05); }
.product-copy { padding: 16px 8px 8px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-tag { margin: 0; font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--garden); }
.product h2 { font-size: clamp(.98rem, 1.3vw, 1.12rem); line-height: 1.25; letter-spacing: -.01em; }
.product p { margin: 0; }
.pack { color: var(--muted); font-size: .88rem; }
.family-details { margin-top: auto; padding-top: 10px; }
.price { font: 650 clamp(1.05rem, 1.6vw, 1.25rem)/1 var(--display); color: var(--gold-deep); }

/* Buttons and fields that shop.js creates */
.shop-main button, #cart button {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: 700 .88rem/1 var(--body); color: #fff;
  background: linear-gradient(135deg, var(--garden), var(--leaf));
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.shop-main button:hover, #cart button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgb(31 77 54 / 70%); }
.shop-main button:disabled, #cart button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.shop-main button.secondary, #cart button.secondary { color: var(--ink); background: var(--surface); border-color: var(--line-2); }
.shop-main button.secondary:hover, #cart button.secondary:hover { border-color: var(--garden); box-shadow: none; }
.add-form { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: end; margin-top: 12px; }
.add-form label { display: grid; gap: 4px; font: 600 .64rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.add-form input, #cart input, #cart textarea {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); font: 600 .95rem/1 var(--body);
}
.add-form input { text-align: center; padding: 0 4px; }
#cart textarea { min-height: 76px; padding: 12px; line-height: 1.4; resize: vertical; }
.add-form input:focus, #cart input:focus, #cart textarea:focus { outline: none; border-color: var(--garden); box-shadow: 0 0 0 3px rgb(60 138 95 / 18%); }
@media (max-width: 520px) {
  .product { padding: 7px; }
  .product-copy { padding: 12px 5px 5px; }
  .add-form { grid-template-columns: 50px 1fr; gap: 6px; }
  .shop-main .add-form button { padding: 0 8px; font-size: .78rem; }
}

#pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
#pagination button { min-width: 44px; padding: 0 12px; }
#pagination [aria-current] { color: #2b1d04; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: var(--gold); }

.trust-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: clamp(40px, 6vw, 72px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.trust-row > div { background: var(--surface); padding: 22px 24px; display: grid; gap: 6px; }
.trust-row b { font: 650 1rem/1.2 var(--display); color: var(--leaf); }
.trust-row span { color: var(--muted); font-size: .92rem; }
.trust-row a { color: var(--ink); }
@media (max-width: 760px) { .trust-row { grid-template-columns: 1fr; } }

/* Cart drawer */
#cart {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100%); height: 100%; max-height: 100%; max-width: 100%;
  padding: 26px clamp(18px, 4vw, 30px) 40px; border: 0; border-left: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface), var(--bg)); color: var(--ink); overflow-y: auto;
}
#cart::backdrop { background: rgb(21 55 42 / 45%); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: no-preference) {
  #cart[open] { animation: cart-in .35s var(--ease); }
  @keyframes cart-in { from { transform: translateX(100%); } to { transform: none; } }
}
.cart-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.cart-heading h2 { font-size: 1.5rem; }
.cart-heading form { margin: 0; }
#cart .icon-close { width: 44px; padding: 0; font-size: 1rem; }
#cart-feedback { margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--mint); border: 1px solid rgb(60 138 95 / 30%); color: var(--leaf); font-weight: 700; font-size: .92rem; }
#empty-cart { color: var(--muted); margin: 18px 0; }
#cart-items, #offers { list-style: none; padding: 0; margin: 0; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line > span { font-weight: 700; line-height: 1.3; }
.cart-line small { display: block; margin-top: 4px; font-weight: 500; }
.quantity { display: flex; gap: 6px; align-items: center; }
.quantity input { width: 64px !important; text-align: center; }
#cart .quantity button { min-height: 40px; padding: 0 12px; font-size: .8rem; }
#cart form#promo, #cart form#checkout { display: grid; gap: 12px; margin-top: 18px; }
#cart form[hidden] { display: none; }
#cart label { display: grid; gap: 6px; font: 700 .78rem/1.2 var(--body); letter-spacing: .04em; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.address-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#promo-status:not(:empty), #checkout-status:not(:empty) { margin: 12px 0 0; font-weight: 700; font-size: .9rem; color: var(--leaf); }
#offers li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink-2); }
#totals { margin: 20px 0 0; padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; display: grid; gap: 10px; }
#totals div { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); }
#totals dd { margin: 0; font-variant-numeric: tabular-nums; }
#totals .total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--leaf); font: 650 1.15rem/1 var(--display); }
#checkout h3 { margin-top: 10px; font-size: 1.1rem; }
#cart #pay { min-height: 52px; font-size: 1rem; margin-top: 6px; color: #2b1d04; background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #cf9e3c); }

.family-media-link { display: block; border-radius: calc(var(--radius) - 8px); }
.product h2 a { text-decoration: none; color: inherit; }
.product h2 a:hover { color: var(--garden); }
.product h2 a::after { content: " →"; opacity: 0; transition: opacity .2s; }
.product:hover h2 a::after { opacity: 1; }

#delivery-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: inherit; }
#delivery-fields[hidden] { display: none; }
.magic-note { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--sage, #e4ebdc); color: var(--leaf, #1f4d36); font-weight: 600; font-size: .92rem; }
#cart .remember { display: flex !important; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; font-weight: 500; font-size: .9rem; }
#cart .remember input { flex: none; width: 20px !important; height: 20px !important; min-height: 0; padding: 0; margin: 0; border-radius: 5px; box-shadow: none; accent-color: var(--leaf, #1f4d36); }

/* Grouped cards: size buttons, from-price, hover to the cup */
.product .size-row { margin: 10px 0 4px; gap: 6px; }
.product .size-btn { min-width: 0; min-height: 36px; padding: 6px 10px; border-radius: 10px; font-size: .78rem; }
.product .size-btn small { font-size: .56rem; }
.family-details { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.from-price { font: 500 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.family-media { position: relative; }
.family-media .alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s var(--ease); mix-blend-mode: normal !important; border-radius: inherit; }
.family-media .alt[hidden] { display: none; }
.product:hover .family-media.has-alt .alt, .family-media-link:focus-visible .family-media.has-alt .alt { opacity: 1; }
.shop-main .product .size-btn { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; min-height: 34px; padding: 5px 10px; font: 600 .78rem/1.15 var(--body); }
.shop-main .product .size-btn:hover { border-color: var(--gold); background: #fff; color: var(--ink); }
.shop-main .product .size-btn[aria-current] { background: var(--leaf); color: #fff; border-color: var(--leaf); box-shadow: 0 0 0 3px rgb(226 184 92 / 35%); }
.shop-main .product .size-btn small { color: var(--garden); }
.shop-main .product .size-btn[aria-current] small { color: var(--gold-2, #f6dc9a); }
.family-media .alt { background: #fff; }
/* Multi-size cards: "Jar" · from ₹… · Choose size (sizes are picked on the product page) */
.family-details.is-from { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 8px; }
.family-details.is-from .from-price { order: 0; }
.shop-main .product .choose-size { display: flex; justify-content: center; align-items: center; margin-top: 12px; min-height: 44px; text-decoration: none; }

/* ---------- Stamps & ribbons on shop cards ---------- */
.family-media .stamp { position: absolute; top: 8px; right: 8px; z-index: 2; width: 76px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, #fff7e2 0 54%, transparent 55%), conic-gradient(from 0deg, #c9952f, #f3d68c, #b67d1f, #f3d68c, #c9952f);
  box-shadow: 0 10px 22px -10px rgb(120 80 20 / 70%), inset 0 0 0 2px rgb(255 255 255 / 45%); transform: rotate(-12deg); pointer-events: none; }
.family-media .stamp svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: stamp-spin 18s linear infinite; }
.family-media .stamp text { font: 700 10.5px/1 var(--mono); letter-spacing: .5px; fill: #3b2a08; }
.family-media .stamp b { font-size: 1.3rem; color: #9e1f36; line-height: 1; }
@keyframes stamp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .family-media .stamp svg { animation: none; } }
.family-media .ribbon { position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 6px 11px 6px 9px; border-radius: 6px 999px 999px 6px; background: var(--leaf); color: #f6dc9a;
  font: 700 .64rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 8px 18px -10px rgb(21 55 42 / 80%); transform: rotate(-3deg); pointer-events: none; }
.family-media .ribbon::before { content: "✦ "; color: var(--gold); }
@media (max-width: 600px) { .family-media .stamp { width: 58px; top: 6px; right: 6px; } .family-media .stamp text { font-size: 10px; } .family-media .ribbon { font-size: .56rem; padding: 5px 8px; } }

/* ---------- Review notes pinned between products ---------- */
.shelf-review { position: relative; margin: 0; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px 18px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transform: rotate(-1.2deg); transition: transform .35s var(--ease); }
.shelf-review:nth-of-type(even) { transform: rotate(1.2deg); }
.shelf-review:hover { transform: rotate(0) translateY(-3px); }
.shelf-review::before { content: "“"; position: absolute; right: 16px; top: 6px; font: 400 7rem/.8 "Instrument Serif", Georgia, serif; opacity: .16; pointer-events: none; }
.shelf-review::after { content: ""; position: absolute; top: -6px; left: 50%; width: 64px; height: 20px; translate: -50% 0; rotate: -4deg; background: rgb(255 255 255 / 55%); box-shadow: 0 2px 6px rgb(0 0 0 / 8%); }
.shelf-review--pink { background: linear-gradient(160deg, #fde4e6, #f7c9cf); color: #5b1322; }
.shelf-review--yellow { background: linear-gradient(160deg, #fff3c4, #fbe08a); color: #4a3405; }
.shelf-review--green { background: linear-gradient(160deg, #e3f0dd, #c6e0bf); color: #173a29; }
.shelf-review--peach { background: linear-gradient(160deg, #fde6d6, #f8cbb0); color: #5a2410; }
.shelf-review-tag { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: rgb(255 255 255 / 70%); font: 700 .62rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.shelf-review-stars { color: #e0a419; font-size: 1.15rem; letter-spacing: 2px; text-shadow: 0 1px 0 rgb(0 0 0 / 10%); }
.shelf-review blockquote { margin: 0; flex: 1; }
.shelf-review blockquote p { margin: 0; font: italic 400 clamp(1.25rem, 1.7vw, 1.45rem)/1.3 "Instrument Serif", Georgia, serif; }
.shelf-review figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shelf-review figcaption small { width: 100%; padding-left: 40px; margin-top: -8px; font: 500 .62rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.shelf-review-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 75%); font-weight: 800; }
.shelf-review-more { font: 700 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: inherit; }
/* Bestseller stamps in ruby red, so they stand apart from the gold ones */
.family-media .stamp--best { background: radial-gradient(circle, #9e1f36 0 54%, transparent 55%), conic-gradient(from 0deg, #7a1428, #d4566c, #6b1023, #d4566c, #7a1428); box-shadow: 0 10px 22px -10px rgb(110 16 35 / 75%), inset 0 0 0 2px rgb(255 255 255 / 35%); }
.family-media .stamp--best text { fill: #fff3d6; }
.family-media .stamp--best b { color: #f3d68c; }
