/* ================================================
   ALHIDAYA — Styles Page Panier
   ================================================ */

/* ================================================
   HEADER
   ================================================ */
.panier-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 32px 0 24px;
}

.panier-titre {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--text);
}

.panier-count {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--warm-gray);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ================================================
   LAYOUT
   ================================================ */
.panier-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
    padding-bottom: 60px;
}

/* ================================================
   ARTICLES
   ================================================ */
.panier-articles {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panier-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s;
}

.panier-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* Image */
.panier-item-img {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.panier-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.panier-item-no-img {
    font-size: 32px;
    color: var(--border);
}

/* Infos */
.panier-item-infos {
    flex: 1;
    min-width: 0;
}

.panier-item-cat {
    font-size: 10px;
    color: var(--teal);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.panier-item-nom {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    /* Sur mobile on affiche le nom complet sur plusieurs lignes */
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.4;
}

.panier-item-nom:hover { color: var(--teal); }

.panier-item-prix-unit {
    font-size: 12px;
    color: var(--text-muted);
}

/* Quantité */
.panier-item-qty { flex-shrink: 0; }

.qty-form { display: inline-flex; }

.qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--teal);
    border-radius: 8px;
    overflow: hidden;
}

/* Boutons +/- plus visibles */
.qty-btn {
    width: 34px;
    height: 34px;
    background: var(--teal-light);
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--teal-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--teal);
    color: white;
}

.qty-val {
    width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    padding: 0 4px;
}

/* Total ligne */
.panier-item-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--teal-dark);
    flex-shrink: 0;
    min-width: 100px;
    text-align: right;
}

/* Supprimer */
.panier-item-del {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.panier-item-del:hover {
    color: #e53e3e;
    background: #fde8e8;
}

/* Continuer shopping */
.continuer-shopping { margin-top: 8px; }

.continuer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
}

.continuer-btn:hover { color: var(--teal); }

/* ================================================
   RESUME COMMANDE
   ================================================ */
.panier-resume {
    position: sticky;
    top: 90px;
}

.resume-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.resume-titre {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

/* Lignes produits */
.resume-lignes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.resume-ligne {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.resume-ligne-nom {
    font-size: 13px;
    color: var(--text-muted);
    flex: 1;
}

.resume-ligne-prix {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.resume-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

.resume-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.resume-label { color: var(--text-muted); }
.resume-val { font-weight: 500; color: var(--text); }
.resume-val-gratuit { font-weight: 600; color: var(--teal); }

.livraison-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--teal-light);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.livraison-info i { color: var(--teal); }

/* Code promo */
.promo-section { margin-bottom: 16px; }

.promo-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.promo-form {
    display: flex;
    gap: 8px;
}

.promo-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}

.promo-input:focus { border-color: var(--teal); }

.promo-btn {
    background: var(--blue-dark);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.promo-btn:hover { opacity: 0.85; }

/* Total */
.resume-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.resume-total-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.resume-total-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--teal-dark);
}

/* Bouton commander */
.btn-commander {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    margin-bottom: 14px;
    font-family: inherit;
}

.btn-commander:hover {
    opacity: 0.88;
    color: white;
}

/* Méthodes paiement */
.paiement-methods {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pay-badge-sm {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--warm-gray);
    padding: 4px 10px;
    border-radius: 6px;
}

/* ================================================
   PANIER VIDE
   ================================================ */
.panier-vide {
    text-align: center;
    padding: 100px 20px;
}

.panier-vide-icon {
    font-size: 72px;
    color: var(--border);
    margin-bottom: 20px;
    line-height: 1;
}

.panier-vide-titre {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.panier-vide-desc {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 991px) {
    .panier-layout {
        grid-template-columns: 1fr;
    }
    .panier-resume { position: static; }
}
@media (max-width: 576px) {
    .panier-item {
        display: grid;
        grid-template-columns: 80px 1fr auto;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 14px;
        align-items: center;
    }

    .panier-item-img {
        width: 80px;
        height: 80px;
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .panier-item-infos {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    .panier-item-qty {
        grid-column: 2;
        grid-row: 2;
    }

    .panier-item-total {
        grid-column: 3;
        grid-row: 2;
        min-width: auto;
        text-align: right;
        font-size: 14px;
    }

    .form-supprimer-panier {
        grid-column: 3;
        grid-row: 1;
        display: flex;
        justify-content: flex-end;
    }

    .panier-item-nom {
        font-size: 13px;
        white-space: normal;
        overflow: visible;
    }

    .qty-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .panier-header {
        flex-direction: column;
        gap: 8px;
    }
}

.pay-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    background: white;
    padding: 4px;
    border: 1px solid var(--border);
}