:root {
    --fcp-primary-color: #1E3A5F;
    --fcp-border-color: #ddd;
    --fcp-background-light: transparent;
    --fcp-background-selected: #e6f3ff;
    --fcp-text-dark: #333;
    --fcp-price-color: #1E3A5F;
    --fcp-gap-small: 8px;
    --fcp-gap-medium: 15px;
    --fcp-gap-large: 20px;
    --fcp-border-radius: 6px;
    --fcp-transition: none;
}

/* Hidden by funnel color filter - ULTRA SPECIFIC TO OVERRIDE ALL OTHER STYLES */
.fcp-product-item.fcp-hidden-by-color-filter,
.fcp-products-grid .fcp-product-item.fcp-hidden-by-color-filter,
.fcp-category-section .fcp-product-item.fcp-hidden-by-color-filter,
.fcp-condition-products .fcp-product-item.fcp-hidden-by-color-filter,
.fcp-subcondition-products .fcp-product-item.fcp-hidden-by-color-filter {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

.fcp-frontend-container {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--fcp-gap-large);
    box-sizing: border-box;
}

.fcp-frontend-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.fcp-frontend-container.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: none;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.fcp-frontend-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.fcp-image-panel {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 380px); 
    display: flex;
    justify-content: flex-start; 
    align-items: flex-start;
}

.fcp-image-container {
    position: relative;
    background: transparent;
    overflow: hidden;
    border: none;
    width: fit-content; 
    max-width: 100%;
    max-width: min(var(--image-width, 600px), 100%);
    display: inline-block;
}

#fcp-frontend-image {
    position: relative;
    width: var(--image-width, 600px);
    height: var(--image-height, 400px);
    max-width: 100%;
    max-height: 80vh;
    aspect-ratio: var(--image-width, 600) / var(--image-height, 400);
    object-fit: contain;
    object-position: center center;
    overflow: hidden;
    display: block;
}

/* Message d'invitation quand aucun produit sélectionné */
.fcp-no-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-sizing: border-box;
}

.fcp-no-selection-content {
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 300px;
    flex-shrink: 0;
}

.fcp-no-selection-content p {
    margin: 0;
    color: white;
    font-size: 16px;
    line-height: 1.5;
}

.fcp-background-layer,
.fcp-layer-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    border-radius: 0;
    box-shadow: none;
    /* Smooth transition when switching views */
    transition: opacity 0.15s ease-in-out;
}

.fcp-config-panel {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 80vh;
    position: relative;
}

.fcp-config-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    padding-top: 15px;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

.fcp-config-content::-webkit-scrollbar {
    width: 8px;
}

.fcp-config-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.fcp-config-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.fcp-config-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.fcp-category-section,
.fcp-condition-section {
    margin-bottom: 30px;
}

.fcp-category-title,
.fcp-condition-title,
.fcp-subcondition-title {
    margin: 0 0 var(--fcp-title-bottom-spacing, 15px) 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--fcp-text-dark);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.fcp-products-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fcp-product-item {
    background: #fff;
    border: 2px solid var(--fcp-border-color);
    border-radius: var(--fcp-border-radius);
    padding: var(--fcp-gap-medium);
    display: flex;
    flex-direction: column;
    gap: var(--fcp-gap-medium);
    cursor: pointer;
    transition: none;
}

.fcp-product-item:hover {
    border-color: var(--fcp-primary-color);
}

.fcp-product-item.selected {
    border-color: var(--fcp-primary-color) !important;
    background: var(--fcp-background-selected) !important;
}

.fcp-product-item.fcp-out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.fcp-product-thumb {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.fcp-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Structure pour les produits normaux dans les catégories */
.fcp-category-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.fcp-category-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-thumb {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
}

.fcp-category-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fcp-category-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.fcp-category-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-price {
    font-size: 16px;
    color: var(--fcp-price-color);
    font-weight: 600;
    margin: 0;
}

.fcp-category-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.fcp-product-info {
    flex: 1;
    min-width: 0;
}

.fcp-product-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--fcp-text-dark);
}

