/**
 * Website layout — règles statiques cacheables.
 *
 * Les valeurs vraiment dynamiques (URLs de bannière par tenant) restent en
 * inline dans layout.html.twig via une custom property `--banner-image`.
 */

.myshop-nav {
    position: sticky;
    top: 80px;
    z-index: 999;
    background: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

html { scroll-behavior: smooth; }

/* CLS fix : verrouille la hauteur des boutons panier.
   width:100% est déjà défini par le thème (style.css).
   white-space:nowrap évite que le changement de texte change la hauteur. */
.btn-add-cart {
    min-height: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown search filiale (desktop + mobile partagent ces règles). */
#filiale-search-dropdown,
#filiale-search-dropdown-mobile {
    display: none;
    position: absolute;
    z-index: 9999;
    width: 100%;
    margin-top: 6px;
}

.breadscrumb-section {
    background-image: var(--banner-image-desktop);
    background-size: cover;
    background-position: center center;
    background-color: #F2EFEA;
    min-height: 110px; /* CLS fix : évite le jump au chargement */
}

.breadscrumb-contain {
    text-align: center;
    display: block !important;
    margin-top: 10px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .breadscrumb-section {
        background-image: var(--banner-image-mobile);
        background-size: contain;
        background-position: 100% center;
        background-color: #F2EFEA;
        background-repeat: no-repeat;
        min-height: 90px; /* CLS fix mobile */
    }
    .breadscrumb-contain h2 {
        text-align: left;
    }
    .breadscrumb-contain p {
        display: none;
    }
    .breadscrumb-section .justify-content-center {
        -webkit-box-pack: start !important;
        -ms-flex-pack: start !important;
        justify-content: left !important;
    }
}

p {
    font-size: 16px;
}

/* CLS fix : footer mobile — masquer via CSS plutôt que via jQuery post-render.
   script.js cache ces éléments en JS après render → layout shift.
   Le CSS prend effet avant le paint → aucun shift. */
@media (max-width: 575px) {
    .footer-contact,
    .footer-contain {
        display: none;
    }
}

/* Toast feedback ajout panier (consommé par website-cart.js). */
.miamland-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    min-width: 280px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity .3s, transform .3s;
}
.miamland-toast.show { opacity: 1; transform: translateX(0); }
.miamland-toast.success { background: #0d6832; }
.miamland-toast.error   { background: #dc3545; }
