/* =====================================================================
   Onex Shop — cart.css
   ===================================================================== */

.onex-cart-header { padding-block: 0.5rem 2rem; }
.onex-cart-header h1 { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.3rem; }
.onex-cart-header i { color: var(--turquoise); }
.onex-cart-header p { color: var(--ink-soft); margin: 0; text-transform: none; }

/* ---------------------------------------------------------------------
   Panier vide
   --------------------------------------------------------------------- */
.onex-cart-empty {
    text-align: center;
    padding-block: 5rem;
}

.onex-cart-empty i { font-size: 3rem; color: var(--turquoise); margin-bottom: 1.4rem; }
.onex-cart-empty p { color: var(--ink-soft); margin-bottom: 1.6rem; }
.onex-cart-empty__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   Mise en page
   --------------------------------------------------------------------- */
.onex-cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    padding-bottom: 4rem;
    align-items: start;
}

/* ---------------------------------------------------------------------
   Lignes du panier
   --------------------------------------------------------------------- */
.onex-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.onex-cart-row {
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    align-items: center;
    gap: 1.3rem;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.onex-cart-row.is-removing { opacity: 0; transform: translateX(20px); }

.onex-cart-row__image {
    display: block;
    width: 90px;
    height: 110px;
    border: 2px solid var(--ink);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--paper-dark);
}

.onex-cart-row__image img { width: 100%; height: 100%; object-fit: cover; }

.onex-cart-row__title { font-weight: 700; font-size: 0.98rem; display: block; margin-bottom: 0.3rem; }
.onex-cart-row__title:hover { color: var(--turquoise-deep); }
.onex-cart-row__meta { font-size: 0.82rem; color: var(--ink-soft); margin: 0 0 0.2rem; }
.onex-cart-row__unit-price { font-size: 0.82rem; color: var(--ink-soft); margin: 0 0 0.5rem; }

.onex-cart-row__remove {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0;
}

.onex-cart-row__remove:hover { color: var(--turquoise-deep); }

.onex-cart-row__stepper { flex-shrink: 0; }

.onex-cart-row__line-total {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0;
    min-width: 90px;
    text-align: right;
}

/* Réutilise .onex-quantity-stepper défini dans articles_details.css ;
   redéfini ici en compact pour rester autonome sur cette page. */
.onex-quantity-stepper {
    display: flex;
    align-items: center;
    border: 2px solid var(--ink);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.onex-quantity-stepper button {
    width: 36px;
    height: 40px;
    background: var(--white);
    border: none;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
}

.onex-quantity-stepper button:hover { background: var(--yellow); }

.onex-quantity-stepper input {
    width: 40px;
    height: 40px;
    border: none;
    border-left: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    text-align: center;
    font-weight: 700;
    font-family: var(--font-body);
}

/* ---------------------------------------------------------------------
   Récapitulatif
   --------------------------------------------------------------------- */
.onex-cart-summary {
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    position: sticky;
    top: 6.5rem;
}

.onex-cart-summary h3 { color: var(--paper); margin-bottom: 1.3rem; font-size: 1.15rem; }

.onex-cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.8rem;
}

.onex-cart-summary__hint {
    font-size: 0.78rem;
    color: var(--turquoise-light);
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    margin: 0.6rem 0 1.2rem;
}

.onex-cart-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--yellow);
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    margin-bottom: 1.4rem;
}

.onex-cart-summary__checkout { width: 100%; margin-bottom: 0.9rem; }

.onex-cart-summary__continue {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.onex-cart-summary__continue:hover { color: var(--yellow); }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
    .onex-cart-layout { grid-template-columns: 1fr; }
    .onex-cart-summary { position: static; }
}

@media (max-width: 640px) {
    .onex-cart-row {
        grid-template-columns: 70px 1fr;
        grid-template-areas:
            "image info"
            "stepper total";
    }
    .onex-cart-row__image { grid-area: image; width: 70px; height: 90px; }
    .onex-cart-row__info { grid-area: info; }
    .onex-cart-row__stepper { grid-area: stepper; margin-top: 0.8rem; }
    .onex-cart-row__line-total { grid-area: total; margin-top: 0.8rem; text-align: right; }
}