.fcp-product-price {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

/* Sale Price Styles - Prix original barré - CIBLÉS SUR fcp-ON-SALE */
.fcp-frontend-container .fcp-product-price.fcp-on-sale del,
.fcp-frontend-container .fcp-product-price.fcp-on-sale del bdi,
.fcp-frontend-container .fcp-selected-price.fcp-on-sale del,
.fcp-frontend-container .fcp-selected-price.fcp-on-sale del bdi,
.fcp-frontend-container .price.fcp-on-sale del,
.fcp-frontend-container .price.fcp-on-sale del bdi {
    font-size: 11px;
    color: #999;
    font-weight: normal;
    text-decoration: line-through;
    margin-right: 5px;
}

/* Sale Price Styles - Nouveau prix en promo - CIBLÉS SUR fcp-ON-SALE */
.fcp-frontend-container .fcp-product-price.fcp-on-sale ins,
.fcp-frontend-container .fcp-product-price.fcp-on-sale ins bdi,
.fcp-frontend-container .fcp-selected-price.fcp-on-sale ins,
.fcp-frontend-container .fcp-selected-price.fcp-on-sale ins bdi,
.fcp-frontend-container .price.fcp-on-sale ins,
.fcp-frontend-container .price.fcp-on-sale ins bdi {
    text-decoration: none;
    font-size: 14px;
    color: #e74c3c; /* Couleur distincte pour le prix promo */
    font-weight: bold;
}

.fcp-add-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: none;
    min-width: 60px;
}

.fcp-add-btn:hover:not(:disabled) {
    background: #555;
}

.fcp-add-btn.added {
    background: var(--fcp-primary-color);
}

.fcp-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.fcp-condition-section {
    margin-bottom: 30px;
}

.fcp-condition-options {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: var(--fcp-gap-medium) !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
}

.fcp-condition-choice {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    width: 100% !important;
}

.fcp-condition-btn {
    background: #fff !important;
    border: var(--fcp-condition-button-border-width, 2px) solid var(--fcp-condition-button-border-color, var(--fcp-border-color)) !important;
    padding: var(--fcp-condition-button-padding-vertical, 8px) var(--fcp-condition-button-padding-horizontal, 16px) !important;
    border-radius: var(--fcp-condition-button-border-radius, 20px) !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: none !important;
    font-weight: 500 !important;
    display: inline-block !important;
    white-space: nowrap !important;
}

.fcp-condition-btn:hover {
    border-color: var(--fcp-primary-color);
    transform: translateY(-1px);
}

.fcp-condition-btn.selected {
    background: var(--fcp-primary-color);
    border-color: var(--fcp-primary-color);
    color: #fff;
}

.fcp-condition-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.fcp-condition-products {
    /* display controlled by JavaScript - do NOT use !important here */
    display: none;
    margin-top: var(--fcp-thumbs-top-spacing, 15px);
}

/* When shown by JavaScript, ensure proper visibility */
.fcp-condition-products[style*="display: block"],
.fcp-condition-products[style*="display:block"] {
    visibility: visible;
    opacity: 1;
}

.fcp-condition-products .fcp-product-item {
    background: #fff !important;
    border: 2px solid var(--fcp-border-color) !important;
    border-radius: var(--fcp-border-radius);
    padding: var(--fcp-gap-medium);
    display: flex !important;
    flex-direction: column !important;
    gap: var(--fcp-gap-medium);
    cursor: pointer;
    transition: none;
    margin-bottom: 10px;
    visibility: visible !important;
    opacity: 1 !important;
}

.fcp-condition-products .fcp-product-item:hover {
    border-color: var(--fcp-primary-color);
}

.fcp-condition-products .fcp-product-item.selected {
    border-color: var(--fcp-primary-color) !important;
    background: var(--fcp-background-selected) !important;
    border-width: 2px !important;
    border-style: solid !important;
}

.fcp-condition-products .fcp-product-item.fcp-out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Structure pour les produits dans les conditions - même que catégories */
.fcp-condition-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.fcp-condition-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-thumb {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
}

.fcp-condition-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fcp-condition-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.fcp-condition-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-price {
    font-size: 16px;
    color: var(--fcp-price-color);
    font-weight: 600;
    margin: 0;
}

