html {
    overflow-x: hidden;
    scroll-behavior: smooth; /* Ajout pour la navigation fluide */
}
/* AJOUT : Réinitialisation pour supprimer les "points" */
ul, li {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
/* --- Variables (copiées de style9.css) --- */
:root {
    --text-color-light: #f8f0e3;
    --text-color-dark: #5c544b; /* GARDÉ POUR LA LISIBILITÉ */
    --text-color-headings: #B05F45; /* NOUVEAU: Terre Cuite / Rouille */
    --accent-color: #E46D37; /* NOUVEAU: Orange Vif */
    --accent-color-rgb: 228, 109, 55; /* NOUVEAU: RGB pour Orange Vif */
    --background-light: #fdfaf6; /* GARDÉ */
    --background-alt: #F7E0DD; /* NOUVEAU: Rose Pâle */
    --border-color: #DE9FA3; /* NOUVEAU: Rose Moyen */
    --base-transition-duration: 0.3s;

    /* Nouvelles variables pour le design premium */
    --card-bg-color: #ffffff; /* Fond de carte blanc pur */
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Ombre plus subtile */
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1); /* Ombre plus prononcée au survol */
    --text-color-card-title: #2a2a2a; /* Gris très foncé pour les titres */
    --text-color-card-description: #7a7a7a; /* Gris un peu plus clair pour descriptions */
}

/* --- Styles Généraux (Inspirés de style9.css) --- */
body {
    font-family: var(--secondary-font);
    background-color: var(--background-light);
    color: var(--text-color-dark);
    margin: 0;
    line-height: 1.65;
    font-weight: 300; /* Texte plus léger par défaut */
    overflow-x: hidden; /* EMPÊCHE LE SCROLL HORIZONTAL */
}

.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header --- */
.site-header {
    text-align: center;
    padding: 30px 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    position: relative;
}
.site-header h2 {
    font-family: var(--primary-font);
    font-size: clamp(2.2rem, 5vw, 2.8rem); /* Un peu plus petit que le h1 du site principal */
    color: var(--text-color-headings);
    font-weight: 700;
    margin: 0;
}
.back-link {
    position: absolute;
    top: 50%;
    left: 10px; /* À gauche pour "retour" */
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--base-transition-duration);
}
.back-link:hover {
    color: var(--text-color-headings);
}
.back-link i {
    margin-right: 8px;
}


/* --- Contenu Principal --- */
.main-content {
    padding: 0 10px; /* Un peu d'aération */
}

.content-container {
    max-width: 960px; /* Correspond au max-w-[960px] de Tailwind */
    margin: 0 auto;
}

/* --- Intro --- */
.intro-paragraph {
    padding: 25px;
    margin: 0 0 40px 0;
    background-color: var(--background-alt);
    border-left: 3px solid var(--accent-color);
    font-size: 0.95rem;
    font-weight: 300;
    border-radius: 0 5px 5px 0;
}
.intro-paragraph p:last-child {
    margin-bottom: 0;
}
.intro-paragraph strong {
    font-weight: 500;
    color: var(--text-color-headings);
}

