/* =========================================
   CART PAGE STYLES
   ========================================= */

.cart-page-section { margin-bottom: 80px; }

/* Layout Grid */
.cart-layout {
    display: flex;
    gap: 40px;
}

/* --- Left: Product Table --- */
.cart-items-area { flex: 1; }

.table-responsive { overflow-x: auto; margin-bottom: 30px; }

.main-cart-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensures table doesn't squash on mobile */
}

.main-cart-table th {
    background: #f9f9f9;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid #eee;
}

.main-cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Columns */
.col-product { width: 40%; }
.col-price, .col-qty, .col-total { width: 15%; }
.col-remove { width: 5%; text-align: center; }

/* Product Cell */
.c-item { display: flex; align-items: center; gap: 15px; }
.c-item img {
    width: 80px; height: 80px; object-fit: cover; border-radius: 5px;
    border: 1px solid #eee;
}
.c-info h4 { font-size: 1rem; margin-bottom: 5px; }
.c-info h4 a { color: var(--dark); }
.c-info h4 a:hover { color: var(--primary); }
.c-info span { color: #888; font-size: 0.85rem; }

/* Small Quantity Box (Override) */
.sm-qty { height: 40px; width: 100px; margin: 0; }
.sm-qty .qty-btn { width: 30px; font-size: 1rem; }
.sm-qty input { width: 40px; font-size: 0.9rem; }

.col-total { font-weight: 700; color: var(--dark); }

.remove-btn {
    background: none; border: none; color: #ccc; font-size: 1.2rem; cursor: pointer; transition: 0.3s;
}
.remove-btn:hover { color: #e74c3c; transform: scale(1.1); }


/* Actions Row (Coupon & Update) */
.cart-actions {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.coupon-box { display: flex; gap: 10px; }
.coupon-box input {
    padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; outline: none; width: 200px;
}
.btn-dark {
    background: var(--dark); color: #fff; padding: 10px 25px; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; transition: 0.3s;
}
.btn-dark:hover { background: var(--primary); color: var(--dark); }

.btn-outline {
    background: transparent; border: 1px solid var(--dark); color: var(--dark);
    padding: 10px 25px; border-radius: 4px; cursor: pointer; font-weight: 600; transition: 0.3s;
}
.btn-outline:hover { background: var(--dark); color: #fff; }


/* --- Right: Cart Totals --- */
.cart-totals-area {
    width: 350px; flex-shrink: 0;
}
.totals-box {
    background: #f9f9f9; padding: 30px; border-radius: 8px; border: 1px solid #eee;
}
.totals-box h3 {
    font-size: 1.2rem; margin-bottom: 20px; border-bottom: 2px solid var(--primary); padding-bottom: 10px; display: inline-block;
}

.t-row {
    display: flex; justify-content: space-between; margin-bottom: 15px; color: #555;
}
.t-row span:last-child { font-weight: 600; color: var(--dark); }

.shipping-row { flex-direction: column; gap: 10px; border-bottom: 1px solid #ddd; padding-bottom: 15px; }
.ship-opts label { display: block; margin-bottom: 5px; font-size: 0.9rem; cursor: pointer; }
.ship-opts input { accent-color: var(--primary); margin-right: 8px; }

.t-row.total {
    font-size: 1.2rem; font-weight: 700; color: var(--dark);
    margin-top: 20px; margin-bottom: 25px;
}
.t-row.total span:last-child { color: var(--primary); font-size: 1.5rem; }

.checkout-btn-full {
    display: block; width: 100%; text-align: center;
    background: var(--dark); color: #fff; padding: 15px;
    border-radius: 5px; font-weight: 700; text-transform: uppercase;
    transition: 0.3s;
}
.checkout-btn-full:hover { background: var(--primary); color: var(--dark); }

.continue-link {
    display: block; text-align: center; margin-top: 15px;
    color: #666; font-size: 0.9rem; text-decoration: underline;
}
.continue-link:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 991px) {
    .cart-layout { flex-direction: column; }
    .cart-totals-area { width: 100%; }
}
@media (max-width: 600px) {
    .cart-actions { flex-direction: column; align-items: stretch; }
    .coupon-box { flex-direction: column; }
    .coupon-box input { width: 100%; }
}