/* ==========================================================================
   TBH INDIA — CART THEME
   Premium visual layer for cart.php
   Keeps existing cart functionality and classes intact.
   ========================================================================== */

.cart-page {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 86px;
}

.cart-page::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 360px;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 5%, rgba(212,175,55,.13), transparent 34%),
        radial-gradient(circle at 90% 0%, rgba(44,62,80,.09), transparent 30%);
    z-index: -1;
}

.cart-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding: 26px 30px;
    border: 1px solid #e9e0ce;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff 0%, #fffdf7 100%);
    box-shadow: 0 18px 55px rgba(17,17,17,.06);
}

.cart-title-main {
    min-width: 0;
}

.cart-title small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #9a7412;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .18em;
}

.cart-title small::before {
    content: "";
    width: 24px;
    height: 1px;
    background: #caa52e;
}

.cart-title h1 {
    margin: 0;
    color: #111;
    font-size: clamp(30px, 4vw, 45px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.cart-title-copy {
    max-width: 690px;
    margin: 11px 0 0;
    color: #6e6a61;
    font-size: 15px;
    line-height: 1.65;
}

.cart-title-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #eadfbf;
    border-radius: 999px;
    background: #fbf7e9;
    color: #6f5a1d;
    white-space: nowrap;
}

.cart-title-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b28a13;
    box-shadow: 0 0 0 4px rgba(178,138,19,.10);
}

.cart-title-status strong {
    color: #111;
}

.cart-error {
    border-radius: 14px;
    border-color: #f1c7c7;
    box-shadow: 0 10px 24px rgba(169,30,30,.05);
}

.cart-layout {
    grid-template-columns: minmax(0,1fr) minmax(300px, 360px);
    gap: 24px;
}

.cart-items {
    gap: 14px;
}

