/* Colonne Gauche : Galerie Fixe */
.sticky-gallery-wrapper {
    position: sticky;
    top: 30px;
    height: fit-content;
    transition: top 0.3s;
    z-index: 10;
}

.main-image-card {
    background: white;
    border-radius: 40px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.main-image {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
    /*filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));*/
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.main-image:hover { transform: scale(1.05) rotate(-2deg); }

.thumbnails-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.thumb {
    width: 70px; height: 70px;
    border-radius: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    object-fit: cover;
    background: white;
    padding: 5px;
    transition: all 0.2s;
}
.thumbnail-item.active .thumb, .thumbnail-item .thumb:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Colonne Droite : Contenu Scrollable */
.product-details-wrapper {
    padding-left: 20px;
}

/* Header Produit */
.product-badge {
    background: var(--pop-purple);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: inline-block;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}
.price-strike {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

/* Sélecteur Couleur (Pop Bubbles) */
.color-bubble {
    width: 45px; height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #eee;
    transition: all 0.2s;
    position: relative;
}
.color-bubble.active {
    box-shadow: 0 0 0 3px var(--primary-color);
    transform: scale(1.1);
}

/* --- STORYTELLING BLOCKS (Reprise du style Catégorie) --- */
.story-block {
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.sb-orange { background: var(--pop-orange); }
.sb-blue { background: var(--pop-blue); }
.sb-green { background: var(--pop-green); }
.sb-white { background: white; color: var(--text-dark); border: 1px solid rgba(0,0,0,0.05); }

.tech-pill {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 5px;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .sticky-gallery-wrapper { position: relative; top: 0; margin-bottom: 30px; }
    .product-details-wrapper { padding-left: 0; }
}


/* --- ATTRIBUTS PRODUIT STYLE POP --- */

/* 1. Les Bulles de Couleur (Color Bubbles) */
.color-bubble {
    display: block;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;     /* Bordure blanche interne */
    box-shadow: 0 0 0 1px #e0e0e0; /* Bordure grise externe fine */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet rebond */
    position: relative;
}

/* État Survol */
.color-variant-item:hover .color-bubble {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* État Sélectionné (Active) */
.input-color:checked + .color-bubble,
.color-bubble.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px #6a11cb; /* Cercle violet autour de la sélection */
    border-color: white;
}

/* 2. Les Boutons Radio "Pilules" (Radio Pills) */
.radio-pill-label {
    display: block;
}

.radio-pill-content {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50px; /* Forme pilule */
    color: #495057;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* État Survol Pilule */
.radio-pill-label:hover .radio-pill-content {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

/* État Sélectionné Pilule */
.input-radio:checked + .radio-pill-content {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); /* Dégradé Infinite */
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
    transform: translateY(-2px);
    font-weight: 700;
}

/* --- BOUTON AJOUT PANIER & QUANTITÉ --- */

/* Le bouton principal */
/* Bouton Panier */
.btn.btn-add-cart {
    background-color: var(--text-dark) !important;
    border-color: transparent !important;
}
.btn.btn-add-cart:hover {
    background-color: transparent; /* évite le flash */
}
.btn-add-cart {
    width: 100%;
    background: var(--text-dark);
    color: white;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-add-cart:hover:not(:disabled) {
    background: var(--gradient-main);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(106, 17, 203, 0.3);
    color: white;
}
.btn-add-cart:disabled {
    background: #e9ecef;
    color: #adb5bd;
    box-shadow: none;
    cursor: not-allowed;
}

/* Le champ quantité */
.product-actions__quantity .form-control {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef !important;
    color: #2c3e50;
    font-size: 1.1rem;
}
.product-actions__quantity .form-control:focus {
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
    border-color: #6a11cb !important;
}

/* Ajustement des icônes input qty si présentes (PrestaShop ajoute souvent des flèches +/-) */
.input-group-btn-vertical {
    display: none !important; /* On cache souvent les petites flèches moches par défaut pour garder un style épuré, sauf si votre thème les gère bien */
}

/* --- QTY INPUT STYLE POP --- */

/* Le conteneur global (la pilule) */
.qty-pop-wrapper {
    overflow: hidden; /* Pour que les boutons ne dépassent pas de l'arrondi */
    height: 100%; /* S'adapte à la hauteur du bouton d'ajout au panier */
    min-height: 50px; /* Hauteur minimale confortable */
    transition: box-shadow 0.3s ease;
}

.qty-pop-wrapper:hover,
.qty-pop-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1); /* Petit halo violet au focus */
    border-color: #6a11cb !important;
}

/* Les boutons +/- */
.btn-qty-pop {
    background: transparent;
    border: none;
    color: #6c757d;
    width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-qty-pop:hover {
    color: #6a11cb; /* Devient violet au survol */
    background-color: rgba(106, 17, 203, 0.05);
}

.btn-qty-pop:active {
    transform: scale(0.9);
}

/* L'input central */
.qty-pop-input {
    font-size: 1.1rem;
    z-index: 1; /* Reste au dessus */
    width: 50px !important; /* Force une largeur fixe pour éviter que ça bouge */
}
.qty-pop-input:focus {
    background: transparent !important; /* Empêche le fond blanc de Bootstrap au focus */
}




/* --- STYLE DU CHAMP PERSONNALISATION --- */
.product-customization {
    margin-top: 0 !important;
    background: linear-gradient(135deg, #fff 0%, #f3f0ff 100%); /* Fond violet très pâle */
    border: 1px dashed #a18cd1;
    border-top: none; /* On colle au bloc du dessus */
    border-radius: 0 0 20px 20px; /* Arrondi seulement en bas */
    padding: 20px;
    display: none; /* Caché par défaut, le JS l'affichera */
    animation: slideDown 0.3s ease-out;
}

.custom-engraving-box {
    background: linear-gradient(135deg, #fff 0%, #f3f0ff 100%);
    border: 1px dashed #a18cd1;
    border-radius: 20px; /* Si ouvert, le JS enlèvera l'arrondi du bas */
    padding: 20px;
    transition: all 0.3s;
    margin: 20px 0;
}

/* Animation d'ouverture */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Style de l'input PrestaShop */
.product-customization .product-message {
    border-radius: 50px;
    border: 1px solid #dcdcdc;
    padding: 10px 20px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

/* Cache le bloc natif de personnalisation PrestaShop */
.product-customization {
    display: none !important; /* On le cache, notre JS s'occupera de le remplir */
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake-animation {
    animation: shake 0.4s ease-in-out;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

.page-product .product__add-to-cart {
    margin-bottom: 0;
}

.engraving-overlay {
    position: absolute;
    z-index: 20; /* Au-dessus de l'image */
    top: 51%;    /* POSITION DE DÉPART À AJUSTER */
    left: 50%;   /* POSITION DE DÉPART À AJUSTER */
    transform: translate(-50%, -50%); /* Centre le point d'ancrage */
    pointer-events: none; /* Permet de cliquer "à travers" le texte si besoin */
    transition: opacity 0.3s ease;
}
/* Mobile Adjustments */
@media (max-width: 991px) {
    .engraving-overlay { top: 52% }
}

#engraving-preview-text {
    font-family: 'Fredoka', sans-serif; /* Ou une police manuscrite si vous en avez une */
    font-weight: 600;
    color: rgba(50, 50, 50, 0.7); /* Gris foncé un peu transparent pour l'effet gravé */
    font-size: 16px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4); /* Petit effet de relief */
    display: block;
}