/* ============================================================
   Restaurant Click & Collect — Vitrine Produits (Carrousel)
   ============================================================ */

/* ── Variables locales ────────────────────────────────────────────────────── */
.rcc-showcase {
    --sc-red:      #7B1A1A;
    --sc-green:    #1a7a4a;
    --sc-green-bg: rgba(26,122,74,0.12);
    --sc-radius:   16px;
    --sc-shadow:   0 4px 24px rgba(0,0,0,0.08);
    --sc-text:     #1a1a1a;
    --sc-muted:    #6b6b6b;
    --sc-border:   #ececec;
    --sc-white:    #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px 48px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--sc-text);
}

/* ── Titre ────────────────────────────────────────────────────────────────── */
.rcc-sc-heading {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    text-align: center;
    margin: 0 0 36px;
    color: var(--sc-text);
    letter-spacing: -0.3px;
}

/* ── Structure carrousel ──────────────────────────────────────────────────── */
.rcc-sc-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rcc-sc-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 4px; /* évite l'arrondi d'overflow sur les bords */
}

.rcc-sc-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Boutons navigation ────────────────────────────────────────────────────── */
.rcc-sc-nav {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--sc-white);
    border: 1.5px solid var(--sc-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    color: var(--sc-text);
}
.rcc-sc-nav:hover:not(:disabled) {
    background: var(--sc-red);
    border-color: var(--sc-red);
    color: #fff;
    box-shadow: 0 4px 16px rgba(123,26,26,0.25);
    transform: scale(1.05);
}
.rcc-sc-nav:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
}
.rcc-sc-nav svg { pointer-events: none; }

/* ── Carte produit ─────────────────────────────────────────────────────────── */
.rcc-sc-card {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 10px;
    box-sizing: border-box;
}

.rcc-sc-card-inner {
    background: var(--sc-white);
    border-radius: var(--sc-radius);
    overflow: hidden;
    box-shadow: var(--sc-shadow);
    transition: box-shadow 0.25s, transform 0.25s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.rcc-sc-card-inner:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.13);
    transform: translateY(-3px);
}

/* ── Image ────────────────────────────────────────────────────────────────── */
.rcc-sc-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;      /* hauteur fixe identique pour toutes les cartes */
    flex-shrink: 0;
    overflow: hidden;
    background: #f3ede7;
}
/*
 * Position absolute : la seule technique qui résiste aux surcharges de thème
 * (Astra, Divi, etc.) qui appliquent height:auto !important sur img.
 * L'image est collée aux 4 coins du wrapper (height: 220px fixe) et
 * couvre tout l'espace sans déformation grâce à object-fit: cover.
 */
.rcc-sc-img,
.rcc-sc-img-wrap img {
    position: absolute !important;
    inset: 0 !important;          /* top/right/bottom/left: 0 */
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    transition: transform 0.4s ease;
}
.rcc-sc-card-inner:hover .rcc-sc-img,
.rcc-sc-card-inner:hover .rcc-sc-img-wrap img {
    transform: scale(1.04);
}
.rcc-sc-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0e8e0, #e5ddd5);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.rcc-sc-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.rcc-sc-badge-cat {
    left: 12px;
    background: rgba(255,255,255,0.92);
    color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.rcc-sc-badge-stock {
    right: 12px;
}
.rcc-sc-badge-stock.is-available {
    background: rgba(26,122,74,0.90);
    color: #fff;
}
.rcc-sc-badge-stock.is-unavailable {
    background: rgba(80,80,80,0.85);
    color: #fff;
}
.rcc-sc-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.rcc-sc-badge-stock.is-available .rcc-sc-badge-dot {
    background: #6dffb0;
    box-shadow: 0 0 6px rgba(109,255,176,0.7);
    animation: rcc-sc-pulse 2s infinite;
}
@keyframes rcc-sc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ── Badge Promotion ─────────────────────────────────────────────────────── */
.rcc-sc-badge-promo {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--sc-red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 7px 12px;
    line-height: 1;
    /* Dégradé subtil pour la profondeur */
    background: linear-gradient(135deg, #7B1A1A 0%, #a02020 100%);
}
.rcc-sc-badge-promo svg {
    flex-shrink: 0;
    opacity: 0.85;
}

/* ── Corps de la carte ────────────────────────────────────────────────────── */
.rcc-sc-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.rcc-sc-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--sc-text);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rcc-sc-desc {
    font-size: 13.5px;
    color: var(--sc-muted);
    margin: 0;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Footer : prix + bouton ──────────────────────────────────────────────── */
.rcc-sc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}
.rcc-sc-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--sc-text);
    flex-shrink: 0;
    line-height: 1.2;
}
.rcc-sc-price .woocommerce-Price-currencySymbol {
    font-size: 15px;
    vertical-align: super;
    margin-left: 1px;
}

