/* Sticky footer sulle pagine corte */
html {
    height: 100%;
}

body {
    min-height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cd-main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.cd-main-content > #footer {
    margin-top: auto;
}

/* HEADER: una sola riga allineata */
div#navbar.site-header {
    height: auto;
    min-height: 72px;
}

#navbar > .container > .header-bar {
    flex-wrap: nowrap;
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
}

#navbar .wrapper-logo {
    height: auto;
    width: 72px;
    flex: 0 0 72px;
    position: relative;
    align-self: center;
}

#navbar .wrapper-logo a {
    position: static;
    display: block;
    transform: none;
    top: auto;
    line-height: 0;
}

#navbar .wrapper-logo img {
    display: block;
    width: 72px;
    height: auto;
    max-width: none;
}

#navbar ul.navbar-menu {
    text-align: left;
    white-space: nowrap;
}

#navbar ul.navbar-menu li {
    padding: 0 8px;
    vertical-align: middle;
}

#wrapper-login {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    text-align: right;
    font-size: 0;
}

#wrapper-login .wrapper-user {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

#wrapper-login a.login {
    margin: 0;
}

#wrapper-login .btn-market-group {
    margin: 0;
}

#wrapper-login .btn-cart,
#wrapper-login .btn-circle {
    margin-left: 0;
}

#wrapper-login .wrapper-user {
    padding-left: 0;
    padding-right: 0;
}

#wrapper-login .wrapper-user {
    position: relative;
}

.wrapper-user .btn-user {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.wrapper-user:hover {
    background: none;
}

.user-menu-popover {
    --bs-popover-max-width: 320px;
    --bs-popover-border-color: #f0f0f0;
    --bs-popover-body-padding-x: 0;
    --bs-popover-body-padding-y: 0;
    --bs-popover-bg: #ffffff;
    --bs-popover-body-color: #000000;
    z-index: 1080;
    width: 320px;
    max-width: 320px;
    position: absolute !important;
    inset: auto 0 auto auto !important;
    top: calc(100% + 8px) !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    margin: 0 !important;
}

.user-menu-popover .popover-arrow {
    display: none;
}

.user-menu-popover .popover-body {
    padding: 0;
}

.user-menu-popover .user-menu-greeting {
    margin: 0;
    padding: 14px 16px;
    background-color: #F79C25;
    color: #000000;
    font-size: 15px;
    line-height: 1.3;
}

.user-menu-popover .user-menu-links,
.wrapper-user .user-menu-popover ul.user-menu-links {
    margin: 0;
    padding: 8px 0;
    line-height: 1.4;
    font-size: 14px;
}

.user-menu-popover .user-menu-links li,
.wrapper-user .user-menu-popover ul.user-menu-links li {
    display: block;
    margin: 0;
    padding: 0;
}

.user-menu-popover .user-menu-links a,
.wrapper-user .user-menu-popover ul.user-menu-links a {
    display: block;
    padding: 8px 16px;
    margin: 0;
    color: #000000;
    font-size: 14px;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    border: 0;
    border-bottom: 0;
}

.user-menu-popover .user-menu-links a:hover,
.user-menu-popover .user-menu-links a:focus,
.user-menu-popover .user-menu-links a.active,
.wrapper-user .user-menu-popover ul.user-menu-links a:hover,
.wrapper-user .user-menu-popover ul.user-menu-links a:focus,
.wrapper-user .user-menu-popover ul.user-menu-links a.active {
    background-color: #fff7ea;
    color: #000000;
    text-decoration: none;
    border: 0;
    border-bottom: 0;
    font-weight: 600;
}

#wrapper-mobile-login {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    text-align: right;
}

#wrapper-mobile-login .btn-market-group {
    margin: 0;
    min-width: 0;
}

#wrapper-mobile-login .btn-market {
    max-width: 42vw;
}

@media (max-width: 991px) {
    div#navbar,
    div#navbar.site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1052;
        min-height: 64px;
    }

    #navbar > .container > .header-bar {
        min-height: 64px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    #navbar .wrapper-logo {
        width: 56px;
        flex-basis: 56px;
    }

    #navbar .wrapper-logo img {
        width: 56px;
    }

    #home-banners,
    #intro-wrapper,
    .category-nav {
        margin-top: var(--site-header-height, 64px) !important;
    }

    body.shop-page {
        padding-top: var(--site-header-height, 64px);
    }

    #shop-aisles-nav {
        position: static;
        top: auto;
    }

    /* Menu mobile a tutto schermo, sopra l'header */
    #mobileMenu.offcanvas {
        top: 0;
        height: 100%;
        z-index: 1080;
    }

    body:has(#mobileMenu.show) .offcanvas-backdrop {
        top: 0;
        height: 100%;
        z-index: 1075;
    }
}

/* Barra contesto negozio sotto il menu */
.shop-context-bar {
    background-color: #F79C25;
    color: #000000;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-context-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.3;
}

.shop-context-store {
    margin: 0;
    color: #000000;
}

.shop-context-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

.shop-context-flyer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #000000;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.shop-context-flyer .fa {
    font-size: 18px;
}

.shop-context-flyer:hover,
.shop-context-flyer:focus {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.shop-context-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #000000;
    font-weight: 500;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.shop-context-change .fa {
    font-size: 14px;
    text-decoration: none;
}

.shop-context-change:hover,
.shop-context-change:focus {
    color: #000000;
    text-decoration: underline;
}

/* Shop online: CTA più evidente delle altre voci */
#navbar ul.navbar-menu li.nav-shop {
    padding: 0 4px;
}

