﻿/**
 * Cart / Checkout Page
 */

.dw-cart-page {
    background: var(--dw-bg-primary);
    padding: var(--dw-space-2xl) 0 var(--dw-space-3xl);
}

.dw-cart-page .dw-container-wide {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--dw-space-lg);
}

/* Alert / message */
.dw-cart-page #lblmsg {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ff8a8a !important;
    padding: 12px 16px;
    border-radius: var(--dw-radius-sm);
    margin-bottom: var(--dw-space-md);
    font-size: 14px;
}

.dw-cart-page #lblmsg:empty {
    display: none;
    padding: 0;
    border: none;
    margin: 0;
}

/* Cart items table */
.dw-cart-table-wrap {
    background: var(--dw-bg-card);
    border: 1px solid var(--dw-border-gold);
    border-radius: var(--dw-radius-lg);
    padding: var(--dw-space-md);
    margin-bottom: var(--dw-space-lg);
    overflow: hidden;
}

.dw-cart-page #tblList {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--dw-text-muted);
    font-size: 13px;
    border: none !important;
}

.dw-cart-page #tblList thead th {
    background: var(--dw-bg-section) !important;
    color: var(--dw-gold-premium) !important;
    font-family: var(--dw-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 12px 10px !important;
    border: none !important;
    border-bottom: 1px solid var(--dw-border-gold) !important;
    white-space: nowrap;
    vertical-align: middle;
}

.dw-cart-page #tblList tbody td {
    padding: 12px 10px !important;
    border: none !important;
    border-bottom: 1px solid var(--dw-border-gold) !important;
    color: var(--dw-text-muted);
    vertical-align: middle;
}

.dw-cart-page #tblList tbody tr:hover td {
    background: rgba(212, 175, 55, 0.04);
}

.dw-cart-page #tblList tbody td[data-title="product"] {
    color: var(--dw-text-primary);
    font-weight: 500;
    min-width: 160px;
}

.dw-cart-page #tblList tbody tr:last-child td {
    border-bottom: none !important;
}

/* Totals row (second thead in JS) */
.dw-cart-page #tblList thead + tbody + thead th,
.dw-cart-page #tblList tbody + thead th {
    background: rgba(212, 175, 55, 0.1) !important;
    color: var(--dw-text-primary) !important;
    font-weight: 700;
    border-top: 1px solid var(--dw-border-gold) !important;
}

/* Empty cart text */
.dw-cart-page #tblList.dw-cart-empty,
.dw-cart-page #tblList:not(:has(tbody)) {
    display: block;
    text-align: center;
    padding: 48px 24px;
    color: var(--dw-text-muted) !important;
    font-size: 1rem;
    background: var(--dw-bg-card);
    border: 1px dashed var(--dw-border-gold);
    border-radius: var(--dw-radius-lg);
    min-width: 0;
}

/* Qty controls in table */
.dw-cart-page #tblList .quant {
    background: rgba(212, 175, 55, 0.12) !important;
    border: 1px solid var(--dw-border-gold) !important;
    color: var(--dw-gold-premium) !important;
    width: 28px;
    height: 28px;
    line-height: 28px !important;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    float: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dw-cart-page #tblList .form-control.input-number {
    background: var(--dw-bg-section) !important;
    border: 1px solid var(--dw-border-gold) !important;
    color: var(--dw-text-primary) !important;
    border-radius: 4px !important;
    margin: 0 6px;
}

.dw-cart-page #tblList .remove span {
    color: #e57373 !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.dw-cart-page #tblList .remove span:hover {
    color: #ff5252 !important;
}

/* Scheme / offer table */
.dw-cart-page #FreeList {
    margin-bottom: var(--dw-space-lg);
}

.dw-cart-page #FreeList .table,
.dw-cart-page #FreeList table {
    width: 100%;
    background: var(--dw-bg-card);
    border: 1px solid var(--dw-border-gold);
    border-radius: var(--dw-radius-lg);
    overflow: hidden;
    color: var(--dw-text-muted);
    font-size: 13px;
}

.dw-cart-page #FreeList table thead tr,
.dw-cart-page #FreeList .table thead tr {
    background: var(--dw-bg-section) !important;
    color: var(--dw-gold-premium) !important;
}

.dw-cart-page #FreeList table th,
.dw-cart-page #FreeList table td {
    padding: 10px 12px;
    border-color: var(--dw-border-gold) !important;
    color: var(--dw-text-muted);
    vertical-align: middle;
}

.dw-cart-page #FreeList h5 {
    color: var(--dw-gold-premium) !important;
    font-family: var(--dw-font-body);
    font-size: 14px;
    margin-top: var(--dw-space-md);
}

.dw-cart-page #FreeList h5 label {
    color: var(--dw-text-muted) !important;
    font-weight: 500;
    cursor: pointer;
}

/* Checkout form cards */
.dw-cart-page .checkout-form {
    background: var(--dw-bg-card);
    border: 1px solid var(--dw-border-gold);
    border-radius: var(--dw-radius-lg);
    padding: var(--dw-space-lg);
    margin-bottom: var(--dw-space-lg);
    height: 100%;
}

