/* BAMBOO product page */
.crumbs { padding-top: calc(var(--header-h) + 28px); padding-bottom: 12px; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: '/'; margin-right: 8px; opacity: 0.5; }
.crumbs a:hover { color: var(--c-accent); }
.crumbs [aria-current] { color: var(--c-cream); }

.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 88px); align-items: start; padding-block: 16px clamp(56px, 8vw, 110px); }
.product__info { position: sticky; top: calc(var(--header-h) + 24px); }
.product__info h1 { font-size: clamp(2.4rem, 4.6vw, 4.4rem); margin-bottom: 0.3em; }
.product__info .eyebrow { margin-bottom: 0.8em; }
.product__info .eyebrow a { color: inherit; }
.product__badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.product__price { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; }
.product__now { font-family: var(--font-heading); font-size: clamp(2rem, 3vw, 2.8rem); color: var(--c-cream); }
.product__was { color: var(--c-muted); }
.product__lead { margin-bottom: 1em; }

.status { display: flex; align-items: center; gap: 10px; margin: 0 0 26px; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-beige); }
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: #6fbf73; }
.status.is-low_stock .status__dot { background: var(--c-accent); }
.status.is-made_to_order .status__dot { background: var(--c-beige); }
.status.is-out_of_stock { color: var(--c-muted); }
.status.is-out_of_stock .status__dot { background: #8a8a8a; }

/* ---------- Gallery ---------- */
.gallery__stage { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border: 1px solid var(--c-line); background: var(--c-surface); perspective: 1200px; }
.gallery__frame { position: absolute; inset: 0; transition: transform 0.35s var(--ease-out); transform-style: preserve-3d; will-change: transform; }
.gallery__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease-out); cursor: zoom-in; }
.gallery__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-accent); }
.gallery__mark { width: 32%; opacity: 0.25; }
.gallery__mark .logo-mark { width: 100%; height: auto; }
.gallery__mark .logo-word { display: none; }

.gallery__btn {
  position: absolute; z-index: 3; display: grid; place-items: center;
  background: rgba(10, 10, 10, 0.72); border: 1px solid var(--c-line); color: var(--c-cream);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.3s, color 0.3s;
}
.gallery__btn:hover, .gallery__btn:focus-visible { background: var(--c-accent); color: #0a0a0a; }
.gallery__btn--zoom { top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; }
.gallery__btn--3d { left: 14px; bottom: 14px; padding: 12px 22px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.gallery__viewer { position: absolute; inset: 0; z-index: 2; background: radial-gradient(ellipse at 50% 55%, #1d1d1d, #0a0a0a); }
.gallery__viewer[hidden] { display: none; }
.gallery__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.gallery__viewer-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--c-beige); pointer-events: none; }
.gallery__viewer-hint { position: absolute; right: 18px; bottom: 18px; margin: 0; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-muted); pointer-events: none; }
.is-3d .gallery__frame, .is-3d .gallery__btn--zoom { visibility: hidden; }

.gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.gallery__thumbs button { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--c-line); opacity: 0.7; transition: opacity 0.3s, border-color 0.3s; }
.gallery__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs button:hover, .gallery__thumbs button[aria-current='true'] { opacity: 1; border-color: var(--c-accent); }

