/* Cart Page Styles */

/* CSS Variables for Cart */
:root {
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
    --primary: #000;
    --primary-dark: #333;
    --primary-light: #f0f0f0;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --success: #28a745;
    --success-light: #d4edda;
    --danger: #dc3545;
    --danger-light: #f8d7da;
}

.cart-page {
    min-height: 100vh;
    background: var(--bg-light);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Cart Content */
.cart-content {
    padding: 3rem 0;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* Cart Main */
.cart-main {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cart-items {
    padding: 0;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: var(--bg-light);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item-image:hover img {
    transform: scale(1.05);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-item-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item-title a:hover {
    color: var(--primary);
}

.cart-item-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.size-label {
    color: var(--text-secondary);
}

.size-value {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-original-price {
    color: var(--text-secondary);
    text-decoration: line-through;
    font-size: 0.9rem;
}

.cart-item-current-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background: var(--bg-light);
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 600;
}

.quantity-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    border: none;
    padding: 0.75rem;
    text-align: center;
    width: 60px;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Cart Item Total */
.cart-item-total {
    text-align: right;
}

.total-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    justify-content: center;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
    transform: scale(1.1);
}

/* Cart Actions */
.cart-actions {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-start;
}

.clear-cart-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--danger-light);
    color: var(--danger);
    border: 2px solid var(--danger);
    transition: all 0.3s ease;
}

.clear-cart-btn:hover {
    background: var(--danger);
    color: white;
}

/* Cart Sidebar */
.cart-sidebar {
    position: sticky;
    top: 2rem;
}

.cart-summary {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    text-align: center;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.discount {
    color: var(--success);
    font-weight: 600;
}

.summary-item.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--primary);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-cart h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.empty-cart p {
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0;
    }

    .page-title {
        font-size: 2rem;
    }

    .cart-content {
        padding: 2rem 0;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }

    .cart-item-quantity {
        justify-content: center;
    }

    .cart-item-total {
        text-align: center;
    }

    .cart-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container-custom {
        padding: 0 1rem;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .summary-actions {
        gap: 0.75rem;
    }
}

/* Animations */
.cart-item {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.cart-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.quantity-input:disabled {
    background: var(--bg-light);
    color: var(--text-secondary);
}

/* Success/Error States */
.cart-item.success {
    background: var(--success-light);
    border-left: 4px solid var(--success);
}

.cart-item.error {
    background: var(--danger-light);
    border-left: 4px solid var(--danger);
}

/* Hover Effects */
.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.cart-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
