/* =================================================================
   Cart Page - Luxury Black & Gold Theme
   ================================================================= */

/* Cart Container */
.cart-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.cart-container h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cart Layout */
.cart-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* Cart Table Container */
.cart-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    overflow: hidden;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table thead th {
    text-align: left;
    padding: 15px 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.cart-table tbody tr:last-child {
    border-bottom: none;
}

.cart-table tbody tr:hover {
    background: rgba(212, 168, 83, 0.03);
}

.cart-table td {
    padding: 25px 10px;
    vertical-align: middle;
    color: var(--text-primary);
}

/* Product Info in Cart */
.product-info {
    display: flex;
    align-items: center;
}

.product-thumbnail {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-thumbnail:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.2);
    transform: scale(1.05);
}

.product-details h5 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-details h5 a {
    transition: all 0.3s ease;
}

.product-details h5 a:hover {
    color: var(--gold-primary) !important;
}

.product-details p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Price Display */
.cart-table td:nth-child(3),
.cart-table td:nth-child(5) {
    color: var(--gold-primary);
    font-weight: 600;
    font-size: 1.05rem;
}

/* Quantity Input */
.quantity-input {
    width: 70px;
    padding: 12px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

/* Hide number input arrows */
.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type="number"] {
    -moz-appearance: textfield;
}

/* Remove Button */
.btn-remove {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.btn-remove:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Cart Actions */
.cart-actions {
    padding-top: 25px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.cart-actions .btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cart-actions .btn-secondary:hover {
    background: rgba(212, 168, 83, 0.1);
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    position: sticky;
    top: 100px;
}

.cart-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 0 0 3px 3px;
}

.cart-summary h3 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.3rem;
    color: var(--text-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.summary-row span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.3rem;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    color: var(--text-primary);
}

.summary-row.total span:last-child {
    color: var(--gold-primary);
}

/* Checkout Button */
.btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 18px;
    margin-top: 25px;
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: var(--bg-primary);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-checkout:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 168, 83, 0.3);
    color: var(--bg-primary);
}

/* Empty Cart Message */
.empty-cart-message {
    text-align: center;
    padding: 100px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.empty-cart-message::before {
    content: '\f07a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: block;
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    opacity: 0.3;
}

.empty-cart-message h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.empty-cart-message p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.empty-cart-message .btn-primary {
    display: inline-block;
    padding: 15px 35px;
}

/* Alerts */
.alert {
    padding: 18px 24px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.4s ease-out;
}

.alert-success {
    background: rgba(40, 167, 69, 0.12);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #4caf50;
}

.alert-success::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.alert-danger,
.alert-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f44336;
}

.alert-danger::before,
.alert-error::before {
    content: '\f057';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Responsive */
@media (max-width: 992px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .cart-container h1 {
        font-size: 1.6rem;
    }

    .cart-table-container {
        padding: 15px;
        overflow-x: auto;
    }

    .cart-table {
        min-width: 500px;
    }

    .product-thumbnail {
        width: 60px;
        height: 60px;
        margin-right: 12px;
    }

    .product-details h5 {
        font-size: 0.95rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}