/*
 * Horepa Cart Mobile Styles
 * Fichier: /wp-content/themes/hello-elementor-enfant/assets/css/horepa-cart-mobile.css
 */


/* ========================================
   DESKTOP CART IMPROVEMENTS
======================================== */

/* Styles pour les boutons de suppression desktop */
@media (min-width: 768px) {
    .woocommerce .e-cart__container .horepa-cart-desktop .product-remove .horepa-remove-desktop {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #D02E2629;
        color: #D02E26 !important;
        border-radius: 10px;
        transition: all 0.3s ease;
		padding: 20px 8px;
    }
    
    .woocommerce .e-cart__container .horepa-cart-desktop .product-remove .horepa-remove-desktop:hover {
        background: #D02E26;
        color: #FFFFFF !important;
    }
	
	.horepa-quantity-desktop {
        justify-content: center;
        margin-top: 0;
    }
    
    /* Styles spécifiques pour les contrôles desktop */
    .horepa-cart-desktop .horepa-quantity-controls {
        gap: 0;
        margin: 0;
		border: 1px solid #ccc;
        border-radius: 10px;
    }
    
    .horepa-cart-desktop .horepa-quantity-btn[type=button] {
        border: none;
        background: #ffffff;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 500;
        color: #6c757d;
        cursor: pointer;
        user-select: none;
        padding: 0 4px;
        transition: all 0.3s ease;
    }
    
    .horepa-cart-desktop .horepa-quantity-input[type=number] {
        width: 30px;
        border: none;
        text-align: center;
        font-size: 14px;
        font-weight: 600;
        border-radius: 10px;
        background: #FFFFFF;
        color: #191919;
        padding: 0;
        transition: all 0.3s ease;
    }
    
    .horepa-cart-desktop .horepa-quantity-input:focus {
        outline: none;
        border-color: #6c757d;
        background: #FFFFFF;
    }
    
    /* Masquer les spinners sur desktop aussi */
    .horepa-cart-desktop .horepa-quantity-input::-webkit-outer-spin-button,
    .horepa-cart-desktop .horepa-quantity-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    .horepa-cart-desktop .horepa-quantity-input[type=number] {
        -moz-appearance: textfield;
    }
}


/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Mobile First - Affichage mobile par défaut */
.horepa-cart-desktop {
    display: none;
}

.horepa-cart-mobile {
    display: block;
}

/* Desktop - À partir de 768px */
@media (min-width: 768px) {
    .horepa-cart-desktop {
        display: table;
    }
    
    .horepa-cart-mobile {
        display: none;
    }
}

/* ========================================
   STYLES MOBILE CART
======================================== */

.horepa-cart-mobile {
    padding: 0;
    background: transparent;
}

.horepa-cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ========================================
   CART ITEM STYLES
======================================== */

.horepa-cart-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
	border-bottom: 1px solid #cccc;
    padding-bottom: 15px;
}

.horepa-cart-item:last-child {
    border-bottom: 0;
	padding-bottom: 0;
}

/* ========================================
   PRODUCT IMAGE
======================================== */

.horepa-product-image {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    overflow: hidden;
}

.horepa-product-image img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    border-radius: 8px;
}

.horepa-product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ========================================
   PRODUCT DETAILS
======================================== */

.horepa-product-details {
    flex: 1;
    min-width: 0;
}

.horepa-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.horepa-product-title a {
    color: inherit;
    text-decoration: none;
}

.horepa-product-title a:hover {
    color: #D02E26;
}

