/* NEBULA MART: chat buttons, flash countdown, footer badges, PDP zoom */
:root { --btt-bottom: 1.25rem; --chat-bottom: calc(var(--btt-bottom) + 4.5rem); }

/* Floating contact launcher (one button -> Call / WhatsApp / Messenger / Hide) */
:root { --chat-color: var(--color-primary); --cart-gap: 4.5rem; }
.chat-fab { position: fixed; right: 1rem; bottom: var(--chat-bottom); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: .75rem; padding-bottom: env(safe-area-inset-bottom, 0px); }
.chat-fab__list { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.chat-fab__item, .chat-fab__toggle { position: relative; width: 3.5rem; height: 3.5rem; border-radius: 9999px; border: 0; padding: 0; display: grid; place-items: center; color: #fff; cursor: pointer; box-shadow: 0 8px 22px rgb(0 0 0 / .3); transition: transform .2s ease, box-shadow .2s ease; }
.chat-fab__item:hover, .chat-fab__item:focus-visible, .chat-fab__toggle:hover { transform: scale(1.07); }
.chat-fab__item:focus-visible, .chat-fab__toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px rgb(var(--color-primary)); }
.chat-fab svg { width: 1.6rem; height: 1.6rem; }
.chat-fab__call { background: #3b82f6; }
.chat-fab__wa { background: #25d366; }
.chat-fab__ms { background: linear-gradient(135deg, #00b2ff, #006aff 55%, #a334fa); }
.chat-fab__toggle { background: rgb(var(--chat-color)); }
.chat-fab__dot { position: absolute; top: -1px; right: -1px; width: .8rem; height: .8rem; border-radius: 9999px; background: #34d399; border: 2px solid #fff; box-sizing: border-box; }
.chat-fab__ic { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .15s ease, transform .2s ease; }
.chat-fab__ic--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
/* soft pulse ring while collapsed */
.chat-fab__toggle::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgb(var(--chat-color)); opacity: .45; z-index: -1; animation: chat-ring 2.4s ease-out infinite; }
@keyframes chat-ring { to { transform: scale(1.7); opacity: 0; } }
/* labels */
.chat-fab__tip { position: absolute; right: calc(100% + .65rem); top: 50%; transform: translateY(-50%) translateX(4px); padding: .4rem .8rem; border-radius: .6rem; background: #111827; color: #fff; font-size: .8125rem; font-weight: 600; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.chat-fab__item:hover .chat-fab__tip, .chat-fab__item:focus-visible .chat-fab__tip { opacity: 1; transform: translateY(-50%); }
/* closed vs open */
.chat-fab__list { display: none; }
.chat-fab.is-open .chat-fab__list { display: flex; }
.chat-fab.is-open .chat-fab__item { animation: chat-pop .22s ease both; }
.chat-fab.is-open .chat-fab__item:nth-child(3) { animation-delay: 0s; }
.chat-fab.is-open .chat-fab__item:nth-child(2) { animation-delay: .05s; }
.chat-fab.is-open .chat-fab__item:nth-child(1) { animation-delay: .1s; }
@keyframes chat-pop { from { opacity: 0; transform: translateY(12px) scale(.7); } }
.chat-fab.is-open .chat-fab__toggle { background: rgb(var(--color-primary-dark)); }
.chat-fab.is-open .chat-fab__toggle::before, .chat-fab.is-open .chat-fab__toggle .chat-fab__dot { display: none; }
.chat-fab.is-open .chat-fab__ic--open { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat-fab.is-open .chat-fab__ic--close { opacity: 1; transform: none; }
.chat-fab.is-open .chat-fab__tip--hide { opacity: 1; transform: translateY(-50%); }
@media (max-width: 640px) { .chat-fab__item, .chat-fab__toggle { width: 3.25rem; height: 3.25rem; } .chat-fab { right: .75rem; } }
@media (prefers-reduced-motion: reduce) { .chat-fab__toggle::before { animation: none; display: none; } .chat-fab.is-open .chat-fab__item { animation: none; } .chat-fab__item, .chat-fab__toggle, .chat-fab__ic, .chat-fab__tip { transition: none; } }
@media print { .chat-fab { display: none; } }

/* Floating cart: original right-edge tab on big screens (style.css).
   On laptop widths it moves down so it never covers the hero slider's arrows,
   and sits just above the contact button. Slider arrows stay where they were. */
@media (min-width: 769px) and (max-width: 1520px) {
  #float-cart { top: 35%; bottom: auto; transform: none; }
  #float-cart.fc-pulse { animation-name: fc-pulse-m; }
}
/* Phones/tablets: cart sits in the bottom-right stack, above the contact button */
@media (max-width: 768px) {
  #float-cart { bottom: calc(var(--chat-bottom) + var(--cart-gap) + env(safe-area-inset-bottom, 0px)); right: .75rem; }
}
/* the opened contact list takes the cart's spot while it is open */
@media (max-width: 1520px) {
  body:has(.chat-fab.is-open) #float-cart { opacity: 0; pointer-events: none; transition: opacity .15s ease; }
}

/* Flash deals countdown: single-row premium capsule */
.flash-side { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.fc { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .4rem .35rem .95rem; border-radius: 999px; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, rgb(var(--color-primary-dark)), rgb(var(--color-primary)) 70%);
  box-shadow: 0 10px 24px -12px rgb(var(--color-primary) / .8), inset 0 0 0 1px rgb(255 255 255 / .1), inset 0 1px 0 rgb(255 255 255 / .18); }
.fc__label { display: inline-flex; align-items: center; gap: .35rem; margin-right: .3rem; font-size: .75rem; font-weight: 700; letter-spacing: .02em; color: rgb(var(--color-accent)); }
.fc__label svg { filter: drop-shadow(0 0 6px rgb(var(--color-accent) / .7)); }
.fc__box { position: relative; display: inline-flex; align-items: baseline; justify-content: center; gap: .15rem; min-width: 2.9rem; padding: .4rem .55rem; border-radius: .7rem; line-height: 1;
  background: rgb(255 255 255 / .12); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
.fc__box::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(0 0 0 / .22); pointer-events: none; }
.fc__box b { font-family: var(--font-display, inherit); font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.fc__box small { font-size: .625rem; font-weight: 700; opacity: .7; }
.fc__box--s { background: rgb(var(--color-accent)); color: rgb(var(--color-ink)); box-shadow: none; }
.fc__box--s small { opacity: .7; }
.fc__sep { width: 4px; height: 12px; background: radial-gradient(circle, rgb(255 255 255 / .75) 1.5px, transparent 2px) 50% 20% / 4px 6px repeat-y; animation: fc-blink 1s steps(2, jump-none) infinite; }
@keyframes fc-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .fc__sep { animation: none; } }
@media (max-width: 640px) { .flash-side { width: 100%; justify-content: space-between; } .fc { padding-left: .7rem; } .fc__box { min-width: 2.5rem; padding: .35rem .4rem; } .fc__label { margin-right: .1rem; } }

/* Footer badges */
.ft-badges { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
@media (min-width: 768px) { .ft-badges { align-items: flex-end; } }
.ft-badges__row { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; font-size: .75rem; font-weight: 800; }
.ft-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .375rem .75rem; border-radius: .5rem; }
.ft-badge--cod { background: rgb(var(--color-accent)); color: rgb(var(--color-ink)); }
.ft-badge--courier { background: rgb(255 255 255 / .1); color: #fff; border: 1px solid rgb(255 255 255 / .25); }

/* PDP image zoom */
[data-zoom] { cursor: zoom-in; touch-action: pan-y; }
[data-zoom] img { transition: transform .25s ease; transform-origin: 50% 50%; will-change: transform; }
[data-zoom].is-zoomed { cursor: zoom-out; }
[data-zoom].is-zoomed img { transform: scale(2.2); transition: transform .12s ease-out; }
@media (prefers-reduced-motion: reduce) { [data-zoom] img, .chat-fab a { transition: none; } }

/* Flash deal strip on the product page: no card, just quiet typography between two hairlines */
.fdeal { position: relative; margin-top: 1.25rem; padding: 1rem 0 1.05rem; border-top: 1px solid rgb(var(--color-primary) / .16); border-bottom: 1px solid rgb(var(--color-primary) / .16); }
.fdeal::before { content: ""; position: absolute; top: -1px; left: 0; width: 3rem; height: 2px; background: rgb(var(--color-accent)); }
.fdeal__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; }
.fdeal__tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--color-primary)); }
.fdeal__title { font-size: .875rem; opacity: .6; }
.fdeal__off { margin-left: auto; font-size: .875rem; font-weight: 700; color: rgb(var(--color-primary)); }
.fdeal__body { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; margin-top: .65rem; }
.fdeal__timer { display: flex; align-items: baseline; gap: .3rem; }
.fdeal__label { margin-right: .5rem; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .5; }
.fdeal__unit { display: inline-flex; align-items: baseline; gap: .12rem; }
.fdeal__unit b { font-family: var(--font-display, inherit); font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fdeal__unit small { font-size: .8rem; font-weight: 600; opacity: .5; }
.fdeal__unit--s b { color: rgb(var(--color-primary)); }
.fdeal__colon { font-style: normal; font-size: 1.4rem; font-weight: 300; opacity: .25; margin: 0 .1rem; }
.fdeal__stock { margin-left: auto; font-size: .85rem; opacity: .75; }
.fdeal__stock b { font-weight: 800; color: rgb(var(--color-primary)); }
@media (max-width: 480px) { .fdeal__unit b { font-size: 1.65rem; } .fdeal__stock { margin-left: 0; } }

/* infinite scroll loader */
.more-loader { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1.1rem; border-radius: 999px; background: #fff; border: 1px solid rgb(var(--color-line)); font-size: .9rem; font-weight: 700; color: rgb(var(--color-ink) / .7); }
.more-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgb(var(--color-primary) / .25); border-top-color: rgb(var(--color-primary)); animation: more-spin .7s linear infinite; }
@keyframes more-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .more-spin { animation-duration: 1.6s; } }

/* footer contact: more breathing room between points */
footer .footer-contact { gap: 1rem; }
footer .footer-contact li { line-height: 1.6; }

/* back to top (bottom-right, directly below the contact launcher) */
.back-top { position: fixed; right: 1.375rem; bottom: calc(var(--btt-bottom) + env(safe-area-inset-bottom, 0px)); z-index: 55; width: 2.75rem; height: 2.75rem; border-radius: 9999px; border: 2px solid rgb(var(--color-accent)); background: rgb(var(--color-primary)); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease, visibility .2s, background .15s; }
.back-top svg { width: 1.25rem; height: 1.25rem; }
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: rgb(var(--color-primary-dark)); }
.back-top:focus-visible { outline: 3px solid rgb(var(--color-primary)); outline-offset: 2px; }
@media (max-width: 640px) { .back-top { right: 1.125rem; width: 2.5rem; height: 2.5rem; } }
@media (prefers-reduced-motion: reduce) { .back-top { transition: none; } }
@media print { .back-top { display: none; } }

/* Product page: gallery slider + description (versioned so cache never serves stale rules) */
main article.grid > * { min-width: 0; }
#product-details, #product-details [role="tabpanel"] { min-width: 0; max-width: 100%; }
#panel-desc, #panel-desc .product-rich { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
#panel-desc .product-rich * { max-width: 100%; white-space: normal !important; overflow-wrap: anywhere; }
#panel-desc .product-rich img { height: auto; }
#panel-desc .product-rich pre { white-space: pre-wrap !important; overflow-x: auto; }
/* Product gallery: compact main image + thumbnail slider */
.pgal { width: 100%; max-width: 440px; margin-inline: auto; }
@media (min-width: 1024px) { .pgal { margin-inline: 0; } }
.pgal__main img { transition: opacity .2s ease; }
.pgal__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; font-size: 1.5rem; line-height: 1;
    background: rgb(255 255 255 / .92); color: rgb(var(--color-ink));
    box-shadow: 0 4px 14px rgb(0 0 0 / .18); opacity: 0; transition: opacity .2s, background .15s, color .15s;
}
.pgal__main:hover .pgal__arrow, .pgal__arrow:focus-visible { opacity: 1; }
@media (hover: none) { .pgal__arrow { opacity: 1; } }
.pgal__arrow:hover { background: rgb(var(--color-primary)); color: #fff; }
.pgal__arrow--prev { left: .6rem; }
.pgal__arrow--next { right: .6rem; }
.pgal__strip { display: flex; align-items: center; gap: .4rem; margin-top: .75rem; }
.pgal__thumbs {
    display: flex; gap: .5rem; flex: 1; min-width: 0; margin: 0; padding: .15rem; list-style: none;
    overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; scrollbar-width: none;
}
.pgal__thumbs::-webkit-scrollbar { display: none; }
.pgal__thumbs li { flex: none; list-style: none; width: 4.25rem; scroll-snap-align: start; }
.pgal__thumbs .thumb { width: 100%; aspect-ratio: 1; background: #fff; }
.pgal__thumbs .thumb.border-primary { box-shadow: 0 0 0 2px rgb(var(--color-primary) / .25); }
.pgal__nav, .pgal__arrow { user-select: none; -webkit-user-select: none; }
.pgal__nav {
    flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; cursor: pointer;
    display: grid; place-items: center; font-size: 1.25rem; line-height: 1;
    border: 1px solid rgb(var(--color-line)); background: #fff; color: rgb(var(--color-ink));
    transition: background .15s, color .15s, border-color .15s;
}
.pgal__nav:hover { background: rgb(var(--color-primary)); border-color: rgb(var(--color-primary)); color: #fff; }
.pgal__nav[disabled] { opacity: .35; cursor: default; pointer-events: none; }
