﻿
img, picture, .product-image, .card-img-top {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Product Selector Styles */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
}

/*.product-configurator {
    display: flex;
    justify-content: center;
    align-items: center;
}*/

.product-configurator {
    display: flex;
    justify-content: center;   /* Centre horizontalement */
    align-items: center;       /* Centre verticalement */
    height: 100%;
    padding-top: 65px;
}

.product-base-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.equipment-overlay {
    position: absolute;
    transform: translate(-50%, -50%);
}

.equipment-overlay img {
    width: 100%;
    height: auto;
}

/*.equipment-overlay:hover {
    transform: scale(1.1);
    z-index: 20;
}*/

/* Summary Styles */
.product-preview {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.summary-btns-bloc {
    width: 100%;
    margin-bottom: 20px;
}
.summary-btns {
    display: flex;
    justify-content: center;
}

.popup-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    max-height: 95vh;
    overflow-y: auto;
    box-sizing: border-box;
    background: white;
    padding: 1.5rem;
    border-radius: 13px;
    width: 30%;
    color: var(--primary-color);
    border-color: var(--secondary-color);
    border-width: 1px;
}

.popup-content::-webkit-scrollbar {
    width: 10px;
}

.popup-content::-webkit-scrollbar-track {
    background: white;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    height: 80%;
}

/*.popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}*/


.ral-search {
    width: 100%;
    max-width: 300px;
    padding: .5rem;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.ral-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.ral-thumb {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: transform 0.2s;
}

.ral-thumb:hover {
    transform: scale(1.1);
    border-color: #000;
}

.ral-thumb.selected {
    outline: 3px solid var(--primary-color);
}
.ral-badge {
    margin-left: 5px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #333;
    display: inline-block;
}
.ral-label {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}
/*.product-wrapper {
    position: relative;
    aspect-ratio: 9 / 16;
}*/
.product-color-mask {
    position: absolute;
    inset: 0;
    background-color: var(--ral-color, transparent);

    -webkit-mask-image: url('/images/products/Vigicam_mask.png');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: url('/images/products/Vigicam_mask.png');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    transition: background-color 300ms ease-in-out;
    pointer-events: none;
    width: 35.5%;
    left: 38%;
    top: 10%;
    z-index: 9;
    opacity: 0.6;
}

.popup-actions {
    display: flex;
    justify-content: center;
}

.saved-popup{
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: auto auto 10px auto;
}
.saved-popup-btns{
    display: flex;
    width: 30%;
    justify-content: space-between;
}

.input {
    width: 100%;
    margin-bottom: 0.5rem;
    border-color: var(--secondary-color);
    border-width: 1px;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-configurator {
        min-height: 700px;
    }
    
    .product-base-image {
        max-height: 700px;
    }
    
    .equipment-overlay img {
        max-width: 150px;
        max-height: 150px;
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .logo-header{
        width: 50% !important;
    }
    .footer-bloc, .certif-banner{
        width: 90%;
        align-items: inherit!important;
    }
    .certif-banner {
        flex-basis: min-content;
    }
    .draws{
        display: none;
    }
    .mt-5 > h1 {
        text-align: center;
    }
    .card-body{
        flex-direction: column;
    > .row, .nomenclature{
        width: 90%!important;
        margin-top: 10px !important;
    }
    }
    .summary-btns-bloc{
        width: 100%;
    }
    .summary-btns{
        display: flex;
        justify-content: center;
    }
    .popup-content{
        width: 90%!important;   
    }
    .saved-popup{
        flex-direction: column;
        > span{
            width: 90% !important;
        }
    }
    .saved-popup-btns{
        width: 50%;
    }
}
@media (max-width: 425px) {
    h1, .navbar-brand {
        font-size: medium!important;
    }
    h2{
        font-size: small!important;
    }
    .summary-btns{
        flex-direction: column;
        align-items: center;
        > button, .me-2 {
            margin-top: 10px !important;
            margin-right: 0 !important;
        }
    }
    .saved-popup-btns{
        width: 90%;
    }
}