.fcp-condition-section:not(.fcp-thumb-only) .fcp-product-item .fcp-product-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.fcp-condition-products {
    animation: none;
}

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

.fcp-category-section.fcp-thumb-only .fcp-products-grid.fcp-thumbs-only,
.fcp-subcondition-section.fcp-thumb-only .fcp-subcondition-products.fcp-thumbs-only,
.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-condition-section.fcp-thumb-only .fcp-condition-products.fcp-visible .fcp-products-grid.fcp-thumbs-only {
    display: grid !important;
    grid-template-columns: repeat(var(--thumb-columns-desktop, 4), 1fr) !important;
    justify-items: center !important;
    gap: var(--fcp-gap-small) !important;
    margin-top: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.fcp-category-section.fcp-thumb-only .fcp-product-item,
.fcp-subcondition-section.fcp-thumb-only .fcp-product-item {
    flex-direction: column !important;
    padding: 0px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    border-radius: var(--fcp-border-radius) !important;
    transition: var(--fcp-transition) !important;
    background: var(--fcp-background-light) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important; 
    max-width: 100% !important;
    aspect-ratio: 1/1 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.fcp-category-section.fcp-thumb-only .fcp-product-item:hover,
.fcp-subcondition-section.fcp-thumb-only .fcp-product-item:hover {
    border-color: var(--fcp-primary-color) !important;
}

.fcp-category-section.fcp-thumb-only .fcp-product-item.selected,
.fcp-subcondition-section.fcp-thumb-only .fcp-product-item.selected {
    border-color: var(--fcp-primary-color) !important;
    background: var(--fcp-background-selected) !important;
}

.fcp-category-section.fcp-thumb-only .fcp-product-thumb,
.fcp-subcondition-section.fcp-thumb-only .fcp-product-thumb {
    width: 100% !important; 
    height: 100% !important; 
    margin: 0 !important;
    border-radius: var(--fcp-border-radius) !important;
    overflow: hidden !important;
}

.fcp-category-section.fcp-thumb-only .fcp-product-thumb img,
.fcp-subcondition-section.fcp-thumb-only .fcp-product-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
}

/* Only show condition products container when visible (controlled by JS) */
.fcp-condition-section.fcp-thumb-only .fcp-condition-products[style*="display: block"],
.fcp-condition-section.fcp-thumb-only .fcp-condition-products[style*="display:block"],
.fcp-condition-section.fcp-thumb-only .fcp-condition-products.fcp-visible {
    display: block !important;
    margin-top: var(--fcp-thumbs-top-spacing, 15px) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Force grid display on products-grid inside condition products - always apply grid styles */
.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-products-grid.fcp-thumbs-only {
    display: grid !important;
    grid-template-columns: repeat(var(--thumb-columns-desktop, 4), 1fr) !important;
    justify-items: center !important;
    gap: var(--fcp-gap-small) !important;
    width: 100% !important;
}

.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-product-item {
    flex-direction: column !important;
    padding: 0px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    border-radius: var(--fcp-border-radius) !important;
    transition: var(--fcp-transition) !important;
    background: var(--fcp-background-light) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important; 
    max-width: 100% !important; 
    aspect-ratio: 1/1 !important;
    overflow: hidden !important;
    box-sizing: border-box !important; 
}

.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-product-item:hover {
    border-color: var(--fcp-primary-color) !important;
}

.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-product-item.selected {
    border-color: var(--fcp-primary-color) !important;
    background: var(--fcp-background-selected) !important;
}

.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-product-thumb {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: var(--fcp-border-radius) !important;
    overflow: hidden !important;
}

.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-product-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.fcp-thumb-cols-1.fcp-category-section .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-1 .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-1 .fcp-subcondition-products,
.fcp-thumb-cols-1.fcp-subcondition-section .fcp-subcondition-products.fcp-thumbs-only {
    grid-template-columns: repeat(1, 1fr) !important;
}

.fcp-thumb-cols-2.fcp-category-section .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-2 .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-2 .fcp-subcondition-products,
.fcp-thumb-cols-2.fcp-subcondition-section .fcp-subcondition-products.fcp-thumbs-only {
    grid-template-columns: repeat(2, 1fr) !important;
}

.fcp-thumb-cols-3.fcp-category-section .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-3 .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-3 .fcp-subcondition-products,
.fcp-thumb-cols-3.fcp-subcondition-section .fcp-subcondition-products.fcp-thumbs-only {
    grid-template-columns: repeat(3, 1fr) !important;
}

.fcp-thumb-cols-4.fcp-category-section .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-4 .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-4 .fcp-subcondition-products,
.fcp-thumb-cols-4.fcp-subcondition-section .fcp-subcondition-products.fcp-thumbs-only {
    grid-template-columns: repeat(4, 1fr) !important;
}

.fcp-thumb-cols-5.fcp-category-section .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-5 .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-5 .fcp-subcondition-products,
.fcp-thumb-cols-5.fcp-subcondition-section .fcp-subcondition-products.fcp-thumbs-only {
    grid-template-columns: repeat(5, 1fr) !important;
}

.fcp-thumb-cols-6.fcp-category-section .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-6 .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-6 .fcp-subcondition-products,
.fcp-thumb-cols-6.fcp-subcondition-section .fcp-subcondition-products.fcp-thumbs-only {
    grid-template-columns: repeat(6, 1fr) !important;
}

.fcp-thumb-cols-5.fcp-category-section.fcp-thumb-only .fcp-products-grid.fcp-thumbs-only {
    gap: 5px !important;
}

.fcp-thumb-cols-6.fcp-category-section.fcp-thumb-only .fcp-products-grid.fcp-thumbs-only {
    gap: 3px !important;
}

.fcp-thumb-cols-5.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-5.fcp-subcondition-section.fcp-thumb-only .fcp-subcondition-products.fcp-thumbs-only {
    gap: 5px !important;
}

.fcp-thumb-cols-6.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-products-grid.fcp-thumbs-only,
.fcp-thumb-cols-6.fcp-subcondition-section.fcp-thumb-only .fcp-subcondition-products.fcp-thumbs-only {
    gap: 3px !important;
}

.fcp-thumb-only .fcp-product-item .fcp-product-info,
.fcp-thumb-only .fcp-product-item .fcp-add-btn {
    display: none !important;
}

.fcp-category-section.fcp-thumb-only .fcp-product-item.fcp-out-of-stock,
.fcp-condition-section.fcp-thumb-only .fcp-condition-products .fcp-product-item.fcp-out-of-stock,
.fcp-subcondition-section.fcp-thumb-only .fcp-subcondition-products .fcp-product-item.fcp-out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==============================================
   BUTTON MODE - Inline buttons with circle image
   ============================================== */

.fcp-category-section.fcp-button-mode .fcp-products-grid.fcp-buttons-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fcp-category-section.fcp-button-mode .fcp-product-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    background: #ffffff;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 1px solid #1a1a1a;
}

.fcp-category-section.fcp-button-mode .fcp-product-item:hover {
    background: #f5f5f5;
}

.fcp-category-section.fcp-button-mode .fcp-product-item.selected {
    background: #e8e8e8 !important;
    border-color: var(--fcp-primary-color, #D4AF37) !important;
}

.fcp-category-section.fcp-button-mode .fcp-button-circle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
}

.fcp-category-section.fcp-button-mode .fcp-button-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fcp-category-section.fcp-button-mode .fcp-button-name {
    color: #1a1a1a;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}

/* Hide other elements in button mode */
.fcp-category-section.fcp-button-mode .fcp-product-item .fcp-product-content,
.fcp-category-section.fcp-button-mode .fcp-product-item .fcp-product-controls,
.fcp-category-section.fcp-button-mode .fcp-product-item .fcp-product-thumb:not(.fcp-button-circle) {
    display: none !important;
}

/* Out of stock in button mode */
.fcp-category-section.fcp-button-mode .fcp-product-item.fcp-out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* LIFESTYLE PREVIEW BUTTON (Eye icon in button mode) */
.fcp-lifestyle-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    margin-left: auto;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #1a1a1a;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.fcp-lifestyle-preview-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
}

.fcp-lifestyle-preview-btn svg {
    width: 18px;
    height: 18px;
}

/* LIFESTYLE PREVIEW MODAL */
.fcp-lifestyle-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.fcp-lifestyle-modal.fcp-modal-open {
    display: flex;
}

.fcp-lifestyle-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
}

