/** 
 * Référence de la réponse : 20250922-154300-1
 * Fichier CSS complet pour les disponibilités Zelliges Winckelmans
 */

/* --- Généralités et Réinitialisation --- */


.page-container {
    max-width: 1280px;
    width: 90%; /* Ajusté à 90% pour une marge de 5% de chaque côté */
    margin: 0 auto;
    background-color: #3f628a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    padding-bottom: 30px; /* Espace en bas du conteneur */
}

.main-title {
    text-align: center;
    color: #e9e6df;
    margin: 30px 0;
    font-size: 4em;
    font-weight: 600;
}

/* --- Carousel Section --- */
.carousel-container {
    position: relative;
    /* width: 80%; */
    height: 350px; /* Hauteur fixe des images du carousel */
    overflow: hidden;
    margin: 0 auto 50px auto;
    background-color: #ffffff; /* Fond par défaut du carousel */
    border-radius: 12px;
   /* border-bottom: 1px solid #e0e0e0; */
    margin-left: 25px;
    margin-right: 25px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform; /* Optimisation de la performance */
}
/*
.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
*/
.carousel-item {
    width: auto;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.carousel-image {
    height: 100%; /* Conserve la hauteur fixe de 350px */
    width: auto; /* Largeur automatique pour conserver les proportions */
    object-fit: contain; /* L'image est contenue dans son cadre */
    /* Assurez-vous que le chemin d'accès aux images est correct */
}

.carousel-arrow {
    position: absolute;
    top: 0; /* Aligné en haut */
    bottom: 0; /* Aligné en bas, couvre toute la hauteur */
    width: 15%; /* 10% du bord du bloc */
    background: rgba(0, 0, 0, 0.1); /* Div transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0; /* Initialement invisible */
    transition: opacity 0.3s ease;
    padding: 0 10px; /* Pour donner un peu d'espace aux flèches SVG */
}

.carousel-container:hover .carousel-arrow {
    opacity: 1; /* Apparaît au survol du conteneur */
}

.carousel-arrow.left {
    left: 0;
    background: linear-gradient(to right, rgba(233, 230, 223, 1), transparent);
}

.carousel-arrow.right {
    right: 0;
    background: linear-gradient(to left, rgba(233, 230, 223, 1), transparent);
}

.carousel-arrow svg {
    fill: white;
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5));
}

/* --- Main Content Layout --- */
.content-wrapper {
    /* display: grid;
    grid-template-columns: 2fr 1fr; /* Galerie: 2 parts, Stock: 1 part */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 24px;
    padding: 0 25px; /* Padding interne pour le contenu, si le page-container a 90% de largeur */
}

.gallery-section, .packaging-section {
    width: 48%;
    background-color: #e6e1cc;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.gallery-section h2, .packaging-section h2 {
    color: #34495e;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.6em;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

/* --- Gallery specific styles --- */
.gallery-section label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

#imageContainer {
    width: 100%;
    height: 300px; /* Hauteur de la galerie principale */
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 5px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0 0, 0, 0.05);
    cursor: pointer;
    margin: 10px auto 10px auto;
}

#galleryImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#loadingText, .no-images {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #777;
    font-size: 1.1em;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    z-index: 5; /* Assure qu'il est au-dessus de l'image si elle est affichée */
}
.no-images-text {
    margin-top: 10px;
    font-weight: bold;
}
.no-images svg {
    width: 100px;
    height: 100px;
    opacity: 0.6;
}

select, button {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #c0c0c0;
    background-color: #e6e1cc;
    box-sizing: border-box;
    font-size: 1em;
    color: #333;
    appearance: none; /* Supprime le style par défaut du select */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%20197.9c-3.2-3.2-7.8-4.9-12.4-4.9H17.8c-4.6%200-9.2%201.7-12.4%204.9-6.5%206.5-6.5%2017.1%200%2023.6l128%20128c3.2%203.2%207.8%204.9%2012.4%204.9s9.2-1.7%2012.4-4.9l128-128c6.5-6.5%206.5-17.1%200-23.6z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}
option.unavailable {
    color: #999;
    font-style: italic;
}

/* --- Packaging specific styles --- */
#packagingTitle {
    margin-bottom: 20px;
}

#packagingError {
    color: #dc3545;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border: 1px solid #dc3545;
    background-color: #fef5f5;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.info-group-2 {
    display: flex;
    flex-direction: raw;
    gap: 10px;
    /* margin-bottom: 18px; */
}

.info-group {
    margin-bottom: 18px;
}

.info-group.mi {
    width: 50%;
}

.info-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 1.05em;
}
.info-value {
    /* background-color: #ecf0f1; */
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-block;
    font-size: 1.1em;
    color: #2c3e50;
    min-width: 100px;
    text-align: center;
}
.stock-value.unavailable {
    color: #dc3545;
    font-weight: bold;
    background-color: #fce4e4;
}
.stock-value.undefined {
    color: #f0ad4e;
    font-weight: bold;
    background-color: #fff8e1;
}

/* --- Compatible Zelliges (New Look) --- */
#compatiblesDisplay {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Espace entre les vignettes */
    margin-top: 15px;
    justify-content: flex-start;
}

.compatible-zellige-item {
    width: 100px; /* Taille fixe pour la vignette */
    height: 100px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligne le contenu en haut */
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 0.85em;
    text-align: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    background-color: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.compatible-zellige-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.compatible-zellige-image {
    width: 100%;
    height: 70px; /* Laisse de l'espace pour le texte */
    object-fit: contain;
    background-color: #f0f0f0; /* Fond si image transparente */
}

.compatible-zellige-placeholder {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    color: #bbb;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    flex-grow: 1; /* S'assure qu'il prend l'espace restant */
}

.compatible-zellige-name {
    padding: 5px 0;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
    line-height: 1.2;
    flex-shrink: 0; /* Empêche le nom de rétrécir */
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr; /* Une seule colonne sur petits écrans */
        padding: 0 15px;
    }
    .page-container {
        width: 95%; /* Moins de marge sur petits écrans */
        padding-bottom: 20px;
    }
    .main-title {
        font-size: 2.5em;
        margin: 20px 0;
    }
    .gallery-section, .packaging-section {
        width: 96%;
        padding: 15px;
    }
    .carousel-container {
        height: 250px; /* Réduit la hauteur du carousel sur petits écrans */
        width: 90%;
    }
}
