/* ============================================
   CART PAGE - Modern minimal style
   ============================================ */

.cart-page-section {
    padding: 48px 0 64px;
    background: #f5f5f5;
    min-height: 60vh;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left: Shopping Cart */
.cart-main {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cart-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.cart-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cart-items-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.cart-table-wrap {
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table thead th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #888;
    text-transform: uppercase;
    text-align: left;
    padding: 12px 0 16px;
    border-bottom: 1px solid #eee;
}

.cart-table thead th.col-product { width: 45%; }
.cart-table thead th.col-qty { width: 20%; }
.cart-table thead th.col-price { width: 15%; }
.cart-table thead th.col-total { width: 20%; text-align: right; }

.cart-table tbody tr {
    border-bottom: 1px solid #eee;
}

.cart-table tbody tr:last-child {
    border-bottom: none;
}

.cart-table tbody td {
    padding: 20px 0;
    vertical-align: middle;
    font-size: 15px;
    color: #1a1a1a;
}

.cart-table tbody td.col-total {
    text-align: right;
    font-weight: 600;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-product-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}

.cart-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-product-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-product-name {
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 15px;
}

.cart-product-name:hover {
    color: #6B4EAA;
}

.cart-product-variant {
    font-size: 13px;
    color: #888;
}

.cart-remove-link {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin-top: 4px;
}

.cart-remove-link:hover {
    color: #c0392b;
}

/* Quantity */
.quantity-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-input .qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f9f9f9;
    color: #333;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.quantity-input .qty-btn:hover {
    background: #eee;
}

.quantity-input input {
    width: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: 500;
    font-size: 14px;
    background: #fff;
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 15px;
    font-weight: 500;
    color: #6B4EAA;
    text-decoration: none;
}

.cart-continue-link:hover {
    color: #5a3d96;
}

.cart-continue-link i {
    font-size: 14px;
}

/* Right: Order Summary */
.cart-sidebar {
    position: sticky;
    top: 100px;
}

.order-summary-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.order-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
}

.order-summary-row .label {
    color: #666;
}

.order-summary-row .value {
    font-weight: 600;
    color: #1a1a1a;
}

.order-summary-shipping {
    margin-bottom: 18px;
}

.order-summary-shipping .label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.shipping-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #1a1a1a;
}

.order-summary-promo {
    margin-bottom: 20px;
}

.order-summary-promo .label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.promo-input-group {
    display: flex;
    gap: 8px;
}

.promo-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.promo-input:focus {
    border-color: #6B4EAA;
    outline: none;
}

.btn-promo-apply {
    padding: 10px 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-promo-apply:hover {
    background: #c0392b;
}

.order-summary-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 16px;
}

.order-summary-total .label {
    font-weight: 600;
    color: #1a1a1a;
}

.order-summary-total .value {
    font-size: 18px;
    font-weight: 700;
}

.btn-checkout {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 16px 24px;
    background: #6B4EAA;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: #5a3d96;
    color: #fff;
}

/* Responsive */
@media (max-width: 991px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: static;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        gap: 12px;
        padding: 20px 0;
        border-bottom: 1px solid #eee;
    }

    .cart-table tbody td {
        padding: 0;
    }

    .cart-table tbody td.col-product {
        grid-column: 1 / -1;
    }

    .cart-table tbody td.col-qty::before {
        content: "Quantity";
        font-size: 11px;
        text-transform: uppercase;
        color: #888;
        margin-right: 8px;
    }

    .cart-table tbody td.col-price::before {
        content: "Price";
        font-size: 11px;
        text-transform: uppercase;
        color: #888;
        margin-right: 8px;
    }

    .cart-table tbody td.col-total {
        text-align: left;
    }

    .cart-table tbody td.col-total::before {
        content: "Total";
        font-size: 11px;
        text-transform: uppercase;
        color: #888;
        margin-right: 8px;
    }
}

@media (max-width: 576px) {
    .cart-main,
    .order-summary-card {
        padding: 20px;
    }

    .cart-main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .promo-input-group {
        flex-direction: column;
    }

    .btn-promo-apply {
        width: 100%;
    }
}