.fcp-lifestyle-modal-header {
    display: none;
}

.fcp-lifestyle-modal-title {
    display: none;
}

.fcp-lifestyle-modal-close {
    position: absolute;
    top: -10px;
    right: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.fcp-lifestyle-modal-close:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.fcp-lifestyle-modal-body {
    position: relative;
    display: inline-block;
    padding: 0;
    background: transparent;
}

.fcp-lifestyle-modal-body img {
    max-width: 90vw;
    max-height: 600px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.fcp-selected-product-info {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: var(--fcp-selected-product-spacing, 5px) 0;
    text-align: left;
    min-height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--fcp-gap-medium);
    transition: none;
}

.fcp-selected-product-info.has-selection {
    background: transparent;
    border: none;
}

.fcp-selected-name {
    font-weight: bold;
    font-size: 14px;
    color: var(--fcp-text-dark);
    margin-bottom: 0;
    flex: 1 1 auto;
    line-height: 1.4;
}

.fcp-selected-price {
    font-size: 14px;
    color: var(--fcp-price-color);
    font-weight: bold;
    flex: 0 0 auto;
    text-align: right; 
    margin-left: auto;
}

.fcp-condition-section .fcp-selected-product-info {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: var(--fcp-selected-product-spacing, 5px) 0;
    text-align: left;
    min-height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--fcp-gap-medium);
    transition: none;
}

