/* Cart & Checkout Styling */

/* Cart Page */
.cart-page {
    min-height: 70vh;
}

.page-banner {
    background: linear-gradient(135deg, #8B7355 0%, #D4AF37 100%);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 0;
}

.page-banner h1 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.cart-table thead {
    background: #f8f8f8;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
}

.product-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.product-info p {
    font-size: 13px;
    color: #999;
}

.price,
.total {
    font-size: 18px;
    font-weight: 600;
    color: #8B4513;
}

.quantity-form input {
    width: 70px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: #c0392b;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.btn-continue-shopping,
.btn-clear-cart {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-continue-shopping {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.btn-continue-shopping:hover {
    background: #f0f0f0;
}

.btn-clear-cart {
    background: #e74c3c;
    color: white;
}

.btn-clear-cart:hover {
    background: #c0392b;
}

.cart-summary {
    background: white;
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-summary h2 {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #8B4513;
    border-top: 2px solid #333;
    margin-top: 15px;
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 18px;
    background: #8B4513;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    margin-top: 25px;
    transition: all 0.3s;
}

.btn-checkout:hover {
    background: #704010;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin-bottom: 10px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 30px;
}

.btn-shop-now {
    display: inline-block;
    padding: 15px 40px;
    background: #8B4513;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

/* Checkout Page */
.checkout-page {
    min-height: 70vh;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 40px;
}

.checkout-details {}

.checkout-details h2,
.order-summary h2 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.order-summary {
    background: white;
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.summary-items {
    margin-bottom: 25px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.item-info {
    flex: 1;
}

.summary-totals {}

.payment-method {
    margin: 25px 0;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.payment-method h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.payment-info p {
    margin: 5px 0;
    font-weight: 600;
}

.payment-info small {
    color: #666;
}

.btn-place-order {
    width: 100%;
    padding: 18px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-place-order:hover {
    background: #229954;
}

.checkout-note {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #999;
}

@media (max-width: 768px) {
    .page-banner {
        padding: 40px 20px;
    }

    .page-banner h1 {
        font-size: 28px;
    }

    .cart-content,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        order: 2;
    }

    .cart-items {
        order: 1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Mobile Cart Table - Card Layout */
    .cart-table {
        font-size: 14px;
        display: block;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody {
        display: block;
    }

    .cart-table tr {
        display: block;
        background: white;
        margin-bottom: 20px;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #eee;
    }

    .cart-table td {
        display: block;
        padding: 10px 0;
        border: none;
        text-align: left;
    }

    .cart-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        margin-right: 10px;
        color: #8B4513;
    }

    .product-info {
        flex-direction: row;
        text-align: left;
        padding: 0 !important;
    }

    .product-info:before {
        display: none;
    }

    .product-info img {
        width: 60px;
        height: 60px;
    }

    .quantity-form input {
        width: 80px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-continue-shopping,
    .btn-clear-cart {
        width: 100%;
        text-align: center;
    }
}

/* Icon size fixes for cart */
.cart-page i,
.btn-remove i,
.alert i {
    max-width: 18px;
    max-height: 18px;
    font-size: 14px;
}

.checkout-form i {
    max-width: 16px;
    max-height: 16px;
}