/* Prix en promotion : prix barré (regular) + prix soldé (sale) */
.rcc-sc-price del {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--sc-muted);
    text-decoration: line-through;
    opacity: 0.8;
    margin-bottom: 1px;
}
.rcc-sc-price del .woocommerce-Price-currencySymbol {
    font-size: 11px;
}
.rcc-sc-price ins {
    text-decoration: none;
    color: var(--sc-red);
    font-size: 22px;
    font-weight: 800;
}
.rcc-sc-price ins .woocommerce-Price-currencySymbol {
    font-size: 15px;
}

/* Feedback erreur sur la carte */
.rcc-sc-card-inner.rcc-sc-add-error {
    box-shadow: 0 0 0 2px #c0392b, 0 4px 24px rgba(192,57,43,0.18);
    transition: box-shadow 0.2s;
}

/* ── Bouton Ajouter ──────────────────────────────────────────────────────── */
.rcc-sc-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--sc-red);
    color: #ffffff;
    border: 2px solid var(--sc-red);
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
}
/* Hover état normal uniquement (pas loading, pas added) */
.rcc-sc-add-btn:hover:not(:disabled):not(.is-added):not(.is-loading) {
    background: #ffffff;
    color: var(--sc-red);
    transform: translateY(-1px);
}
.rcc-sc-add-btn:disabled {
    cursor: default;
    opacity: 0.7;
}
.rcc-sc-add-btn.is-loading {
    background: #c0c0c0;
    border-color: #c0c0c0;
    color: #fff;
    pointer-events: none;
}

/* ── État "dans le panier" → bouton Voir le panier ───────────────────────── */
.rcc-sc-add-btn.is-added {
    background: transparent;
    border-color: #1a7a4a;
    color: #1a7a4a;
    cursor: pointer;
    animation: rcc-sc-btn-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rcc-sc-add-btn.is-added:hover {
    background: #1a7a4a;
    border-color: #1a7a4a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26,122,74,0.28);
}
@keyframes rcc-sc-btn-pop {
    0%   { transform: scale(0.88); opacity: 0.6; }
    100% { transform: scale(1);    opacity: 1;   }
}

/* Supprimer le lien "Voir le panier" injecté par Astra/WC après l'événement added_to_cart */
.rcc-sc-footer a.added_to_cart,
.rcc-sc-footer .added_to_cart {
    display: none !important;
}

.rcc-sc-unavailable-label {
    font-size: 13px;
    color: var(--sc-muted);
    font-style: italic;
}

/* ── Dots ────────────────────────────────────────────────────────────────── */
.rcc-sc-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    min-height: 16px;
}
.rcc-sc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sc-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s, width 0.2s;
}
.rcc-sc-dot.is-active {
    background: var(--sc-red);
    width: 22px;
    border-radius: 4px;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.rcc-sc-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLETTE (≤ 900px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .rcc-sc-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .rcc-sc-img-wrap { height: 200px; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 600px)
   Redesign complet : grandes cartes plein-écran, swipe natif
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* Pas de padding latéral — les flèches se placent en overlay */
    .rcc-showcase { padding: 0 0 40px; }
    .rcc-sc-heading { margin: 0 16px 28px; font-size: clamp(22px, 6vw, 30px); }

    /* Wrapper sans gap : les flèches sont intégrées en overlay */
    .rcc-sc-wrapper { gap: 0; position: relative; }

    /* Flèches en overlay sur les côtés — ne mangent plus de place horizontale */
    .rcc-sc-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 36px;
        height: 36px;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 2px 12px rgba(0,0,0,0.18);
        /* Visibilité réduite : swipe est le moyen principal sur mobile */
        opacity: 0.75;
    }
    .rcc-sc-prev { left: 8px; }
    .rcc-sc-next { right: 8px; }
    .rcc-sc-nav:disabled { opacity: 0.2; }

    /* Carte : quasi plein-écran avec léger peek de la suivante */
    .rcc-sc-card {
        flex: 0 0 88% !important;
        max-width: 88% !important;
        padding: 0 8px;
    }

    /* Image nettement plus haute sur mobile */
    .rcc-sc-img-wrap { height: 260px; }

    /* Corps de la carte : plus généreux */
    .rcc-sc-body {
        padding: 20px 18px 22px;
        gap: 10px;
    }

    /* Nom : plus grand, 2 lignes max */
    .rcc-sc-name {
        font-size: 20px;
        -webkit-line-clamp: 2;
    }

    /* Description : 3 lignes sur mobile */
    .rcc-sc-desc {
        font-size: 14px;
        line-height: 1.6;
        -webkit-line-clamp: 3;
    }

    /* Footer : colonne sur très petits écrans */
    .rcc-sc-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    /* Prix : plus grand */
    .rcc-sc-price { font-size: 26px; }

    /* Bouton "Ajouter" pleine largeur sur mobile */
    .rcc-sc-add-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 800;
        border-radius: 14px;
    }

    /* Dots : plus visibles */
    .rcc-sc-dots { margin-top: 20px; gap: 10px; }
    .rcc-sc-dot { width: 10px; height: 10px; }
    .rcc-sc-dot.is-active { width: 28px; }
}
