/* Eco Computer — product page (product.php) stylesheet
 * Studio layout + motion, ported from Erica's design sample (30 Nov 2026).
 * Adapted to EcoComp branding: Plus Jakarta Sans (as on index.html) instead of
 * the sample's Manrope; thumbnail strip omitted at Erica's request.
 */
:root {
  --green-900: #0f2818;
  --green-800: #1a3d26;
  --green-700: #2e6742;
  --green-500: #3a7d52;
  --green-400: #5fa67d;
  --green-200: #c8e0d0;
  --green-50:  #ecf5ef;
  --warm-white: #faf9f7;
  --warm-100: #f0ede8;
  --warm-200: #ddd9d2;
  --text-dark: #141a17;
  --text-mid: #3d4f45;
  --text-muted: #6e8077;
  --ink-500: #5a6961;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--warm-white);
  color: var(--text-dark);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ── Topbar ── */
.topbar {
  background: var(--green-900);
  color: white;
  padding: 14px 0;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}
.brand-mark {
  width: 34px; height: 34px;
  background: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
  box-sizing: border-box;
  object-fit: contain;
}
.back-link {
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  font-weight: 500;
}
.back-link:hover { color: white; }

/* ── Main layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumbs a:hover { color: var(--green-700); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; opacity: 0.5; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Gallery ── */
.gallery {
  position: sticky;
  top: 24px;
}
.gallery-main {
  background: linear-gradient(135deg, #e8f0fe 0%, #f8f8f8 100%);
  border-radius: 16px;
  border: 1px solid var(--warm-100);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 32px;
  position: relative;
}
.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.placeholder {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,0.025) 8px, rgba(0,0,0,0.025) 16px);
  border-radius: 12px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.thumb {
  width: 72px; height: 72px;
  border-radius: 10px;
  border: 2px solid var(--warm-100);
  background: white;
  cursor: pointer;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
  transition: border-color 0.15s;
}
.thumb.active { border-color: var(--green-500); }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ── Info column ── */
.brand-pill {
  display: inline-block;
  background: #e8f0fe;
  color: #1a56cc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
h1.product-name {
  font-size: 30px;
  font-weight: 800;
  color: var(--green-900);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.product-subtitle {
  color: var(--text-mid);
  font-size: 15px;
  margin-bottom: 24px;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.price-from {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.price {
  font-size: 36px;
  font-weight: 800;
  color: var(--green-700);
  letter-spacing: -0.01em;
}
.stock-line {
  font-size: 13.5px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stock-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500);
}
.stock-dot.low { background: #e67c00; }
.stock-dot.out { background: #c44; }
.stock-text-ok { color: var(--green-700); font-weight: 600; }
.stock-text-low { color: #b56700; font-weight: 600; }
.stock-text-out { color: #c44; font-weight: 600; }

.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.qty-label { font-size: 13px; color: var(--text-mid); font-weight: 600; }
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--warm-200);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.qty-control button {
  width: 36px; height: 40px;
  border: none; background: white;
  font-size: 18px; cursor: pointer;
  color: var(--text-mid);
}
.qty-control button:hover { background: var(--warm-100); }
.qty-control input {
  width: 48px; height: 40px;
  border: none; text-align: center;
  font-size: 15px; font-weight: 600;
  background: white;
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.view-cart-link {
  display: inline-block;
  margin: -8px 0 24px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
}
.view-cart-link:hover { text-decoration: underline; }
.view-cart-link[hidden] { display: none; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--green-800);
  color: white;
}
.btn-primary:hover { background: var(--green-700); }
.btn-primary:disabled { background: #999; cursor: not-allowed; }
.btn-whatsapp {
  background: #25d366;
  color: white;
}
.btn-whatsapp:hover { background: #1eb858; }
.btn-secondary {
  background: white;
  color: var(--green-800);
  border: 1.5px solid var(--green-700);
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--green-50);
  border-radius: 12px;
  margin-bottom: 32px;
}
.trust-item {
  text-align: center;
  font-size: 12px;
  color: var(--green-800);
  font-weight: 600;
  line-height: 1.4;
}
.trust-item .ico { font-size: 18px; display: block; margin-bottom: 4px; }

/* ── Spec table ── */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-500);
  display: inline-block;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--warm-100);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}
.spec-table tr { border-top: 1px solid var(--warm-100); }
.spec-table tr:first-child { border-top: none; }
.spec-table td {
  padding: 12px 18px;
  font-size: 13.5px;
  vertical-align: top;
  line-height: 1.5;
}
.spec-table td.label {
  width: 38%;
  background: #fbfaf7;
  font-weight: 600;
  color: var(--text-mid);
}
.spec-table td.value {
  color: var(--text-dark);
}
.spec-empty {
  background: white;
  border: 1px dashed var(--warm-200);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.description {
  background: white;
  border: 1px solid var(--warm-100);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.7;
}
.description p + p { margin-top: 12px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-800);
  color: white;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════
   Polish & motion layer
   Everything above this line is the original stylesheet, unchanged.
   This layer only adds motion tokens and refinements; the palette and the
   existing CSS variables are reused as-is. Entrance/reveal states are
   scoped to html.js so the page is fully visible without JavaScript, and
   all motion is switched off under prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow-sm: 0 1px 2px rgba(15,40,24,.06), 0 2px 8px rgba(15,40,24,.05);
  --shadow-md: 0 4px 14px rgba(15,40,24,.08), 0 14px 34px rgba(15,40,24,.08);
  --shadow-lg: 0 20px 50px rgba(15,40,24,.18);
  --topbar-h: 62px;
}
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: var(--green-200); color: var(--green-900); }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; border-radius: 6px; }

/* ── Topbar: sticky, condenses on scroll ── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  transition: padding .3s var(--ease-out), box-shadow .3s, background-color .3s;
}
.topbar.is-scrolled {
  padding: 10px 0;
  background: rgba(15, 40, 24, .94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.brand-mark { transition: transform .5s var(--ease-spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.back-link .arr { display: inline-block; transition: transform .3s var(--ease-out); }
.back-link:hover .arr { transform: translateX(-4px); }
.cart-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: 13px; font-weight: 600;
  transition: background-color .2s, border-color .2s;
}
.cart-link:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.32); }
.cart-link svg { width: 17px; height: 17px; }
.cart-count {
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px;
  background: var(--green-400); color: var(--green-900);
  font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cart-count[hidden] { display: none; }
.cart-link.bump { animation: cartBump .55s var(--ease-spring); }
@keyframes cartBump { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
@media (max-width: 560px) {
  .back-link .txt-long { display: none; }
  .cart-link .txt { display: none; }
}

/* ── Breadcrumbs ── */
.breadcrumbs a { transition: color .2s; }

/* ── Gallery ── */
.gallery { top: calc(var(--topbar-h) + 20px); }
.gallery-main {
  box-shadow: var(--shadow-sm);
  isolation: isolate;
  transition: box-shadow .4s var(--ease-out);
}
.gallery-main:hover { box-shadow: var(--shadow-md); }
/* soft studio light that follows the pointer */
.gallery-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 40%), rgba(255,255,255,.75), transparent 60%);
  opacity: .9; transition: opacity .4s;
  pointer-events: none;
}
/* floor shadow under the product */
.gallery-main::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 9%;
  height: 16px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(15,40,24,.20), transparent);
  pointer-events: none;
}
.gallery-stage {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img {
  transition: opacity .35s ease, transform .55s var(--ease-out), filter .35s ease;
  transform-origin: var(--zx, 50%) var(--zy, 50%);
  will-change: transform;
  border-radius: 8px;
}
.gallery-main.is-swapping img { opacity: 0; filter: blur(6px); transform: translateX(var(--swap-x, 0)) scale(.96); }
.gallery-main.is-zooming img { transform: scale(1.75); transition: transform .25s ease-out; cursor: zoom-out; }
@media (hover: hover) and (pointer: fine) { .gallery-main.zoomable { cursor: zoom-in; } }

.gal-nav {
  position: absolute; top: 50%; z-index: 2;
  width: 40px; height: 40px; margin-top: -20px;
  border-radius: 50%; border: 1px solid var(--warm-100);
  background: rgba(255,255,255,.92); color: var(--green-800);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-sm);
  opacity: 0; transform: scale(.9);
  transition: opacity .25s, transform .3s var(--ease-out), background-color .2s;
}
.gal-nav svg { width: 18px; height: 18px; }
.gal-nav.prev { left: 14px; }
.gal-nav.next { right: 14px; }
.gallery-main:hover .gal-nav, .gal-nav:focus-visible { opacity: 1; transform: scale(1); }
.gal-nav:hover { background: #fff; }
.gal-nav:active { transform: scale(.92); }
@media (hover: none) { .gal-nav { opacity: 1; transform: scale(1); } }
.gal-counter {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.9); border: 1px solid var(--warm-100);
  font-size: 12px; font-weight: 600; color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}