.dw-cart-page .billing-cart {
    font-family: var(--dw-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dw-gold-premium) !important;
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid var(--dw-gold-premium);
    padding: 10px 14px;
    margin: 0 0 var(--dw-space-md) 0;
    border-radius: 0 var(--dw-radius-sm) var(--dw-radius-sm) 0;
}

.dw-cart-page .form-group {
    margin-bottom: var(--dw-space-md);
}

.dw-cart-page .form-group label,
.dw-cart-page .checkout-form > .row > .form-group {
    font-family: var(--dw-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--dw-text-muted);
    display: block;
    margin-bottom: 6px;
}

.dw-cart-page .form-control {
    background: var(--dw-bg-section) !important;
    border: 1px solid var(--dw-border-gold) !important;
    color: var(--dw-text-primary) !important;
    border-radius: var(--dw-radius-sm) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    height: auto !important;
    min-height: 42px;
}

.dw-cart-page .form-control:focus {
    border-color: var(--dw-gold-premium) !important;
    box-shadow: 0 0 0 3px var(--dw-glow-gold) !important;
    outline: none;
}

.dw-cart-page .form-control::placeholder {
    color: var(--dw-text-subtle) !important;
}

.dw-cart-page select.form-control option {
    background: var(--dw-bg-card);
    color: var(--dw-text-primary);
}

.dw-cart-page #lbl_UserDetails,
.dw-cart-page #lblRefName {
    color: var(--dw-gold-premium) !important;
    font-size: 13px !important;
}

/* Billing summary rows */
.dw-cart-page .checkout-form .col-8 .form-control,
.dw-cart-page .checkout-form .col-8 span.form-control {
    background: transparent !important;
    border: none !important;
    color: var(--dw-text-muted) !important;
    padding-left: 0 !important;
    font-weight: 500;
    box-shadow: none !important;
}

.dw-cart-page .checkout-form .col-4 .form-control,
.dw-cart-page .checkout-form .col-4 label.form-control {
    background: var(--dw-bg-section) !important;
    border: 1px solid var(--dw-border-gold) !important;
    color: var(--dw-gold-premium) !important;
    font-weight: 700;
    text-align: right;
}

.dw-cart-page .checkout-form hr {
    border-color: var(--dw-border-gold);
    margin: var(--dw-space-md) 0;
}

/* Invoice total highlight */
.dw-cart-page label[id*="lbl_Net_Amt"] {
    color: var(--dw-gold-royal) !important;
    font-size: 1.05rem !important;
}

/* Action buttons */
.dw-cart-page .btn-secondary1,
.dw-cart-page input.btn-secondary1,
.dw-cart-page a.btn-secondary1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px !important;
    font-family: var(--dw-font-body);
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--dw-radius-sm) !important;
    border: none !important;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dw-cart-page a.btn-secondary1 {
    background: transparent !important;
    color: var(--dw-gold-premium) !important;
    border: 1px solid var(--dw-border-gold-strong) !important;
}

.dw-cart-page a.btn-secondary1:hover {
    background: rgba(212, 175, 55, 0.08) !important;
    color: var(--dw-gold-royal) !important;
}

.dw-cart-page input#btn_submit.btn-secondary1 {
    background: var(--dw-gradient-cta) !important;
    color: var(--dw-bg-primary) !important;
    cursor: pointer;
}

.dw-cart-page input#btn_submit.btn-secondary1:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--dw-glow-gold);
}

.dw-cart-page input#btn_submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Bank details GridView */
.dw-cart-page .mygrd,
.dw-cart-page table.mygrd {
    background: var(--dw-bg-card);
    border: 1px solid var(--dw-border-gold);
    border-radius: var(--dw-radius-md);
    color: var(--dw-text-muted);
    overflow: hidden;
}

.dw-cart-page .mygrd th {
    background: var(--dw-bg-section) !important;
    color: var(--dw-gold-premium) !important;
    border-color: var(--dw-border-gold) !important;
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dw-cart-page .mygrd td {
    border-color: var(--dw-border-gold) !important;
    padding: 10px 12px;
    color: var(--dw-text-muted);
}

/* File upload */
.dw-cart-page #div_Slip input[type="file"] {
    color: var(--dw-text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.dw-cart-page #div_Slip img {
    border-radius: var(--dw-radius-sm);
    border: 1px solid var(--dw-border-gold);
}

/* Payment image */
.dw-cart-page #div_payment img {
    border-radius: var(--dw-radius-sm);
    border: 1px solid var(--dw-border-gold);
    max-width: 100%;
}

/* Layout grid */
.dw-cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--dw-space-lg);
}

@media (min-width: 1200px) {
    .dw-cart-layout-bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--dw-space-lg);
        align-items: start;
    }
}

/* Mobile table scroll */
@media (max-width: 991px) {
    .dw-cart-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dw-cart-page #tblList {
        min-width: 900px;
    }

    .dw-cart-page .checkout-form {
        padding: var(--dw-space-md);
    }
}

@media (max-width: 575px) {
    .dw-cart-page .checkout-form .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