.horepa-product-ref {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

/* ========================================
   PRODUCT PRICE
======================================== */

.horepa-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.horepa-original-price {
    font-size: 15px;
    color: #95a5a6;
    text-decoration: line-through;
    font-weight: 500;
}

.horepa-discount-badge {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: #FFFFFF;
    font-size: 12px;
    padding: 0px 4px;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ========================================
   QUANTITY CONTROLS
======================================== */

.horepa-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 16px;
	border: 1px solid #ccc;
    width: 71px;
    border-radius: 10px;
}

.horepa-quantity-btn[type=button] {
    border: none;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
	padding: 0 4px;
}

.horepa-quantity-btn[type=button]:hover {
	background: #FFFFFF;
	color: #6c757d;
}

.horepa-quantity-btn[type=button]:focus {
	background: #FFFFFF;
	color: #6c757d;
}

.horepa-quantity-btn:active {
    transform: scale(0.95);
}

.horepa-quantity-input[type=number] {
    width: 30px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    background: #FFFFFF;
    color: #191919;
	padding: 0;
}

.horepa-quantity-input:focus {
    outline: none;
    border-color: #6c757d;
    background: #FFFFFF;
}

/* ========================================
   CART ITEM ACTIONS
======================================== */

.horepa-cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    margin-left: 16px;
}

.horepa-product-subtotal {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    text-align: right;
}

.horepa-remove-btn[type=button] {
    background: #D02E2629;
    color: #D02E26;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 8px 10px;
}

.horepa-remove-btn[type=button]:hover {
    background: #D02E26;
    color: #FFFFFF;
}

.horepa-cart-actions-mobile {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 24px;
}

.horepa-update-cart-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #2ed573, #1dd1a1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.horepa-update-cart-btn:hover {
    background: linear-gradient(135deg, #1dd1a1, #17c0eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 213, 115, 0.4);
}

.horepa-update-cart-btn:active {
    transform: translateY(0);
}

/* ========================================
   PRODUCT META DATA STYLES
======================================== */

.horepa-product-details .wc-item-meta {
    margin-top: 8px;
    font-size: 13px;
    color: #6c757d;
}

.horepa-product-details .wc-item-meta p {
    margin: 4px 0;
    line-height: 1.4;
}

.horepa-backorder-notification {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 8px;
    border-left: 4px solid #ffc107;
}

/* ========================================
   LOADING STATES & ANIMATIONS
======================================== */

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.horepa-cart-item.removing {
    animation: slideOut 0.3s ease forwards;
}

/* ========================================
   QUANTITY INPUT IMPROVEMENTS
======================================== */

/* Masquer les flèches spinner sur Chrome/Safari/Edge */
.horepa-quantity-input::-webkit-outer-spin-button,
.horepa-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Masquer les flèches spinner sur Firefox */
.horepa-quantity-input[type=number] {
    -moz-appearance: textfield;
}

/* ========================================
   EMPTY CART STYLES
======================================== */

.horepa-cart-mobile:empty::after {
    content: "Votre panier est vide";
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 18px;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
======================================== */

@media (max-width: 480px) {
    
    .horepa-product-image {
        width: 60px;
        height: 60px;
        margin-right: 12px;
        margin-bottom: 0;
        align-self: flex-start;
    }
    
    .horepa-product-image img {
        border-radius: 10px;
    }
    
    .horepa-product-subtotal {
        font-size: 16px;
    }
    
    .horepa-quantity-controls {
        margin-top: 12px;
    }
	
	.horepa-product-price {
		margin-bottom: 12px;
	}
}

@media (max-width: 360px) {
    
    .horepa-product-title {
        font-size: 15px;
    }
    
    .horepa-product-price {
        font-size: 16px;
    }
    
    .horepa-quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .horepa-quantity-input {
        width: 50px;
        height: 36px;
        font-size: 14px;
    }
    
    .horepa-remove-btn {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
======================================== */

.horepa-quantity-btn:focus,
.horepa-remove-btn:focus,
.horepa-coupon-btn:focus,
.horepa-update-cart-btn:focus {
    outline-offset: 2px;
}

.horepa-quantity-input:focus {
    outline-offset: 2px;
}

/* Amélioration de la lisibilité pour les utilisateurs avec déficience visuelle */
@media (prefers-reduced-motion: reduce) {
    .horepa-cart-item,
    .horepa-quantity-btn,
    .horepa-remove-btn,
    .horepa-coupon-btn,
    .horepa-update-cart-btn {
        transition: none;
        animation: none;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    .horepa-remove-btn,
    .horepa-quantity-controls,
    .horepa-cart-actions-mobile {
        display: none;
    }
    
    .horepa-cart-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}