.gal-hint {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.9); border: 1px solid var(--warm-100);
  font-size: 12px; color: var(--text-muted);
  transition: opacity .3s;
}
.gal-hint svg { width: 13px; height: 13px; }
.gallery-main.is-zooming .gal-hint, .gallery-main.is-zooming .gal-counter { opacity: 0; }
@media (hover: none) { .gal-hint { display: none; } }

.thumb {
  position: relative;
  transition: border-color .2s, transform .3s var(--ease-out), box-shadow .3s;
}
.thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.thumb.active { box-shadow: 0 0 0 3px var(--green-50); }
.thumb img { transition: transform .4s var(--ease-out); }
.thumb:hover img { transform: scale(1.06); }

/* ── Info column ── */
h1.product-name { text-wrap: balance; }
.price { font-variant-numeric: tabular-nums; }
.qty-control { transition: border-color .2s, box-shadow .2s; }
.qty-control:focus-within { border-color: var(--green-400); box-shadow: 0 0 0 3px var(--green-50); }
.qty-control button { transition: background-color .15s, color .15s; }
.qty-control button:hover { color: var(--green-800); }
.qty-control button:active { background: var(--warm-200); }
.qty-control input:focus { outline: none; }
.qty-control input.bump { animation: qtyBump .28s var(--ease-spring); }
@keyframes qtyBump { 0% { transform: scale(1); } 45% { transform: scale(1.22); color: var(--green-700); } 100% { transform: scale(1); } }

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease-out), box-shadow .25s, background-color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary.is-added { background: var(--green-500); }
.btn .check { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawIn .45s .05s var(--ease-out) forwards; }
.btn-whatsapp:hover svg { animation: wiggle .6s ease; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } }
.ripple {
  position: absolute; border-radius: 50%; z-index: -1;
  background: rgba(255,255,255,.35);
  transform: scale(0); animation: ripple .6s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.view-cart-link { display: inline-flex; align-items: center; gap: 6px; }
.view-cart-link .arr { display: inline-block; transition: transform .3s var(--ease-out); }
.view-cart-link:hover .arr { transform: translateX(4px); }
.view-cart-link:not([hidden]) { animation: rise .45s var(--ease-out) both; }

.trust-row { border: 1px solid var(--green-200); }
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.trust-item .ico {
  width: 40px; height: 40px; margin: 0;
  border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-700); box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease-spring);
}
.trust-item .ico svg { width: 21px; height: 21px; }
.trust-item:hover .ico { transform: translateY(-3px) rotate(-4deg); }
.js .trust-item .ico path, .js .trust-item .ico polyline, .js .trust-item .ico circle {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: drawIn 1.1s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 450ms);
}
@keyframes drawIn { to { stroke-dashoffset: 0; } }