.cart-item {
    position: relative;
    grid-template-columns: 132px minmax(0,1fr) auto;
    gap: 20px;
    padding: 18px;
    border: 1px solid #ece4d6;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff 0%, #fffefa 100%);
    box-shadow: 0 12px 32px rgba(17,17,17,.055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cart-item:hover {
    transform: translateY(-2px);
    border-color: #e2d2a8;
    box-shadow: 0 18px 40px rgba(17,17,17,.08);
}

.cart-image {
    width: 132px;
    height: 132px;
    border: 1px solid #eee8dc;
    border-radius: 16px;
    background: #faf8f2;
    transition: transform .2s ease, border-color .2s ease;
}

.cart-item:hover .cart-image {
    border-color: #e0c77c;
}

.cart-image img {
    padding: 7px;
    transition: transform .25s ease;
}

.cart-item:hover .cart-image img {
    transform: scale(1.035);
}

.cart-product-name {
    margin: 0 0 7px;
    color: #171717;
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -.015em;
}

.cart-product-name a:hover {
    color: #9b7515;
}

.cart-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.cart-stock.available {
    background: #eff8f2;
    color: #17683a;
}

.cart-stock.unavailable {
    background: #fff0f0;
    color: #a62828;
}

.cart-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #111;
    font-size: 18px;
}

.cart-mrp {
    margin-left: 0;
    color: #999;
    font-size: 13px;
}

.cart-discount-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 6px;
    background: #f5e8b5;
    color: #7d5d00;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}

.cart-actions {
    align-items: flex-end;
    min-width: 145px;
}

.quantity-form {
    gap: 0;
    overflow: hidden;
    border: 1px solid #dcd2c1;
    border-radius: 12px;
    background: #fff;
}

.quantity-form input {
    width: 58px;
    height: 42px;
    border: 0;
    border-left: 1px solid #eee7dc;
    border-right: 1px solid #eee7dc;
    border-radius: 0;
    outline: 0;
    font-weight: 800;
}

.quantity-step {
    width: 38px;
    height: 42px;
    border: 0;
    background: #fbfaf6;
    color: #302b20;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
}

.quantity-step:hover {
    background: #f1eadb;
}

.quantity-step:focus-visible,
.quantity-form input:focus-visible {
    outline: 2px solid rgba(197,159,32,.45);
    outline-offset: -2px;
}

.update-btn {
    height: 38px;
    border-radius: 10px;
    padding: 0 13px;
    background: #181818;
    box-shadow: 0 7px 18px rgba(0,0,0,.10);
}

.update-btn:hover {
    background: #2d2d2d;
}

.item-subtotal {
    color: #161616;
    font-size: 18px;
}

.remove-form button {
    color: #a72828;
    padding: 5px 0;
}

.cart-summary {
    top: 92px;
    border: 1px solid rgba(224,193,93,.28);
    border-radius: 22px;
    padding: 26px;
    background:
        radial-gradient(circle at 80% 0%, rgba(214,178,94,.14), transparent 34%),
        linear-gradient(160deg, #151515 0%, #0c0c0c 100%);
    box-shadow: 0 24px 56px rgba(0,0,0,.18);
}

.cart-summary h2 {
    margin-bottom: 20px;
    font-size: 25px;
    letter-spacing: -.02em;
}

.summary-row {
    color: #d9d4cc;
}

.summary-row strong {
    color: #fff;
}

.summary-total {
    padding-top: 18px;
    font-size: 23px;
}

.summary-total strong {
    color: #f1d98b;
}

.cart-summary-trust {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.10);
    color: #bab5ad;
    font-size: 12px;
    line-height: 1.5;
}

.checkout-btn {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    box-shadow: 0 14px 30px rgba(166,124,0,.18);
}

.checkout-btn:hover {
    box-shadow: 0 18px 36px rgba(166,124,0,.22);
}

.guest-checkout-note {
    border: 1px solid rgba(255,255,255,.09);
    color: #c9c3b9;
}

.continue-shopping {
    color: #cbc3b4;
    font-weight: 700;
}

.continue-shopping:hover {
    color: #f1d98b;
}

.empty-cart {
    max-width: 760px;
    margin: 55px auto 95px;
    padding: 70px 32px;
    border: 1px solid #e8e0cf;
    border-radius: 26px;
    background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
    box-shadow: 0 18px 55px rgba(17,17,17,.07);
}

.empty-cart-icon {
    width: 92px;
    height: 92px;
    margin-bottom: 22px;
    border: 1px solid #e1ce8f;
    background: #fbf6e6;
    color: #99730e;
    box-shadow: 0 12px 26px rgba(166,124,0,.10);
}

.empty-cart h2 {
    font-size: 29px;
    letter-spacing: -.025em;
}

.empty-cart p {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    color: #716d65;
    line-height: 1.7;
}

.shop-btn {
    min-height: 48px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #141414;
    box-shadow: 0 12px 26px rgba(0,0,0,.12);
}

.shop-btn:hover {
    background: #292929;
}

.empty-cart-trust {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    color: #777066;
    font-size: 12px;
}

.empty-cart-trust span {
    padding: 7px 10px;
    border: 1px solid #ece4d5;
    border-radius: 999px;
    background: #fff;
}

.cart-warning {
    border: 1px solid #f0cbcb;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(169,30,30,.04);
}

.cart-discovery {
    margin-top: 58px;
}

.cart-discovery-header {
    margin-bottom: 20px;
}

.cart-discovery-eyebrow {
    color: #98730e;
    letter-spacing: .18em;
}

.cart-discovery h2 {
    font-size: clamp(25px, 3vw, 31px);
    letter-spacing: -.025em;
}

.cart-discovery-copy {
    color: #716d65;
}

.cart-product-grid {
    gap: 16px;
}

.cart-product-card {
    border: 1px solid #e9e1d2;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(17,17,17,.045);
}

.cart-product-card:hover {
    transform: translateY(-4px);
    border-color: #e0cf9e;
    box-shadow: 0 18px 36px rgba(17,17,17,.08);
}

.cart-product-card-image {
    background: linear-gradient(180deg, #fbfaf6 0%, #f6f2e8 100%);
}

.cart-product-card-body {
    padding: 17px;
}

.cart-product-card-name {
    color: #1a1a1a;
}

.cart-product-card-price {
    color: #111;
}

.cart-product-card-link {
    min-height: 42px;
    border-radius: 10px;
    background: #151515;
}

.cart-product-card-link:hover {
    background: #292929;
}

@media (max-width: 900px) {
    .cart-page {
        width: min(100% - 24px, 1220px);
        padding-top: 28px;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 680px) {
    .cart-title {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px 20px;
        margin-bottom: 20px;
    }

    .cart-title-copy {
        font-size: 14px;
    }

    .cart-title-status {
        min-height: 38px;
    }

    .cart-item {
        grid-template-columns: 88px minmax(0,1fr);
        gap: 14px;
        padding: 14px;
        border-radius: 18px;
    }

    .cart-image {
        width: 88px;
        height: 88px;
        border-radius: 13px;
    }

    .cart-product-name {
        font-size: 16px;
    }

    .cart-price {
        font-size: 16px;
    }

    .cart-actions {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid #eee7da;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .quantity-form {
        order: 1;
    }

    .item-subtotal {
        order: 2;
        margin-left: auto;
    }

    .remove-form {
        order: 3;
        width: 100%;
        text-align: right;
    }

    .cart-summary {
        padding: 21px;
        border-radius: 20px;
    }

    .empty-cart {
        padding: 52px 20px;
        margin-top: 28px;
        border-radius: 20px;
    }
}

@media (max-width: 420px) {
    .cart-page {
        width: min(100% - 16px, 1220px);
        padding-top: 18px;
        padding-bottom: 55px;
    }

    .cart-title h1 {
        font-size: 29px;
    }

    .cart-title-copy {
        font-size: 13px;
    }

    .cart-item {
        grid-template-columns: 76px minmax(0,1fr);
        padding: 12px;
    }

    .cart-image {
        width: 76px;
        height: 76px;
    }

    .quantity-step {
        width: 34px;
    }

    .quantity-form input {
        width: 46px;
    }

    .update-btn {
        padding: 0 10px;
    }

    .cart-product-grid {
        gap: 10px;
    }

    .cart-product-card-image {
        height: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cart-item,
    .cart-image img,
    .cart-product-card,
    .checkout-btn {
        transition: none !important;
    }
}
