/* ═══════════════════════════════════════════
   CART & CHECKOUT — Styles
   Paris Grandes Cuisines
   ═══════════════════════════════════════════ */

/* ─── CART BADGE (Header) ─── */
.cart-btn {
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    animation: cartBadgePop 0.3s ease;
}
@keyframes cartBadgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.cart-btn-label { margin-right: 2px; }

/* ─── QUICK CART BUTTON (Boutique cards) ─── */
.product-footer-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}
.btn-cart-quick {
    background: var(--primary, #1a365d);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-size: 0.85rem;
}
.btn-cart-quick:hover {
    background: var(--accent, #c9a227);
    transform: scale(1.1);
}
.btn-cart-quick.added {
    background: #38a169 !important;
}

/* ─── ADD TO CART (Product detail) ─── */
.btn-add-cart {
    position: relative;
    overflow: hidden;
}
.btn-add-cart.adding {
    pointer-events: none;
    opacity: 0.7;
}
.btn-add-cart.added {
    background: #38a169 !important;
    border-color: #38a169 !important;
}

/* ─── CART TOAST NOTIFICATION ─── */
.cart-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #0d1117;
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-left: 3px solid #c9a227;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
}
.cart-toast.show {
    transform: translateX(0);
}
.cart-toast i {
    color: #c9a227;
    font-size: 1.1rem;
}
.cart-toast .toast-text { flex: 1; }
.cart-toast .toast-link {
    color: #c9a227;
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   CART PAGE
   ═══════════════════════════════════════════ */

.cart-section {
    padding: 40px 0 80px;
}

/* Empty state */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
}
.cart-empty-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}
.cart-empty h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #1a365d;
    margin-bottom: 10px;
}
.cart-empty p {
    color: #64748b;
    margin-bottom: 30px;
}

/* Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Items header */
.cart-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 1fr 40px;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
}

/* Cart item row */
.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 1fr 40px;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid #edf2f7;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.cart-item.removing {
    opacity: 0;
    transform: translateX(-40px);
}

/* Product col */
.cart-col-product {
    display: flex;
    gap: 16px;
    align-items: center;
}
.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}
.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e0;
    font-size: 1.5rem;
}
.cart-item-name {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #1a365d;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 4px;
}
.cart-item-name:hover { color: #c9a227; }
.cart-item-ref,
.cart-item-brand {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
}
.cart-item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.cart-opt-badge {
    font-size: 0.7rem;
    background: #edf2f7;
    color: #475569;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cart-opt-badge i { color: #c9a227; font-size: 0.65rem; }

/* Price col */
.cart-col-price {
    text-align: center;
}
.cart-price {
    font-weight: 600;
    color: #1a365d;
    font-size: 0.95rem;
}
.cart-price-old {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.8rem;
    display: block;
}

/* Qty col */
.cart-col-qty {
    display: flex;
    justify-content: center;
}
.qty-selector-sm {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.qty-selector-sm .qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f7fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #475569;
    transition: background 0.2s ease;
}
.qty-selector-sm .qty-btn:hover { background: #edf2f7; }
.qty-selector-sm .qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a365d;
    background: #fff;
    -moz-appearance: textfield;
}
.qty-selector-sm .qty-input::-webkit-outer-spin-button,
.qty-selector-sm .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Total col */
.cart-col-total {
    text-align: center;
}
.cart-item-total {
    font-weight: 700;
    color: #1a365d;
    font-size: 1rem;
}

/* Remove btn */
.cart-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}
.cart-remove-btn:hover {
    color: #e53e3e;
    background: #fff5f5;
}

/* ─── CART SUMMARY ─── */
.cart-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.cart-summary h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #edf2f7;
}
.cart-summary h3 i { color: #c9a227; margin-right: 6px; }
.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #475569;
}
.cart-summary-tva {
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.85rem;
    color: #94a3b8;
}
.cart-summary-total-ttc {
    padding-top: 12px;
    border-top: 2px solid #1a365d;
    font-size: 1.1rem;
    color: #1a365d;
}
.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.cart-summary-actions .btn-block {
    display: block;
    width: 100%;
    text-align: center;
}
.cart-security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    font-size: 0.72rem;
    color: #94a3b8;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}
.cart-security-badges span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-security-badges i { color: #38a169; }

/* ═══════════════════════════════════════════
   CHECKOUT PAGE — Multi-Step Wizard
   ═══════════════════════════════════════════ */

.checkout-section {
    padding: 40px 0 80px;
}

/* Step progress bar */
.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 50px;
    padding: 0 20px;
}
.checkout-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    position: relative;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.checkout-step::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    width: 40px;
    height: 1px;
    background: #e2e8f0;
}
.checkout-step:last-child::after { display: none; }
.checkout-step .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.3s ease, color 0.3s ease;
}
.checkout-step.active {
    color: #1a365d;
}
.checkout-step.active .step-num {
    background: #c9a227;
    color: #fff;
}
.checkout-step.completed {
    color: #38a169;
}
.checkout-step.completed .step-num {
    background: #38a169;
    color: #fff;
}