.description { box-shadow: var(--shadow-sm); }

/* ── Spec table ── */
.section-title { border-bottom-color: transparent; position: relative; }
.section-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--green-500);
  transform-origin: left; transition: transform .8s var(--ease-out) .1s;
}
.js .reveal-pending.section-title::after { transform: scaleX(0); }
.spec-table { border-collapse: separate; border-spacing: 0; box-shadow: var(--shadow-sm); }
.spec-table tr + tr td { border-top: 1px solid var(--warm-100); }
.spec-table td { transition: background-color .2s, color .2s; }
.spec-table tr:hover td.label { background: var(--green-50); color: var(--green-800); }
.spec-table tr:hover td.value { background: #fdfefd; }

/* ── Entrance (page load) ── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes galleryIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes productIn { from { opacity: 0; transform: translateX(28px) rotate(1.5deg) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes floorShadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.9); opacity: .7; } }
.js [data-anim] { animation: rise .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.js .breadcrumbs { animation: rise .6s var(--ease-out) both; }
.js .gallery-main { animation: galleryIn .8s var(--ease-out) both .05s; }
.js .gallery-main .gallery-stage { animation: productIn 1s var(--ease-out) both .25s, float 6s ease-in-out 1.3s infinite; }
.js .gallery-main::after { animation: floorShadow 6s ease-in-out 1.3s infinite; }
.js .gallery-main:hover .gallery-stage { animation-play-state: running, paused; }
.js .gallery-main:hover::after { animation-play-state: paused; }
.js .gallery-thumbs .thumb { animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 420ms); }

/* ── Scroll reveal (only for content below the fold at load) ── */
.js .reveal-pending { opacity: 0; transform: translateY(18px); }
.js .revealed { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .spec-table.reveal-pending { opacity: 1; transform: none; }
.js .spec-table.reveal-pending tr { opacity: 0; transform: translateY(8px); }
.js .spec-table.revealed tr { opacity: 1; transform: none; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); transition-delay: calc(var(--i, 0) * 35ms); }

/* ── Sticky buy bar (appears once the main buttons scroll away) ── */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--warm-100);
  box-shadow: 0 -8px 30px rgba(15,40,24,.10);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform .45s var(--ease-out);
}
.buybar.show { transform: none; }
.buybar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 14px;
}
.buybar-thumb {
  width: 46px; height: 46px; flex: none;
  border-radius: 10px; border: 1px solid var(--warm-100);
  background: linear-gradient(135deg, var(--green-50), #f8f8f8);
  display: flex; align-items: center; justify-content: center; padding: 4px;
}
.buybar-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.buybar-text { min-width: 0; flex: 1; }
.buybar-name { font-size: 14px; font-weight: 700; color: var(--green-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar-price { font-size: 13px; font-weight: 700; color: var(--green-700); font-variant-numeric: tabular-nums; }
.buybar .btn { padding: 11px 18px; flex: none; }
.buybar .btn-whatsapp { padding: 11px 13px; }
@media (max-width: 560px) {
  .buybar-inner { padding: 0 16px; gap: 10px; }
  .buybar-thumb { display: none; }
  .buybar .btn-primary .txt { display: none; }
}
body.buybar-on .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* ── Toast ── */
.toast {
  display: flex; align-items: center; gap: 10px;
  overflow: hidden;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%) translateY(24px) scale(.96);
  transition: opacity .25s, transform .45s var(--ease-spring), bottom .3s var(--ease-out);
}
.toast.show { transform: translateX(-50%) translateY(0) scale(1); }
.toast-ico {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: var(--green-400); color: var(--green-900);
  display: flex; align-items: center; justify-content: center;
}
.toast-ico svg { width: 13px; height: 13px; }
.toast::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--green-400); transform-origin: left; transform: scaleX(0);
}
.toast.show::after { animation: toastTimer 2.2s linear forwards; }
@keyframes toastTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* flying thumbnail used by the add-to-cart animation */
.fly-img {
  position: fixed; z-index: 70; pointer-events: none;
  object-fit: contain; border-radius: 10px;
  background: #fff; box-shadow: var(--shadow-lg); padding: 6px;
}

