/* Cart Page Specific Styles */

.cart-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.back-link-container {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
    transform: translateX(-5px);
}

.cart-main {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

/* Cart Items Section */
.cart-items-section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

#itemCount {
    color: #667eea;
}

#cartItemsContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: #f8f9ff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.cart-item-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 2px solid #e0e0e0;
}

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

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.cart-item-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
}

.cart-item-spec {
    display: flex;
    gap: 8px;
}

.cart-item-spec strong {
    color: #333;
    min-width: 80px;
}

.cart-item-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.cart-item-breakdown {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

.cart-item-actions {
    margin-top: 10px;
}

.btn-remove {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart svg {
    color: #ccc;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 30px;
}

/* Order Summary */
.order-summary-section {
    position: sticky;
    top: 20px;
}

.order-summary {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 30px;
}

.order-summary h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1rem;
    color: #333;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    padding-top: 20px;
}

.summary-divider {
    height: 2px;
    background: #667eea;
    margin: 15px 0;
}

.btn-block {
    width: 100%;
    margin-top: 20px;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-methods {
    margin-top: 20px;
    text-align: center;
}

.payment-methods p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.5rem;
}

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

    .order-summary-section {
        position: static;
        order: 2;
    }
    
    .cart-items-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    .cart-content {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .cart-main {
        gap: 2rem;
    }
    
    .cart-items-section h2 {
        font-size: 1.35rem;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }

    .cart-item-price-section {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .cart-item-title {
        font-size: 1.1rem;
    }
    
    .cart-item-specs {
        font-size: 0.85rem;
    }
    
    .cart-item-price {
        font-size: 1.3rem;
    }
    
    .order-summary {
        padding: 1.5rem;
    }
    
    .order-summary h2 {
        font-size: 1.35rem;
    }
    
    .summary-row {
        font-size: 0.95rem;
        padding: 10px 0;
    }
    
    .summary-row.total {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .cart-content {
        padding: 1rem;
    }
    
    .back-link-container {
        margin-bottom: 1.5rem;
    }
    
    .back-link {
        font-size: 0.9rem;
    }
    
    .cart-items-section h2 {
        font-size: 1.25rem;
    }
    
    .cart-item {
        padding: 0.875rem;
    }
    
    .cart-item-image {
        height: 180px;
    }
    
    .cart-item-title {
        font-size: 1rem;
    }
    
    .cart-item-specs {
        font-size: 0.8rem;
    }
    
    .cart-item-spec {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .cart-item-spec strong {
        min-width: auto;
    }
    
    .cart-item-price {
        font-size: 1.2rem;
    }
    
    .cart-item-breakdown {
        font-size: 0.75rem;
    }
    
    .btn-remove {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .order-summary {
        padding: 1.25rem;
    }
    
    .order-summary h2 {
        font-size: 1.2rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    .summary-row.total {
        font-size: 1.1rem;
    }
    
    .empty-cart {
        padding: 3rem 1rem;
    }
    
    .empty-cart svg {
        width: 60px;
        height: 60px;
    }
    
    .empty-cart h3 {
        font-size: 1.3rem;
    }
    
    .empty-cart p {
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .cart-item-image {
        height: 160px;
    }
    
    .cart-item-title {
        font-size: 0.95rem;
    }
    
    .order-summary h2 {
        font-size: 1.1rem;
    }
}
