/* Shared Product Grid Styles - Hybrid (Original Layout + Modern Polish) */

/* Shared Page Header (Discrete) */
.page-hint-title {
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-left: 5vw;
    margin-bottom: 1.5rem !important;
    /* mb-4 equivalent */
    font-size: 1.25rem;
    /* fs-5 equivalent */
    font-weight: 300;
    /* fw-light equivalent */
    color: var(--p-color);
    /* text-muted equivalent-ish, or use muted class */
    text-align: left;
}

/* Using !important on margin to override bootstrap utils if necessary, but class usage is cleaner */

#catalogue-container {
    width: 90vw;
    display: flex;
    position: relative;
    left: 5vw;
    flex-wrap: wrap;
    justify-content: center;
}

/* Product Card - Green Background (Border effect) + Modern Hover */
.product {
    display: none;
    /* Default hidden for catalogue filtering */
    background-color: var(--secondary-color);
    margin: 1vw;
    border-radius: 2vw;
    /* Kept responsiveness */
    padding: 0.3vw;
    /* Slightly more padding for a cleaner border look */
    box-shadow: 0.5vw 0.5vw 0.5vw rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Modern smooth transition */
    cursor: pointer;
}

/* Hover Effect - Restored from Modern Version */
.product:hover {
    transform: translateY(-0.8vw) scale(1.02);
    /* The lift effect */
    box-shadow: 1vw 1vw 1.5vw rgba(0, 0, 0, 0.25);
    /* Stronger shadow on hover */
    z-index: 2;
}

.bijoux-image {
    width: 15vw;
    /* Start with 15vw (Desktop) -> allows ~5 per row */
    border-radius: 1.8vw;
    /* Matches container radius */
    display: block;
}

/* HTML: <div class="loader"></div> */
.loader {
    width: 7vw;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--section-bg-color);
    animation: l2 1.5s infinite;
}

.image-loader {
    width: 6vw;
}

/* Info Bubble */
#info-container {
    color: var(--primary-color);
    font-size: 13px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    transform-origin: center center;
    opacity: 0;
    transform: scale(0);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#info-container.show {
    animation: info-grow 0.4s cubic-bezier(0.4, 0.8, 0.2, 1) forwards;
    pointer-events: auto;
}

#info-container.hide {
    animation: info-shrink 0.3s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}

#info-bubble {
    padding: 3vh;
    flex-direction: column;
    background-color: var(--navbar-bg-color);
    width: calc(min(90vh, 90vw));
    border-radius: 2vw;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    /* Enhanced shadow */
    display: flex;
    align-items: center;
}

#info-img-container {
    height: calc(min(65vh, 65vw));
    width: calc(min(65vh, 65vw));
}

#info-img-container .loader {
    width: calc(min(15vh, 15vw));
}

#info-img-container .image-loader {
    width: calc(min(14vh, 14vw));
}

#info-image {
    width: calc(min(65vh, 65vw));
    border: 5px solid var(--navbar-sec-bg-color);
    border-radius: 1vw;
}

.info-text {
    border: 2px solid var(--navbar-sec-bg-color);
    border-radius: 50px;
    /* Modern pill shape */
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.5);
    /* Slight glass feel */
}

/* Info Buttons - Modern Style Restored */
#info-container a {
    color: var(--white-color);
    background-color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

#info-container a:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Animations */
@keyframes l2 {

    0%,
    100% {
        transform: translate(-35px);
        box-shadow: 0 0 var(--primary-color), 0 0 var(--secondary-color)
    }

    40% {
        transform: translate(35px);
        box-shadow: -3.5vw 0 var(--primary-color), -7vw 0 var(--secondary-color)
    }

    50% {
        transform: translate(35px);
        box-shadow: 0 0 var(--primary-color), 0 0 var(--secondary-color)
    }

    90% {
        transform: translate(-35px);
        box-shadow: 3.5vw 0 var(--primary-color), 7vw 0 var(--secondary-color)
    }
}

@keyframes info-grow {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes info-shrink {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1000px) {

    #info-img-container {
        height: calc(min(75vh, 75vw));
        width: calc(min(75vh, 75vw));
    }

    #info-img-container .loader {
        width: calc(min(30vh, 30vw));
    }

    #info-img-container .image-loader {
        width: calc(min(28vh, 28vw));
    }

    #info-image {
        width: calc(min(75vh, 75vw));
    }

    .bijoux-image {
        width: 24vw;
        /* Larger on tablet -> ~3 per row */
    }

    .product:hover {
        transform: translateY(-0.8vw) scale(1.02);
    }

    .product {
        margin: 2vw;
        padding: 0.5vw;
    }

    /* HTML: <div class="loader"></div> */
    .loader {
        width: 16vw;
    }

    .image-loader {
        width: 15vw;
    }

    #info-container {
        font-size: 11px;
    }

    @keyframes l2 {

        0%,
        100% {
            transform: translate(-35px);
            box-shadow: 0 0 var(--primary-color), 0 0 var(--secondary-color)
        }

        40% {
            transform: translate(35px);
            box-shadow: -8vw 0 var(--primary-color), -16vw 0 var(--secondary-color)
        }

        50% {
            transform: translate(35px);
            box-shadow: 0 0 var(--primary-color), 0 0 var(--secondary-color)
        }

        90% {
            transform: translate(-35px);
            box-shadow: 8vw 0 var(--primary-color), 16vw 0 var(--secondary-color)
        }
    }
}

@media (max-width: 1000px) and (orientation:landscape) {
    #info-bubble {
        padding: 3vw;
        flex-direction: row;
        height: calc(min(90vh, 90vw));
        width: auto;
        border-radius: 2vh;
    }

    #info-image {
        border-radius: 1vh;
    }
}

@media (max-width: 500px) {
    #info-image {
        border: 3px solid var(--navbar-sec-bg-color);
    }

    .bijoux-image {
        width: 36vw;
        /* ~2 per row */
    }

    .product {
        margin: 3vw;
        padding: 1vw;
    }

    /* Mobile fix: Equal height & Consistent rounding */
    #info-bubble .inv-align {
        align-items: stretch !important;
    }

    .info-text {
        border-radius: 18px;
        /* Slightly more round (was 10px) but not pill (50px) */
        padding: 5px 10px;
        font-size: 14px;
        height: auto;

        /* Flexbox for centering text inside */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    /* Make buttons match the info-text rounding on mobile */
    #info-container a {
        border-radius: 18px !important;
        /* Less round than desktop (50px) */
    }
}