/* --- Section Cagnotte Libre --- */
.cagnotte-section {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.cagnotte-section h3 {
    font-family: var(--primary-font);
    font-size: 1.8rem;
    color: var(--text-color-headings);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cagnotte-section h3 i {
    color: var(--accent-color);
    margin-right: 15px;
    font-size: 0.9em;
}
.cagnotte-section p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Conteneur global de la liste (après les onglets) --- */
.gift-list {
    display: block; /* Conteneur simple pour titres + grilles */
}

/* --- Style pour le Titre de Catégorie --- */
.category-title {
    font-family: var(--secondary-font); /* Police moderne sans-serif */
    font-size: 1.5rem; /* Taille assez grande */
    font-weight: 700; /* Gras */
    color: var(--text-color-card-title); /* Noir/Gris très foncé */
    
    /* --- AJOUTS/MODIFICATIONS ICI --- */
    margin-top: 40px; /* Espace AU-DESSUS du titre (et de la ligne) */
    margin-bottom: 25px; /* Espace avant la grille */
    padding-top: 40px; /* Espace ENTRE la ligne et le titre */
    border-top: 1px solid var(--border-color); /* Ligne horizontale fine */
    /* --- FIN AJOUTS/MODIFICATIONS --- */
    
    text-align: left; /* Alignement à gauche */
    width: 100%;
    box-sizing: border-box;
}

/* Retire la ligne et l'espace supérieur pour le PREMIER titre */
.category-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none; 
}


/* --- Style pour le Conteneur de la Grille Cadeaux --- */
.gift-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.loading-message {
    text-align: center;
    padding: 40px;
    font-style: italic;
    color: var(--text-color-dark);
    /* S'applique maintenant au gridWrapper si vide, pas besoin de grid-column */
}
.error-message {
     text-align: center;
    padding: 40px;
    font-style: italic;
    color: #c53030; /* Red for errors */
    font-weight: 500;
    /* S'applique maintenant au gridWrapper si erreur */
}


/* --- Styles pour UNE carte cadeau (design épuré) --- */
.gift-card {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: none;
}
.gift-card:hover {
     box-shadow: none;
}

.gift-image-wrapper {
    position: relative; /* Déjà présent, important pour la pastille */
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.price-tag {
    display: block; /* Réactive l'affichage */
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9); /* Fond blanc semi-transparent */
    color: var(--text-color-headings); /* Texte foncé */
    font-size: 0.85rem; /* Taille ajustée */
    font-weight: 600; /* Plus gras */
    padding: 5px 10px; /* Ajuster pour la taille souhaitée */
    border-radius: 15px; /* Pour un effet "pilule" ou 50% pour rond */
    z-index: 20; /* Z-INDEX MODIFIÉ : Doit être > 10 (image) */
    transition: opacity 0.3s ease;
    /* Optionnel: petite ombre pour détacher */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* Cache la pastille si le cadeau est offert */
.gift-card.offered .price-tag {
    opacity: 0;
    pointer-events: none; /* Empêche interaction si invisible */
}


/* Overlay "Offert" sur l'image */
.gift-card.offered .gift-image-wrapper::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);   
    z-index: 2; /* Au-dessus de l'image */
    border-radius: 8px;
}

/* Cache le prix DANS le titre (puisqu'il est maintenant sur l'image) */
.gift-price-value {
    display: none;
}


.gift-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0;
    text-align: left;
}

/* Style pour Titre (sans le prix) */
.gift-title-price {
    font-family: var(--secondary-font);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color-card-title);
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Marque */
.gift-info .brand {
    font-size: 0.85rem;
    color: var(--text-color-card-description);
    font-weight: 600; /* MODIFIÉ : Mis en gras */
    margin-bottom: 8px;
}

/* Description */
.gift-info .description {
    font-family: var(--secondary-font);
    font-size: 0.9rem;
    color: var(--text-color-card-description);
    font-weight: 300;
    font-style: italic; /* AJOUT : Mis en italique */
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* --- Boutons (style épuré) --- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    border: 1px solid var(--accent-color);
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}
.button i {
    margin-right: 8px;
    font-size: 0.9em;
}

.button.primary {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}
.button.primary:hover {
    background-color: var(--text-color-headings);
    border-color: var(--text-color-headings);
}

.button.secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}
.button.secondary:hover {
    background-color: rgba(var(--accent-color-rgb), 0.1);
}


/* Bouton "Offert" */
.button.offered {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #9a9a9a;
    cursor: default;
}
.button.offered:hover {
    background-color: transparent;
    border-color: #ccc;
}

/* --- DÉBUT MODIFICATION : Style pour le bouton "Voir le produit" --- */
.button.product-link {
    background-color: transparent;
    color: var(--text-color-dark); /* Couleur plus discrète */
    border: 1px solid var(--border-color); /* Bordure plus discrète */
    margin-top: 8px; /* Espace entre les deux boutons */
    font-weight: 500; /* Moins gras que le bouton principal */
}
.button.product-link:hover {
    background-color: var(--background-alt); /* Léger fond au survol */
    border-color: var(--accent-color); /* Bordure accentuée au survol */
    color: var(--accent-color);
}
.button.product-link i {
    font-size: 0.8em; /* Icône légèrement plus petite */
}
/* --- FIN MODIFICATION --- */