/* ── Single-column layout: the gallery stops being sticky so it no longer
   slides over the details while scrolling on phones ── */
@media (max-width: 880px) {
  .gallery { position: static; }
}
@media (max-width: 480px) {
  .cta-row { grid-template-columns: 1fr; }
  h1.product-name { font-size: 26px; }
  .trust-row { padding: 14px 10px; gap: 8px; }
}

/* ── Reduced motion: keep every state change, drop the movement ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal-pending, .js .spec-table.reveal-pending tr { opacity: 1; transform: none; }
  .js .reveal-pending.section-title::after { transform: none; }
  .gallery-main.is-zooming img { transform: none; }
}
.gallery-main:not(.zoomable) .gal-hint { display: none; }

/* ══════════════════════════════════════════════════════════════════════
   Studio layout (v2)
   Inspired by app-promo studio frames: a light stage with soft concentric
   rings and drifting dots behind a tilted product, a big bold headline and
   glowing pill buttons, then a greige "studio" band for the details.
   Uses the same palette variables as above. No new colours.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Hero stage ── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 28% 45%, #fff 0%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, var(--warm-white) 0%, #f4f6f3 100%);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 28px 24px 72px;
  position: relative;
}
.hero .detail-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero .breadcrumbs { margin-bottom: 20px; }

/* Gallery becomes a stage: no card, just light, rings and a floor shadow */
.gallery { position: relative; top: auto; }
.gallery-main {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  padding: 28px;
}
.gallery-main:hover { box-shadow: none; }
.gallery-main::before {
  inset: 8% 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0));
}
.gallery-main::after {
  left: 12%; right: 12%; bottom: 3%;
  height: 34px;
  background: radial-gradient(closest-side, rgba(15,40,24,.26), rgba(15,40,24,0));
  filter: blur(4px);
}

