/* Styles pour le système de panier */

/* Icône du panier dans la navigation */
.cart-icon {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.cart-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    display: none;
}

/* Modal du panier */
.cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: flex-end;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.cart-panel {
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

h3{
    color: #8B4513;
}

.cart-header h3 {
    margin: 0;
    color: #8B4513;
    font-size: 1.2rem;
}

.btn-clear {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #dc3545;
    color: white;
}

/* Contenu du panier */
.cart-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-cart h3 {
    color: #8B4513;
    margin-bottom: 10px;
}

.empty-cart p {
    margin-bottom: 20px;
}

/* Articles du panier */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    align-items: center;
}

.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #8B4513;
}

.wine-info, .wine-vintage, .wine-color {
    margin: 2px 0;
    font-size: 0.85rem;
    color: #666;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-quantity {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-quantity:hover {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.price {
    font-weight: bold;
    color: #8B4513;
    font-size: 1.1rem;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
}

/* Footer du panier */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.cart-total {
    text-align: right;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #8B4513;
}

.cart-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.cart-actions .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: #8B4513;
    color: white;
}

.btn-primary:hover {
    background: #D4AF37;
}

/* Bouton d'ajout au panier sur les cartes de vins */
.add-to-cart-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.add-to-cart-btn:hover {
    background: #D4AF37;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Prix sur les cartes de vins */
.wine-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B4513;
    margin: 10px 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .cart-panel {
        max-width: 100%;
    }
    
    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }
    
    .cart-item-quantity,
    .cart-item-price {
        grid-column: 1 / -1;
        justify-self: center;
        margin-top: 10px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-container {
        padding: 15px;
    }
    
    .cart-footer {
        padding: 15px;
    }
}

/* Notification de panier */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #8B4513;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

/* Fermeture du panier */
.cart-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.cart-close:hover {
    background: rgba(0, 0, 0, 0.1);
} 