/* ============================================================
   CART.CSS — MV Moda Femenina
   Cart panel + Checkout modal
   ============================================================ */

/* ── Cart panel — fullscreen ── */

.mv-cart-overlay { display: none; }

.mv-cart-panel {
    position: fixed;
    inset: 0;
    background: var(--cream);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}

.mv-cart-panel.open { transform: translateY(0); }

/* Desktop: side panel */
@media (min-width: 768px) {
    .mv-cart-panel {
        top: 0; right: 0; bottom: 0; left: auto;
        width: 440px;
        transform: translateX(100%);
        box-shadow: -8px 0 32px rgba(0,0,0,0.1);
    }
    .mv-cart-panel.open { transform: translateX(0); }
}

/* ── Panel header ── */

.mv-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mv-cart-title {
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--ink);
    text-transform: uppercase;
}

.mv-cart-close {
    background: none;
    border: none;
    color: var(--warm-gray);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.mv-cart-close:hover { color: var(--ink); }

/* ── Cart content (scrollable) ── */

.mv-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

/* Empty state */
.mv-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 12px;
    color: var(--warm-gray);
}

.mv-cart-empty-icon { font-size: 36px; }

.mv-cart-empty-text {
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 400;
    color: var(--ink);
}

.mv-cart-empty-sub {
    font-size: 13px;
    line-height: 1.6;
}

/* ── Cart item ── */

.mv-cart-item {
    display: flex;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.mv-cart-item-img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    object-position: center top;
    background: var(--cream-3);
    flex-shrink: 0;
    border-radius: 4px;
}

.mv-cart-item-img--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.mv-cart-item-info { flex: 1; min-width: 0; }

.mv-cart-item-name {
    font-family: var(--f-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 3px;
    line-height: 1.3;
}

.mv-cart-item-meta {
    font-family: var(--f-italic);
    font-style: italic;
    font-size: 12px;
    color: var(--warm-gray);
    margin-bottom: 4px;
}

.mv-cart-item-price {
    font-family: var(--f-display);
    font-size: 15px;
    color: var(--gold-dark);
    margin-bottom: 10px;
}

.mv-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.mv-qty-btn {
    width: 28px; height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--ink);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mv-qty-btn:hover { background: var(--cream-3); }

.mv-qty-val {
    width: 28px;
    text-align: center;
    font-size: 13px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    line-height: 28px;
    color: var(--ink);
}

.mv-cart-remove {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--warm-gray-2);
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    padding-bottom: 1px;
    transition: color 0.2s;
    font-family: var(--f-body);
}

.mv-cart-remove:hover { color: var(--bordeaux); border-color: var(--bordeaux); }

.mv-cart-item-total {
    font-family: var(--f-display);
    font-size: 14px;
    color: var(--ink);
    flex-shrink: 0;
    padding-top: 2px;
}

/* ── Cart footer ── */

.mv-cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--cream-2);
}

.mv-cart-totals { margin-bottom: 16px; }

.mv-cart-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--warm-gray);
    padding: 4px 0;
}

.mv-cart-row--total {
    font-family: var(--f-display);
    font-size: 17px;
    color: var(--ink);
    font-weight: 400;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 10px;
}

.mv-checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--ink);
    color: var(--cream);
    border: none;
    cursor: pointer;
    font-family: var(--f-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.25s;
}

.mv-checkout-btn:hover { background: #1c5e3a; }

/* ── Checkout Modal ── */

.mv-checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mv-checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 401;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.mv-checkout-modal.open ~ .mv-checkout-overlay { opacity: 1; pointer-events: auto; }
.mv-checkout-overlay.open { opacity: 1; pointer-events: auto; }

.mv-checkout-box {
    width: 100%;
    max-height: 90vh;
    background: var(--cream);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
}

.mv-checkout-modal.open .mv-checkout-box {
    transform: translateY(0);
    pointer-events: auto;
}

.mv-checkout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--cream);
    z-index: 1;
}

.mv-checkout-title {
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink);
}

.mv-checkout-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--warm-gray);
    cursor: pointer;
    padding: 6px;
    line-height: 1;
}

.mv-checkout-form {
    padding: 20px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mv-checkout-eyebrow {
    font-family: var(--f-italic);
    font-style: italic;
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin-bottom: -4px;
}

.mv-field { display: flex; flex-direction: column; gap: 6px; }

.mv-field label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--warm-gray);
    font-family: var(--f-body);
}

.mv-field input,
.mv-field textarea {
    background: var(--cream-2);
    border: 1px solid var(--border);
    padding: 13px 14px;
    font-size: 15px;
    font-family: var(--f-body);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
    border-radius: 4px;
    -webkit-appearance: none;
}

.mv-field input:focus,
.mv-field textarea:focus { border-color: var(--gold); }

.mv-field textarea { resize: vertical; min-height: 72px; }

.mv-checkout-error {
    font-size: 12px;
    color: var(--bordeaux);
    min-height: 16px;
    text-align: center;
}

.mv-checkout-submit {
    width: 100%;
    padding: 18px;
    background: #25D366;
    color: white;
    border: none;
    cursor: pointer;
    font-family: var(--f-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 4px;
    transition: background 0.2s;
    margin-top: 4px;
}

.mv-checkout-submit:hover { background: #1eab55; }

/* ── Cart bar (sticky bottom) ── */

.mv-cart-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    background: var(--ink);
    color: var(--cream);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.mv-cart-bar.visible { transform: translateY(0); }

.mv-cart-bar-icon {
    position: relative;
    flex-shrink: 0;
}

.mv-cart-bar-icon svg { stroke: var(--cream); }

.mv-cart-bar-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--gold);
    color: var(--ink);
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.mv-cart-bar-info {
    flex: 1;
    min-width: 0;
}

.mv-cart-bar-count {
    font-family: var(--f-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(212,175,125,0.7);
    margin-bottom: 1px;
}

.mv-cart-bar-total {
    font-family: var(--f-display);
    font-size: 16px;
    font-weight: 400;
    color: var(--champagne);
    white-space: nowrap;
}

.mv-cart-bar-btn {
    background: var(--gold);
    color: var(--ink);
    border: none;
    cursor: pointer;
    font-family: var(--f-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 20px;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
    border-radius: 2px;
}

.mv-cart-bar-btn:hover { background: var(--champagne); }

/* ── Desktop ── */
@media (min-width: 768px) {
    .mv-checkout-modal {
        align-items: center;
        justify-content: center;
    }

    .mv-checkout-box {
        width: 520px;
        max-height: 85vh;
        border-radius: 16px;
        transform: scale(0.95);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    .mv-checkout-modal.open .mv-checkout-box {
        transform: scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}
