/* =====================================================================
   MiaSpesa — Redesign 2026
   Caricato DOPO main.min.css (tema legacy editato a mano): ne sovrascrive
   le regole globali e definisce i componenti nuovi con prefisso .ms-.
   Palette, tipografia e raggi vengono dal prototipo "MiaSpesa App".
   ===================================================================== */

:root {
    --ms-green: #2E8B3E;
    --ms-green-2: #3FA34D;
    --ms-green-dark: #277A36;
    --ms-green-mid: #4A9F57;
    --ms-green-soft: #E5F3E5;
    --ms-green-mint: #DDF1E0;
    --ms-green-pale: #E6F1E6;
    --ms-orange: #F39237;
    --ms-orange-ink: #2A1400;
    --ms-peach: #FFE7D1;
    --ms-peach-ink: #A54B07;
    --ms-red: #C2410C;
    --ms-heart: #E0483C;
    --ms-bg: #F5F4EF;
    --ms-bg-2: #EAE9E2;
    --ms-bg-3: #F0EFE8;
    --ms-line: #E4E3DB;
    --ms-card: #FFFFFF;
    --ms-ink: #15221A;
    --ms-ink-2: #3E4842;
    --ms-muted: #6B746E;
    --ms-muted-2: #8A928C;
    --ms-muted-3: #B4B9B5;
    --ms-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
    --ms-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ms-r-sm: 12px;
    --ms-r-md: 18px;
    --ms-r-lg: 22px;
    --ms-r-xl: 28px;
    --ms-r-2xl: 32px;
    --ms-shadow: 0 1px 0 var(--ms-line);
    --ms-shadow-pop: 0 14px 36px -12px rgba(46, 139, 62, .35);
    --ms-mobile-top: 103px; /* header mobile fisso: 56 + 47 */
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--ms-bg);
    color: var(--ms-ink);
    font-family: var(--ms-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--ms-display);
    color: var(--ms-ink);
    letter-spacing: -0.02em;
}
a { color: var(--ms-green); }
a:hover, a:focus { color: var(--ms-green-2); }
input, button, select, textarea { font-family: inherit; }
::selection { background: var(--ms-green-mint); }
:focus-visible { outline: 2px solid var(--ms-green-2); outline-offset: 2px; }

