/* NIKKI — fiche produit V3.5
 * Tailwind porte la structure, les espacements, les couleurs et le responsive.
 * Ce fichier ne conserve que les comportements techniques pilotés par JavaScript.
 */

.product-no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-no-scrollbar::-webkit-scrollbar {
    display: none;
}

.product-gallery-track {
    will-change: transform;
}

.product-gallery-thumb.is-active {
    border-color: #9d563d;
    box-shadow: 0 0 0 2px rgba(157, 86, 61, 0.14);
}

.product-gallery-dot.is-active {
    width: 1.25rem;
    background: #ffffff;
}

html.product-lightbox-open,
html.product-lightbox-open body {
    overflow: hidden;
    height: 100%;
}

.product-lightbox[hidden] {
    display: none !important;
}

.product-toast {
    position: fixed;
    left: 50%;
    bottom: max(5.75rem, calc(env(safe-area-inset-bottom) + 4.75rem));
    z-index: 11000;
    max-width: calc(100vw - 2rem);
    transform: translate(-50%, 12px);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: #201b17;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    box-shadow: 0 12px 35px rgba(32, 27, 23, 0.22);
}

.product-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.product-favorite-btn.is-active {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(254, 242, 242, 0.85);
}

summary::-webkit-details-marker {
    display: none;
}

@media (min-width: 768px) {
    .product-toast {
        bottom: 2rem;
    }
}

/* La barre d'achat mobile reste au-dessus de la navigation basse et de son
 * bouton central débordant. Lors de la disparition de la navigation, elle
 * redescend automatiquement pour ne pas gaspiller de hauteur utile. */
.product-mobile-buybar {
    bottom: calc(5rem + env(safe-area-inset-bottom));
    transition: bottom 300ms ease;
}

body:has(#nikki-mobile-nav.translate-y-full) .product-mobile-buybar {
    bottom: env(safe-area-inset-bottom);
}


/* V3.5 — apparition contextuelle de la barre d'achat mobile */
.product-mobile-buybar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, calc(100% + 1rem), 0);
    transition:
        bottom 300ms ease,
        opacity 180ms ease,
        transform 220ms ease,
        visibility 0s linear 220ms;
}

.product-mobile-buybar.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .product-mobile-buybar {
        transition: none;
    }
}
