/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2025 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
#module-fa_customboxbuilder-configurator .title_box img,
#module-fa_customboxbuilder-builder .title_box img {
    position: absolute;
    max-width: 110px;
    z-index: 0;
    top: 0;
    left: 0;
}

#module-fa_customboxbuilder-builder .title_box.clickable img {
    display: none;
}

#module-fa_customboxbuilder-configurator .title_box,
#module-fa_customboxbuilder-builder .title_box {
    z-index: 1;
    position: relative;
    padding: 50px 65px
}

#module-fa_customboxbuilder-builder .title_box.clickable {
    padding: 10px 65px;
}
#module-fa_customboxbuilder-builder  h2.title,
#module-fa_customboxbuilder-configurator .title_box h2,
#module-fa_customboxbuilder-builder .title_box h2 {
    font-weight: 300;
    z-index: 1;
    font-size: 40px;
    color: var(--secondary);
    transition: 0.4 ease-in-out;
}

#module-fa_customboxbuilder-builder .title_box.clickable h2 {
    color: var(--color_txt);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    cursor: pointer;
}

#module-fa_customboxbuilder-builder .options-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}
#module-fa_customboxbuilder-builder .options-grid#type_options {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 100px;
    flex-wrap: wrap;
}

#module-fa_customboxbuilder-builder #box_type .options-grid img {
    max-width: 100%;
    height: auto;
    transform: scale(1.15);
    transition: 1s ease-in-out;
}

#module-fa_customboxbuilder-builder .options-grid .box-option {
    max-width: 300px;
    cursor: pointer;
}

#module-fa_customboxbuilder-builder #box_type .options-grid .box-option {
    overflow: hidden;
    position: relative;
    border: 1px solid var(--secondary);
}

#module-fa_customboxbuilder-builder #box_type .options-grid .box-option:hover img {
    transform: scale(1);
}

#module-fa_customboxbuilder-builder #box_type .options-grid .box-option::after {
    content: "";
    height: calc(100% + 100px);
    width: 90px;
    left: -180px;
    top: 13%;
    background: #ffffff45;
    backdrop-filter: blur(1px);
    position: absolute;
    transform: skewX(40deg);
}

#module-fa_customboxbuilder-builder #box_type .options-grid .box-option:hover::after {
    left: 450px;
    transition: 0.6s ease-in-out;
    top: -30px;
}

#module-fa_customboxbuilder-builder .options-grid .choice {
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: center;
    align-items: center;
    min-width: 215px;
}

#module-fa_customboxbuilder-builder .options-grid .choice h3 {
    font-size: 24px;
    color: var(--color_txt);
}

#module-fa_customboxbuilder-builder #box_quantity .options-grid img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--secondary);
    transition: 0.3s ease-in-out;
}

#module-fa_customboxbuilder-builder #box_quantity .options-grid .box-option:hover img {
    transform: translateY(-6px);
    box-shadow: 0px 7px 10px -1px rgba(0, 0, 0, 0.25);
}

.fixed-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff85;
    backdrop-filter: blur(9px);
    border-top: 2px solid #ccc;
    padding: 20px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
    transition: 0.6s ease-in-out;
}

.fixed-bottom-bar.collapsed {
    top: calc(100vh - 60px);
}

.fixed-bottom-bar.collapsed #add_selected_to_cart,
.fixed-bottom-bar.collapsed #resume_price,
.fixed-bottom-bar.collapsed #update_qty_box,
.fixed-bottom-bar.collapsed #selected_products_list,
.fixed-bottom-bar.collapsed #selected_products_total {
    opacity: 0;
}

.fixed-bottom-bar #add_selected_to_cart,
.fixed-bottom-bar #resume_price,
.fixed-bottom-bar #update_qty_box,
.fixed-bottom-bar #selected_products_total,
.fixed-bottom-bar #selected_products_list {
    opacity: 1;
    transition: 0.4s ease-in-out;
}

#selected_products_list {
    display: flex;
    gap: 55px;
    justify-content: flex-start;
}

.selected-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.selected-item img {
    width: 100px;
    margin-bottom: 20px;
    height: auto;
    border-radius: 6px;
}
@media (max-width: 1065px) {
    .selected-item img {
        display: none;
    }
    #selected_products_list{
        flex-direction: column;
        gap: 15px;
    }
}
#selected_products_total {
    flex: 1;
    text-align: left;
    padding-left: 40px;
    font-size: 24px;
    align-self: center;
    font-weight: 800;
    color: var(--color_txt);
}

