/* =========================================================
   AGAPE SHOP — CART PAGE
   Design clair / bleu nuit
   ========================================================= */

/* ---------------------------------------------------------
   PAGE
   --------------------------------------------------------- */

.cart-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 45px 25px 70px;
    color: #172033;
}

/* TITRE PRINCIPAL */

.cart-page > h1 {
    margin: 0 0 30px;

    color: #172033 !important;

    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: -0.03em;
}

/* ---------------------------------------------------------
   LAYOUT
   --------------------------------------------------------- */

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

/* ---------------------------------------------------------
   LISTE PRODUITS
   --------------------------------------------------------- */

.cart-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------------------------------------------------------
   PRODUIT
   --------------------------------------------------------- */

.cart-item {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.cart-item:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.09);
}

/* ---------------------------------------------------------
   IMAGE
   --------------------------------------------------------- */

.cart-item-image {
    width: 125px;
    height: 125px;

    object-fit: cover;

    display: block;

    background: #f8fafc;

    border: 1px solid #e5e7eb;
    border-radius: 13px;
}

/* ---------------------------------------------------------
   INFORMATIONS
   --------------------------------------------------------- */

.cart-item-info {
    min-width: 0;
}

.cart-item-info h3 {
    margin: 0 0 8px;

    color: #172033 !important;

    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.cart-variant {
    margin: 0 0 10px;

    color: #64748b;

    font-size: 0.9rem;
}

.cart-variant strong {
    color: #334155;
}

.cart-price {
    margin: 0 0 16px;

    color: #1d4ed8;

    font-size: 1.1rem;
    font-weight: 700;
}

/* ---------------------------------------------------------
   QUANTITÉ
   --------------------------------------------------------- */

.cart-update-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cart-update-form label {
    width: 100%;

    margin-bottom: 2px;

    color: #64748b;

    font-size: 0.75rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-update-form input[type="number"] {
    width: 75px;
    height: 42px;

    padding: 0 10px;

    background: #ffffff;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    color: #172033;

    font-size: 0.95rem;
    font-weight: 600;

    text-align: center;

    outline: none;
}

.cart-update-form input[type="number"]:focus {
    border-color: #1d4ed8;

    box-shadow:
        0 0 0 3px rgba(29, 78, 216, 0.10);
}

.cart-update-form button {
    height: 42px;

    padding: 0 15px;

    background: #f8fafc;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    color: #172033;

    font-size: 0.88rem;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}

.cart-update-form button:hover {
    background: #172033;
    border-color: #172033;
    color: #ffffff;
}

/* ---------------------------------------------------------
   DROITE PRODUIT
   --------------------------------------------------------- */

.cart-item-right {
    min-width: 120px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    gap: 18px;
}

.cart-subtotal {
    color: #172033;

    font-size: 1.2rem;
    font-weight: 800;

    white-space: nowrap;
}

.cart-remove {
    padding: 5px 0;

    background: transparent;

    border: 0;

    color: #dc2626;

    font-size: 0.88rem;
    font-weight: 600;

    cursor: pointer;
}

.cart-remove:hover {
    color: #991b1b;
    text-decoration: underline;
}

/* ---------------------------------------------------------
   RÉCAPITULATIF
   --------------------------------------------------------- */

.cart-summary {
    position: sticky;
    top: 25px;

    padding: 25px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    box-shadow:
        0 8px 28px rgba(15, 23, 42, 0.07);
}

.cart-summary h2 {
    margin: 0 0 22px;
    padding-bottom: 18px;

    border-bottom: 1px solid #e5e7eb;

    color: #172033 !important;

    font-size: 1.3rem;
    font-weight: 800;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 4px 0 20px;

    border-bottom: 1px solid #e5e7eb;

    color: #64748b;

    font-size: 0.95rem;
}

.summary-line strong {
    color: #172033;

    font-size: 1.35rem;
    font-weight: 800;
}

/* ---------------------------------------------------------
   CHECKOUT
   --------------------------------------------------------- */

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 52px;

    margin-top: 22px;
    padding: 0 20px;

    background: #172033;

    border-radius: 11px;

    color: #ffffff !important;

    font-size: 0.98rem;
    font-weight: 700;

    text-decoration: none;

    box-shadow:
        0 6px 16px rgba(15, 23, 42, 0.15);

    transition: all 0.2s ease;
}

.btn-checkout:hover {
    background: #0f172a;

    transform: translateY(-2px);

    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.20);
}

/* ---------------------------------------------------------
   CONTINUER ACHATS
   --------------------------------------------------------- */

.continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    margin-top: 14px;
    padding: 13px 15px;

    color: #475569 !important;

    font-size: 0.9rem;
    font-weight: 600;

    text-decoration: none;

    border-radius: 10px;

    transition: all 0.2s ease;
}

.continue-shopping:hover {
    background: #f8fafc;

    color: #172033 !important;
}

/* ---------------------------------------------------------
   PANIER VIDE
   --------------------------------------------------------- */

.cart-empty {
    max-width: 700px;

    margin: 40px auto 20px;
    padding: 60px 30px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 20px;

    box-shadow:
        0 8px 28px rgba(15, 23, 42, 0.06);

    text-align: center;
}

.cart-empty::before {
    content: "🛒";

    display: block;

    margin-bottom: 18px;

    font-size: 3.5rem;
}

.cart-empty h2 {
    margin: 0 0 12px;

    color: #172033 !important;

    font-size: 1.6rem;
    font-weight: 800;
}

.cart-empty p {
    max-width: 500px;

    margin: 0 auto 25px;

    color: #64748b;

    line-height: 1.6;
}

.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 0 24px;

    background: #172033;

    border-radius: 10px;

    color: #ffffff !important;

    font-weight: 700;

    text-decoration: none;

    transition: all 0.2s ease;
}

.btn-continue-shopping:hover {
    background: #0f172a;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.18);
}

/* ---------------------------------------------------------
   TABLETTE
   --------------------------------------------------------- */

@media (max-width: 1000px) {

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .cart-page {
        padding: 30px 15px 50px;
    }

    .cart-page > h1 {
        font-size: 1.8rem;
        margin-bottom: 22px;
    }

    .cart-item {
        grid-template-columns: 90px minmax(0, 1fr);

        gap: 15px;

        padding: 15px;
    }

    .cart-item-image {
        width: 90px;
        height: 90px;
    }

    .cart-item-info h3 {
        font-size: 1rem;
    }

    .cart-price {
        font-size: 1rem;
    }

    .cart-item-right {
        grid-column: 1 / -1;

        width: 100%;

        flex-direction: row;
        justify-content: space-between;
        align-items: center;

        padding-top: 13px;

        border-top: 1px solid #e5e7eb;
    }

    .cart-subtotal {
        font-size: 1.1rem;
    }

    .cart-summary {
        padding: 20px;
    }
}

/* ---------------------------------------------------------
   PETIT MOBILE
   --------------------------------------------------------- */

@media (max-width: 450px) {

    .cart-item {
        grid-template-columns: 75px minmax(0, 1fr);
    }

    .cart-item-image {
        width: 75px;
        height: 75px;
    }

    .cart-empty {
        padding: 45px 20px;
    }

    .cart-empty h2 {
        font-size: 1.35rem;
    }
}