/**
 * Gravity Recommender — Product card styles
 *
 * Toutes les classes sont préfixées `.gr-*` pour éviter les conflits.
 *
 * `!important` est utilisé sur certaines propriétés critiques car
 * certains builders (Elementor + thèmes vendor) écrasent les styles des
 * plugins avec des sélecteurs très spécifiques. Pour surcharger depuis
 * votre thème, augmentez la spécificité (ex. `body .gr-product-card { ... }`).
 *
 * Thématisation : surchargez ces variables CSS dans votre thème pour
 * adapter les couleurs et la typographie sans toucher au plugin.
 */

:root {
    --gr-primary:        var(--gr-primary);
    --gr-secondary:      var(--gr-secondary);
    --gr-accent:         var(--gr-accent);
    --gr-font-heading:   var(--gr-font-heading);
    --gr-font-body:      var(--gr-font-body);
}

/* ============================================
   Conteneur principal
   ============================================ */

.gr-recommendations-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    font-family: var(--gr-font-body) !important;
    box-sizing: border-box !important;
}

.gr-recommendations-wrapper *,
.gr-recommendations-wrapper *::before,
.gr-recommendations-wrapper *::after {
    box-sizing: border-box !important;
}

.gr-explanation {
    text-align: center !important;
    margin-bottom: 40px !important;
}

.gr-explanation p {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: var(--gr-primary) !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    font-family: var(--gr-font-body) !important;
}

/* ============================================
   Grille de produits
   ============================================ */

.gr-products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* ============================================
   Carte produit
   ============================================ */

.gr-product-card {
    background: #fff !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 16px !important;
    padding: 35px 28px 28px !important;
    position: relative !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(46, 61, 68, 0.06) !important;
    overflow: visible !important;
    display: block !important;
}

.gr-product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(46, 61, 68, 0.14) !important;
}

/* Carte featured — se démarque visuellement */
.gr-product-card--featured {
    border: 3px solid var(--gr-accent) !important;
    padding-top: 50px !important;
    box-shadow: 0 8px 30px rgba(217, 93, 57, 0.15) !important;
    transform: scale(1.03) !important;
}

.gr-product-card--featured:hover {
    box-shadow: 0 20px 50px rgba(217, 93, 57, 0.22) !important;
    transform: scale(1.03) translateY(-6px) !important;
}

/* ============================================
   Badge recommandation
   ============================================ */

.gr-badge {
    position: absolute !important;
    top: -15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: var(--gr-accent) !important;
    background-color: var(--gr-accent) !important;
    color: #fff !important;
    padding: 8px 24px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: var(--gr-font-body) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
    z-index: 10 !important;
    display: inline-block !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    box-shadow: 0 3px 12px rgba(217, 93, 57, 0.35) !important;
}

/* ============================================
   Contenu de la carte
   ============================================ */

.gr-product-content {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.gr-product-category {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: var(--gr-secondary) !important;
    font-family: var(--gr-font-body) !important;
}

.gr-product-title {
    font-family: var(--gr-font-heading) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: var(--gr-primary) !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* ============================================
   Prix
   ============================================ */

.gr-product-price {
    margin-bottom: 22px !important;
    padding-bottom: 18px !important;
    border-bottom: 2px solid #f0f0f0 !important;
    width: 100% !important;
}

.gr-price-amount {
    font-family: var(--gr-font-heading) !important;
    font-size: 40px !important;
    font-weight: 700 !important;
    color: var(--gr-primary) !important;
    line-height: 1 !important;
}

.gr-product-card--featured .gr-price-amount {
    color: var(--gr-accent) !important;
}

.gr-price-period {
    font-size: 16px !important;
    color: #888 !important;
    font-weight: 400 !important;
    font-family: var(--gr-font-body) !important;
}

/* ============================================
   Liste de caractéristiques
   ============================================ */

.gr-product-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 22px 0 !important;
    text-align: left !important;
    width: 100% !important;
}

.gr-product-features li {
    padding: 9px 0 9px 30px !important;
    position: relative !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
    color: var(--gr-primary) !important;
    border-bottom: 1px solid #f5f5f5 !important;
    font-family: var(--gr-font-body) !important;
    list-style: none !important;
    margin: 0 !important;
}

.gr-product-features li:last-child {
    border-bottom: none !important;
}

.gr-product-features li::before {
    content: "\2713" !important;
    position: absolute !important;
    left: 2px !important;
    top: 9px !important;
    font-weight: 700 !important;
    color: var(--gr-secondary) !important;
    font-size: 15px !important;
}

.gr-product-card--featured .gr-product-features li::before {
    color: var(--gr-accent) !important;
}

/* ============================================
   Description
   ============================================ */

.gr-product-description {
    margin: 0 0 22px 0 !important;
    width: 100% !important;
}

.gr-product-description p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #888 !important;
    margin: 0 !important;
    font-style: italic !important;
    font-family: var(--gr-font-body) !important;
}