/* --- Footer --- */
.site-footer-liste {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-color-dark);
    opacity: 0.8;
}

/* --- Modale --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(60, 50, 40, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1010;
    display: none;
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-light);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    z-index: 1011;
    display: none;
}
.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-color-dark);
    opacity: 0.7;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.modal-close-button:hover {
    color: var(--accent-color);
    opacity: 1;
}
#modal-content h3 {
    font-family: var(--primary-font);
    font-size: 1.6rem;
    color: var(--text-color-headings);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}
#modal-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: center;
}
#modal-content .modal-revolut-link {
    display: block;
    margin-bottom: 25px;
    text-align: center;
}

#modal-content .confirmation-section {
    margin-top: 15px; /* MODIFIÉ : Réduit de 25px */
    padding-top: 15px; /* MODIFIÉ : Réduit de 20px */
    border-top: 1px solid var(--border-color);
    text-align: center;
}
#modal-content label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color-headings);
    font-size: 0.9rem;
    text-align: left;
}
#modal-content input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--secondary-font);
    font-size: 0.9rem;
    margin-bottom: 15px;
    box-sizing: border-box;
}
#modal-content .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* --- DEBUT STYLES BLOC RIB/COPIER (DISCRET) --- */
.modal-or-separator {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-color-card-description);
    margin: -10px 0 15px 0;
    text-align: center;
}
.discreet-iban-container {
    text-align: center;
    margin-bottom: 15px; /* MODIFIÉ : Réduit de 25px */
    padding-top: 10px; /* Espace après le "ou" */
}
.discreet-iban-container p {
    margin-bottom: 8px; /* Espace entre les lignes */
}
.iban-info {
    font-size: 0.95rem;
    color: var(--text-color-headings);
    font-weight: 500;
    word-break: break-all;
    display: inline-flex; /* Pour aligner l'icône */
    align-items: center;
}
.icon-copy-iban {
    color: var(--accent-color);
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}
.icon-copy-iban:hover {
    color: var(--text-color-headings);
    transform: scale(1.1);
}
/* Style pour le BIC a été supprimé */
.copy-confirm-text {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 1em; /* Réserve l'espace pour éviter que le layout saute */
    margin-top: 5px;
}
/* --- FIN STYLES BLOC RIB/COPIER --- */


@media (min-width: 480px) {
    #modal-content .modal-buttons {
        flex-direction: row;
        justify-content: center;
    }
    #modal-content .modal-buttons .button {
        width: auto;
        min-width: 150px;
    }
}

#modal-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: none;
}
#modal-message.success {
    background-color: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(var(--accent-color-rgb), 0.3);
}
#modal-message.error {
    background-color: #fceded;
    color: #c53030;
    border: 1px solid #f7baba;
}

/* --- Adaptation Mobile pour Titre + Grille --- */
@media (max-width: 960px) {
    .gift-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .category-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
}
@media (max-width: 768px) {
    .gift-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
     .category-title {
        font-size: 1.3rem;
    }
}
@media (max-width: 480px) {
    .gift-grid-wrapper {
        grid-template-columns: repeat(2, 1fr); /* MODIFIÉ : 2 colonnes */
        gap: 20px; /* J'ai réduit le 'gap' pour que ça rentre mieux */
    }
     .category-title {
        font-size: 1.2rem;
        text-align: center; /* Centrer le titre sur mobile? */
    }
}