/* ---------- Options ---------- */
.buy { display: grid; gap: 22px; margin-bottom: 34px; }
.opt { margin: 0; padding: 0; border: 0; }
.opt legend { margin-bottom: 12px; padding: 0; font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-muted); }
.opt legend span { color: var(--c-cream); }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch, .size { position: relative; cursor: pointer; }
.swatch input, .size input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.swatch__dot { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--sw, #888); box-shadow: 0 0 0 1px var(--c-line); transition: box-shadow 0.3s; }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-accent); }
.swatch input:focus-visible + .swatch__dot { outline: 2px solid var(--c-accent); outline-offset: 5px; }
.size span { display: block; padding: 11px 20px; font-size: 0.82rem; letter-spacing: 0.06em; border: 1px solid var(--c-line); border-radius: 999px; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.size:hover span { border-color: var(--c-accent); }
.size input:checked + span { background: var(--c-accent); border-color: var(--c-accent); color: #0a0a0a; }
.size input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.is-off { opacity: 0.35; cursor: not-allowed; }
.is-off input { cursor: not-allowed; }
.size.is-off span { text-decoration: line-through; }
.opt.has-error legend { color: #ff8a80; }

.buy__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: 999px; }
.qty button { width: 46px; height: 52px; font-size: 1.2rem; color: var(--c-beige); transition: color 0.3s; }
.qty button:hover { color: var(--c-accent); }
.qty input { width: 48px; text-align: center; color: var(--c-text); background: transparent; border: 0; font: inherit; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy__add { flex: 1 1 200px; min-height: 54px; }
.buy__add[disabled] { opacity: 0.45; cursor: not-allowed; }
.buy__ask { justify-self: start; }

.wish { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--c-line); border-radius: 50%; fill: none; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.wish:hover { border-color: var(--c-accent); color: var(--c-accent); }
.wish[aria-pressed='true'] { background: var(--c-accent); border-color: var(--c-accent); color: #0a0a0a; fill: #0a0a0a; }

/* ---------- Accordions ---------- */
.accordions { border-top: 1px solid var(--c-line); }
.acc { border-bottom: 1px solid var(--c-line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; list-style: none; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-size: 1.3rem; color: var(--c-accent); transition: transform 0.4s var(--ease-out); }
.acc[open] summary::after { transform: rotate(45deg); }
.acc p { margin: 0 0 20px; color: var(--c-beige); }
.dims { margin: 0 0 20px; }
.dims div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.dims div:last-child { border-bottom: 0; }
.dims dt { color: var(--c-muted); }
.dims dd { margin: 0; text-align: right; color: var(--c-cream); }

/* ---------- Description, related, saved ---------- */
.product-desc { padding-bottom: clamp(56px, 8vw, 110px); }
.product-desc h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.prose { max-width: 68ch; color: var(--c-beige); font-size: 1.05rem; }
.related, .saved { padding-bottom: clamp(56px, 8vw, 110px); }
.related h2, .saved h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1em; }
.p-grid--related { grid-template-columns: repeat(4, 1fr); }
.saved[hidden] { display: none; }

/* ---------- Lightbox ---------- */
.lightbox { width: 100%; max-width: 100vw; height: 100%; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; color: var(--c-cream); }
.lightbox::backdrop { background: rgba(5, 5, 5, 0.95); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img { max-width: 90vw; max-height: 86vh; object-fit: contain; }
.lightbox__close, .lightbox__nav { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; font-size: 2rem; line-height: 1; border: 1px solid var(--c-line); border-radius: 50%; background: rgba(10, 10, 10, 0.6); transition: background 0.3s, color 0.3s; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--c-accent); color: #0a0a0a; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 600; display: flex; align-items: center; gap: 18px;
  padding: 16px 26px; max-width: calc(100vw - 32px); background: var(--c-surface); border: 1px solid var(--c-accent); border-radius: 999px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); opacity: 0; transform: translate(-50%, 20px); transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: var(--c-accent); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--c-accent); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product { grid-template-columns: 1fr; }
  .product__info { position: static; }
  .p-grid--related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .p-grid--related { grid-template-columns: 1fr; }
  .gallery__stage { aspect-ratio: 4 / 3.4; }
  .buy__add { flex-basis: 100%; order: 3; }
}

/* Order Now (Porosit Tani) button next to Add to selection */
.buy__order { flex: 1 1 200px; min-height: 54px; border-color: var(--c-accent); color: var(--c-accent); }
.buy__order:hover, .buy__order:focus-visible { background: var(--c-accent); color: #0a0a0a; }
.buy__order[disabled] { opacity: 0.45; cursor: not-allowed; }
