/* Стилі для кошика */

/* Модальне вікно кошика */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.cart-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em 2em;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.cart-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.cart-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5em 2em;
}

.cart-empty {
    text-align: center;
    color: #666;
    font-size: 1.2em;
    padding: 2em;
}

.cart-item {
    display: flex;
    gap: 1em;
    padding: 1em 0;
    border-bottom: 1px solid #e9ecef;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.cart-item-name {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.cart-item-specs {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-top: 0.5em;
}

.cart-item-controls label {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
}

.cart-item-controls input {
    width: 80px;
    padding: 0.3em 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.cart-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.2s;
}

.cart-remove-btn:hover {
    background: #c82333;
}

.cart-item-price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
    margin-top: auto;
}

.cart-modal-footer {
    padding: 1.5em 2em;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
}

.cart-total {
    font-size: 1.2em;
    color: #333;
}

.cart-checkout-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5em;
    transition: background 0.2s;
}

.cart-checkout-btn:hover {
    background: #218838;
}

/* Повідомлення про додавання до кошика */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1em 1.5em;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.cart-notification-content {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.cart-notification i {
    font-size: 1.2em;
}

/* Адаптивність */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .cart-modal-header,
    .cart-modal-body,
    .cart-modal-footer {
        padding: 1em;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 0.5em;
    }
    
    .cart-item-image {
        width: 100%;
        height: 120px;
    }
    
    .cart-item-controls {
        flex-wrap: wrap;
    }
    
    .cart-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-checkout-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cart-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .cart-notification.show {
        transform: translateY(0);
    }
} 