#selected_products_total .price {
    font-size: 28px;
    color: var(--secondary);
}

.selected-item .price {
    color: #a6542f;
    font-weight: 600;
    font-size: 18px;
    margin-top: 5px;
}

.selected-item .remove-selected {
    position: absolute;
    top: 5px;
    right: -25px;
    cursor: pointer;
    color: var(--secondary);
    border-radius: 50%;
    font-size: 22px;
    padding: 2px 4px;
}

#module-fa_customboxbuilder-builder #add_selected_to_cart {
    font-size: 22px;
}

#resume_box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    text-align: end;
    gap: 15px;
    min-width: 250px;
    padding-top: 40px;
}

/* Bouton réduire / agrandir */
.toggle_modal {
    cursor: pointer;
    position: absolute;
    color: var(--secondary);
    font-size: 28px;
    transition: transform 0.3s ease;
    top: 15px;
}

.toggle_modal:hover {
    transform: scale(1.2);
}

/* Bloc de sélection de quantité */
#update_qty_box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

#update_qty_box label {
    font-weight: 500;
    color: var(--color_txt);
    font-size: 24px;
}

#update_qty_box input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    text-align: right;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Bloc du prix total */
#resume_price {
    font-size: 24px;
    color: var(--color_txt);
    font-weight: 600;
}

#resume_price .price_total {
    color: var(--secondary);
    font-weight: 700;
    font-size: 28px;
    margin-left: 5px;
}

/* Conteneur des produits sélectionnés */
.selected-products-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Chaque produit */
.prod-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px;
    min-width: 220px;
}

.prod-item:last-child {
    border-bottom: none;
}

.prod-item img {
    width: 200px;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.prod-item span {
    font-size: 16px;
    font-weight: 500;
}

/* Options du pack (quantité de coffrets) */
.pack-options {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pack-options label {
    font-weight: 500;
    font-size: 16px;
}

.pack-options input[type="number"] {
    width: 80px;
    padding: 5px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Résumé du coffret et total */
.coffret-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* texte aligné à droite */
    gap: 5px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

/* Style du formulaire de personnalisation */
#custom_text,
#custom_logo {
    display: block;
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Bouton principal */
#final_add_to_cart {

    font-size: 22px;

}

#section_personnalisation {
    margin-bottom: 40px;
}

#module-fa_customboxbuilder-configurator p {
    font-size: 24px;
    color: var(--primary);
}

#module-fa_customboxbuilder-configurator p .price {
    font-size: 28px;
    color: var(--secondary);
    font-weight: 800;
}

#module-fa_customboxbuilder-configurator label:has(input[type="radio"]) {
    padding: 40px 15px;
    border: 2px solid var(--color_txt);
    transition: 0.1s ease-in-out;
}


#module-fa_customboxbuilder-configurator label:has(input[type="radio"]):hover{
    transform: translateY(-6px);
    box-shadow: 0px 7px 10px -1px rgba(0, 0, 0, 0.25);
}
#module-fa_customboxbuilder-configurator label:has(input[type="radio"]:checked) {
    border: 2px solid var(--secondary);
    transform: translateY(-6px);
    box-shadow: 0px 7px 10px -1px rgba(0, 0, 0, 0.25);
    background-color: #e0e0e0;
}

#module-fa_customboxbuilder-configurator input[type="radio"] {
    display: none;
}

#section_livraison label,
#section_personnalisation label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    min-width: fit-content;
}

#section_livraison .choices,
#section_personnalisation .choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 30px;
    align-items: center;
    padding-top: 40px;
}
#product .coffret-contents ul{
    list-style: none;
    display: flex;
    gap: 15px;
    margin-top: 25px;
}
#product .coffret-contents .item_coffret{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
#product .coffret-contents .item_coffret .price{
    color: var(--secondary);
}
/* ==================== CARTE 3D PERSONNALISABLE ==================== */

.card-3d-container {
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
    perspective: 1500px; /* Profondeur de la 3D */
}

.card-3d {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
}

/* Effet de survol : la carte se soulève légèrement */
.card-3d:hover {
    transform: translateY(-5px) rotateX(2deg);
}

/* État flipped : rotation de 180° */
.card-3d.is-flipped {
    transform: rotateY(180deg);
}

.card-3d.is-flipped:hover {
    transform: rotateY(180deg) translateY(-5px) rotateX(2deg);
}

