/* ===================================================================
   SHOP PAGE — specific styles (loads after styles.css)
   Eco-Fresh theme
   =================================================================== */

.shop-hero { padding: clamp(40px,6vw,70px) 0 10px; text-align: center; position: relative; overflow: hidden; }
.shop-hero__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 60% at 80% 0%, rgba(255,214,10,.28), transparent 60%), radial-gradient(45% 60% at 10% 20%, rgba(16,185,129,.2), transparent 62%), linear-gradient(180deg, var(--cream-2), var(--cream)); }
.shop-hero h1 { font-size: clamp(2.4rem,5.5vw,4rem); color: var(--ink); }
.shop-hero p { color: var(--text); max-width: 560px; margin: 16px auto 0; font-size: 1.08rem; }
.shop-hero .trust-row { justify-content: center; }
.crumbs { display: flex; gap: 8px; justify-content: center; font-weight: 600; font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a:hover { color: var(--emerald-700); }

.shop-section { padding: clamp(36px,5vw,64px) 0; }

/* ---------- Product layout ---------- */
.buy-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start; margin-bottom: clamp(40px,6vw,72px);
}
.buy-card:last-of-type { margin-bottom: 0; }

/* gallery */
.gallery { position: sticky; top: 90px; }
.gallery__main {
  position: relative; background: #fff; border-radius: var(--radius-lg);
  aspect-ratio: 1; display: grid; place-items: center; padding: 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
}
.gallery__main img { max-height: 100%; width: auto; object-fit: contain; transition: opacity .18s ease; }
.flag { position: absolute; top: 18px; left: 18px; z-index: 3; background: var(--coral); color: #fff; font-weight: 800; font-size: .74rem; letter-spacing: .04em; padding: 7px 13px; border-radius: var(--radius-pill); text-transform: uppercase; box-shadow: var(--shadow-sm); }
.flag.emerald { background: var(--emerald-600); }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--emerald-900); transition: transform .25s, background .25s; }
.gallery__nav:hover { transform: translateY(-50%) scale(1.1); background: #fff; }
.gallery__nav.prev { left: 12px; } .gallery__nav.next { right: 12px; }
.gallery__counter { position: absolute; bottom: 14px; right: 16px; z-index: 4; font-size: .74rem; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.85); padding: 4px 11px; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumbs .thumb { flex: none; width: 74px; height: 74px; border-radius: 14px; border: 2px solid transparent; background: #fff; padding: 6px; box-shadow: var(--shadow-sm); transition: border-color .25s, opacity .25s; opacity: .6; }
.gallery__thumbs .thumb.sel { border-color: var(--emerald-600); opacity: 1; }
.gallery__thumbs .thumb:hover { opacity: 1; }
.gallery__thumbs .thumb img { width: 100%; height: 100%; object-fit: contain; }

/* details */
.buy-body__rating { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.buy-body__rating .stars { color: #F59E0B; }
.buy-body__rating span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.buy-body h1, .buy-body h2 { font-size: clamp(1.9rem,3.6vw,2.7rem); }
.buy-body__net { color: var(--muted); font-weight: 600; margin-top: 6px; }
.buy-body__desc { margin-top: 16px; color: var(--text); }

.benefit-list { margin: 22px 0; display: grid; gap: 10px; }
.benefit-list li { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .96rem; color: var(--ink); }
.benefit-list .tick { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--emerald-100); color: var(--emerald-700); display: grid; place-items: center; }

/* selectors */
.opt-group { margin-top: 22px; }
.opt-group > label { display: block; font-weight: 800; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.opt-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 18px; font-weight: 700; color: var(--ink); background: #fff; cursor: pointer; transition: border-color .25s, background .25s, transform .2s; position: relative; }
.opt small { display: block; font-weight: 600; color: var(--muted); font-size: .78rem; }
.opt:hover { transform: translateY(-2px); }
.opt.sel { border-color: var(--emerald-600); background: var(--emerald-50); color: var(--emerald-800); }
.opt .opt-badge { position: absolute; top: -10px; right: -8px; background: var(--coral); color: #fff; font-size: .66rem; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-pill); }

/* format buttons (2-up) */
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.format-grid .opt { text-align: left; }

/* purchase options box */
.purchase-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 22px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; }
.purchase { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 2px solid var(--line); border-radius: var(--radius-sm); transition: border-color .25s, background .25s; text-align: left; }
.purchase[hidden] { display: none !important; }
.purchase.sel { border-color: var(--emerald-600); background: var(--cream-card); }
.purchase__t b { display: block; color: var(--ink); }
.purchase__t span { font-size: .8rem; color: var(--muted); }
.purchase__p { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--emerald-700); }
.purchase .save-tag { font-size: .7rem; font-weight: 800; color: var(--emerald-700); background: var(--emerald-100); padding: 2px 8px; border-radius: var(--radius-pill); margin-left: 8px; }

/* qty */
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.qty button { width: 44px; height: 44px; font-size: 1.4rem; color: var(--emerald-900); display: grid; place-items: center; transition: background .2s; }
.qty button:hover { background: var(--emerald-50); }
.qty input { width: 44px; text-align: center; border: none; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* SHOPIFY embed slot */
.shopify-slot { position: relative; margin-top: 18px; }
.shopify-slot__hint { position: absolute; top: -10px; left: 16px; z-index: 2; background: var(--emerald-600); color: #fff; font-size: .64rem; font-weight: 800; letter-spacing: .04em; padding: 3px 10px; border-radius: var(--radius-pill); text-transform: uppercase; }
.shopify-embed { border: 2px dashed rgba(5,150,105,.4); border-radius: var(--radius); background: linear-gradient(135deg, rgba(209,250,229,.4), rgba(254,243,199,.4)); padding: 16px; min-height: 70px; display: flex; align-items: center; justify-content: center; }
.shopify-embed.live { border-style: solid; border-color: var(--line); background: #fff; padding: 8px; }
/* Collapse (instead of display:none) so the Shopify SDK can still size its iframe */
.shopify-embed.collapsed { height: 0; overflow: hidden; padding: 0; border-width: 0; min-height: 0; }
.shopify-slot__note { text-align: center; font-size: .76rem; color: var(--muted); font-weight: 600; padding: 8px 6px 0; }

.pay-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; font-weight: 600; }
.pay-row .chips { display: flex; gap: 6px; }
.pay-row .chips span { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: .72rem; font-weight: 800; color: var(--emerald-900); }

/* trust badges row */
.trust-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 22px; }
.trust-3 .t { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; }
.trust-3 .t svg { color: var(--emerald-600); margin: 0 auto 6px; }
.trust-3 .t span { font-size: .76rem; font-weight: 700; color: var(--ink); }

/* ---------- Bundles ---------- */
.bundles { background: var(--cream-card); }
.bundle-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.bundle { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 28px; text-align: center; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; display: flex; flex-direction: column; }
.bundle:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.bundle.featured { border-color: var(--emerald-600); box-shadow: var(--shadow-md); transform: scale(1.03); }
.bundle.featured:hover { transform: scale(1.03) translateY(-8px); }
.bundle__tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg,var(--yellow),var(--yellow-deep)); color: var(--emerald-900); font-weight: 800; font-size: .76rem; padding: 7px 16px; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); white-space: nowrap; }
.bundle__emoji { font-size: 2.6rem; }
.bundle h3 { font-size: 1.5rem; margin-top: 10px; }
.bundle__sub { color: var(--muted); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.bundle__price { margin: 20px 0 6px; }
.bundle__price .now { font-family: var(--font-display); font-weight: 600; font-size: 2.6rem; color: var(--emerald-700); }
.bundle__price .per { color: var(--muted); font-weight: 600; font-size: .9rem; }
.bundle__was { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.bundle ul { display: grid; gap: 10px; margin: 20px 0 26px; text-align: left; }
.bundle ul li { display: flex; gap: 10px; font-size: .94rem; font-weight: 600; color: var(--ink); }
.bundle ul li svg { flex: none; color: var(--emerald-600); margin-top: 3px; }
.bundle .shopify-slot { margin-top: auto; }

/* ---------- Subscribe ---------- */
.subscribe-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--emerald-900), #0b6b4f); border-radius: var(--radius-lg); padding: clamp(36px,5vw,58px); color: #fff; overflow: hidden; position: relative; }
.subscribe-card .eyebrow { background: rgba(255,255,255,.12); color: #FDE68A; border-color: rgba(255,255,255,.12); }
.subscribe-card h2 { color: #fff; font-size: clamp(1.9rem,4vw,2.7rem); margin-top: 16px; }
.subscribe-card p { color: rgba(209,250,229,.85); margin-top: 14px; }
.sub-perks { display: grid; gap: 14px; }
.sub-perk { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-sm); padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.sub-perk .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: var(--yellow); font-size: 1.3rem; }
.sub-perk b { display: block; }
.sub-perk span { color: rgba(209,250,229,.7); font-size: .9rem; }

/* ---------- Guarantees ---------- */
.guarantee-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.guarantee { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; text-align: center; box-shadow: var(--shadow-sm); }
.guarantee .ic { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.guarantee h4 { font-family: var(--font-display); font-size: 1.1rem; color: var(--emerald-900); }
.guarantee p { color: var(--muted); font-size: .88rem; margin-top: 6px; }

.compare-note { text-align: center; color: var(--muted); font-weight: 600; margin-top: 14px; font-size: .9rem; }

/* ---------- Shopify SDK integration ---------- */
/* Hide the SDK's floating cart bubble — our header cart icon opens the drawer instead */
.shopify-buy-frame--toggle { display: none !important; }

/* ---------- Sticky mobile buy bar ---------- */
.stickybar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  display: none; align-items: center; justify-content: space-between; gap: 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 10px 10px 20px;
  box-shadow: 0 18px 50px -12px rgba(6,78,59,.45);
  transform: translateY(140%);
  transition: transform .45s var(--ease);
}
.stickybar.show { transform: translateY(0); }
.stickybar__info { min-width: 0; }
.stickybar__info b { display: block; font-size: .84rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stickybar__price { font-family: var(--font-display); font-weight: 600; color: var(--emerald-700); font-size: 1.15rem; }
.stickybar .btn { padding: 13px 22px; flex: none; }
@media (max-width: 980px) { .stickybar { display: flex; } }

.purchase-box.flash { animation: boxflash 1.2s ease; }
@keyframes boxflash {
  0%, 100% { box-shadow: var(--shadow-sm); }
  30% { box-shadow: 0 0 0 5px rgba(5,150,105,.35); }
}

@media (max-width: 980px) {
  .buy-card { grid-template-columns: 1fr; gap: 30px; }
  .gallery { position: static; }
  .bundle-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .bundle.featured { transform: none; }
  .bundle.featured:hover { transform: translateY(-8px); }
  .subscribe-card { grid-template-columns: 1fr; }
  .guarantee-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 460px) {
  .guarantee-grid { grid-template-columns: 1fr; }
  .format-grid { grid-template-columns: 1fr; }
}