#navbar ul.navbar-menu a.nav-shop-link,
#navbar .header-shop-mobile a.nav-shop-link {
    display: inline-block;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background-color: #F79C25;
    color: #000000;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

#navbar ul.navbar-menu a.nav-shop-link:hover,
#navbar ul.navbar-menu a.nav-shop-link:focus,
#navbar ul.navbar-menu li.nav-shop.active a.nav-shop-link,
#navbar .header-shop-mobile a.nav-shop-link:hover,
#navbar .header-shop-mobile a.nav-shop-link:focus,
#navbar .header-shop-mobile a.nav-shop-link.active {
    background-color: #e88d16;
    color: #000000;
    text-decoration: none;
    border-bottom-color: transparent;
}

#navbar .header-shop-mobile {
    display: flex;
    align-items: center;
    padding-left: 12px;
    margin-left: 4px;
}

#navbar .header-shop-mobile a.nav-shop-link {
    padding: 7px 12px;
    font-size: 13px;
    white-space: nowrap;
}

/* Menu mobile Bootstrap offcanvas */
#mobileMenu.offcanvas {
    --bs-offcanvas-width: min(320px, 88vw);
    --bs-offcanvas-bg: #ffffff;
    background-color: #ffffff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
}

#mobileMenu .offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#mobileMenu .offcanvas-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.mobile-offcanvas-nav a {
    display: block;
    margin: 0 -8px;
    padding: 12px 12px;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    border-bottom: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-offcanvas-nav a:hover,
.mobile-offcanvas-nav a:focus {
    color: #000000;
    text-decoration: none;
    background-color: #fff7ea;
}

.mobile-offcanvas-nav a:active {
    color: #000000;
    text-decoration: none;
    background-color: #F79C25;
}

.mobile-offcanvas-nav a.active {
    color: #000000;
    font-weight: 700;
    text-decoration: none;
    box-shadow: inset 3px 0 0 #F79C25;
}

.mobile-offcanvas-label {
    margin: 24px 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
}

button.btn-sandwich {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    margin-left: 10px;
}

button.btn-sandwich span {
    display: block;
    position: absolute;
    width: 50%;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: #000;
}

button.btn-sandwich span:before,
button.btn-sandwich span:after {
    content: "";
    height: 2px;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: #000;
}

button.btn-sandwich span:before {
    transform: translateY(5px);
}

button.btn-sandwich span:after {
    transform: translateY(-5px);
}

.aisle-sign-label {
    flex: 0 0 220px;
}

.aisle-sign-contents {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.aisle-sign-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.aisle-sign-body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 991px) {
    .aisle-directory {
        gap: 8px;
        margin-bottom: 24px;
    }

    .aisle-sign {
        flex-direction: row;
        align-items: center;
        min-height: 0;
        border-width: 1px;
    }

    .aisle-sign-label {
        flex: 0 0 38%;
        max-width: 150px;
        padding: 8px 10px;
        justify-content: center;
    }

    .aisle-sign-num {
        font-size: 10px;
        margin-bottom: 2px;
        letter-spacing: 0.04em;
    }

    .aisle-sign-title {
        font-size: 14px;
        line-height: 1.15;
    }

    .aisle-sign-contents {
        padding: 8px 10px;
        gap: 8px;
        min-width: 0;
    }

    .aisle-sign-icon {
        width: 32px;
        height: 32px;
    }

    .aisle-sign-body {
        gap: 2px;
    }

    .aisle-sign-items {
        font-size: 12px;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.shop-page-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.shop-page-icon {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-top: 4px;
}

.shop-page-heading-text {
    min-width: 0;
    flex: 1 1 auto;
}

.shop-page-heading-text h1 {
    margin-top: 0;
}

@media (max-width: 575px) {
    .shop-page-icon {
        width: 48px;
        height: 48px;
    }
}

.shop-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.shop-flex .shop-col-flex {
    margin-bottom: 1rem;
}

.shop-wrapper .shop-description {
    flex: 1 1 auto;
}

.supplier-back {
    margin: 0 0 16px;
}

.supplier-back .button,
.supplier-back .button:hover,
.supplier-back .button:focus {
    margin-bottom: 0;
    color: #000000;
    font-weight: 400;
    text-decoration: none;
}

#about-us.text-content h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 500;
    color: #000000;
    line-height: 1.15;
}

.shop-choose-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 999px;
    background-color: #F79C25;
    color: #000000;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
}

.shop-choose-btn:hover,
.shop-choose-btn:focus {
    background-color: #e88d16;
    color: #000000;
    text-decoration: none;
}

/* SELECT CART PESO PRODOTTO */
.cart-select-peso{
    border: 0;
    width: 100%;
    margin-top: 16px;
    border-bottom: solid 2px #F79C25;
    padding-top: 5px;
    padding-bottom: 5px;
    outline: 0;
}
.cart-select-peso:focus {
    background-color: rgba(247, 156, 37, 0.1);
}
@media (max-width: 991px) {
    .cart-select-peso {
        margin: 8px 0;
    }
}

/* GESTIONE PREFERITI */
.product a.icon-preferiti{
    position: absolute;
    top: 10px;
    right: 0;
    display: block;
    background: #fff;
    color: #d2d2d2;
    border: solid 1px #F79C25;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    z-index: 1;
    transform: translateX(-50%);
    box-shadow: 0 5px 10px rgb(210 210 210 / 50%);
    transition: all .3s ease;
}
.product a.icon-preferiti:hover,
.product a.icon-preferiti.active {
    background: #F79C25;
    color: #000000;
}