/* ============================================
   Bouton principal (CTA)
   ============================================ */

a.gr-product-button,
.gr-product-button {
    display: block !important;
    width: 100% !important;
    padding: 16px 30px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    font-family: var(--gr-font-body) !important;
    transition: all 0.3s ease !important;
    background: var(--gr-secondary) !important;
    background-color: var(--gr-secondary) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    line-height: 1.4 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 12px rgba(57, 123, 129, 0.3) !important;
}

a.gr-product-button:hover,
.gr-product-button:hover {
    background: var(--gr-primary) !important;
    background-color: var(--gr-primary) !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(46, 61, 68, 0.35) !important;
}

a.gr-product-button:visited,
.gr-product-button:visited {
    color: #fff !important;
}

/* CTA featured — accent orange */
.gr-product-card--featured a.gr-product-button,
.gr-product-card--featured .gr-product-button {
    background: var(--gr-accent) !important;
    background-color: var(--gr-accent) !important;
    box-shadow: 0 4px 14px rgba(217, 93, 57, 0.35) !important;
    font-size: 16px !important;
    padding: 18px 30px !important;
}

.gr-product-card--featured a.gr-product-button:hover,
.gr-product-card--featured .gr-product-button:hover {
    background: #c04e2f !important;
    background-color: #c04e2f !important;
    box-shadow: 0 6px 20px rgba(217, 93, 57, 0.45) !important;
}

/* ============================================
   Lien détails (secondaire)
   ============================================ */

a.gr-product-details-link,
.gr-product-details-link {
    display: block !important;
    margin-top: 14px !important;
    font-size: 13px !important;
    color: var(--gr-secondary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-family: var(--gr-font-body) !important;
    letter-spacing: 0.3px !important;
    transition: color 0.2s ease !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

a.gr-product-details-link:hover,
.gr-product-details-link:hover {
    color: var(--gr-primary) !important;
    text-decoration: underline !important;
    background: none !important;
    box-shadow: none !important;
}

/* ============================================
   Disclaimer
   ============================================ */

.gr-disclaimer {
    text-align: center !important;
    margin-top: 35px !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
}

.gr-disclaimer p {
    font-size: 12px !important;
    color: #aaa !important;
    margin: 0 !important;
    font-family: var(--gr-font-body) !important;
}

/* ============================================
   Message d'erreur
   ============================================ */

.gr-error-message {
    text-align: center !important;
    padding: 60px 20px !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.gr-error-message h3 {
    font-family: var(--gr-font-heading) !important;
    font-size: 26px !important;
    margin-bottom: 15px !important;
    color: var(--gr-primary) !important;
}

.gr-error-message p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin-bottom: 30px !important;
    color: #666 !important;
    font-family: var(--gr-font-body) !important;
}

a.gr-contact-button,
.gr-contact-button {
    display: inline-block !important;
    padding: 14px 40px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    background: var(--gr-secondary) !important;
    background-color: var(--gr-secondary) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(57, 123, 129, 0.3) !important;
}

a.gr-contact-button:hover,
.gr-contact-button:hover {
    background: var(--gr-primary) !important;
    background-color: var(--gr-primary) !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 960px) and (min-width: 769px) {
    .gr-products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
    }

    .gr-product-card {
        padding: 28px 18px 22px !important;
    }

    .gr-price-amount {
        font-size: 32px !important;
    }

    .gr-product-title {
        font-size: 20px !important;
    }
}

@media (max-width: 768px) {
    .gr-recommendations-wrapper {
        padding: 25px 12px !important;
    }

    .gr-products-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .gr-product-card {
        padding: 28px 20px 22px !important;
    }

    .gr-product-card--featured {
        padding-top: 45px !important;
        transform: none !important;
    }

    .gr-product-card--featured:hover {
        transform: translateY(-4px) !important;
    }

    .gr-price-amount {
        font-size: 34px !important;
    }

    .gr-product-title {
        font-size: 22px !important;
    }
}
