/* Cart Page Styles */

.cart-section {
    padding: 12rem 0 6rem;
    min-height: 100vh;
}

.page-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 1.5rem;
    background: var(--bg-dark-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--primary-gold);
}

.item-image {
    width: 120px;
    height: 120px;
    background: var(--bg-dark-3);
    border-radius: 4px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.item-meta {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.item-price {
    color: var(--primary-gold);
    font-size: 1.2rem;
    font-weight: 600;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-dark-3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
}

.qty-btn:hover {
    color: var(--primary-gold);
}

.qty-display {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.item-total {
    text-align: right;
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.remove-btn {
    background: none;
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0;
    transition: opacity 0.3s ease;
}

.remove-btn:hover {
    opacity: 0.7;
}

/* Empty Cart */
.empty-cart {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 2rem;
}

.empty-cart svg {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.empty-cart h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-dark-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 2rem;
    position: sticky;
    top: 120px;
}

.cart-summary h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-gray);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.checkout-btn {
    width: 100%;
    margin: 1.5rem 0 1rem;
}

.continue-shopping {
    display: block;
    text-align: center;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.continue-shopping:hover {
    color: var(--primary-gold);
}

/* Checkout Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-dark-2);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-light);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark-3);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.order-total-display {
    background: var(--bg-dark-3);
    padding: 1.5rem;
    border-radius: 4px;
    margin: 2rem 0;
    text-align: center;
}

.order-total-display h3 {
    font-size: 1.5rem;
    color: var(--primary-gold);
}

.order-total-display span {
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .cart-section {
        padding: 10rem 0 4rem;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .item-image {
        width: 100%;
        height: 200px;
    }

    .item-total {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem;
    }
}