.fcp-condition-section .fcp-selected-product-info.has-selection {
    background: transparent;
    border: none;
}

.fcp-condition-section .fcp-selected-name {
    font-weight: bold;
    font-size: 14px;
    color: var(--fcp-text-dark);
    margin-bottom: 0;
    flex: 1 1 auto;
    line-height: 1.4;
}

.fcp-condition-section .fcp-selected-price {
    font-size: 14px;
    color: var(--fcp-price-color);
    font-weight: bold;
    flex: 0 0 auto;
    text-align: right;
    margin-left: auto;
}

.fcp-cart-section {
    position: sticky;
    bottom: 0;
    background: white;
    padding: var(--fcp-gap-medium) 0 0 0;
    margin-top: 0;
    z-index: 99999 !important;
    flex-shrink: 0;
}

.fcp-add-to-cart-btn {
    width: 100%;
    background: #333;
    color: #fff;
    border: none;
    padding: var(--fcp-gap-medium) var(--fcp-gap-large);
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fcp-add-to-cart-btn:hover:not(:disabled) {
    background: #555;
}

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

.fcp-cart-text {
    flex: 1;
    text-align: left;
}

.fcp-cart-price {
    font-weight: bold;
}

.fcp-layer-image {
    opacity: 1;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.fcp-product-item.fcp-shake,
.fcp-condition-btn.fcp-shake {
    animation: none;
}

.fcp-required-badge {
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.fcp-required-asterisk {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.fcp-placeholder-thumb {
    color: #999;
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 1400px) {
    .fcp-frontend-container {
        max-width: 100%;
        padding: var(--fcp-gap-medium);
    }
}

@media (max-width: 1200px) {
    .fcp-frontend-layout {
        gap: 20px;
    }
    
    .fcp-config-panel {
        width: 320px;
    }
    
    .fcp-image-panel {
        max-width: calc(100% - 340px);
    }
}

@media (max-width: 800px) {
    .fcp-frontend-layout {
        flex-direction: column;
        gap: var(--fcp-gap-large);
    }
    
    .fcp-image-panel {
        max-width: 100%;
    }
    
    .fcp-config-panel {
        width: 100%;
        height: auto;
        max-height: none;
    }
    
    .fcp-config-content {
        overflow-y: visible;
        padding-right: 0;
    }
    
    .fcp-cart-section {
        position: relative;
        box-shadow: none;
    }
}

.fcp-tab-content.active {
    height: 80vh !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

#fcp-tab-configure.active {
    height: 100% !important;
    overflow-y: auto !important;
}

.fcp-tab-content:not(.active) {
    display: none !important;
}

/* Gestion fine des z-index pour cohabiter avec les builders */
.fcp-frontend-container {
    z-index: auto;
}

.fcp-config-panel {
    z-index: 1;
}

.fcp-cart-section {
    z-index: 99999 !important;
}

/* Reset z-index pour tous les autres éléments internes */
.fcp-frontend-container .fcp-product-item,
.fcp-frontend-container .fcp-condition-products,
.fcp-frontend-container .fcp-selected-product-info {
    z-index: auto !important;
}


/* Success Modal Styles */
.fcp-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fcp-modal-fade-in 0.2s ease;
}

.fcp-success-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.fcp-success-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.fcp-success-modal-header .fcp-modal-title {
    margin: 0;
    font-size: 20px;
    color: #1d2327;
    font-weight: 600;
}

.fcp-success-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0 5px;
}

.fcp-success-modal-close:hover {
    color: #d63638;
}

.fcp-success-modal-body {
    padding: 20px;
}

.fcp-cart-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.fcp-item-name {
    flex: 1;
    min-width: 0;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.fcp-item-thumb {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 8px;
}

.fcp-item-text {
    flex: 1;
    min-width: 0;
}

.fcp-item-qty {
    width: 40px;
    text-align: center;
    margin-right: 10px;
}

.fcp-item-price {
    width: 80px;
    text-align: right;
}

.fcp-cart-total {
    margin-top: 15px;
    padding-top: 15px;
    text-align: right;
    font-size: 18px;
}

.fcp-stock-warning {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fcp-warning-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.fcp-modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.fcp-btn-secondary {
    background: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.fcp-btn-primary {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
}

.fcp-btn-primary:hover {
    background: #005a87;
}

.fcp-btn-secondary:hover {
    background: #e6e6e6;
}

@keyframes fcp-modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error Modal Styles */
.fcp-error-modal {
    display: flex;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.fcp-error-modal-content {
    background-color: #fefefe;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.fcp-error-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    background: #fdf2f2;
}

.fcp-error-modal-header .fcp-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fcp-error-icon {
    font-size: 20px;
    color: #e74c3c;
}

.fcp-error-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s;
}

.fcp-error-modal-close:hover,
.fcp-error-modal-close:focus {
    color: #e74c3c;
}

.fcp-error-modal-body {
    padding: 20px;
}

.fcp-error-general {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

.fcp-error-product {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.fcp-error-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.fcp-error-product-info {
    flex: 1;
}

.fcp-error-product-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.fcp-error-details h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.fcp-error-message {
    color: #e74c3c;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.fcp-stock-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.fcp-stock-info:last-child {
    border-bottom: none;
}

.fcp-stock-label {
    font-weight: 500;
    color: #666;
}

.fcp-stock-available {
    color: #27ae60;
    font-weight: 600;
}

.fcp-stock-requested {
    color: #e74c3c;
    font-weight: 600;
}

.fcp-stock-total {
    color: #3498db;
    font-weight: 600;
}

.fcp-stock-cart {
    color: #f39c12;
    font-weight: 600;
}

.fcp-stock-breakdown {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.fcp-out-of-stock {
    background: #fdf2f2;
    color: #e74c3c;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    margin-top: 10px;
}

.fcp-error-modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: flex-end;
}

.fcp-btn-error {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.fcp-btn-error:hover {
    background-color: #c0392b;
}

/* Hide prices feature */
.fcp-hide-prices .fcp-product-price,
.fcp-hide-prices .fcp-selected-price {
    display: none !important;
}

/* ========================================
   VIEW TOGGLE BUTTON (Face / 3/4 view)
   ======================================== */

.fcp-view-toggle-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.fcp-view-toggle-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--fcp-primary-color, #1E3A5F);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: scale(1.05);
}

.fcp-view-toggle-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.fcp-view-toggle-btn.fcp-view-34-active {
    background: var(--fcp-primary-color, #1E3A5F);
    color: #fff;
    border-color: var(--fcp-primary-color, #1E3A5F);
}

.fcp-view-toggle-btn.fcp-view-34-active:hover {
    background: var(--fcp-primary-color, #1E3A5F);
    opacity: 0.9;
}

.fcp-view-toggle-btn svg {
    width: 20px;
    height: 20px;
}

