/* ══ cart.css ════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
body { background: #f5f5f5; font-family: 'Montserrat', 'Segoe UI', sans-serif; }

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.cart-wrap {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    width: 92%;
    max-width: 1200px;
    margin: 28px auto 60px;
    align-items: start;
}

/* ── LEFT COLUMN ─────────────────────────────────────────────────────────── */
.cart-left { display: flex; flex-direction: column; gap: 14px; }

.cart-delivery-banner {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
}
.cart-delivery-banner .fas { font-size: 16px; }

.cart-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
}
.cart-title { font-size: 1.3rem; font-weight: 800; color: #1a1a1a; }
.cart-item-count { font-size: 13px; color: #888; font-weight: 500; }

/* ── CART ITEM CARD ──────────────────────────────────────────────────────── */
.cart-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    transition: box-shadow .2s;
}
.cart-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); }

.cart-item-img {
    width: 110px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 3/4;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cart-item-details { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cart-item-brand { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: .05em; }
.cart-item-name  { font-size: 14px; font-weight: 600; color: #1a1a1a; line-height: 1.4; }

.cart-item-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cart-item-eff  { font-size: 16px; font-weight: 800; color: #1a1a1a; }
.cart-item-orig { font-size: 12px; color: #bbb; text-decoration: line-through; }
.cart-item-disc { font-size: 12px; color: #e63946; font-weight: 700; }

.cart-item-saved { font-size: 12px; color: #2a9d4e; font-weight: 600; }

.cart-item-selects { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.select-wrap { display: flex; flex-direction: column; gap: 3px; }
.select-wrap label { font-size: 10px; font-weight: 700; color: #aaa; text-transform: uppercase; }
.select-wrap select {
    padding: 6px 10px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.select-wrap select:focus { border-color: #c8832a; }
.cart-size-tag { font-size: 12px; color: #555; font-weight: 600; align-self: flex-end; }

.cart-item-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}
.cart-item-actions button {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color .15s;
    font-family: inherit;
}
.cart-item-actions button:hover { color: #c8832a; }

/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */
.cart-empty {
    background: #fff;
    border-radius: 12px;
    padding: 60px 20px;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.cart-empty .fas { font-size: 56px; color: #e0e0e0; }
.cart-empty h3 { font-size: 1.2rem; font-weight: 800; color: #1a1a1a; }
.cart-empty p { font-size: 14px; color: #888; }
.cart-shop-btn {
    margin-top: 4px;
    padding: 13px 36px;
    background: #c8832a;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    transition: background .18s;
    display: inline-block;
}
.cart-shop-btn:hover { background: #a96a1c; }

/* ── RIGHT COLUMN ────────────────────────────────────────────────────────── */
.cart-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 90px;
}

/* Coupon box */
.cart-coupon-box {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.coupon-icon { width: 36px; height: 36px; background: #fff9f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.coupon-icon .fas { color: #c8832a; font-size: 16px; }
.coupon-text { flex: 1; }
.coupon-title { font-size: 13px; font-weight: 700; color: #1a1a1a; }
.coupon-hint  { font-size: 11px; color: #888; margin-top: 2px; }
.coupon-apply-btn {
    padding: 7px 18px;
    background: transparent;
    border: 2px solid #c8832a;
    border-radius: 6px;
    color: #c8832a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.coupon-apply-btn:hover { background: #c8832a; color: #fff; }

.coupon-input-row {
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.coupon-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
    text-transform: uppercase;
}
.coupon-input:focus { border-color: #c8832a; }
.coupon-submit-btn {
    padding: 10px 18px;
    background: #c8832a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s;
}
.coupon-submit-btn:hover { background: #a96a1c; }

.coupon-success {
    background: #e8f5e9;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    align-items: center;
    gap: 8px;
}

/* Price box */
.price-box {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.price-box-head {
    background: #f8f8f8;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 800;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid #f0f0f0;
}
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #f9f9f9;
}
.price-row:last-child { border-bottom: none; }
.price-row .green { color: #2a9d4e; font-weight: 700; }
.price-divider { border-top: 1.5px dashed #f0f0f0; margin: 4px 0; }
.price-row-total { font-size: 15px; font-weight: 800; color: #1a1a1a; }
.price-row-total span:last-child { color: #c8832a; }

/* Savings pill */
.savings-pill {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    align-items: center;
    gap: 8px;
}

/* Checkout button */
.cart-checkout-btn {
    width: 100%;
    padding: 16px;
    background: #c8832a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .05em;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .18s, transform .12s;
    box-shadow: 0 4px 14px rgba(200,131,42,.3);
}
.cart-checkout-btn:hover { background: #a96a1c; transform: translateY(-1px); }

.cart-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    color: #888;
    font-weight: 600;
}
.cart-secure .fas { color: #2a9d4e; }

/* ── ADDRESS MODAL ───────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.address-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.modal-head h3 { font-size: 1rem; font-weight: 800; }
.modal-close-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: #888; transition: color .15s; }
.modal-close-btn:hover { color: #e63946; }
.modal-body-form { padding: 20px 22px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group label { font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .05em; }
.form-ctrl {
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
    background: #fafafa;
}
.form-ctrl:focus { border-color: #c8832a; background: #fff; box-shadow: 0 0 0 3px rgba(200,131,42,.10); }

.address-type-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; font-size: 13px; font-weight: 600; color: #555; }
.addr-type-btn {
    padding: 7px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    color: #555;
}
.addr-type-btn.active { border-color: #c8832a; background: #fff9f0; color: #c8832a; }

.modal-footer-btns { display: flex; gap: 10px; }
.btn-save-addr {
    flex: 2;
    padding: 14px;
    background: #c8832a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s;
}
.btn-save-addr:hover { background: #a96a1c; }
.btn-cancel-addr {
    flex: 1;
    padding: 14px;
    background: #fff;
    color: #888;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s;
}
.btn-cancel-addr:hover { border-color: #c8832a; color: #c8832a; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .cart-wrap { grid-template-columns: 1fr; }
    .cart-right { position: static; }
}
@media (max-width: 600px) {
    .cart-wrap { width: 96%; margin-top: 18px; }
    .cart-item { flex-direction: column; }
    .cart-item-img { width: 100%; aspect-ratio: 16/9; }
    .form-row-2 { grid-template-columns: 1fr; }
    .modal-body-form { padding: 16px; }
}
