/* Cart Styles */
.cart-section {
    padding: 4rem 0;
    background: var(--background-light);
}

.cart-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    padding: 2rem;
}

/* Cart Items List */
.cart-items-list h2 {
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.cart-item-row {
    display: grid;
    grid-template-columns: 80px 1fr 150px 120px 50px;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-row:last-child {
    border-bottom: none;
}

.item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.item-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.item-details .variant {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.original-price {
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 0.5rem;
    font-weight: normal;
}

/* Quantity Controls */
.item-quantity label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.qty-input {
    width: 60px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.item-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    text-align: right;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Cart Summary */
.cart-summary {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 2rem;
}

.free-shipping-notice {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    text-align: center;
    margin: 1rem 0;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.continue-shopping {
    text-align: center;
}

.continue-shopping a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.continue-shopping a:hover {
    text-decoration: underline;
}

/* Empty Cart */
.empty-cart-page {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-page i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-cart-page h2 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.empty-cart-page p {
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.close-cart:hover {
    background: var(--background-light);
    color: var(--text-dark);
}

.cart-sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cart-item-details .variant {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.cart-item-details .price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-actions .quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-item-actions .qty-btn {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
}

.cart-item-actions .quantity {
    font-size: 0.9rem;
    min-width: 25px;
}

.cart-sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-light);
}

.cart-total-section {
    margin-bottom: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.cart-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar.active ~ .cart-sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* Cart Notifications */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    animation: slideInRight 0.3s ease;
}

.notification-content {
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 300px;
}

.close-notification {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    line-height: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Breadcrumb */
.breadcrumb {
    background: var(--background-light);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-list .active {
    color: var(--text-light);
}

/* Related Products */
.related-products {
    padding: 4rem 0;
    background: white;
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.related-products .product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.related-products .product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .cart-item-row {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }
    
    .item-quantity,
    .item-total,
    .item-remove {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    .item-quantity {
        justify-self: start;
    }
    
    .item-total {
        justify-self: end;
        align-self: center;
    }
    
    .item-remove {
        justify-self: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    
    .notification-content {
        max-width: none;
    }
}