/* Step panels */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}
.checkout-panel {
    display: none;
}
.checkout-panel.active {
    display: block;
    animation: fadeSlideIn 0.4s ease;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Form styles */
.checkout-form-group {
    margin-bottom: 20px;
}
.checkout-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 6px;
}
.checkout-form-group label .required {
    color: #e53e3e;
}
.checkout-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1a365d;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.checkout-input:focus {
    outline: none;
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}
.checkout-input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}
.checkout-input-error {
    color: #e53e3e;
    font-size: 0.75rem;
    margin-top: 4px;
}
.checkout-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.payment-method {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
}
.payment-method:hover {
    border-color: #c9a227;
}
.payment-method.selected {
    border-color: #c9a227;
    background: rgba(201, 162, 39, 0.04);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}
.payment-method input[type="radio"] {
    display: none;
}
.payment-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
    margin-top: 2px;
}
.payment-method.selected .payment-radio {
    border-color: #c9a227;
}
.payment-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c9a227;
    transform: scale(0);
    transition: transform 0.2s ease;
}
.payment-method.selected .payment-radio::after {
    transform: scale(1);
}
.payment-method-info {
    flex: 1;
}
.payment-method-title {
    font-weight: 700;
    color: #1a365d;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.payment-method-title i {
    color: #c9a227;
}
.payment-method-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}
.payment-method-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.payment-method-badges img {
    height: 24px;
    opacity: 0.7;
}

/* Stripe card element */
.stripe-card-element {
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    margin-top: 16px;
    transition: border-color 0.3s ease;
}
.stripe-card-element.StripeElement--focus {
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}
.stripe-card-element.StripeElement--invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.stripe-card-element.StripeElement--complete {
    border-color: #10b981;
}

/* Cetelem 4x breakdown */
.cetelem-breakdown {
    background: #f0f9ff;
    border: 1px solid #bee3f8;
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
}
.cetelem-breakdown h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cetelem-breakdown h5 i { color: #3182ce; }
.cetelem-installment {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.83rem;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
}
.cetelem-installment:last-child { border-bottom: none; }
.cetelem-installment strong { color: #1a365d; }

/* Order review summary */
.order-review-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
    align-items: center;
}
.order-review-item:last-child { border-bottom: none; }
.order-review-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f7fafc;
    flex-shrink: 0;
}
.order-review-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.order-review-details {
    flex: 1;
    font-size: 0.85rem;
}
.order-review-name {
    font-weight: 600;
    color: #1a365d;
}
.order-review-meta {
    color: #94a3b8;
    font-size: 0.75rem;
}
.order-review-price {
    font-weight: 700;
    color: #1a365d;
    white-space: nowrap;
}

/* Checkout sidebar (reuse cart summary) */
.checkout-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.checkout-summary h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #edf2f7;
}
.checkout-summary h3 i { color: #c9a227; margin-right: 6px; }

/* Navigation buttons */
.checkout-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 12px;
}
.checkout-nav .btn { min-width: 160px; }

/* ═══════════════════════════════════════════
   CONFIRMATION PAGE
   ═══════════════════════════════════════════ */

.confirmation-section {
    padding: 60px 0 80px;
    text-align: center;
}
.confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0fff4;
    border: 3px solid #38a169;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: #38a169;
    animation: confirmPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes confirmPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}
.confirmation-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #1a365d;
    margin-bottom: 10px;
}
.confirmation-order-num {
    background: #edf2f7;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-family: monospace;
    font-size: 1rem;
    color: #1a365d;
    margin: 10px 0 20px;
}
.confirmation-details {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    margin-top: 30px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Cart & Checkout
   ═══════════════════════════════════════════ */

@media (max-width: 960px) {
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary,
    .checkout-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-header-row { display: none; }
    .cart-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 0;
    }
    .cart-col-product {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-col-price,
    .cart-col-qty,
    .cart-col-total {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }
    .cart-col-price::before { content: 'Prix: '; color: #94a3b8; font-size: 0.8rem; }
    .cart-col-total::before { content: 'Total: '; color: #94a3b8; font-size: 0.8rem; }
    .cart-col-remove {
        position: absolute;
        top: 20px;
        right: 0;
    }
    .cart-item { position: relative; }

    .checkout-row { grid-template-columns: 1fr; }
    .checkout-steps { flex-wrap: wrap; gap: 8px; }
    .checkout-step { padding: 8px 12px; font-size: 0.75rem; }
    .checkout-step::after { display: none; }
    .checkout-nav { flex-direction: column; }
    .checkout-nav .btn { width: 100%; }
}