/* ---------- Tipografia di servizio ---------- */
.ms-h1 { margin: 0; font-family: var(--ms-display); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.ms-h2 { margin: 0; font-family: var(--ms-display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ms-h3 { margin: 18px 0 10px; font-family: var(--ms-display); font-size: 17px; font-weight: 600; }
.ms-kicker { display: block; font-size: 12px; font-weight: 700; color: var(--ms-muted-2); letter-spacing: .06em; text-transform: uppercase; }
.ms-kicker--light { color: var(--ms-green-mint); }
.ms-muted-sm { font-size: 12px; color: var(--ms-muted-2); }
.ms-price { font-family: var(--ms-display); font-weight: 700; letter-spacing: -0.02em; font-size: 18px; color: var(--ms-ink); white-space: nowrap; }
.ms-price--xl { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ms-link { font-size: 13px; font-weight: 700; color: var(--ms-green-2); }
.ms-link:hover { color: var(--ms-green); text-decoration: none; }
.ms-link--danger { color: var(--ms-red); }
.ms-hl { color: var(--ms-green); }
.ms-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.ms-dot--light { background: #D8F5DC; }
.ms-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }

/* ---------- Bottoni, pill, chip ---------- */
.ms-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px;
    border: 0; border-radius: 14px;
    font-family: var(--ms-body); font-size: 14px; font-weight: 800; line-height: 1;
    text-decoration: none !important; cursor: pointer; white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.ms-btn:active { transform: scale(.98); }
.ms-btn--sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 13px; }
.ms-btn--lg { height: 56px; padding: 0 22px; font-size: 15px; border-radius: 20px; }
.ms-btn--primary { background: var(--ms-green); color: #fff !important; }
.ms-btn--primary:hover { background: var(--ms-green-dark); color: #fff; }
.ms-btn--accent { background: var(--ms-orange); color: var(--ms-orange-ink) !important; }
.ms-btn--accent:hover { background: #E8842A; }
.ms-btn--soft { background: var(--ms-green-soft); color: var(--ms-green) !important; }
.ms-btn--soft:hover { background: #D6ECD7; }
.ms-btn--ghost { background: #fff; color: var(--ms-ink) !important; box-shadow: inset 0 0 0 1px var(--ms-line); }
.ms-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ms-green-2); }
.ms-btn--outline { background: transparent; color: var(--ms-green) !important; box-shadow: inset 0 0 0 1.5px var(--ms-green); width: 100%; }
.ms-accent-arrow { color: var(--ms-orange); font-size: 18px; }

.ms-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ms-pill--deal { background: var(--ms-peach); color: var(--ms-peach-ink); }
.ms-pill--accent { background: var(--ms-orange); color: var(--ms-orange-ink); }
.ms-pill--green { background: var(--ms-green); color: #fff; }
.ms-tag { display: inline-block; background: var(--ms-green); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; letter-spacing: .02em; vertical-align: middle; }

.ms-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ms-chips::-webkit-scrollbar { display: none; }
.ms-chips--wrap { flex-wrap: wrap; overflow: visible; }
.ms-chip {
    display: inline-flex; align-items: center; flex: none;
    height: 36px; padding: 0 14px; border-radius: 999px;
    background: #fff; border: 1px solid var(--ms-line);
    font-size: 13px; font-weight: 600; color: var(--ms-ink) !important;
    text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.ms-chip:hover { border-color: var(--ms-green-2); }
.ms-chip.is-active { background: var(--ms-green); border-color: var(--ms-green); color: #fff !important; font-weight: 700; cursor: default; }
.ms-chip--static { cursor: default; height: 30px; font-size: 12px; color: var(--ms-muted) !important; }
.ms-chip--static:hover { border-color: var(--ms-line); }

.ms-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 16px; border: 0;
    background: #fff; color: var(--ms-ink) !important; cursor: pointer;
    box-shadow: 0 1px 2px rgba(21, 34, 26, .06);
}
.ms-icon-btn:hover { color: var(--ms-green) !important; }

.ms-panel { background: var(--ms-card); border-radius: 26px; padding: 18px; }
.ms-note { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 12px 14px; border-radius: 16px; background: #fff; font-size: 13px; color: var(--ms-muted); }
.ms-note--soft { background: transparent; padding: 4px 4px 0; margin: 4px 0 14px; font-size: 12px; color: var(--ms-muted-2); }
.ms-note--warn { background: #FDECEC; color: #B42323; }

/* Stepper quantita' */
.ms-stepper { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 18px; background: #fff; flex: none; }
.ms-stepper__btn {
    width: 40px; height: 44px; border: 0; border-radius: 14px;
    background: var(--ms-bg-3); color: var(--ms-ink);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.ms-stepper__btn:hover { background: var(--ms-green-soft); color: var(--ms-green); }
.ms-stepper__val, .ms-stepper__input { width: 30px; text-align: center; font-weight: 800; font-size: 16px; }
.ms-stepper__input { border: 0; background: transparent; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.ms-stepper__input::-webkit-outer-spin-button, .ms-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ms-stepper--sm { background: var(--ms-bg); border-radius: 13px; padding: 3px; }
.ms-stepper--sm .ms-stepper__btn { width: 30px; height: 30px; border-radius: 10px; background: #fff; font-size: 16px; }
.ms-stepper--sm .ms-stepper__input { width: 26px; font-size: 14px; }

/* Interruttore */
.ms-switch { width: 48px; height: 28px; border-radius: 14px; background: #D6D8D3; padding: 3px; display: flex; flex: none; transition: background-color .15s; }
.ms-switch > span { width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ms-switch.is-on { background: var(--ms-green-2); }
.ms-switch.is-on > span { transform: translateX(20px); }
.ms-toggle-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--ms-bg-3); text-align: left; cursor: pointer; }
.ms-toggle-row__title { display: block; font-size: 14px; font-weight: 700; color: var(--ms-ink); }

/* Avatar supermercato */
.ms-store-av {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 34px; height: 34px; border-radius: 11px; overflow: hidden;
    background: #fff; box-shadow: inset 0 0 0 1px var(--ms-line);
    font-size: 11px; font-weight: 800; color: var(--ms-green);
}
.ms-store-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-store-av--wide img { object-fit: contain; padding: 4px; }
.ms-store-av--xs { width: 22px; height: 22px; border-radius: 50%; font-size: 7px; }
.ms-store-av--sm { width: 28px; height: 28px; border-radius: 50%; font-size: 9px; box-shadow: 0 0 0 2px #fff; }
.ms-store-av--md { width: 38px; height: 38px; border-radius: 12px; }
.ms-store-av--lg { width: 48px; height: 48px; border-radius: 16px; font-size: 13px; }

/* ---------- Brand ---------- */
.ms-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ms-ink); text-decoration: none; }
.ms-brand__mark { width: 36px; height: 36px; border-radius: 12px; background: var(--ms-green); color: #D8F5DC; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ms-brand__mark svg { width: 20px; height: 20px; }
.ms-brand__name { font-family: var(--ms-display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1; color: var(--ms-ink); }
.ms-brand__tld { color: var(--ms-green-2); }
.ms-brand--sm { gap: 8px; }
.ms-brand--sm .ms-brand__mark { width: 30px; height: 30px; border-radius: 10px; }
.ms-brand--sm .ms-brand__mark svg { width: 17px; height: 17px; }
.ms-brand--sm .ms-brand__name { font-size: 20px; }
.ms-brand--lg .ms-brand__name { font-size: 26px; color: #fff; }

/* =====================================================================
   HEADER
   ===================================================================== */
header { background: var(--ms-bg); }
header .header-desktop { padding: 0; }
header .header-desktop .top-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0 14px; }
header .header-desktop .top-bar::before, header .header-desktop .top-bar::after { display: none; }
header .header-desktop .pull-left { float: none !important; display: flex; align-items: center; gap: 28px; flex: 1; min-width: 0; }
header .header-desktop .pull-right { float: none !important; }
header .header-desktop .logo { display: inline-flex; padding: 0; margin: 0; text-decoration: none !important; flex: none; }

/* Ricerca desktop */
header .fast-search {
    position: relative; display: flex; align-items: center; gap: 10px;
    flex: 1; max-width: 560px; height: 52px; margin: 0; padding: 0 6px 0 16px;
    border-radius: 18px; background: #fff; box-shadow: var(--ms-shadow);
    border: 1.5px solid transparent; transition: border-color .15s;
}
header .fast-search:focus-within { border-color: var(--ms-green); }
header .fast-search .ms-ico { color: var(--ms-ink); flex: none; }
header .fast-search .keyword {
    flex: 1; width: auto !important; height: 100%; min-width: 0;
    border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important;
    padding: 0 !important; margin: 0 !important; font-size: 15px; color: var(--ms-ink);
}
header .fast-search .keyword::placeholder { color: var(--ms-muted-2); }
header .fast-search .pline-magnifier { display: none; }
header .fast-search .submit-form.btn {
    position: static; float: none; height: 40px; margin: 0; padding: 0 16px;
    border: 0; border-radius: 13px; background: var(--ms-green); color: #fff;
    font-size: 14px; font-weight: 800; line-height: 40px; box-shadow: none;
}
header .fast-search .submit-form.btn:hover { background: var(--ms-green-dark); }
header .fast-search .keyword_suggest_stores { top: calc(100% + 6px); left: 0; right: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px -14px rgba(0,0,0,.25); }

/* Link account / carrello */
header .account-list { display: flex; align-items: center; gap: 6px; margin: 0; }
header .account-list > li { padding: 0; margin: 0; }
header .account-list > li > a {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 14px; border-radius: 14px;
    color: var(--ms-ink); font-size: 14px; font-weight: 700; text-decoration: none;
}
header .account-list > li > a:hover { background: #fff; color: var(--ms-green); }
header .account-list > li.cart-items > a { background: var(--ms-green); color: #fff; padding-right: 16px; }
header .account-list > li.cart-items > a:hover { background: var(--ms-green-dark); color: #fff; }
header .account-list .pline-bag { display: none; }
header .count-items,
header .cart-qty-badge,
.ms-bottom-nav .cart-qty-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: var(--ms-orange); color: var(--ms-orange-ink);
    font-size: 11px; font-weight: 800; line-height: 1; position: static;
}
header .account-list .count-items { order: 3; }
header .no-cart-items, .ms-bottom-nav .no-cart-items { display: none !important; }

/* Barra di navigazione desktop */
.navigation { padding: 0 !important; border: 0 !important; box-shadow: none !important; background: var(--ms-bg); }
.navigation.sticky-nav { background: rgba(245, 244, 239, .94); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 1px 0 var(--ms-line) !important; }
.navigation .navbar .small-device-wrapper > ul { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 0 14px; }
.navigation .navbar .small-device-wrapper > ul li { margin: 0 !important; }
.navigation .navbar .small-device-wrapper > ul > li > a {
    display: inline-flex !important; align-items: center; gap: 6px;
    height: 38px; padding: 0 14px !important; border-radius: 999px;
    font-size: 14px; font-weight: 700 !important; color: var(--ms-ink) !important;
    background: transparent;
}
.navigation .navbar .small-device-wrapper > ul > li > a:hover,
.navigation .navbar .small-device-wrapper > ul > li.open > a { background: #fff !important; color: var(--ms-green) !important; }
.navigation .navbar .small-device-wrapper > ul > li > a::after,
.navigation .navbar .small-device-wrapper > ul > li > a::before { display: none !important; }
.navigation .navbar .small-device-wrapper > ul li .dropdown-menu.ms-mega { border-radius: 22px !important; padding: 12px !important; box-shadow: 0 24px 50px -20px rgba(21, 34, 26, .35) !important; top: calc(100% - 6px); }
.navigation .navbar .small-device-wrapper > ul li .dropdown-menu.ms-mega > li > a { border-radius: 14px !important; font-weight: 600 !important; color: var(--ms-ink) !important; }
.navigation .navbar .small-device-wrapper > ul li .dropdown-menu.ms-mega > li > a:hover { background: var(--ms-green-soft) !important; color: var(--ms-green) !important; }
.navigation .navbar-nav .ms-mega-ico { border-radius: 12px !important; background: var(--ms-bg) !important; }
.navigation .navbar .small-device-wrapper > ul li .dropdown-menu.ms-mega > li.ms-mega-all > a { color: var(--ms-green-2) !important; }
.navigation .navbar .small-device-wrapper > ul li .dropdown-menu:not(.ms-mega) { border-radius: 16px; border: 0; box-shadow: 0 18px 40px -16px rgba(21, 34, 26, .3); padding: 8px; background: #fff; }
.navigation .navbar .small-device-wrapper > ul li .dropdown-menu:not(.ms-mega) > li > a { border-radius: 10px; padding: 9px 12px; color: var(--ms-ink); font-weight: 600; }
.main-home header .navigation { display: block; }

/* Header mobile */
@media (max-width: 800px) {
    header .header-primary-nav-mobile { background: var(--ms-bg) !important; box-shadow: none; }
    header .header-primary-nav-mobile .primary-nav-mobile-menu-btn .ms-mobile-menu-btn { display: inline-flex !important; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0 !important; line-height: 1 !important; border-radius: 14px; color: var(--ms-ink) !important; }
    header .header-primary-nav-mobile .primary-nav-mobile-logo a { text-decoration: none; }
    header .header-primary-nav-mobile .primary-nav-mobile-cart-btn { text-align: center; vertical-align: middle; }
    header .header-primary-nav-mobile .primary-nav-mobile-cart-btn a { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; color: var(--ms-ink); }
    header .header-primary-nav-mobile .primary-nav-mobile-cart-btn .cart-qty-badge { position: absolute; top: 2px; right: -2px; }
    header .header-primary-nav-mobile .ic-icon.pline-bag { display: none; }

    header .header-secondary-nav-mobile { background: var(--ms-bg) !important; border: 0 !important; padding: 0 14px; transition: box-shadow .2s; }
    body.ms-scrolled header .header-secondary-nav-mobile { box-shadow: 0 10px 18px -16px rgba(21, 34, 26, .5); }
    header .header-secondary-nav-mobile .home-search-form { margin: 0; }
    header .header-secondary-nav-mobile .search-input-wrapper {
        display: flex; align-items: center; gap: 10px;
        height: 42px; margin: 0; padding: 0 4px 0 14px;
        background: #fff; border-radius: 15px; box-shadow: var(--ms-shadow);
        border: 1.5px solid transparent;
    }
    header .header-secondary-nav-mobile .search-input-wrapper:focus-within { border-color: var(--ms-green); }
    header .header-secondary-nav-mobile .search-input-wrapper .ms-ico { color: var(--ms-ink); flex: none; }
    header .header-secondary-nav-mobile .keyword {
        flex: 1; width: auto !important; min-width: 0; height: 100%;
        margin: 0 !important; padding: 0 !important; border: 0 !important; outline: 0;
        background: transparent !important; box-shadow: none !important;
        font-size: 15px !important; color: var(--ms-ink);
    }
    header .header-secondary-nav-mobile .submit-form.btn {
        display: inline-flex; align-items: center; justify-content: center;
        width: 34px !important; height: 34px; margin: 0 !important; padding: 0 !important;
        border: 0; border-radius: 11px !important; background: var(--ms-green-soft) !important; color: var(--ms-green) !important;
    }

    /* Drawer */
    header .navigation .navbar#ms-mobile-drawer { background: var(--ms-bg); border-radius: 0 28px 28px 0; }
    header .navigation .navbar#ms-mobile-drawer .navbar-nav > li { border-bottom: 0 !important; padding: 0 12px; }
    header .navigation .navbar#ms-mobile-drawer .navbar-nav > li > a { display: flex !important; height: auto; padding: 14px 14px !important; border-radius: 16px; font-weight: 700 !important; font-size: 16px; }
    header .navigation .navbar#ms-mobile-drawer .navbar-nav > li > a:hover { background: #fff !important; }
    header .navigation .navbar#ms-mobile-drawer .navbar-nav .dropdown-menu { background: transparent !important; }
    header .navigation .navbar#ms-mobile-drawer .ms-drawer-close { background: #fff; border-radius: 14px; }
}

/* ---------- Bottom nav (mobile) ---------- */
.ms-bottom-nav { display: none; }
@media (max-width: 800px) {
    .ms-bottom-nav {
        position: fixed; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 1030;
        display: flex; align-items: center; justify-content: space-between;
        height: 66px; padding: 0 9px; border-radius: 24px;
        background: #fff; box-shadow: var(--ms-shadow-pop), 0 0 0 1px rgba(21, 34, 26, .04);
    }
    .ms-bottom-nav__item {
        position: relative; display: inline-flex; align-items: center; justify-content: center;
        width: 50px; height: 50px; border-radius: 17px; color: #7E8781 !important;
        transition: background-color .15s, color .15s;
    }
    .ms-bottom-nav__item.is-active { background: var(--ms-green); color: #fff !important; }
    .ms-bottom-nav .cart-qty-badge { position: absolute; top: 5px; right: 3px; }
    body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
    body.ms-has-buybar .ms-bottom-nav { display: none; }
    body.ms-menu-open .ms-bottom-nav { display: none; }
}

/* ---------- Toast ---------- */
.ms-toast {
    position: fixed; left: 50%; top: 18px; z-index: 2000;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    width: min(440px, calc(100% - 28px)); padding: 14px 16px; border-radius: 18px;
    background: var(--ms-green); color: #fff; font-size: 14px; font-weight: 700;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .4);
    transform: translate(-50%, -140%); opacity: 0; pointer-events: none;
    transition: transform .28s cubic-bezier(.2, .9, .3, 1.2), opacity .2s;
}
.ms-toast.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.ms-toast__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-toast__link { color: var(--ms-orange) !important; white-space: nowrap; text-decoration: none !important; }
@media (max-width: 800px) { .ms-toast { top: calc(var(--ms-mobile-top) + 8px); } }

/* =====================================================================
   HOME
   ===================================================================== */
.main-home .home-page-body { margin-top: 8px; }
.ms-hero { padding: 6px 0 4px; }

.ms-hero__card {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: stretch;
    padding: 36px; border-radius: 36px; background: var(--ms-green); color: #fff;
}
.ms-hero__card::after {
    content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.10), rgba(255,255,255,0)); pointer-events: none;
}
.ms-hero__copy { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.ms-hero__title { margin: 0; font-family: var(--ms-display); font-size: 46px; font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; color: #fff; text-wrap: balance; }
.ms-hero__sub { margin: 0; max-width: 46ch; font-size: 16px; line-height: 1.5; color: #E6F5E8; text-wrap: pretty; }
.ms-hero__search {
    display: flex; align-items: center; gap: 10px; margin-top: 8px;
    height: 58px; padding: 0 7px 0 18px; border-radius: 20px; background: #fff; color: var(--ms-ink);
    max-width: 560px;
}
.ms-hero__search .keyword { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ms-ink); }
.ms-hero__search .keyword::placeholder { color: var(--ms-muted-2); }
.ms-hero__search .ms-btn { height: 44px; }
.ms-hero__cta { align-self: flex-start; font-size: 14px; font-weight: 800; color: #fff !important; text-decoration: none !important; opacity: .92; }
.ms-hero__cta:hover { opacity: 1; }
.ms-hero__visual { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px; border-radius: 28px; background: rgba(255, 255, 255, .08); }
.ms-hero__badge { position: absolute; top: -10px; right: 14px; background: var(--ms-orange); color: var(--ms-orange-ink); font-size: 13px; font-weight: 800; padding: 7px 13px; border-radius: 999px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.4); }
.ms-hero__stores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ms-hero__stores li { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-radius: 18px; background: var(--ms-green-mid); }
.ms-hero__stores li:first-child { background: var(--ms-bg); }
.ms-hero__stores li:first-child .ms-hero__store-name, .ms-hero__stores li:first-child .ms-hero__store-check { color: var(--ms-green); }
.ms-hero__store-name { flex: 1; font-size: 14px; font-weight: 700; color: #fff; }
.ms-hero__store-check { font-family: var(--ms-display); font-size: 18px; font-weight: 700; color: #fff; }
.ms-hero__more { font-size: 13px; font-weight: 700; color: var(--ms-green-mint); padding-left: 4px; }

.ms-home-cats { padding: 22px 0 6px; }
.ms-scroller { display: flex; gap: 10px; overflow-x: auto; padding: 0 max(15px, calc((100vw - 1170px) / 2 + 15px)) 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.ms-scroller::-webkit-scrollbar { display: none; }
.ms-cat-tile { flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none !important; scroll-snap-align: start; }
.ms-cat-tile__ico { width: 76px; height: 76px; border-radius: 24px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: var(--ms-shadow); transition: transform .15s, box-shadow .15s; }
.ms-cat-tile:hover .ms-cat-tile__ico { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(46, 139, 62, .45); }
.ms-cat-tile__name { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.2; color: var(--ms-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 800px) {
    .ms-hero .container { padding: 0 14px; }
    .ms-hero__card { grid-template-columns: 1fr; padding: 22px; border-radius: 30px; gap: 18px; }
    .ms-hero__title { font-size: 32px; }
    .ms-hero__sub { font-size: 15px; }
    .ms-hero__search { height: 54px; }
    .ms-hero__search .ms-btn { display: none; }
    .ms-hero__visual { padding: 0; background: transparent; }
    .ms-hero__badge { top: -36px; }
    .ms-hero__stores li { height: 48px; }
    .ms-cat-tile { width: 84px; }
    .ms-cat-tile__ico { width: 70px; height: 70px; font-size: 28px; }
}

/* Card risparmio (pronta) */
.ms-savings { margin-top: 14px; border-radius: 28px; background: var(--ms-green); color: #fff; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.ms-savings__top { display: flex; justify-content: space-between; align-items: flex-start; }
.ms-savings__label { font-size: 12px; color: var(--ms-green-mint); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ms-savings__amount { font-family: var(--ms-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ms-savings__pct { background: var(--ms-green-mid); color: #F1FAF2; font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 999px; }
.ms-savings__bars { display: flex; align-items: flex-end; gap: 6px; height: 44px; }
.ms-savings__bars span { flex: 1; border-radius: 6px; background: #62B06D; }
.ms-savings__bars span.is-now { background: var(--ms-orange); }
.ms-savings__foot { font-size: 13px; color: #E6F5E8; }

/* =====================================================================
   LISTING / GRIGLIA PRODOTTI
   ===================================================================== */
.home-page-body .page-content { background: transparent; }
.ms-pg-title { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 18px !important; padding: 0 !important; background: transparent !important; border: 0 !important; }
.ms-pg-title .title-box { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; padding: 0 !important; background: transparent !important; }
.ms-pg-title h1 { margin: 0 !important; font-family: var(--ms-display); font-size: 26px !important; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--ms-ink) !important; text-transform: none !important; }
.ms-pg-title__count { font-size: 13px; color: var(--ms-muted-2); font-weight: 600; }
.ms-sort { display: flex; align-items: center; gap: 12px; float: none !important; position: static !important; margin: 0 !important; padding: 0 !important; min-width: 0; }
.ms-sort__label { font-size: 13px; font-weight: 700; color: var(--ms-muted); flex: none; }
@media (max-width: 800px) {
    .ms-sort__label { display: none; }
    .ms-pg-title h1 { font-size: 22px !important; }
}

.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0 0 24px !important; }
.ms-grid::before, .ms-grid::after { display: none !important; }
.ms-grid__item { float: none !important; width: auto !important; padding: 0 !important; min-width: 0; }
.ms-grid__full { grid-column: 1 / -1; }
@media (max-width: 800px) {
    .ms-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* Card prodotto */
.ms-card {
    position: relative; height: 100%;
    display: flex; flex-direction: column; gap: 10px;
    padding: 10px; border-radius: 24px; background: var(--ms-card);
    transition: box-shadow .18s ease, transform .18s ease;
}
.ms-card:hover { box-shadow: 0 18px 34px -22px rgba(21, 34, 26, .45); }
.ms-card__media {
    position: relative; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1 / 1; border-radius: 18px; background: #fff; overflow: hidden;
}
.ms-card__media img { width: 86%; height: 86%; object-fit: contain; transition: transform .25s ease; }
.ms-card:hover .ms-card__media img { transform: scale(1.04); }
.ms-card__badge { position: absolute; top: 8px; left: 8px; }
.ms-card__promo { position: absolute; left: 8px; bottom: 8px; right: 8px; padding: 4px 8px; border-radius: 10px; background: rgba(21, 34, 26, .78); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.ms-card__fav {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ms-ink); cursor: pointer;
    box-shadow: 0 2px 8px -2px rgba(21, 34, 26, .25);
}
.ms-card__fav i { font-size: 15px; line-height: 1; }
.ms-card__fav .fa-heart, .ms-pdp__fav .fa-heart { color: var(--ms-heart); }
.ms-card__body { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.ms-card__title { margin: 0; font-family: var(--ms-body); font-size: 14px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.ms-card__title a { color: var(--ms-ink) !important; text-decoration: none !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.ms-card__title a:hover { color: var(--ms-green) !important; }
.ms-card__meta { font-size: 12px; color: var(--ms-muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-card__price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 0 4px; margin-top: auto; }
.ms-card__price { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ms-card__price del { font-size: 11px; color: var(--ms-muted-2); }
.ms-card__price-label { font-size: 11px; font-weight: 700; color: var(--ms-green-2); }
.ms-card__price strong { font-family: var(--ms-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ms-ink); }
.ms-card__store { display: inline-flex; text-decoration: none !important; }
.ms-card__actions { display: flex; gap: 6px; }
.ms-card__cmp { flex: 1; height: 38px; border-radius: 12px; font-size: 13px; }
.ms-card__add-wrap { margin: 0 !important; padding: 0 !important; float: none !important; width: auto !important; }
.ms-card__add-wrap .view-cart { display: none !important; }
.ms-card__add {
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--ms-green); color: #fff !important; text-decoration: none !important;
    transition: background-color .15s, transform .1s;
}
.ms-card__add:hover { background: var(--ms-green-dark); }
.ms-card__add:active { transform: scale(.94); }
.ms-card__add.disabled { opacity: .6; pointer-events: none; }
.ms-card__add.in-cart { background: var(--ms-orange); color: var(--ms-orange-ink) !important; }
@media (max-width: 800px) {
    .ms-card { padding: 8px; border-radius: 22px; gap: 8px; }
    .ms-card__fav { top: 13px; right: 13px; width: 30px; height: 30px; }
    .ms-card__price strong { font-size: 18px; }
    .ms-card__cmp { font-size: 12px; padding: 0 8px; gap: 4px; }
}

/* Sidebar del listing */
.home-page-body .col-md-3 .widget,
.home-page-body .col-md-3 .white-block {
    border: 0 !important; border-radius: 22px !important; background: #fff !important; box-shadow: none !important;
    padding: 16px !important; margin-bottom: 14px;
}
.home-page-body .widget .widget-title { padding: 0 0 10px !important; margin: 0 0 6px !important; border: 0 !important; background: transparent !important; display: flex; align-items: baseline; justify-content: space-between; }
.home-page-body .widget .widget-title::before, .home-page-body .widget .widget-title::after { display: none !important; }
.home-page-body .widget .widget-title h2, .home-page-body .widget .widget-title h3, .home-page-body .widget .widget-title h5 { margin: 0; font-family: var(--ms-display); font-size: 17px !important; font-weight: 600; color: var(--ms-ink); text-transform: none; letter-spacing: -0.01em; }
.home-page-body .widget .reset a { font-size: 12px; font-weight: 700; color: var(--ms-green-2); }
.offer-cat-filter { margin: 0; }
.offer-cat-filter li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 !important; margin: 0 !important; border: 0 !important; }
.offer-cat-filter li a { flex: 1; display: block; padding: 7px 10px; border-radius: 10px; color: var(--ms-ink) !important; font-size: 14px; font-weight: 600; text-decoration: none !important; }
.offer-cat-filter li a:hover { background: var(--ms-bg); color: var(--ms-green) !important; }
.offer-cat-filter li a.current { background: var(--ms-green-soft); color: var(--ms-green) !important; }
.offer-cat-filter li .count { font-size: 12px; color: var(--ms-muted-2); padding-right: 6px; }
.current-store #change_store { cursor: pointer; font-weight: 700; color: var(--ms-green); }

/* Breadcrumbs */
.bc-box { background: transparent !important; padding: 0 !important; margin-bottom: 10px; }
.bc-box .breadcrumbs, .bc-box .breadcrumbs a { font-size: 13px; font-weight: 600; color: var(--ms-muted) !important; }
.bc-box .breadcrumbs a:hover { color: var(--ms-green) !important; }
.bc-box .breadcrumbs span { color: var(--ms-ink) !important; }
.ms-crumbs .bc-box { margin: 0 0 12px !important; }
.ms-crumbs .go-back { display: none; }

/* Paginazione */
.pagination-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0 30px; }
.pagination-wrap .pagination { display: flex; gap: 6px; margin: 0; }
.pagination-wrap .pagination > li > a, .pagination-wrap .pagination > li > span {
    float: none; display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 16px; margin: 0;
    border: 0 !important; border-radius: 14px !important; background: #fff; color: var(--ms-ink); font-weight: 700;
}
.pagination-wrap .pagination > li > a:hover { background: var(--ms-green-soft); color: var(--ms-green); }
.pagination-wrap .pagination > li.active > a { background: var(--ms-green) !important; color: #fff !important; }
.pagination-wrap .pagination > li.page-numbers strong { font-weight: 800; }
.pagination-info { font-size: 13px; color: var(--ms-muted-2); }

/* =====================================================================
   LAYOUT A UNA COLONNA (PDP, carrello)
   ===================================================================== */
.ms-main { padding: 6px 0 40px; }
@media (max-width: 800px) {
    .ms-main { padding-top: 6px; }
    .ms-main > .container { padding: 0 14px; }
}

/* =====================================================================
   SCHEDA PRODOTTO
   ===================================================================== */
.ms-pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ms-pdp__main, .ms-pdp__aside { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ms-pdp__aside { position: relative; }

.ms-pdp__gallery { position: relative; border-radius: var(--ms-r-2xl); background: #fff; overflow: hidden; min-height: 0 !important; }
.ms-pdp__gallery .deal-img-slider { margin: 0; padding: 0; }
.ms-pdp__gallery .deal-img-slider li { display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 4; padding: 28px; }
.ms-pdp__gallery .deal-img-slider:not(.owl-loaded) li + li { display: none; }
.ms-pdp__gallery .deal-img-slider img { width: 100% !important; height: 100% !important; object-fit: contain; }
.ms-pdp__gallery .owl-nav { position: absolute; left: 12px; right: 12px; top: 50%; display: flex; justify-content: space-between; pointer-events: none; transform: translateY(-50%); }
.ms-pdp__gallery .owl-nav button, .ms-pdp__gallery .owl-nav > div { pointer-events: auto; width: 40px; height: 40px; border-radius: 14px !important; background: var(--ms-bg) !important; color: var(--ms-ink) !important; display: inline-flex !important; align-items: center; justify-content: center; font-size: 18px; }
.ms-pdp__gallery .owl-nav .disabled { opacity: .35; }
.ms-pdp__back { position: absolute; top: 14px; left: 14px; z-index: 3; background: var(--ms-bg); }
.ms-pdp__fav { position: absolute; top: 14px; right: 14px; z-index: 3; background: var(--ms-bg); }
.ms-pdp__fav i { font-size: 18px; }
.ms-pdp__flag {
    position: absolute; left: 14px; bottom: 14px; z-index: 3;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 999px;
    background: var(--ms-orange); color: var(--ms-orange-ink); font-size: 12px; font-weight: 800;
}
.ms-pdp__flag--low { background: var(--ms-green); color: #fff; left: auto; right: 14px; }
.ms-pdp__thumbs { margin-top: 10px; }
.ms-pdp__thumbs a { display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 4; border-radius: 16px; background: #fff; padding: 8px; }
.ms-pdp__thumbs img { width: 100% !important; height: 100% !important; object-fit: contain; }
.ms-pdp__thumbs:not(.owl-loaded) { display: flex; gap: 10px; }
.ms-pdp__thumbs:not(.owl-loaded) > div { width: 90px; }

.ms-pdp__head { display: flex; flex-direction: column; gap: 6px; }
.ms-pdp__title { margin: 0; font-family: var(--ms-display); font-size: 32px; font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; color: var(--ms-ink); text-wrap: balance; }
.ms-pdp__social { font-size: 13px; color: var(--ms-muted); }
.ms-pdp__social strong { color: var(--ms-ink); }

.ms-pdp__summary { display: flex; flex-direction: column; gap: 16px; }
.ms-pdp__summary-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ms-pdp__summary-label { font-size: 12px; font-weight: 700; color: var(--ms-green-2); margin-bottom: 4px; }
.ms-pdp__summary-from { margin-top: 6px; font-size: 13px; color: var(--ms-muted); }
.ms-pdp__summary-from b { color: var(--ms-ink); }
.ms-pdp__summary-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.ms-pdp__summary-side .ms-pill { height: 30px; font-size: 13px; padding: 0 11px; }

.ms-range { display: flex; flex-direction: column; gap: 8px; }
.ms-range__track { position: relative; height: 28px; }
.ms-range__track::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--ms-green-2), var(--ms-line) 45%, var(--ms-orange)); }
.ms-range__dot { position: absolute; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #9AA39D; border: 3px solid #fff; box-shadow: 0 0 0 1px #DCDBD3; }
.ms-range__dot.is-best { top: 3px; width: 22px; height: 22px; margin-left: -11px; background: var(--ms-green); }
.ms-range__legend { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--ms-muted-2); }

.ms-pdp__cta-desktop { padding-top: 14px; border-top: 1px solid var(--ms-bg-3); display: flex; flex-direction: column; gap: 10px; }
.ms-buy { display: flex; align-items: center; gap: 10px; }
.ms-buy .ms-stepper { background: var(--ms-bg); }
.ms-buy .ms-stepper__btn { background: #fff; }
.ms-add-qty { flex: 1; justify-content: space-between; }
.ms-add-qty__total { color: var(--ms-orange); }
.ms-add-qty.is-busy { opacity: .7; pointer-events: none; }
.ms-pdp__secondary { display: flex; gap: 8px; }
.ms-pdp__secondary > .ms-btn, .ms-pdp__secondary > .ms-list-box { flex: 1; }
.ms-pdp__secondary .ms-btn { width: 100%; height: 42px; font-size: 13px; }
.ms-pdp__secondary .fa-heart { color: var(--ms-heart); }
.ms-pdp__secondary .fav-saved, .ms-pdp__secondary .fav-not-saved { display: inline-flex; align-items: center; gap: 7px; color: inherit; }
.ms-pdp__secondary br { display: none; }
.ms-list-box { position: relative; }
.ms-list-box .lists-ul { display: none; position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 18px 40px -16px rgba(21, 34, 26, .35); }
.ms-list-box .list-dropdown-items { display: flex !important; flex-direction: column; width: 100%; }
.ms-list-box .list-dropdown-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ms-list-box .list-dropdown-item:hover { background: var(--ms-bg); }
.ms-list-box .list-dropdown-item i { opacity: 0; color: var(--ms-green); }
.ms-list-box .list-dropdown-item.show-check i { opacity: 1; }

/* Confronto per supermercato */
.ms-offers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ms-offer {
    display: flex; align-items: center; gap: 12px; min-height: 64px;
    padding: 10px 14px; border-radius: 18px; background: #fff;
    border: 1.5px solid #fff; text-decoration: none !important; color: var(--ms-ink) !important;
    transition: border-color .15s, box-shadow .15s;
}
a.ms-offer[href]:hover { border-color: var(--ms-green-2); box-shadow: 0 10px 22px -18px rgba(46, 139, 62, .7); }
.ms-offer.is-best { background: var(--ms-green-soft); border-color: var(--ms-green-2); }
.ms-offer__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-offer__name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.ms-offer__stock { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ms-green); }
.ms-offer__ship { font-size: 12px; color: var(--ms-muted-2); }
.ms-offer__price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ms-offer__diff { font-size: 11px; font-weight: 800; color: var(--ms-red); }
.ms-offer__diff.is-best { color: var(--ms-green); }
.ms-offer__was { font-size: 11px; color: var(--ms-muted-2); }
.ms-offer__go { color: var(--ms-muted-3); flex: none; }
a.ms-offer:hover .ms-offer__go { color: var(--ms-green); }

/* Storico prezzi (pronto) */
.ms-history { display: flex; flex-direction: column; gap: 14px; }
.ms-history__head { display: flex; justify-content: space-between; align-items: baseline; }
.ms-history__title { font-size: 15px; font-weight: 700; }
.ms-history__bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.ms-history__bar { flex: 1; border-radius: 6px; background: var(--ms-line); }
.ms-history__bar.is-now { background: var(--ms-green-2); }

/* Info prodotto */
.ms-pdp__info { display: flex; flex-direction: column; gap: 18px; }
.ms-pdp__info-row { display: flex; flex-direction: column; gap: 6px; }
.ms-pdp__info-row > a { font-weight: 700; }
.ms-prose { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ms-ink-2); }
.ms-prose p { margin: 0 0 8px; }
.ms-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.ms-table th { padding: 9px 12px; background: var(--ms-bg); font-weight: 700; color: var(--ms-ink-2); text-align: right; white-space: nowrap; }
.ms-table th:first-child { text-align: left; border-radius: 10px 0 0 10px; }
.ms-table th:last-child { border-radius: 0 10px 10px 0; }
.ms-table td { padding: 8px 12px; border-bottom: 1px solid var(--ms-bg-3); text-align: right; color: var(--ms-ink-2); }
.ms-table td:first-child { text-align: left; color: var(--ms-ink); font-weight: 600; }
.ms-pdp__tags .ms-chip { margin: 0; }

/* Righe "altre marche" (partial legacy ajax.row_price) */
.ms-pdp .price-link-static { padding: 0 !important; }

/* Barra d'acquisto mobile */
.ms-buybar { display: none; }

@media (max-width: 991px) {
    .ms-pdp { display: flex; flex-direction: column; gap: 18px; }
    .ms-pdp__main, .ms-pdp__aside { display: contents; }
    .ms-order-1 { order: 1; } .ms-order-2 { order: 2; } .ms-order-3 { order: 3; } .ms-order-4 { order: 4; }
    .ms-order-5 { order: 5; } .ms-order-6 { order: 6; } .ms-order-7 { order: 7; } .ms-order-8 { order: 8; }
}
@media (max-width: 800px) {
    .ms-pdp-page .ms-crumbs { display: none; }
    .ms-pdp__gallery { border-radius: 30px; background: var(--ms-green-pale); }
    .ms-pdp__gallery .deal-img-slider li { padding: 54px 24px 46px; }
    .ms-pdp__gallery .deal-img-slider img { mix-blend-mode: multiply; }
    .ms-pdp__thumbs { display: none !important; }
    .ms-pdp__title { font-size: 26px; }
    .ms-price--xl { font-size: 34px; }
    .ms-pdp__cta-desktop .ms-buy { display: none; }
    .ms-pdp__cta-desktop { border-top: 0; padding-top: 0; }
    .ms-buybar {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
        background: rgba(245, 244, 239, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        border-top: 1px solid var(--ms-bg-2);
    }
    .ms-buybar .ms-stepper { background: #fff; }
    .ms-buybar .ms-stepper__btn { background: var(--ms-bg-3); }
    body.ms-has-buybar { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 992px) {
    .ms-pdp__more { margin-top: 8px; }
}

/* =====================================================================
   CAROSELLO
   ===================================================================== */
.ms-carousel { margin: 6px 0 18px; }
.ms-carousel__nav { display: flex; gap: 6px; }
.ms-carousel__nav .ms-icon-btn { width: 38px; height: 38px; border-radius: 13px; }
.ms-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 30px) / 3); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.ms-carousel__track::-webkit-scrollbar { display: none; }
.ms-carousel__item { scroll-snap-align: start; min-width: 0; }
@media (max-width: 991px) { .ms-carousel__track { grid-auto-columns: calc((100% - 24px) / 2.6); } }
@media (max-width: 800px) {
    .ms-carousel__nav { display: none; }
    .ms-carousel__track { grid-auto-columns: 44%; gap: 10px; margin: 0 -14px; padding: 0 14px 4px; scroll-padding: 0 14px; }
}
@media (hover: none) { .ms-carousel__nav { display: none; } }

/* =====================================================================
   CARRELLO
   ===================================================================== */
.ms-cart { display: flex; flex-direction: column; gap: 18px; }
.ms-cart__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ms-cart__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ms-cart__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.ms-best, .ms-hero-total {
    display: flex; flex-direction: column; gap: 16px;
    padding: 20px; border-radius: 30px; background: var(--ms-green); color: #fff !important;
    text-decoration: none !important;
}
.ms-best:hover { background: #2A8239; }
.ms-best__top { display: flex; align-items: center; justify-content: space-between; }
.ms-best__avail { font-size: 12px; color: var(--ms-green-mint); }
.ms-best__store { display: flex; align-items: center; gap: 12px; }
.ms-best__name { font-size: 18px; font-weight: 700; }
.ms-best__ship { font-size: 13px; color: #E6F5E8; }
.ms-best__bottom, .ms-hero-total__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ms-best__total, .ms-hero-total__amount { font-family: var(--ms-display); font-size: 46px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ms-best__save, .ms-hero-total__side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--ms-green-mint); }
.ms-best__save strong, .ms-hero-total__side strong { font-family: var(--ms-display); font-size: 22px; font-weight: 700; color: var(--ms-orange); }
.ms-best__warn { font-size: 12px; font-weight: 700; color: var(--ms-orange); }
.ms-hero-total__note { font-size: 13px; color: #E6F5E8; }

.ms-ranking { list-style: none; margin: 0; padding: 4px 14px; border-radius: 22px; background: #fff; }
.ms-ranking > li + li { border-top: 1px solid var(--ms-bg-3); }
.ms-rank { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ms-ink) !important; text-decoration: none !important; }
.ms-rank:hover .ms-rank__name, .ms-rank.is-selected .ms-rank__name { color: var(--ms-green); }
.ms-rank__pos { width: 22px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ms-muted-2); letter-spacing: .04em; }
.ms-rank__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-rank__name { font-size: 14px; font-weight: 700; }
.ms-rank__note { font-size: 12px; color: var(--ms-muted-2); }
.ms-rank__note.is-warn { color: var(--ms-red); }
.ms-rank__price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ms-rank__price .ms-price { font-size: 17px; }
.ms-rank__diff { font-size: 11px; font-weight: 700; color: var(--ms-red); }

.ms-cart__items { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.ms-line { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 22px; background: #fff; }
.ms-line.is-missing { opacity: .72; }
.ms-line__img { flex: none; width: 68px; height: 68px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--ms-bg-3); }
.ms-line__img img { width: 84%; height: 84%; object-fit: contain; }
.ms-line__body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ms-line__title { font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--ms-ink) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-line__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 12px; color: var(--ms-muted-2); }
.ms-line__meta b { font-family: var(--ms-display); font-size: 15px; color: var(--ms-ink); }
.ms-line__missing { color: var(--ms-red); font-weight: 700; }
.ms-line__remove { flex: none; color: var(--ms-muted-3) !important; padding: 4px; }
.ms-line__remove:hover { color: var(--ms-red) !important; }
.ms-cart__empty { align-self: center; padding: 6px; }

.ms-cart__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px 22px; border-radius: 26px; background: #fff; }
.ms-cart__bar-total { display: flex; flex-direction: column; }
.ms-cart__bar-total strong { font-family: var(--ms-display); font-size: 24px; font-weight: 700; }

.ms-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 24px; border-radius: 26px; background: #fff; text-align: center; color: var(--ms-muted); }
.ms-empty__ico { width: 64px; height: 64px; border-radius: 22px; background: var(--ms-green-soft); color: var(--ms-green); display: flex; align-items: center; justify-content: center; }
.ms-empty p { margin: 0; max-width: 34ch; }

.ms-split { display: flex; flex-direction: column; gap: 12px; }
.ms-split__group { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 22px; }
.ms-split__head { display: flex; align-items: center; gap: 12px; }
.ms-split__meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ms-split__items { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--ms-bg-3); display: flex; flex-direction: column; gap: 6px; }
.ms-split__items li { display: flex; justify-content: space-between; font-size: 13px; color: var(--ms-ink-2); }

@media (max-width: 800px) {
    .ms-cart__grid { grid-template-columns: 1fr; gap: 22px; }
    .ms-best__total { font-size: 40px; }
    .ms-cart__bar {
        position: fixed; left: 14px; right: 14px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 1029;
        padding: 10px 10px 10px 16px; box-shadow: 0 18px 40px -16px rgba(21, 34, 26, .35);
    }
    .ms-cart__bar .ms-btn--lg { height: 50px; padding: 0 16px; font-size: 14px; }
    .ms-cart-page { padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px)); }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.widget-footer { margin-top: 40px !important; padding: 48px 0 28px !important; background: var(--ms-ink) !important; border-radius: 36px 36px 0 0; color: #C9D2CB; }
.widget-footer .widget-title h5 { font-family: var(--ms-display); color: #fff !important; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.widget-footer a { color: #C9D2CB !important; font-size: 14px; }
.widget-footer a:hover { color: #fff !important; text-decoration: none; }
.widget-footer li { margin-bottom: 6px; }
.widget-footer .textwidget p { color: #9FAAA3; font-size: 14px; line-height: 1.6; }
.widget-footer .store-social-networks a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.08); }
.widget-footer .store-social-networks a:hover { background: var(--ms-green); }
.footer { background: var(--ms-ink) !important; color: #7E8A82 !important; border-top: 1px solid rgba(255,255,255,.06); }
.widget-footer-res { background: var(--ms-ink); color: #7E8A82; padding: 0 0 16px; }
.widget-footer-res a { color: #C9D2CB !important; }
.ms-footer-logo { display: inline-flex; margin-bottom: 14px; }
.ms-footer-logo .ms-brand__name { color: #fff; }

/* =====================================================================
   PAGINE LEGACY: base comune piu' morbida
   ===================================================================== */
.white-block { border-radius: var(--ms-r-lg); border: 0; }
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
    border-radius: 14px;
}
.form-control:focus { border-color: var(--ms-green-2); box-shadow: 0 0 0 3px rgba(63, 163, 77, .18); }
.btn.btn-saving, .btn.save-money, .btn.view-cart, .btn.empty-cart, .btn-primary {
    border-radius: 14px !important; font-weight: 800; background: var(--ms-green); border-color: var(--ms-green); color: #fff;
}
.btn-primary:hover { background: var(--ms-green-dark); border-color: var(--ms-green-dark); }
.modal-content { border-radius: 26px; border: 0; box-shadow: 0 30px 60px -20px rgba(21, 34, 26, .4); }

/* Cuore preferiti: main.min.js alterna le classi fa-heart-o / fa-heart sull'<i>,
   ma la webfont del tema non ha piu' fa-heart-o. Disegniamo il cuore con una
   maschera SVG: contorno quando non e' salvato, pieno rosso quando lo e'. */
.ms-card__fav i, .ms-pdp__fav i, .ms-pdp__secondary .fav-auth i, .ms-pdp__secondary .fav-reg i {
    display: inline-block; width: 16px; height: 16px; font-size: 0 !important;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ms-card__fav i::before, .ms-pdp__fav i::before, .ms-pdp__secondary .fav-auth i::before, .ms-pdp__secondary .fav-reg i::before { content: none !important; }
.ms-card__fav i.fa-heart, .ms-pdp__fav i.fa-heart, .ms-pdp__secondary i.fa-heart {
    color: var(--ms-heart);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2.2'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2.2'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E");
}
.ms-pdp__fav i { width: 20px; height: 20px; }
@media (max-width: 800px) { .ms-hero__search { display: none; } }

/* PDP: le sezioni non devono allargarsi sul contenuto (owl-stage e' larghissimo) */
.ms-pdp > *, .ms-pdp__main > *, .ms-pdp__aside > * { min-width: 0; max-width: 100%; }
.ms-pdp__gallery .owl-stage-outer { overflow: hidden; }
@media (max-width: 800px) {
    .ms-pdp__gallery { background: #fff; }
    .ms-pdp__gallery .deal-img-slider img { mix-blend-mode: normal; }
}

/* Trigger legacy dei filtri mobile (linguetta laterale): nel nuovo stile */
.small-device-categories .categories-trigger {
    top: calc(var(--ms-mobile-top) + 10px); padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 0 14px 14px 0 !important;
    background: var(--ms-green) !important; color: #fff !important;
    box-shadow: 0 8px 18px -10px rgba(21, 34, 26, .5);
}
.ms-page .small-device-categories { display: none !important; }
.small-device-categories .small-device-wrapper { background: var(--ms-bg); }
.ms-pdp__secondary > * { min-width: 0; }
.ms-pdp__secondary .ms-btn { padding: 0 10px; overflow: hidden; }
.ms-pdp__secondary .fav-text { overflow: hidden; text-overflow: ellipsis; }

/* Breadcrumb nel layout a una colonna: niente offset del tema mobile */
.ms-crumbs .bc-box { margin-top: 0 !important; }
.ms-cart-page .ms-crumbs { display: none; }
.ms-cart__bar-total strong { white-space: nowrap; }
.ms-cart__bar .ms-btn { min-width: 0; }
.ms-cart__bar .ms-btn > :first-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) {
    .ms-cart__bar-total strong { font-size: 20px; }
    .ms-cart__bar .ms-btn--lg { white-space: normal; text-align: left; line-height: 1.15; font-size: 13px; }
}
.ms-cart.ajax-cart-wrap { margin: 0 !important; padding: 0 !important; }
.ms-cart .ms-note { margin: 0; }
.ms-cart form.ms-cart__items { padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.ms-line { align-items: flex-start; }
.ms-line__body { gap: 8px; }
.ms-line__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ms-line__meta { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.ms-cart .ms-note { display: block; line-height: 1.45; }

/* Correzioni contro regole del tema (larghezze/posizioni fisse) */
header .fast-search { flex: 1 1 420px; width: auto !important; }
header .fast-search .submit-form.btn { display: inline-flex !important; align-items: center; width: auto !important; min-width: 0 !important; position: static !important; }
header .count-items, header .cart-qty-badge { position: static !important; top: auto !important; right: auto !important; left: auto !important; }
@media (max-width: 800px) {
    header .header-primary-nav-mobile .primary-nav-mobile-cart-btn .cart-qty-badge { position: absolute !important; top: 2px !important; right: -2px !important; }
}
.ms-sort { width: auto !important; max-width: 100%; }
.ms-scroller { --ms-gutter: max(15px, calc((100vw - 1170px) / 2 + 15px)); padding-left: var(--ms-gutter); padding-right: var(--ms-gutter); scroll-padding-left: var(--ms-gutter); }
@media (max-width: 800px) { .ms-scroller { --ms-gutter: 14px; } }
header .header-desktop .top-bar .pull-left { flex: 1 1 auto !important; }
header .header-desktop .top-bar .pull-right { flex: 0 0 auto !important; }
header .fast-search { flex: 1 1 auto !important; }
header .fast-search .keyword { flex: 1 1 auto !important; }
header .fast-search .submit-form.btn { flex: none !important; }
.navigation.sticky-nav .ms-drawer-close, .navigation.sticky-nav .menu-trigger { display: none !important; }
.navigation.sticky-nav .navbar .small-device-wrapper > ul { padding: 10px 0; }

/* Offset sotto l'header mobile fisso (56 + 47 px). Nel tema lo spazio lo crea
   il banner pubblicitario in testa (.ad-top-banner, margin-top 115px): quando
   il banner non c'e' (disattivato o in locale) lo aggiungiamo noi. */
@media (max-width: 800px) {
    body:not(:has(header .ad-top-banner)) .ms-hero,
    body:not(:has(header .ad-top-banner)) .ms-main { padding-top: calc(var(--ms-mobile-top) + 8px); }
    body:not(.main-home):not(:has(header .ad-top-banner)) .home-page-body { margin-top: calc(var(--ms-mobile-top) + 10px) !important; }
    .page .ms-pg-title { display: flex !important; }
}

/* Testo SEO di categoria/brand */
.taxonomy-seo-copy { border-radius: 22px !important; border: 0 !important; background: #fff !important; box-shadow: none !important; padding: 16px 18px !important; margin: 0 0 16px !important; color: var(--ms-ink-2); font-size: 14px; line-height: 1.6; }
.taxonomy-seo-copy h2, .taxonomy-seo-copy h3 { font-size: 17px; font-weight: 600; margin: 4px 0 8px; }
.taxonomy-seo-copy a, .taxonomy-seo-copy button { color: var(--ms-green) !important; font-weight: 700; }
@media (min-width: 801px) { .ms-cart__bar { flex-wrap: wrap; } }