/* --- Adaptation Mobile pour Navigation --- */
@media (max-width: 768px) {
    .sticky-nav {
        /* Transformation en liste verticale (non sticky pour ne pas bloquer la vue) */
        position: static !important;
        display: block;
        height: auto;
        overflow-x: visible;
        white-space: normal;

        text-align: center;
        padding: 20px;

        /* Optimisation Mobile: Pleine largeur */
        /* Correction des marges pour compenser le padding parent (.page-container + .main-content) */
        margin-left: -30px;
        margin-right: -30px;
        width: calc(100% + 60px);

        border-radius: 0;
        border-left: none;
        border-right: none;
        background: rgba(255, 255, 255, 0.5); /* Plus transparent pour fondre dans la page */
        box-shadow: none; /* Enlever l'ombre de "barre flottante" */
        border-bottom: 1px solid var(--border-color);
    }

    .sticky-nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .sticky-nav li {
        display: block;
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
        border: 1px solid rgba(0,0,0,0.05);
        background-color: rgba(255, 255, 255, 0.8);
    }

    /* Si l'écran est très petit (<600px), le padding container est de 10px */
    @media (max-width: 600px) {
        .sticky-nav {
            /* page-container padding = 10px. main-content padding = 10px. Total offset = 20px */
            margin-left: -20px;
            margin-right: -20px;
            width: calc(100% + 40px);
        }
    }
}

/* --- Adaptation Mobile pour Header/Intro --- */
@media (max-width: 600px) {
    .back-link {
        position: static;
        transform: none;
        display: block;
        margin-top: 15px;
        text-align: center;
    }
    .page-container {
        padding: 10px;
    }
    .intro-paragraph {
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
    }
     .cagnotte-section {
        padding: 20px;
    }
     .cagnotte-section h3 {
        font-size: 1.6rem;
    }
}
/* Message d'information dans la modale */
#modal-message.modal-message-info {
    background-color: #e6f7ff; /* Light blue */
    color: #1890ff; /* Blue */
    border: 1px solid #91d5ff;
}
/* Ensure existing styles use the new class names */
#modal-message.modal-message-success {
    background-color: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(var(--accent-color-rgb), 0.3);
}
#modal-message.modal-message-error {
    background-color: #fceded; /* Soft red */
    color: #c53030; /* Darker red */
    border: 1px solid #f7baba;
}
/* General modal message styles */
#modal-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: none; /* Caché par défaut */
}

/* --- Progress Bar Styles --- */
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-color-card-description);
    margin-bottom: 8px;
    padding: 0 5px;
}
.progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 10px;
    transition: width 0.4s ease-in-out;
}
/* Styles for Partial Contribution Modal */
.partial-contribution-section {
    margin-bottom: 15px;
    padding: 15px;
    background-color: rgba(var(--accent-color-rgb), 0.05);
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-color-rgb), 0.1);
}
.partial-contribution-section p {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
}
.partial-contribution-section label {
    text-align: left;
}
.partial-contribution-section input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}
.gift-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Espace entre les boutons */
    margin-top: auto; /* Pousse les boutons en bas de la carte */
}

/* --- SKELETON LOADING --- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-bg {
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin-top: 10px;
}

.skeleton-text {
    height: 16px;
    width: 60%;
}

.skeleton-button {
    height: 40px;
    width: 100%;
    border-radius: 20px;
    margin-top: auto;
}

@media (max-width: 960px) {
    .skeleton-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .skeleton-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .skeleton-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- REVAMPED HEADER --- */
.site-header {
    background-image: radial-gradient(circle at 50% 50%, #ffffff 0%, #fdfaf6 100%);
    padding: 60px 20px 40px 20px; /* Increased padding */
    border-bottom: none; /* Removing the border for a cleaner look */
    margin-bottom: 20px;
}

.site-header h2 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 400; /* More elegant, lighter weight */
    letter-spacing: -0.02em;
    color: var(--text-color-headings);
}

/* --- STICKY CATEGORY NAVIGATION --- */
.sticky-nav {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 10px;
    margin-bottom: 30px;
    border-radius: 0 0 12px 12px;

    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);

    display: flex;
    justify-content: center;
    overflow-x: auto; /* Allow horizontal scroll on mobile */
    white-space: nowrap;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.sticky-nav::-webkit-scrollbar {
    display: none;
}