/* Les deux faces de la carte */
.card-face {
    width: 100%;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden; /* Cache la face arrière */
    border-radius: 12px;
    box-shadow: 0 4px 11px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* RECTO (face avant) - fond blanc personnalisable */
.card-front {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    transform: rotateY(0deg);
    z-index: 2;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* VERSO (face arrière) - image fixe */
.card-back {
    transform: rotateY(180deg);
    z-index: 1;
    position: relative;
    width: 100%;
}

/* Fix Firefox - cache le recto quand la carte est retournée */
.card-3d.is-flipped .card-front {
    visibility: hidden;
}

/* Affiche le verso uniquement quand la carte est retournée */
.card-3d:not(.is-flipped) .card-back {
    visibility: hidden;
}

.card-back img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Logo dans la carte (recto) */
.logo_cart {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
    max-height: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo_cart img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Texte dans la carte (recto) */
.txt_cart {
    width: 100%;
    text-align: center;
    font-family: 'Georgia', serif;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0 20px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    flex: 1;
    display: block;
}

/* Bouton pour retourner la carte */
.btn-flip-card {
    display: block;
    margin: 20px 0 0;
    padding: 8px 24px;
    background: var(--secondary, #8B4513);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-flip-card:hover {
    background: var(--primary, #6d3410);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-flip-card:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .card-3d-container {
        max-width: 100%;
        padding: 0 15px;
    }

    .card-front {
        padding: 25px;
    }

    .logo_cart img {
        max-height: 80px;
    }

    .txt_cart {
        font-size: 14px;
        padding: 0 10px;
    }

    .btn-flip-card {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ==================== FILTERS SIDEBAR ==================== */
.filters-sidebar-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 15px 10px;
    background: #333;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    z-index: 999;
    transition: background 0.3s ease, left 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.filters-sidebar-toggle:hover {
    background: #555;
    left: 5px;
}

.filters-sidebar {
    position: fixed;
    left: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.filters-sidebar.open {
    left: 0;
}

.filters-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
    position: sticky;
    top: 0;
    z-index: 10;
}

.filters-sidebar-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.close-filters {
    background: none;
    border: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-filters:hover {
    color: #333;
}

.filters-sidebar-content {
    padding: 20px;
}

/* Overlay sombre quand le panneau est ouvert */
body.filters-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color_txt);
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Category Filters */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filter-checkbox span {
    font-size: 14px;
    color: var(--color_txt);
}

.filter-checkbox:hover span {
    color: var(--secondary);
}

/* Parent Category Filters (Catégories principales) */
.filter-checkbox-parent span {
    font-weight: 700;
    color: var(--color_txt);
}

.filter-checkbox-parent:hover span {
    color: var(--secondary);
}

/* Disabled Filter Styles */
.filter-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.filter-checkbox.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.filter-checkbox.disabled span {
    color: #999;
}

.filter-checkbox.disabled:hover span {
    color: #999;
}

/* Price Filter */
.price-filter {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-input-group label {
    font-weight: 500;
    font-size: 13px;
    color: var(--color_txt);
}

.price-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.price-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(var(--secondary-rgb), 0.1);
}

.currency {
    font-size: 13px;
    font-weight: 500;
    color: var(--color_txt);
}

/* Slider Styles */
.slider-container {
    position: relative;
    height: 5px;
    margin: 20px 0;
}

.slider {
    position: absolute;
    width: 100%;
    height: 5px;
    top: 0;
    left: 0;
    z-index: 5;
    background: none;
    pointer-events: none;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer !important;
}

/* Force le curseur pointer sur les sliders, jamais not-allowed */
.slider:disabled,
.slider.disabled {
    cursor: pointer !important;
    opacity: 1 !important;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer !important;
    pointer-events: all;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer !important;
    pointer-events: all;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
    transition: transform 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.slider-track {
    position: absolute;
    height: 5px;
    top: 0;
    left: 0;
    right: 0;
    background: #ddd;
    border-radius: 5px;
    z-index: 0;
}

.slider-min {
    z-index: 5;
}

.slider-max {
    z-index: 4;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#clear_filters {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#clear_filters:hover {
    background: var(--secondary);
    color: white;
}

/* ==================== LOADER SPINNER ==================== */
.product_loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px 40px 20px;
    min-height: 200px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .filters-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .filter-group {
        width: 100%;
    }

    .price-inputs {
        flex-direction: column;
    }

    .price-input-group {
        width: 100%;
    }

    .price-input {
        width: 100%;
    }
}

