/* =============================================
   CART STYLES - Mazagan Optique
   ============================================= */

/* Global Reset for Cart Page */
* {
    box-sizing: border-box;
}

/* Badge panier dans la navbar */
.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Notifications panier */
.cart-notification {
    position: fixed;
    top: 120px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cart-notification.show {
    transform: translateX(0);
}

.cart-notification-success {
    background: #27ae60;
    color: white;
}

.cart-notification-error {
    background: #e74c3c;
    color: white;
}

/* Page panier */
.cart-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.cart-empty i {
    font-size: 5rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
}

/* Conteneur de la table et du résumé */
#cartContent {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.cart-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.cart-table thead {
    background: #0d2c54;
    color: white;
}

.cart-table th {
    padding: 1rem;
    font-weight: 600;
    text-align: left;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #0d2c54;
    color: white;
    border-color: #0d2c54;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #c0392b;
}

/* Résumé commande */
.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #c5a059;
    position: sticky;
    top: 20px;
}

.cart-summary h3 {
    color: #0d2c54;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0d2c54;
    border-bottom: 2px solid #c5a059;
    border-top: 2px solid #c5a059;
    margin-top: 1rem;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-checkout {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #c5a059 0%, #d4b06a 100%);
    color: white;
    padding: 1.2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    /* Force border-box */
    max-width: 100%;
    /* Prevent overflow */
}

.btn-checkout:hover {
    background: linear-gradient(135deg, #0d2c54 0%, #1a3d6b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 44, 84, 0.4);
    color: white;
    text-decoration: none;
}

.btn-checkout:active,
.btn-checkout:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(13, 44, 84, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .cart-table {
        font-size: 0.9rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-notification {
        right: 10px;
        left: 10px;
        top: 80px;
    }
}

/* =============================================
   FLOATING SOCIAL BUTTONS
   ============================================= */

.floating-social {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.float-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.float-btn::before {
    content: attr(title);
    position: absolute;
    right: 65px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.float-btn:hover::before {
    opacity: 1;
}

.float-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.float-btn.instagram:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(240, 148, 51, 0.5);
}

.float-btn.facebook {
    background: #1877f2;
}

.float-btn.facebook:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5);
}

.float-btn.whatsapp {
    background: #25d366;
}

.float-btn.whatsapp:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}