/* ==========================================================================
   STICKY BOTTOM BAR - Synexta Woo Plugin
   Barre fixe en bas de page avec produit courant, derniers vus et CTA.
   Desktop : image principale (55px) + miniatures récentes (35px, grisées) + titre + bouton
   Mobile : image (40px) + bouton compact, pas de miniatures ni de titre
   ========================================================================== */

/* section 1 : Conteneur principal - barre fixe en bas, masquée par défaut via translateY, transition slide-up fluide au scroll */
.synexta-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #eaeaea;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.synexta-bottombar.is-visible {
    transform: translateY(0);
}

/* section 2 : Wrapper interne - flex horizontal centré, max-width pour les grands écrans */
.synexta-bb-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* section 3 : Bloc gauche - image produit principal + miniatures des derniers consultés (desktop) */
.synexta-bb-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.synexta-bb-main-thumb {
    width: 55px;
    height: 55px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    display: block;
    transition: opacity 0.3s ease;
}

.synexta-bb-main-thumb:hover {
    opacity: 0.8;
}

.synexta-bb-main-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.synexta-bb-recent {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.synexta-bb-recent-thumb {
    width: 35px;
    height: 35px;
    border-radius: 3px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    display: block;
    opacity: 0.5;
    filter: grayscale(40%);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

.synexta-bb-recent-thumb:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.08);
}

.synexta-bb-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* section 4 : Bloc central - titre du produit (h4) + catégorie (span), tronqués si trop longs */
.synexta-bb-info {
    flex: 1;
    min-width: 0;
    padding: 0 0.5rem;
}

.synexta-bb-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1e1e1e;
    font-family: var(--globalfont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.synexta-bb-info span {
    font-size: 0.75rem;
    color: #757575;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--globalfont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* section 5 : Bouton CTA - utilise les variables CSS du thème avec fallback sombres */
.synexta-bb-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: var(--primaire, #1e1e1e);
    color: var(--contrast, #ffffff);
    font-family: var(--globalfont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    border-radius: 0;
    flex-shrink: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.synexta-bb-cta:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: var(--contrast, #ffffff);
    text-decoration: none;
}

/* section 6 : Responsive - sur mobile (<=768px) on masque les miniatures récentes et le bloc info, la barre devient image + bouton compact */
@media (max-width: 768px) {
    .synexta-bb-content {
        padding: 0.6rem 1rem;
        gap: 0.8rem;
    }

    .synexta-bb-main-thumb {
        width: 40px;
        height: 40px;
    }

    .synexta-bb-recent {
        display: none;
    }

    .synexta-bb-info {
        display: none;
    }

    .synexta-bb-cta {
        font-size: 0.7rem;
        padding: 0.6rem 1rem;
        flex: 1;
        text-align: center;
    }
}
