/* ============ STYLE YITH ADDONS - LAYOUT 2 COLONNES ============ */

:root {
    --addon-border-radius: 6px;
    --addon-transition: all 0.2s ease;
    --addon-shadow: 0 2px 6px rgba(30, 58, 95, 0.08);
    --addon-shadow-hover: 0 4px 12px rgba(30, 58, 95, 0.12);
}

/* ============ RESET GÉNÉRAL ============ */
.single-product .yith-wapo-block {
    background: transparent !important;
    padding: 0 !important;
    margin: 20px 0 !important;
}

.single-product .yith-wapo-addon {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}
.product-container, .product-container *  {
    cursor: default !important;
}

/* ============ HEADER DE TOGGLE AVEC RÉSUMÉ (Produits uniquement) ============ */
.single-product .yith-wapo-addon[data-addon-type="product"] .addon-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--ast-global-color-5, #f9f9f9);
    border: 1px solid var(--ast-global-color-6, #e5e5e5);
    border-radius: var(--addon-border-radius);
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--addon-transition);
}

.single-product .yith-wapo-addon[data-addon-type="product"] .addon-header:hover {
    border-color: var(--ast-global-color-0, #046bd2);
}

/* Image du header */
.single-product .yith-wapo-addon[data-addon-type="product"] .addon-header .addon-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .addon-header .addon-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info du header */
.single-product .yith-wapo-addon[data-addon-type="product"] .addon-header-info {
    flex: 1;
    min-width: 0;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .addon-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ast-global-color-2, #3a3a3a);
    margin-bottom: 4px;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .addon-selection-summary {
    font-size: 13px;
    color: var(--ast-global-color-3, #777);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .addon-selection-summary strong {
    color: var(--ast-global-color-0, #046bd2);
}

/* Toggle arrow */
.single-product .yith-wapo-addon[data-addon-type="product"] .toggle-arrow {
    font-size: 18px;
    color: var(--ast-global-color-3, #777);
    transition: transform 0.3s ease;
}

.single-product .yith-wapo-addon[data-addon-type="product"].toggle-open .toggle-arrow {
    transform: rotate(180deg);
}

/* ============ CONTAINER DES OPTIONS ============ */
.single-product .yith-wapo-addon[data-addon-type="product"] .options-container {
    overflow: hidden;
    transition: all 0.3s ease;
}

.single-product .yith-wapo-addon[data-addon-type="product"].toggle-closed .options-container {
    max-height: 0;
    opacity: 0;
}

.single-product .yith-wapo-addon[data-addon-type="product"].toggle-open .options-container {
    max-height: 3000px;
    opacity: 1;
}

/* ============ LAYOUT PRINCIPAL ADDON PRODUIT - 2 COLONNES ============ */
.single-product .yith-wapo-addon[data-addon-type="product"] .yith-wapo-option {
    width: 100% !important;
    position: relative;
}

/* Container principal avec grille 2 colonnes */
.single-product .yith-wapo-addon[data-addon-type="product"] .product-container {
    display: grid !important;
    grid-template-columns: 60px 1fr; /* Image | Info */
    align-items: start;
    gap: 15px;
    padding: 15px !important;
    background: var(--ast-global-color-4, #fff);
    border: 1px solid var(--ast-global-color-6, #e5e5e5);
    border-radius: var(--addon-border-radius);
    transition: var(--addon-transition);
    position: relative;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .product-container:hover {
    border-color: var(--ast-global-color-0, #046bd2);
}

/* ============ COLONNE 1 : IMAGE PRODUIT ============ */
.single-product .yith-wapo-addon[data-addon-type="product"] .product-image {
    width: 60px !important;
    height: 60px !important;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    grid-column: 1;
    grid-row: 1 / -1; /* S'étend sur toute la hauteur */
}
.addon-zoom-icon {cursor:pointer!important;}
.single-product .yith-wapo-addon[data-addon-type="product"] .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* ============ COLONNE 2 : INFOS PRODUIT ============ */
.single-product .yith-wapo-addon[data-addon-type="product"] .product-info {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Ligne 1 : Titre + Prix */
.single-product .yith-wapo-addon[data-addon-type="product"] .product-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .product-name {
    font-size: 14px !important;
    font-weight: 600;
    color: var(--ast-global-color-2, #3a3a3a);
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .option-price {
    font-size: 14px !important;
    color: var(--ast-global-color-1, #333);
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

/* Ligne 2 : Quantité + Bouton */
.single-product .yith-wapo-addon[data-addon-type="product"] .product-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 4px;
}

/* Zone quantité */
.single-product .yith-wapo-addon[data-addon-type="product"] .quantity input{
		cursor:text!important;
}
.single-product .yith-wapo-addon[data-addon-type="product"] .quantity{
	border: solid #4a4a4a 1px;
	float: none; 
    margin: 0!important;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .wapo-product-qty {
    width: 60px !important;
    height: 34px !important;
    text-align: center;
    border: none !important;
    border-radius: 4px;
    font-size: 14px;
    padding: 0 6px;
    box-sizing: border-box;
    transition: var(--addon-transition);
}

.single-product .yith-wapo-addon[data-addon-type="product"] .wapo-product-qty:focus {
    background: var(--ast-global-color-4, #fff);
    outline: none;
}

/* Bouton Ajouter/Ajouté */
.single-product .yith-wapo-addon[data-addon-type="product"] .addon-add-btn {
	cursor:pointer!important;
    padding: 8px 16px;
    border: none;
    background: var(--ast-global-color-0, #046bd2);
    color: var(--ast-global-color-4, #fff);
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--addon-transition);
    white-space: nowrap;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .addon-add-btn:hover {
    background: var(--ast-global-color-7, #0056b3);
}

.single-product .yith-wapo-addon[data-addon-type="product"] .yith-wapo-option.selected .addon-add-btn {
    background: var(--ast-global-color-3, #777);
    cursor: pointer;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .yith-wapo-option.selected .addon-add-btn:hover {
    background: var(--ast-global-color-3, #777);
}

/* ============ DESCRIPTION  ============ */

.yith-wapo-addon-type-product .wapo-addon-description {
    font-style: italic;
    margin-left: 20px;
}

/* ============ keyframes  ============ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ MASQUER LES ÉLÉMENTS NATIFS ============ */
.single-product .yith-wapo-addon[data-addon-type="product"] input[type="checkbox"] {
    display: none !important;
}

/* ============ TOAST NOTIFICATIONS ============ */
.wapo-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--ast-global-color-2, #3a3a3a);
    color: var(--ast-global-color-4, #fff);
    padding: 12px 24px;
    border-radius: var(--addon-border-radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.wapo-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wapo-toast.removed {
    background: #dc3545;
}

.single-product .yith-wapo-addon[data-addon-type="product"] .options.per-row-2.grid {
	grid-template-columns:repeat(2, minmax(0, 50%)) !important;
	gap: 0 !important;
}
.single-product .yith-wapo-addon[data-addon-type="product"] .options.per-row-1.grid {
	grid-template-columns: repeat(1, minmax(0, 50%));
    justify-content: start;
}
.single-product .yith-wapo-addon[data-addon-type="product"] .options.per-row-1 {
	grid-template-columns: repeat(2, minmax(0, 50%))!important;
}



/* ============ RESPONSIVE MOBILE ============ */
@media (max-width: 768px) {
    /* Forcer les addons à prendre toute la largeur (1 colonne) */
    .single-product .yith-wapo-addon[data-addon-type="product"] .options.per-row-2.grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .yith-wapo-option {
        width: 100% !important;
    }
    
    /* Layout interne mobile optimisé */	 
    .single-product .yith-wapo-addon[data-addon-type="product"] .product-container {
        grid-template-columns: 50px 1fr;
        gap: 12px;
        padding: 12px !important;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .product-image {
        width: 50px !important;
        height: 50px !important;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .product-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .product-actions {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .single-product .yith-wapo-addon[data-addon-type="product"] .quantity {
        flex-shrink: 0;
    }																	   
    .single-product .yith-wapo-addon[data-addon-type="product"] .addon-add-btn {
        margin-left: 0;
        padding: 6px 16px;
		white-space: nowrap;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .addon-selection-summary {
        white-space: normal;
        line-height: 1.3;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .addon-header {
        padding: 12px;
    }
    
    .single-product .yith-wapo-addon[data-addon-type="product"] .product-description {
        grid-column: 1 / -1;
        margin-top: 10px;
    }
}