/* ============================================
   CART PAGE
   ============================================ */

.cart-page {
    padding: 40px 0 80px;
    background: #f9f7f4;
    min-height: calc(100vh - 200px);
}

.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    color: #2C1810;
    margin-bottom: 30px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 25px;
}

.empty-cart h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #888;
    margin-bottom: 30px;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Cart Items */
.cart-items {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 1fr 50px;
    gap: 20px;
    padding: 15px 25px;
    background: #f9f7f4;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 1fr 50px;
    gap: 20px;
    padding: 25px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.col-product {
    display: flex;
    gap: 20px;
    align-items: center;
}

.item-image {
    flex-shrink: 0;
}

.item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.item-details h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    margin-bottom: 5px;
}

.item-details h3 a {
    color: #2C1810;
}

.item-details h3 a:hover {
    color: #B8860B;
}

.item-variant {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
}

.stock-warning {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #e53935;
    background: #ffebee;
    padding: 4px 10px;
    border-radius: 4px;
}

.item-price {
    font-size: 16px;
    font-weight: 600;
    color: #2C1810;
}

.item-original-price {
    display: block;
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #B8860B;
    color: #fff;
}

.qty-input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-total {
    font-size: 18px;
    font-weight: 600;
    color: #B8860B;
}

.remove-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #ffebee;
    color: #e53935;
}

/* Cart Summary */
.cart-summary {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    color: #2C1810;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.coupon-section form {
    display: flex;
    gap: 10px;
}

.coupon-section input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.coupon-section input:focus {
    outline: none;
    border-color: #B8860B;
}

#couponMessage {
    margin-top: 10px;
    font-size: 13px;
}

#couponMessage .success {
    color: #28a745;
}

#couponMessage .error {
    color: #dc3545;
}

/* Summary Rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
}

.summary-row.discount-row {
    color: #28a745;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 600;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #2C1810;
    color: #2C1810;
}

.free-shipping {
    color: #28a745;
    font-weight: 600;
}

.free-shipping-notice {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin: 15px 0;
    text-align: center;
}

.free-shipping-notice i {
    margin-right: 8px;
}

.tax-note {
    font-size: 12px;
    color: #888;
    margin: 15px 0;
}

.btn-large {
    padding: 16px 24px;
    font-size: 16px;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #888;
    font-size: 14px;
}

.continue-shopping:hover {
    color: #B8860B;
}

.secure-checkout {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.secure-checkout i {
    color: #28a745;
    margin-right: 5px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 24px;
    color: #666;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.cart-sidebar-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: #2C1810;
}

.cart-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-sidebar-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-sidebar-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-sidebar-item .item-details {
    flex: 1;
}

.cart-sidebar-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.cart-sidebar-item .item-price {
    font-size: 13px;
    color: #B8860B;
}

.cart-sidebar-item .remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
}

.empty-cart-sidebar {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-cart-sidebar i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #ddd;
}

.cart-sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f9f7f4;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .col-product {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}
