/* VARIABLES THEME BOUTIQUE */
:root {
    --shop-primary: #7a8862;
    --shop-primary-dark: #647051;
}



/* Blocage du scroll d'arrière plan */
body:has(.shop-modal.show),
body:has(.success-overlay.show) {
    overflow: hidden;
}




/* STYLES SPECIFIQUES BOUTIQUE */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.shop-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overscroll-behavior: contain;
}

.shop-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empêcher le scroll du body quand une modale est ouverte */
body:has(.shop-modal.show),
body:has(.success-overlay.show) {
    overflow: hidden;
}

.size-option {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid #e5e7eb;
}

.size-option:hover {
    border-color: var(--shop-primary);
}

.size-option.selected {
    background: var(--shop-primary);
    color: white;
    border-color: var(--shop-primary);
}

/* Notification Toast Standard */
.shop-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000;
    padding: 14px 20px;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    animation: shopSlideIn 0.3s ease forwards;
    font-size: 14px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}

/* OVERLAY DE SUCCÈS COMMANDE */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 15000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
    overscroll-behavior: contain;
}

.success-overlay.show {
    display: flex;
}

.success-card {
    background: white;
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.success-icon-circle {
    width: 80px;
    height: 80px;
    background: var(--shop-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    box-shadow: 0 0 20px rgba(122, 136, 98, 0.4);
}

/* ICON PANIER NAVIGATION */
.nav-cart-wrapper {
    display: flex;
    align-items: left;
    margin-right: 45px;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s;
}

.nav-cart-wrapper:hover {
    opacity: 0.7;
}

.nav-cart-icon {
    font-size: 20px !important;
    color: #fff;
}

.nav-cart-count {
    position: relative;
    /*absolute*/
    top: -8px;
    right: 8px;
    /*-8px*/
    /*background: var(--shop-primary);*/
    background: white;
    color: red;
    font-size: 10px;
    /*10px*/
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Heartbeat Animation & Tooltip */
@keyframes heartbeat {

    0%,
    20%,
    40%,
    100% {
        transform: scale(1);
    }

    10%,
    30% {
        transform: scale(1.6);
    }
}

.nav-heart-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s;
}

.nav-heart-wrapper i {
    animation: heartbeat 2s ease-in-out infinite;
    color: #ef4444;
    /* Rouge pour le coeur */
}

.nav-heart-wrapper:hover {
    opacity: 0.8;
}

.nav-heart-wrapper::after {
    content: "Faite nous un don";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--shop-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    font-family: inherit;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-heart-wrapper::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent var(--shop-primary) transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.nav-heart-wrapper:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
}

.nav-heart-wrapper:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shopSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .shop-notification {
        top: 10px;
        right: 5%;
        left: 5%;
        text-align: center;
    }

    .success-card {
        padding: 30px 20px;
    }
}

.notif-success {
    background-color: var(--shop-primary);
}

.notif-error {
    background-color: #ef4444;
}

.sticker-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--shop-primary);
}

.thumbnail {
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    border: 2px solid transparent;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border-color: var(--shop-primary);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}


.preloader {
    display: flex;
    align-items: center;
}



.shop-loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: shopSpin 1s linear infinite;
    display: inline-block;
    margin-right: 6px;
}

@keyframes shopSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.bg-shop-theme {
    background-color: var(--shop-primary);
}

.text-shop-theme {
    color: var(--shop-primary);
}

.hover-bg-shop-theme:hover {
    background-color: var(--shop-primary-dark);
}

/* CORRECTIFS POUR LE DÉFILEMENT (SCROLL) ET HAUTEUR DANS LES MODALES */
.max-h-\[85vh\] {
    max-height: 85vh;
}

.max-h-\[90vh\] {
    max-height: 90vh;
}

/* Fixe la taille de l'image du produit sur mobile pour ne pas écraser les boutons */
@media (max-width: 767px) {
    /* L'image prend 30% de l'écran, avec une taille minimum et maximum */
    .h-\[25vh\] {
        height: 30vh !important;
        min-height: 180px;
        max-height: 250px;
    }
    
    /* On s'assure que la zone de détails (titre, prix, bouton) puisse scroller si l'écran est petit */
    #product-modal > div > div:nth-child(2) {
        flex: 1 1 auto !important;
        min-height: 0;
        padding: 1rem !important; /* Réduit un peu le padding sur mobile pour gagner de la place */
    }
    
    /* Réduit la marge sous la description sur mobile */
    #modal-desc {
        margin-bottom: 1rem !important;
        font-size: 0.8rem;
    }
}