/* cart.css - Only styling changes to match main page */

/* Main container styling to match main page */
.cart-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Header styling */
.cart-wrapper h1 {
    font-size: 2.5rem;
    color: var(--tech-blue);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Back button styling to match main page buttons */
.back-to-home button {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-home button:hover {
    background-color: var(--primary-dark);
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    gap: 15px;
    flex-wrap: wrap;
}

.cart-details {
    flex: 1;
    min-width: 150px;
}

.cart-price {
    margin-top: 5px;
    font-size: 14px;
    color: #333;
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    font-size: 18px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

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

.qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    padding: 6px 12px;
    font-size: 14px;
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

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

.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #f5f5f5;
    margin-right: 1.5rem;
}

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--gray);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quantity-value {
    min-width: 30px;
    text-align: center;
}

.remove-item {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}

.remove-item:hover {
    text-decoration: underline;
}

/* Cart summary styling */
.cart-summary {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.cart-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--tech-blue);
    border-bottom: 1px solid var(--gray);
    padding-bottom: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-row.total {
    font-weight: 700;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray);
}

#checkout-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1.5rem;
}

#checkout-btn:hover {
    background-color: var(--primary-dark);
}

/* Responsive design */
@media (max-width: 768px) {
    .cart-wrapper {
        padding: 0 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-wrapper h1 {
        font-size: 2rem;
    }
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.qty-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.remove-btn {
    padding: 6px 12px;
    font-size: 14px;
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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