/* Cart Container */
.cart-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dc3545;
}

.cart-header h1 {
    font-size: 2rem;
    color: #333;
    margin: 0;
}

.cart-item-count {
    font-size: 1rem;
    color: #666;
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Cart Content */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 1.5rem;
    align-items: start;
    transition: box-shadow 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-image {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.item-size {
    color: #666;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.item-price-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit-price {
    color: #333;
    font-weight: 500;
}

.sale-badge {
    background-color: #dc3545;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-quantity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
}

.item-quantity label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: background-color 0.2s ease;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-btn:active {
    background: #dee2e6;
}

.qty-input {
    width: 60px;
    border: none;
    text-align: center;
    padding: 0.5rem;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-fitting {
    display: flex;
    align-items: center;
    min-width: 200px;
}

.fitting-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.fitting-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 150px;
}

.total-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-label {
    font-size: 0.85rem;
    color: #666;
}

.price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc3545;
}

.remove-item {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.remove-item:hover {
    background: #f8f9fa;
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
}

.summary-card h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc3545;
    margin-top: 1rem;
}

.summary-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 1rem 0;
}

.checkout-btn {
    width: 100%;
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background: #c82333;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.continue-shopping:hover {
    color: #c82333;
    text-decoration: underline;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.empty-cart h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: #666;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 968px) {
    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .item-quantity,
    .item-fitting,
    .item-total {
        grid-column: 1 / -1;
    }

    .item-quantity {
        margin-top: 1rem;
    }

    .item-fitting {
        margin-top: 0.5rem;
    }

    .item-total {
        margin-top: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .cart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        padding: 1rem;
    }

    .item-image {
        width: 80px;
        height: 80px;
    }

    .item-name {
        font-size: 1rem;
    }
}