.stage-bg {
  position: absolute;
  left: 50%; top: 42%;
  width: 150%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}
.gallery-main, .gallery-thumbs { position: relative; z-index: 1; }
.ring {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--r) * 24%); aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 26px solid rgba(200, 224, 208, .38);
  box-shadow:
    inset 0 0 30px rgba(95, 166, 125, .14),
    0 0 34px rgba(95, 166, 125, .07);
}
.ring-pulse {
  position: absolute; left: 50%; top: 50%;
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(95, 166, 125, .35);
  opacity: 0;
}
.dot {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--green-400), var(--green-700));
  box-shadow: 0 4px 10px rgba(46, 103, 66, .25);
  opacity: .8;
}

/* Tilted product, like a device lying in a studio */
.tilt {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform: perspective(1100px) rotateX(calc(6deg + var(--ty, 0deg))) rotateY(calc(-12deg + var(--tx, 0deg)));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out);
}
.gallery-main img {
  filter: drop-shadow(0 26px 30px rgba(15,40,24,.18)) drop-shadow(0 6px 10px rgba(15,40,24,.10));
  border-radius: 14px;
}
.gallery-main.is-swapping img { filter: blur(6px); }
.gallery-main.is-zooming .tilt { transform: none; }

.gal-nav { background: #fff; border-color: var(--warm-200); }
.gal-counter, .gal-hint { background: rgba(255,255,255,.85); }
.gallery-thumbs { justify-content: center; margin-top: 8px; }
.thumb { border-radius: 14px; background: rgba(255,255,255,.9); }

/* ── Headline block ── */
.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.eyebrow .brand-pill { margin: 0; }
.eyebrow-text {
  font-size: 13px; font-weight: 700;
  color: var(--green-700);
  letter-spacing: .02em;
}
.eyebrow-text::first-letter { text-transform: uppercase; }
h1.product-name {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.product-subtitle {
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 46ch;
  margin-bottom: 26px;
}
.price-row { margin-bottom: 26px; }
.price { font-size: clamp(34px, 3.4vw, 42px); letter-spacing: -0.02em; }

.qty-control { border-radius: 999px; padding: 0 4px; }
.qty-control button { border-radius: 50%; width: 36px; height: 36px; margin: 2px 0; }

/* Glowing pill buttons */
.btn { border-radius: 999px; padding: 15px 22px; }
.btn-primary {
  box-shadow: 0 12px 28px -8px rgba(46, 103, 66, .65), 0 0 0 0 rgba(95,166,125,.0);
}
.js .cta-row .btn-primary { animation: glow 3.2s ease-in-out 1.6s infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 12px 28px -8px rgba(46,103,66,.6), 0 0 0 0 rgba(95,166,125,0); }
  50%      { box-shadow: 0 16px 36px -6px rgba(46,103,66,.75), 0 0 0 6px rgba(95,166,125,.14); }
}
.btn-primary:hover { box-shadow: 0 18px 38px -8px rgba(46,103,66,.75); animation-play-state: paused; }
.btn-whatsapp { box-shadow: 0 12px 28px -10px rgba(37,211,102,.7); }
.btn-whatsapp:hover { box-shadow: 0 18px 36px -10px rgba(37,211,102,.85); }

/* Trust items as a light inline row */
.trust-row {
  background: transparent;
  border: none;
  border-top: 1px solid var(--warm-200);
  border-radius: 0;
  padding: 20px 0 0;
  margin: 8px 0 0;
  gap: 16px;
}
.trust-item {
  flex-direction: row; text-align: left; gap: 10px;
  font-size: 12.5px;
}
.trust-item .ico { width: 38px; height: 38px; border-radius: 50%; flex: none; }

/* ── Details band: warm greige studio ── */
.details {
  background: linear-gradient(180deg, var(--warm-100) 0%, var(--warm-white) 100%);
  border-top: 1px solid var(--warm-200);
}
.details-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 72px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: start;
}
.details-head {
  position: sticky;
  top: calc(var(--topbar-h) + 28px);
}
.details-head .eyebrow-text { margin-bottom: 12px; }
.details-title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--green-900);
  text-wrap: balance;
  margin-bottom: 24px;
}
.details .description { margin-bottom: 0; background: rgba(255,255,255,.75); }
.details .spec-table { margin-bottom: 0; border-radius: 16px; }
.details .spec-empty { border-radius: 16px; }

