/* 
   WASSLDESIGN PREMIUM CART PAGE (REFINED V2)
*/

/* 1. HEADER & GLOBAL */
.wd-cart-page-header {
    background: #fff;
    padding: 40px 0 20px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 48px;
    max-width: 1200px;
    margin: 0 auto 48px;
    padding-left: 24px;
}

.wd-cart-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #111827;
    margin: 0;
    font-weight: 700;
}

/* 2. GRID WRAPPER */
.wd-cart-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 64px;
    align-items: start;
    font-family: 'Inter', sans-serif;
}

/* 3. LEFT COLUMN (Items Table) */
.woocommerce-cart-form {
    background: #fff;
}

.shop_table.cart {
    border: none !important;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.shop_table.cart th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #9CA3AF;
    border-bottom: 1px solid #F3F4F6 !important;
    padding: 16px 0;
    letter-spacing: 0.05em;
    text-align: left;
}

.shop_table.cart td {
    border-bottom: 1px solid #F3F4F6 !important;
    padding: 32px 0;
    vertical-align: top;
}

/* Thumbnail */
.product-thumbnail img {
    width: 96px !important;
    height: 96px !important;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #F3F4F6;
    margin-right: 24px;
}

/* Name & Meta */
.product-name a {
    color: #111827;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    line-height: 1.3;
    display: block;
    margin-bottom: 8px;
}

.product-name {
    padding-right: 24px !important;
}

.variation {
    font-size: 0.85rem;
    color: #6B7280;
    display: block;
    margin-top: 4px;
}

.variation dt {
    display: none;
}

.variation dd {
    margin: 0;
    display: inline-block;
    font-weight: 500;
}

/* Price & Subtotal */
.product-price,
.product-subtotal {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #111;
    font-size: 1rem;
    padding-top: 32px;
}

/* QUANTITY PILL (Critical Match) */
.product-quantity .quantity {
    display: inline-flex;
    background: #F3F4F6;
    border-radius: 99px;
    padding: 4px;
    margin-top: 8px;
    border: 1px solid transparent;
}

.product-quantity input {
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    font-weight: 600;
    color: #111;
    font-size: 0.95rem;
    padding: 0;
    height: 32px;
}

/* Hide Spinners */
.product-quantity input[type=number]::-webkit-inner-spin-button,
.product-quantity input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove Button */
.product-remove a.remove {
    color: #9CA3AF !important;
    font-size: 24px;
    font-weight: 400;
    text-decoration: none;
    line-height: 1;
}

.product-remove a.remove:hover {
    color: #EF4444 !important;
}

/* Coupon Row */
td.actions {
    padding: 40px 0 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none !important;
    flex-wrap: wrap;
    gap: 16px;
}

.coupon {
    display: flex;
    gap: 12px;
    flex: 1;
}

.coupon .input-text {
    width: 100%;
    max-width: 240px;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    padding: 0 16px;
    height: 48px;
    font-size: 0.9rem;
    color: #111;
    background: #fff;
}

.coupon .button {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    height: 48px;
    padding: 0 24px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.coupon .button:hover {
    background: #F9FAFB !important;
    border-color: #111 !important;
}

button[name="update_cart"] {
    background: transparent !important;
    color: #6B7280 !important;
    border: none !important;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

button[name="update_cart"]:hover {
    color: #111 !important;
}


/* 4. RIGHT COLUMN (Sidebar Card) */
.wd-cart-totals-column {
    position: sticky;
    top: 40px;
}

.cart-collaterals .cart_totals {
    background: #fff;
    border: 1px solid #F3F4F6;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
    /* Soft premium shadow */
    width: 100% !important;
    float: none !important;
    position: relative;
    overflow: hidden;
}

/* Navy Accent Top */
.cart-collaterals .cart_totals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #111827;
}

/* Totals Title */
.cart_totals h2 {
    margin-top: 0;
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    color: #111;
    margin-bottom: 24px;
    border-bottom: none;
    line-height: 1.2;
    padding-bottom: 0;
    background: transparent;
    text-align: left;
    width: 100%;
}

/* Summary Table */
.shop_table.shop_table_responsive {
    border: none;
    width: 100%;
    margin-bottom: 24px;
}

.shop_table.shop_table_responsive th {
    font-weight: 500;
    text-transform: capitalize;
    font-size: 0.9rem;
    color: #6B7280;
    padding: 12px 0;
    border-top: none;
    text-align: left;
}

.shop_table.shop_table_responsive td {
    text-align: right;
    padding: 12px 0;
    border-top: none;
    font-weight: 600;
    color: #111;
}

/* Order Total */
.order-total {
    border-top: 1px dashed #E5E7EB;
}

.order-total th {
    padding-top: 24px !important;
    font-size: 1rem !important;
    color: #111 !important;
    font-weight: 700 !important;
}

.order-total td {
    padding-top: 24px !important;
    font-size: 1.5rem !important;
    color: #111 !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif;
}

/* 5. CHECKOUT BUTTON (Forced Navy) */
.wc-proceed-to-checkout {
    margin: 0;
    padding: 0;
}

.wc-proceed-to-checkout .checkout-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #111827 !important;
    /* BRAND NAVY */
    color: #fff !important;
    height: 56px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #111827 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Trust Sidebar */
.wd-cart-trust-sidebar {
    text-align: center;
    border-top: 1px solid #F3F4F6;
    padding-top: 20px;
    margin-top: 8px;
}

.wd-trust-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.wd-trust-row span {
    font-size: 0.7rem;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.wd-payment-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0.6;
}

.wd-pay-icon {
    font-size: 0.65rem;
    padding: 3px 8px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    background: #fff;
    color: #9CA3AF;
}

/* MOBILE RESPONSIVE */
@media (max-width: 900px) {
    .wd-cart-page-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .shop_table.cart thead {
        display: none;
    }

    .shop_table.cart tr {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 16px;
        border-bottom: 1px solid #E5E7EB;
        padding-bottom: 24px;
        margin-bottom: 24px;
        position: relative;
    }

    .product-thumbnail {
        grid-row: 1 / 3;
        margin: 0 !important;
        width: 80px !important;
        height: 80px !important;
    }

    .product-thumbnail img {
        width: 100% !important;
        height: 100% !important;
    }

    .product-name {
        grid-column: 2;
        padding: 0 !important;
    }

    .product-price {
        grid-column: 2;
        padding: 0 !important;
        font-size: 0.9rem;
        color: #6B7280;
    }

    .product-quantity {
        grid-column: 2;
        padding: 8px 0 0 !important;
    }

    .product-subtotal {
        display: none;
    }

    .product-remove {
        position: absolute;
        top: 0;
        right: 0;
        padding: 0 !important;
    }

    td.actions {
        flex-direction: column;
    }

    .coupon {
        width: 100%;
    }
}