.sticky-nav ul {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-nav li {
    display: inline-block;
}

.nav-link {
    display: block;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-color-dark);
    font-family: var(--secondary-font);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nav-link.active {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(228, 109, 55, 0.3); /* Shadow matching accent color */
}

/* Adjusting scroll offset for anchors so the title isn't hidden behind the sticky nav */
.category-title {
    scroll-margin-top: 100px;
}

/* --- CARD INTERACTIONS & GLASSMORPHISM --- */

/* 1. Enhanced Card Hover Effects */
.gift-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    border-radius: 12px; /* Softer corners */
    padding: 15px; /* More breathing room inside card */
    background-color: var(--card-bg-color);
    box-shadow: var(--card-shadow);
}

.gift-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

/* Image Zoom Effect */
.gift-image-wrapper {
    overflow: hidden; /* Keep image inside bounds */
    border-radius: 8px;
}

.gift-image-wrapper::before { /* Preload a zoom layer */
    content: "";
    display: block;
    padding-top: 100%; /* Aspect Ratio 1:1 */
}

/* Targeting the background image directly isn't possible since it's set via inline style.
   We need to change how the image is rendered or hack it.
   Wait, the current code uses background-image on .gift-image-wrapper.
   To zoom, we need a child element or change background-size.
   Changing background-size is jerky.
   Better approach: The JS creates <div class="gift-image-wrapper" style="background-image...">
   I will modify the CSS to use background-size transition, which might be acceptable,
   OR I will update JS in the next step to use an actual <img> tag for better accessibility and animation.
   For now, let's try background-size transition.
*/
.gift-image-wrapper {
    transition: background-size 0.5s ease;
    background-size: 100%; /* Start normal cover */
    background-position: center;
    background-repeat: no-repeat;
}
.gift-card:hover .gift-image-wrapper {
    /* Scaling background image is tricky with 'cover'.
       Let's switch strategy in JS to use <img> for better animation.
       For now, let's just add a subtle brightness lift. */
    filter: brightness(1.02);
}


/* 2. Modern Typography for Cards */
.gift-title-price {
    font-family: var(--primary-font); /* Switching to Serif for titles adds elegance */
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
    color: var(--text-color-headings);
}

.price-tag {
    /* Refined pill */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: var(--secondary-font);
    letter-spacing: 0.5px;
}


/* 3. Glassmorphism Modal */
.modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-overlay {
    background-color: rgba(60, 50, 40, 0.6); /* Lighter, warmer overlay */
    backdrop-filter: blur(3px);
}

/* --- NEW IMAGE STYLES FOR ZOOM (Using img tag) --- */
.gift-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f0f0f0;
}

.gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the square area */
    transition: transform 0.6s ease;
    display: block; /* Remove bottom space */
}

.gift-card:hover .gift-image {
    transform: scale(1.1); /* The Zoom Effect */
}

.gift-card.offered .gift-image {
    filter: grayscale(100%) opacity(0.6);
}
/* Remove old .gift-img-content if unused, but keeping clean */

/* --- SCROLL ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-on-scroll {
    opacity: 0; /* Hidden by default */
}

.animate-in {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
/* --- CORRECTIF FORCE POUR LES IMAGES --- */

/* 1. On nettoie le conteneur de l'image */
.gift-image-wrapper {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; /* Carré parfait */
    overflow: hidden !important;
    background: #f0f0f0 !important; /* Fond gris clair si pas d'image */
    display: block !important;
    padding: 0 !important;
    height: auto !important;
}

/* 2. IMPORTANT : On supprime le bloc invisible qui "pousse" l'image dehors */
.gift-image-wrapper::before,
.gift-image-wrapper::after {
    display: none !important;
    content: none !important;
}

/* 3. On force l'image à prendre toute la place */
.gift-image {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* L'image remplit le carré sans être déformée */
    display: block !important;
    z-index: 10; /* On s'assure qu'elle est au-dessus */
    opacity: 1 !important;
    transform: none !important; /* On annule les effets de zoom temporairement */
}