/* ── Stage motion ── */
@keyframes ringIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes ringBreathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.035); } }
@keyframes ringPulse { 0% { opacity: .7; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(5.2); } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(10px, -14px); }
  66% { transform: translate(-8px, 8px); }
}
@keyframes dotIn { from { opacity: 0; transform: scale(0); } to { opacity: .8; transform: scale(1); } }
.js .ring {
  animation: ringIn 1.1s var(--ease-out) both, ringBreathe 7s ease-in-out infinite;
  animation-delay: calc(var(--r) * 110ms), calc(var(--r) * 600ms + 1.2s);
}
.js .ring-pulse { animation: ringPulse 5.5s cubic-bezier(.2,.6,.3,1) 1.4s infinite; }
.js .dot {
  animation: dotIn .7s var(--ease-spring) both, drift calc(9s + var(--d) * 2s) ease-in-out infinite;
  animation-delay: calc(var(--d) * 180ms + 500ms), calc(var(--d) * -1s);
}

/* ── Responsive ── */
@media (max-width: 880px) {
  .hero .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .details-inner { grid-template-columns: 1fr; gap: 32px; padding: 52px 24px 72px; }
  .details-head { position: static; }
  .stage-bg { width: 125%; }
}
@media (max-width: 560px) {
  .hero-inner { padding: 20px 16px 52px; }
  .details-inner { padding: 44px 16px 64px; }
  .ring { border-width: 16px; }
  .gallery-main { padding: 12px; }
  .trust-row { grid-template-columns: 1fr; gap: 10px; }
  .tilt { transform: perspective(900px) rotateX(4deg) rotateY(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ring-pulse, .dot, .ring { animation: none !important; }
  .tilt { transition: none; }
}

/* ── Type refinement (v3): a lighter, more editorial headline set in the
   display font (Plus Jakarta Sans for EcoComp, see adaptations below) ── */
:root { --font-display: var(--font); }
.eyebrow { gap: 12px; margin-bottom: 18px; }
.eyebrow .brand-pill { font-size: 10.5px; padding: 4px 11px; letter-spacing: .12em; }
.eyebrow-text {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 12px; border-left: 1px solid var(--warm-200);
}
.details-head .eyebrow-text { padding-left: 0; border-left: 0; }
h1.product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 3.9vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--green-900);
  margin-bottom: 18px;
}
.key-specs {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 28px; padding: 0;
  max-width: 520px;
}
.key-specs li {
  font-size: 13px; font-weight: 500;
  color: var(--text-mid);
  background: rgba(255,255,255,.8);
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  padding: 6px 12px;
  line-height: 1.3;
}
.price-row {
  flex-direction: column; align-items: flex-start; gap: 4px;
  margin-bottom: 26px;
}
.price-from {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
}
.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 2.9vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--green-700);
  display: inline-flex; align-items: baseline; gap: 6px;
}
.price-cur { font-size: .5em; font-weight: 600; letter-spacing: .04em; color: var(--green-500); }
.qty-label { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.details-title, .section-title { font-family: var(--font-display); }
.details-title { font-weight: 600; letter-spacing: -0.028em; }
.buybar-name, .buybar-price { font-family: var(--font-display); }

/* ── Grounded product (v4): the laptop sits on the stage floor instead of
   hovering. No bobbing, no tilt, and a tight contact shadow at its base. ── */
.gallery-main { --pad: 28px; padding: var(--pad); }
.gallery-stage { align-items: flex-end; position: relative; z-index: 1; }
.js .gallery-main .gallery-stage { animation: productIn 1s var(--ease-out) both .25s; }
.tilt { transform: none; align-items: flex-end; transition: none; }
.gallery-main img {
  filter: drop-shadow(0 1px 1px rgba(15,40,24,.18)) drop-shadow(0 3px 4px rgba(15,40,24,.10));
}
.gallery-main.is-swapping img { filter: blur(6px); }
/* contact shadow: dark and tight right under the base, with a softer spread */
.gallery-main::after {
  left: 8%; right: 8%;
  bottom: calc(var(--pad) - 7px);
  height: 16px;
  background:
    radial-gradient(closest-side, rgba(15,40,24,.55) 0%, rgba(15,40,24,.28) 55%, rgba(15,40,24,0) 100%);
  filter: blur(2.5px);
  z-index: 0;
  animation: none !important;
  transform: none;
  opacity: 1;
}
/* faint floor plane so the shadow has something to rest on */
.gallery-main .gallery-stage::after {
  content: ""; position: absolute; z-index: -2;
  left: -4%; right: -4%; bottom: calc(var(--pad) - 30px); height: 60px;
  background: radial-gradient(50% 50% at 50% 40%, rgba(240,237,232,.9), rgba(240,237,232,0));
  pointer-events: none;
}
@media (max-width: 560px) {
  .gallery-main { --pad: 12px; }
}

/* ── Buttons (v5): calmer, premium treatment. Moderate radius, medium
   weight, solid dark primary and a quiet outlined WhatsApp secondary.
   No glow, no shine sweep. ── */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .005em;
  border-radius: 12px;
  min-height: 52px;
  padding: 0 22px;
  gap: 10px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease, transform .2s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary,
.js .cta-row .btn-primary {
  animation: none;
  background: var(--green-900);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 1px 2px rgba(15,40,24,.20),
    0 8px 20px -12px rgba(15,40,24,.55);
}
.btn-primary::after { display: none; }
.btn-primary:hover {
  background: var(--green-800);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 2px 4px rgba(15,40,24,.18),
    0 14px 28px -14px rgba(15,40,24,.6);
}
.btn-primary.is-added { background: var(--green-700); }
.btn-whatsapp {
  background: #fff;
  color: var(--green-900);
  border: 1px solid var(--warm-200);
  box-shadow: 0 1px 2px rgba(15,40,24,.06);
}
.btn-whatsapp svg { color: #25d366; }
.btn-whatsapp:hover {
  background: var(--green-50);
  border-color: var(--green-200);
  box-shadow: 0 1px 2px rgba(15,40,24,.06), 0 10px 22px -14px rgba(15,40,24,.35);
}
.ripple { background: rgba(255,255,255,.18); }
.btn-whatsapp .ripple { background: rgba(46,103,66,.10); }
.buybar .btn { min-height: 44px; padding: 0 18px; border-radius: 10px; }
.buybar .btn-whatsapp { padding: 0 13px; }
.qty-control { border-radius: 12px; }
.qty-control button { border-radius: 8px; }

/* ── Add to Cart in bright green (v6, CK's request) ── */
:root { --cta-green: #16a34a; --cta-green-hover: #15803d; }
.btn-primary,
.js .cta-row .btn-primary {
  background: var(--cta-green);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 1px 2px rgba(22,163,74,.25),
    0 8px 20px -12px rgba(22,163,74,.7);
}
.btn-primary:hover {
  background: var(--cta-green-hover);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 2px 4px rgba(22,163,74,.22),
    0 14px 28px -14px rgba(22,163,74,.75);
}
.btn-primary.is-added { background: var(--green-700); }

/* ── Light header + breadcrumb (v7): frosted, blends into the stage ── */
.topbar {
  background: rgba(250, 249, 247, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  color: var(--green-900);
  border-bottom: 1px solid rgba(221, 217, 210, .55);
  padding: 14px 0;
}
.topbar.is-scrolled {
  padding: 10px 0;
  background: rgba(250, 249, 247, .92);
  box-shadow: 0 10px 30px -22px rgba(15, 40, 24, .45);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--green-900);
  gap: 11px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--warm-200);
  box-shadow: 0 1px 2px rgba(15,40,24,.06);
}
.topbar-actions { gap: 8px; }
.back-link {
  color: var(--text-mid);
  font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
  transition: color .2s, background-color .2s;
}
.back-link:hover { color: var(--green-900); background: rgba(240, 237, 232, .8); }
.cart-link {
  height: 38px; padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--warm-200);
  background: #fff;
  color: var(--green-900);
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,40,24,.06);
}
.cart-link:hover { background: var(--green-50); border-color: var(--green-200); }
.cart-count { background: var(--cta-green, var(--green-500)); color: #fff; }

.hero-inner { padding-top: 22px; }
.hero .breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center;
  font-size: 12.5px; letter-spacing: .01em;
  color: var(--text-muted);
  margin-bottom: 14px;
  position: relative; z-index: 2;
}
.hero .breadcrumbs a { color: var(--text-muted); }
.hero .breadcrumbs a:hover { color: var(--green-800); text-decoration: none; }
.hero .breadcrumbs .sep { margin: 0 9px; opacity: .45; }
.hero .breadcrumbs > span:last-child { color: var(--text-dark); font-weight: 500; }

/* ── EcoComp adaptations (product.php port) ── */
:root {
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Subtitle shown when a product has no admin key specs */
.info .product-subtitle { color: var(--text-mid); max-width: 46ch; margin: -4px 0 26px; }
/* Thumbnail strip intentionally not rendered (Erica, 30 Nov); arrows + counter browse photos */
.gallery-main .placeholder { position: relative; z-index: 1; }
.details-head:only-child { grid-column: 1 / -1; }

/* Our product photos are white-background JPGs (the sample used cut-out
   images). Multiply-blend them so the white melts into the studio stage.
   Blending needs the ancestors to stay un-isolated, so the stage containers
   drop their z-index/isolation and the entrance motion moves onto the photo. */
.gallery-main { isolation: auto; z-index: auto; }
.gallery-main::before { z-index: 0; }
.gallery-stage { z-index: auto; }
.tilt { transform-style: flat; }
.js .gallery-main { animation: none; }
.js .gallery-main .gallery-stage { animation: none; }
.gallery-main img { mix-blend-mode: multiply; filter: none; border-radius: 0; }
.js .gallery-main img { animation: productIn 1s var(--ease-out) backwards .25s; }
.gallery-main.is-swapping img { filter: blur(6px); }
