/* ============================================================
   SGH – Serigest Header Menu – Frontend Styles
   ============================================================ */

/* ── Reset / vars ─────────────────────────────────────────── */
.sgh-header *,
.sgh-drawer *,
.sgh-megamenu * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --sgh-height:       90px;
    --sgh-bg:           #ffffff;
    --sgh-border:       #ebebeb;
    --sgh-text:         #111111;
    --sgh-text-muted:   #777;
    --sgh-accent:       #111111;
    --sgh-hover-bg:     #f5f5f5;
    --sgh-mega-bg:      #ffffff;
    --sgh-drawer-width: 320px;
    --sgh-transition:   .18s ease;
    --sgh-radius:       8px;
    --sgh-font:         inherit;
}

/* ── Header shell ─────────────────────────────────────────── */
.sgh-header {
    position: relative;
    z-index: 1000;
    background: #ffffff;
}

.sgh-header__inner {
    display: flex;
    align-items: center;
    height: var(--sgh-height);
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 20px;
}

/* ── Logo ─────────────────────────────────────────────────── */
.sgh-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sgh-logo img {
    height: 36px;
    width: auto;
    display: block;
}

.sgh-logo__text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sgh-text);
    letter-spacing: -.02em;
}

/* ── Right side wrapper ───────────────────────────────────── */
.sgh-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Search inline (destra, vicino alle icone) ────────────── */
.sgh-search-inline {
    display: flex;
    align-items: center;
}

/* Il campo è il contenitore pill che include anche il bottone */
.sgh-search-inline__field {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--sgh-border);
    border-radius: 50px;
    padding: 7px 7px 7px 20px;
    background: #fff;
    transition: border-color .15s;
    width: 280px;
    max-width: 280px;
}

.sgh-search-inline__field:focus-within {
    border-color: #bbb;
}

.sgh-search-inline__field svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #9ca3af;
}

.sgh-search-inline__field input[type="search"] {
    flex: 1;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--sgh-text);
    outline: none;
    min-width: 0;
}

.sgh-search-inline__field input[type="search"]::placeholder {
    color: #9ca3af;
}

.sgh-search-inline__field input[type="search"]::-webkit-search-cancel-button {
    appearance: none;
    -webkit-appearance: none;
    display: none;
}

/* Bottone dentro il pill, con ombra che lo fa sembrare sollevato */
.sgh-search-inline__submit {
    flex-shrink: 0;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}

.sgh-search-inline__submit:hover {
    background: #2a2a2a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
}

/* Wrapper campo ricerca (desktop) */
.sgh-search-expand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── Desktop nav ──────────────────────────────────────────── */
.sgh-nav {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sgh-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
}

.sgh-item {
    position: static;
}

.sgh-item--link {
    position: relative;
}

/* Il mega item resta static: il dropdown si ancora a .sgh-header */
.sgh-item--mega {
    position: static;
}

/* ── Link con underline animato ───────────────────────────── */
.sgh-item__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 22px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: normal;
    text-transform: none;
    color: var(--sgh-text);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--sgh-font);
    transition: color var(--sgh-transition);
    /* Allinea verticalmente al centro dell'header */
    margin-top: 16px;
}

/* Underline animata che scorre da centro verso i lati */
.sgh-item__link::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--sgh-text);
    border-radius: 2px;
    transition: left .22s ease, right .22s ease;
}

.sgh-item__link:hover {
    color: var(--sgh-text);
    opacity: .75;
}

.sgh-item__link:hover::after,
.sgh-item--mega.is-open > .sgh-item__link::after {
    left: 14px;
    right: 14px;
}

.sgh-item--mega.is-open > .sgh-item__link {
    color: var(--sgh-text);
}

.sgh-chevron {
    transition: transform var(--sgh-transition);
    flex-shrink: 0;
    opacity: .5;
}

.sgh-item--mega.is-open .sgh-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* ── Voce “in evidenza” (admin: Spicca) — stesso nero, vibrazione più frequente ── */

/* ── Voce kit builder: “Sei indeciso?” ── */
.sgh-item--kit .sgh-item__link {
    color: #16a34a;
    opacity: 1;
    font-weight: 700;
}

.sgh-item--kit .sgh-item__link::after {
    background: #16a34a;
}

.sgh-item--kit .sgh-item__link:hover {
    color: #15803d;
    opacity: 1;
}

.sgh-kit-wave {
    display: inline-flex;
    align-items: baseline;
}

.sgh-kit-wave__char {
    display: inline-block;
    transform-origin: center bottom;
    will-change: transform;
    animation: sgh-kit-wave 2.6s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.09s);
}

.sgh-kit-wave__char--space {
    width: 0.28em;
}

@keyframes sgh-kit-wave {
    0%,
    16%,
    100% {
        transform: scale(1);
    }
    8% {
        transform: scale(1.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgh-kit-wave__char {
        animation: none;
    }
}

/* ── Actions (search, account, cart, hamburger) ───────────── */
.sgh-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sgh-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    color: var(--sgh-text);
    text-decoration: none;
    transition: background var(--sgh-transition);
}

.sgh-action:hover {
    background: var(--sgh-hover-bg);
}

.sgh-cart-count {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background: #e53935;
    border-radius: 50%;
    font-size: 0;
    padding: 0;
    min-width: 0;
    pointer-events: none;
    border: 2px solid #fff;
}

.sgh-cart-count.is-empty {
    display: none;
}

/* ── Hamburger ────────────────────────────────────────────── */
.sgh-action--hamburger {
    flex-direction: column;
    gap: 5px;
    display: none;   /* shown only on mobile */
}

.sgh-action--hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--sgh-transition), opacity var(--sgh-transition);
    transform-origin: center;
}

.sgh-action--hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.sgh-action--hamburger.is-open span:nth-child(2) {
    opacity: 0;
}
.sgh-action--hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Search bar ───────────────────────────────────────────── */
/* Dropdown searchbar legacy disabilitato — search è inline desktop + mobile header */
.sgh-searchbar {
    display: none !important;
}

/* Icona ricerca header: solo mobile (vedi media query) */
.sgh-action--header-search {
    display: none;
}

.sgh-action--header-search svg {
    width: 18px;
    height: 18px;
}

.sgh-action--header-search.is-open {
    background: var(--sgh-hover-bg);
}

.sgh-searchbar {
    border-top: 1px solid var(--sgh-border);
    background: var(--sgh-bg);
    overflow: hidden;
    max-height: 0;
    transition: max-height .28s ease, padding .28s ease;
    padding: 0;
}

.sgh-searchbar:not([hidden]) {
    max-height: 90px;
    padding: 14px 0;
}

.sgh-searchbar[hidden] {
    display: block !important;
    max-height: 0;
    padding: 0;
}

.sgh-searchbar__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sgh-searchbar__inner form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Campo input con icona */
.sgh-searchbar__field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    border: 1.5px solid var(--sgh-border);
    border-radius: 50px;
    padding: 10px 18px;
    background: #fff;
    transition: border-color .15s;
}

.sgh-searchbar__field:focus-within {
    border-color: #999;
}

.sgh-searchbar__field svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: #9ca3af;
}

.sgh-searchbar__field input[type="search"] {
    flex: 1;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--sgh-text);
    outline: none;
    min-width: 0;
}

.sgh-searchbar__field input[type="search"]::placeholder {
    color: #9ca3af;
}

/* Pulsante Cerca */
.sgh-searchbar__submit {
    flex-shrink: 0;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 11px 26px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.sgh-searchbar__submit:hover {
    background: #333;
}

/* Pulsante chiudi */
.sgh-searchbar__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--sgh-text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: color var(--sgh-transition);
    flex-shrink: 0;
}

.sgh-searchbar__close:hover {
    color: var(--sgh-text);
}

/* ── Mega menu dropdown ───────────────────────────────────── */

/*
 * Il mega menu si aggancia all'header (position: relative sul nav)
 * e si estende per tutta la larghezza disponibile senza uscire dal viewport.
 */
.sgh-nav {
    position: static; /* il mega si aggancia a .sgh-header */
}

.sgh-header {
    position: relative; /* ancora per il mega menu */
}

.sgh-megamenu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #111;
    box-shadow: 0 24px 48px rgba(0,0,0,.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
    z-index: 999;
    isolation: isolate;
}

/* Bridge tra trigger e dropdown */
.sgh-megamenu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.sgh-item--mega.is-open .sgh-megamenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.sgh-megamenu__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 32px 48px 40px;
    max-width: 1280px;
    margin: 0 auto;
}

.sgh-mega__col {
    min-width: 0;
    padding: 0 28px;
    border-left: 1px solid #efefef;
}

.sgh-mega__col:first-child {
    border-left: none;
    padding-left: 0;
}

.sgh-mega__col:last-child {
    padding-right: 0;
}

.sgh-mega__group + .sgh-mega__group {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.sgh-mega__head {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #111;
}

.sgh-mega__thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: #f4f4f4;
}

.sgh-mega__thumb img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}

.sgh-mega__thumb.is-empty {
    color: #bbb;
}

.sgh-mega__thumb.is-empty svg {
    width: 22px;
    height: 22px;
}

.sgh-mega__title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.2;
    text-transform: none;
}

.sgh-mega__head:hover .sgh-mega__title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sgh-mega__list {
    list-style: none;
    margin: 8px 0 0 68px;
    padding: 0;
}

.sgh-mega__list a {
    display: block;
    padding: 3px 0;
    font-size: 13px;
    font-weight: 400;
    color: #737373;
    text-decoration: none;
    line-height: 1.35;
}

.sgh-mega__list a:hover {
    color: #111;
}

@media (max-width: 1100px) {
    .sgh-megamenu__inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 24px 28px 32px;
    }
}

/* ── Mega Brand ──────────────────────────────────────────── */
.sgh-item--brands .sgh-megamenu__inner {
    display: block;
    padding: 0;
}

.sgh-brands-mega {
    padding: 22px 32px 28px;
}

.sgh-brands-mega__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sgh-border);
}

.sgh-brands-mega__kicker {
    margin: 0 0 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--sgh-text-muted);
}

.sgh-brands-mega__title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--sgh-text);
}

.sgh-brands-mega__az {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 3px;
    max-width: 62%;
}

.sgh-brands-mega__az button {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
}

.sgh-brands-mega__az button:hover,
.sgh-brands-mega__az button.is-active {
    background: #111;
    color: #fff;
}

.sgh-brands-mega__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
}

.sgh-brand-tile[hidden],
.sgh-brand-tile.is-hidden {
    display: none !important;
}

.sgh-brand-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 10px 14px;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: var(--sgh-text);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.sgh-brand-tile:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: #111;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

.sgh-brand-tile__logo {
    width: 92px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgh-brand-tile__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sgh-brand-tile__mono {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}

.sgh-brand-tile__name {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
}

.sgh-brands-mega__empty {
    margin: 0;
    padding: 24px 0;
    color: var(--sgh-text-muted);
    font-size: 14px;
}

.sgh-drawer__brands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.sgh-drawer__brands a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sgh-drawer__brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
}

.sgh-drawer__brand-logo img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

/* ── Overlay — nascosto (drawer è full-screen) ─────────────── */
.sgh-overlay { display: none !important; }

/* ── Mobile drawer — full screen ──────────────────────────── */
.sgh-drawer {
    position: fixed;
    inset: 0;
    width: 100vw;
    background: var(--sgh-bg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

.sgh-drawer.is-open {
    transform: translateX(0);
}

/* Header drawer */
.sgh-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 68px;
    border-bottom: 1px solid var(--sgh-border);
    flex-shrink: 0;
}

.sgh-drawer__logo img {
    height: 36px;
    width: auto;
}

/* X di chiusura */
.sgh-drawer__close {
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--sgh-transition), color var(--sgh-transition);
    flex-shrink: 0;
}

.sgh-drawer__close:hover {
    background: #e0e0e0;
    color: #000;
}

/* Toggle label (non più button) */
.sgh-drawer__mega-toggle {
    display: block;
    padding: 12px 24px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #aaa;
    cursor: default;
}

/* Nav */
.sgh-drawer__nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 0;
}

.sgh-drawer__menu {
    list-style: none;
}

.sgh-drawer__item > a,
.sgh-drawer__mega-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sgh-text);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--sgh-font);
    transition: background var(--sgh-transition);
    border-radius: 0;
}

.sgh-drawer__item > a:hover,
.sgh-drawer__mega-toggle:hover {
    background: var(--sgh-hover-bg);
}

.sgh-drawer__mega-toggle .sgh-chevron {
    transition: transform var(--sgh-transition);
}

.sgh-drawer__mega-toggle[aria-expanded="true"] .sgh-chevron {
    transform: rotate(180deg);
}

.sgh-drawer__item--kit > a {
    color: #16a34a;
    font-weight: 700;
}

.sgh-drawer__item--kit > a:hover {
    color: #15803d;
}

/* Submenu categorie */
.sgh-drawer__submenu {
    list-style: none;
    background: #fafafa;
    border-top: 1px solid var(--sgh-border);
    border-bottom: 1px solid var(--sgh-border);
    padding: 12px 0;
}

/* Categoria con icona tonda */
.sgh-drawer__subitem--parent > .sgh-drawer__parent-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--sgh-text);
    text-decoration: none;
    transition: background var(--sgh-transition);
}

.sgh-drawer__parent-link:hover {
    background: var(--sgh-hover-bg);
    color: var(--sgh-accent);
}

/* Icona tonda categoria nel drawer */
.sgh-drawer__cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgh-drawer__cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sgh-drawer__subchildren {
    list-style: none;
    padding: 2px 0 6px;
}

.sgh-drawer__subchildren a {
    display: block;
    padding: 7px 24px 7px 84px;
    font-size: .825rem;
    color: var(--sgh-text-muted);
    text-decoration: none;
    transition: color var(--sgh-transition);
}

.sgh-drawer__subchildren a:hover {
    color: var(--sgh-text);
}

/* Footer drawer — pill neri come Cerca / submit searchbar */
.sgh-drawer__footer {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--sgh-border);
    flex-shrink: 0;
    background: var(--sgh-bg);
}

.sgh-drawer__footer--single .sgh-drawer__action {
    flex: 1;
    justify-content: center;
}

.sgh-drawer__action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: #111;
    border: none;
    border-radius: 50px;
    transition: background .15s ease, color .15s ease, transform .12s ease;
    box-shadow: none;
}

.sgh-drawer__action:hover {
    background: #333;
    color: #fff;
}

.sgh-drawer__action:active {
    transform: scale(0.98);
}

/* Voce in evidenza (solo nel pulsante, non in elenco): blu brand, testo bianco */
.sgh-drawer__action--spica {
    background: #2e81bb;
    color: #fff;
}

.sgh-drawer__action--spica:hover {
    background: #2570a3;
    color: #fff;
}

.sgh-drawer__action--spica .sgh-drawer__action-label {
    max-width: 46vw;
}

.sgh-drawer__action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: inherit;
}

.sgh-drawer__action-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.sgh-drawer__action-icon--round {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
}

.sgh-drawer__action-icon--round img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sgh-drawer__action-icon--round svg {
    width: 16px;
    height: 16px;
    opacity: 0.95;
}

.sgh-drawer__action-label {
    min-width: 0;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 781px) {
    .sgh-nav {
        display: none;
    }

    /* Barra ricerca desktop nascosta; quella nel dropdown mobile è eccezione sotto */
    .sgh-search-expand .sgh-search-inline {
        display: none !important;
    }

    .sgh-action--header-search {
        display: inline-flex !important;
    }

    .sgh-action--account {
        display: none;
    }

    .sgh-right {
        margin-left: auto;
    }

    .sgh-action--hamburger {
        display: inline-flex;
    }

    .sgh-header__inner {
        padding: 0 16px;
        gap: 8px;
    }

    .sgh-logo img {
        height: 30px;
    }

    /* Pannello ricerca sotto header: stesso pill del desktop */
    .sgh-mobile-search-dropdown {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 1002;
        background: #fff;
        border-bottom: 1px solid var(--sgh-border);
        box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition:
            max-height .32s cubic-bezier(.4, 0, .2, 1),
            opacity .22s ease,
            visibility 0s linear .32s;
    }

    .sgh-mobile-search-dropdown.is-open {
        max-height: min(420px, 85vh);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition:
            max-height .36s cubic-bezier(.4, 0, .2, 1),
            opacity .22s ease .04s,
            visibility 0s linear 0s;
    }

    .sgh-mobile-search-dropdown:not(.is-open) {
        pointer-events: none;
    }

    .sgh-mobile-search-dropdown__inner {
        padding: 12px 16px 16px;
    }

    .sgh-mobile-search-dropdown .sgh-search-inline {
        display: flex !important;
        width: 100%;
    }

    .sgh-mobile-search-dropdown .sgh-search-inline__field {
        width: 100%;
        max-width: none;
    }

    .sgh-mobile-search-tags {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid var(--sgh-border);
    }

    .sgh-mobile-search-tags__heading {
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--sgh-text-muted);
        margin-bottom: 8px;
    }

    .sgh-mobile-search-tags__heading--spaced {
        margin-top: 14px;
    }

    .sgh-mobile-search-tags__empty {
        font-size: 13px;
        color: var(--sgh-text-muted);
        margin-bottom: 0;
    }

    .sgh-mobile-search-dropdown .sgh-search-tags--mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sgh-mobile-search-dropdown .sgh-search-tag {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
        color: var(--sgh-text);
        text-decoration: none;
        border: 1px solid var(--sgh-border);
        border-radius: 999px;
        background: #2376aa33;
        transition: background var(--sgh-transition), border-color var(--sgh-transition);
    }

    .sgh-mobile-search-dropdown .sgh-search-tag:hover {
        background: #2376aa55;
        border-color: #2376aa88;
    }

    /* Overlay sotto l’header: blur + scurito (ricerca mobile aperta) */
    .sgh-mobile-search-backdrop {
        position: fixed;
        inset: 0;
        z-index: 998;
        background: rgba(15, 15, 15, 0.45);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .28s ease, visibility .28s ease;
    }

    .sgh-mobile-search-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (min-width: 782px) and (max-width: 1280px) {
    .sgh-search-inline__field {
        width: 220px;
        max-width: 220px;
    }

    .sgh-header__inner {
        gap: 14px;
    }
}

@media (min-width: 782px) {
    .sgh-action--header-search {
        display: none !important;
    }

    .sgh-mobile-search-dropdown {
        display: none !important;
    }

    .sgh-mobile-search-backdrop {
        display: none !important;
    }

    .sgh-action--hamburger {
        display: none;
    }

    /* Colonna centrale: menu o tag (ricerca attiva) */
    .sgh-nav {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
        gap: 0;
    }

    /* Ricerca attiva: nascondi voci menu, mostra tag nello stesso spazio */
    .sgh-header--search-expanded .sgh-menu {
        display: none !important;
    }

    .sgh-search-panel {
        position: relative;
        flex: 1;
        min-width: 0;
        align-items: center;
        padding: 0 8px 0 0;
    }

    .sgh-search-panel[hidden] {
        display: none !important;
    }

    .sgh-search-panel:not([hidden]) {
        display: flex;
    }

    .sgh-header--search-expanded .sgh-search-inline__field {
        width: 520px;
        max-width: min(520px, 46vw);
    }

    .sgh-search-panel__close {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        border: none;
        background: transparent;
        font-size: 1.25rem;
        line-height: 1;
        cursor: pointer;
        color: var(--sgh-text-muted);
        border-radius: 8px;
        transition: background var(--sgh-transition), color var(--sgh-transition);
    }

    .sgh-search-panel__close:hover {
        background: var(--sgh-hover-bg);
        color: var(--sgh-text);
    }

    .sgh-search-panel__cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 24px;
        align-items: start;
        width: 100%;
        padding-right: 32px;
    }

    .sgh-search-panel__heading {
        font-size: 11px;
        font-weight: 800;
        color: var(--sgh-text-muted);
        text-transform: uppercase;
        letter-spacing: .04em;
        margin-bottom: 6px;
    }

    .sgh-search-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .sgh-search-tag {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        font-size: 12px;
        font-weight: 600;
        color: var(--sgh-text);
        text-decoration: none;
        border: 1px solid var(--sgh-border);
        border-radius: 999px;
        background: #2376aa33;
        transition: background var(--sgh-transition), border-color var(--sgh-transition);
    }

    .sgh-search-tag:hover {
        background: #2376aa55;
        border-color: #2376aa88;
    }

    .sgh-search-panel__empty {
        font-size: 12px;
        color: var(--sgh-text-muted);
    }
}

/* ── Prevent body scroll when drawer is open ──────────────── */
body.sgh-drawer-open {
    overflow: hidden;
}

/* ── Fullscreen instant search ────────────────────────────── */
.sgh-live-search *,
.sgh-live-search *::before,
.sgh-live-search *::after {
    box-sizing: border-box;
}

.sgh-live-search[hidden] {
    display: none !important;
}

.sgh-live-search--full {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.sgh-live-search-open #stb-bar {
    display: none !important;
}

@media (min-width: 782px) {
    body.sgh-live-search-open #stb-bar {
        display: block !important;
    }
}

.sgh-live-search__close-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 38px;
    border: none;
    background: #1e3a5f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.sgh-live-search__top {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 24px 8px;
}

.sgh-live-search__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #111;
    font-weight: 800;
}

.sgh-live-search__logo img {
    height: 32px;
    width: auto;
    display: block;
}

.sgh-live-search__form {
    flex: 1;
    min-width: 0;
}

.sgh-live-search__close-x {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #111;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sgh-live-search__close-x:hover {
    background: #e4e4e4;
    color: #000;
}

.sgh-live-search__field {
    width: 100% !important;
    max-width: none !important;
}

.sgh-live-search__meta {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 12px;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.sgh-live-search__meta[hidden] {
    display: none !important;
}

.sgh-live-search__layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 24px;
    overflow: hidden;
}

.sgh-live-search__layout:has(.sgh-live-search__facets[hidden]) {
    grid-template-columns: 1fr;
}

.sgh-live-search__facets {
    overflow-y: auto;
    padding-right: 8px;
}

.sgh-live-search__facets[hidden] {
    display: none !important;
}

.sgh-live-search__facet {
    margin-bottom: 22px;
}

.sgh-live-search__facet-title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #111;
}

.sgh-live-search__facet-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: #222;
    cursor: pointer;
    text-transform: uppercase;
}

.sgh-live-search__facet-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

.sgh-live-search__facet-dot.is-light {
    box-shadow: 0 0 0 1px #bbb;
}

.sgh-live-search__facet-row em {
    margin-left: auto;
    font-style: normal;
    color: #888;
    font-size: 12px;
}

.sgh-live-search__main {
    min-width: 0;
    overflow-y: auto;
}

.sgh-live-search__hint {
    margin: 24px 0;
    font-size: 14px;
    color: #777;
}

.sgh-live-search__hint[hidden] {
    display: none !important;
}

.sgh-live-search__idle {
    max-width: 1080px;
    padding: 8px 0 40px;
}

.sgh-live-search__idle[hidden] {
    display: none !important;
}

.sgh-live-search__idle-hero {
    margin: 0 0 36px;
    padding: 8px 0 28px;
    border-bottom: 1px solid #eee;
}

.sgh-live-search__idle-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #111;
}

.sgh-live-search__idle-prompt {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -.03em;
    color: #111;
    font-weight: 700;
    max-width: 18em;
}

.sgh-live-search__idle-block {
    margin: 0 0 32px;
}

.sgh-live-search__idle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #111;
}

.sgh-live-search__idle-ico {
    flex-shrink: 0;
    color: #888;
}

.sgh-live-search__idle-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sgh-live-search__idle-chip {
    appearance: none;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.sgh-live-search__idle-chip:hover,
.sgh-live-search__idle-chip:focus-visible {
    background: #111;
    border-color: #111;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    transform: translateY(-1px);
    outline: none;
}

.sgh-live-search__idle-starters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.sgh-live-search__idle-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.sgh-live-search__idle-tile-img {
    display: block;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: #f6f6f6;
    border: 1px solid #ececec;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}

.sgh-live-search__idle-tile-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    display: block;
    background: #fafafa;
    image-rendering: auto;
}

.sgh-live-search__idle-tile-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sgh-live-search__idle-tile:hover .sgh-live-search__idle-tile-img {
    border-color: #d8d8d8;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    transform: translateY(-3px);
}

.sgh-live-search__idle-tile:hover .sgh-live-search__idle-tile-name {
    color: #111;
}

.sgh-live-search__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.sgh-live-search__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.sgh-live-search__card:hover {
    border-color: #ddd;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
}

.sgh-live-search__card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1;
    background: #f6f6f6;
}

.sgh-live-search__card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sgh-live-search__card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
}

.sgh-live-search__card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sgh-live-search__card-sku {
    font-size: 12px;
    color: #777;
}

.sgh-live-search__card-prices {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 4px;
}

.sgh-live-search__card-price {
    font-size: 16px;
    font-weight: 800;
    color: #1e3a5f;
}

.sgh-live-search__card-price-excl {
    font-size: 12px;
    font-weight: 600;
    color: #667085;
}

.sgh-live-search__card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.sgh-live-search__card--skeleton {
    pointer-events: none;
    box-shadow: none;
}

.sgh-skel {
    display: block;
    background: linear-gradient(90deg, #f0f0f0 25%, #f7f7f7 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: sgh-skel-shimmer 1.15s ease-in-out infinite;
}

.sgh-skel--title {
    height: 14px;
    width: 88%;
    border-radius: 4px;
    margin-top: 2px;
}

.sgh-skel--sku {
    height: 11px;
    width: 42%;
    border-radius: 4px;
    margin-top: 6px;
}

.sgh-skel--price {
    height: 16px;
    width: 34%;
    border-radius: 4px;
    margin-top: 10px;
}

@keyframes sgh-skel-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.sgh-live-search__card-chips span {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #444;
}

.sgh-live-search__more {
    display: block;
    margin: 24px auto 8px;
    padding: 10px 22px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.sgh-live-search__more[hidden] {
    display: none !important;
}

.sgh-live-search__filters-toggle {
    display: none;
}

body.sgh-live-search-open {
    overflow: hidden;
    padding-right: var(--sgh-sbw, 0px);
}

/* Desktop: logo fermo, campo si allunga in orizzontale, pannello sotto l'header */
.sgh-search-close {
    display: none;
}

@media (min-width: 782px) {
    body.sgh-live-search-open {
        overflow: hidden;
        padding-right: var(--sgh-sbw, 0px);
    }

    body.sgh-live-search-open .sgh-header {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: auto;
        background: #fff;
    }

    .sgh-nav {
        transition: opacity .28s ease;
    }

    .sgh-search-inline__field {
        box-sizing: border-box;
        flex: 0 0 auto;
        margin-left: auto;
        transition: border-color .15s, width .42s cubic-bezier(.22, 1, .36, 1);
    }

    .sgh-right {
        overflow: visible;
        justify-content: flex-end;
    }

    .sgh-search-expand,
    .sgh-search-inline {
        display: flex;
        justify-content: flex-end;
        min-width: 0;
        max-width: 100%;
    }

    .sgh-actions {
        position: relative;
        flex: 0 0 84px;
        width: 84px;
        min-width: 84px;
        justify-content: flex-end;
        z-index: 3;
        background: #fff;
    }

    .sgh-search-close {
        display: flex;
        position: absolute;
        inset: 0;
        margin: auto;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 50%;
        background: #f0f0f0;
        color: #111;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 2;
    }

    body.sgh-live-search-open .sgh-search-close {
        opacity: 1;
        pointer-events: auto;
    }

    body.sgh-live-search-open .sgh-header {
        z-index: 10060;
        background: #fff;
    }

    body.sgh-live-search-open .sgh-right {
        z-index: 2;
        flex: 1 1 auto;
        min-width: 0;
        margin-left: 0;
        justify-content: flex-end;
    }

    body.sgh-live-search-open .sgh-search-expand,
    body.sgh-live-search-open .sgh-search-inline {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        justify-content: flex-end;
    }

    body.sgh-live-search-open .sgh-nav {
        flex: 0 0 0;
        max-width: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

    body.sgh-live-search-open .sgh-action--account,
    body.sgh-live-search-open .sgh-action--cart {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .scb-bar {
        max-height: 180px;
        transition: max-height .34s ease, opacity .24s ease;
    }

    body.sgh-live-search-open .scb-bar {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        border: none;
    }

    .sgh-live-search--full {
        top: var(--sgh-live-top, 90px);
        background: transparent;
        transition: background .35s ease;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .sgh-live-search--full.is-ready {
        background: #fff;
    }

    .sgh-live-search__chrome {
        display: none;
    }

    .sgh-live-search__layout {
        opacity: 0;
        transition: opacity .32s ease .08s;
    }

    .sgh-live-search.is-ready .sgh-live-search__layout {
        opacity: 1;
    }
}

@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
    .sgh-nav,
    .sgh-right,
    .sgh-search-expand,
    .sgh-search-inline,
    .sgh-search-inline__field,
    .scb-bar,
    .sgh-live-search--full,
    .sgh-live-search__layout {
        transition: none !important;
    }
}

@media (max-width: 1100px) {
    .sgh-live-search__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sgh-live-search__idle-starters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 781px) {
    .sgh-live-search__close-bar {
        height: 34px;
    }

    .sgh-live-search__top {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo close"
            "form form";
        align-items: center;
        gap: 12px;
        padding: 12px 16px 8px;
    }

    .sgh-live-search__logo {
        grid-area: logo;
    }

    .sgh-live-search__form {
        grid-area: form;
    }

    .sgh-live-search__close-x {
        grid-area: close;
        justify-self: end;
    }

    .sgh-live-search__meta {
        padding: 0 16px 8px;
    }

    .sgh-live-search__layout {
        display: block;
        overflow-y: auto;
        padding: 0 16px 20px;
    }

    .sgh-live-search__filters-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
        padding: 8px 14px;
        border: 1px solid #ddd;
        background: #fff;
        border-radius: 999px;
        font-weight: 700;
        cursor: pointer;
        max-width: 100%;
    }

    .sgh-live-search__filters-toggle-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sgh-live-search__filters-toggle[hidden] {
        display: none !important;
    }

    .sgh-live-search__facets {
        display: none;
        margin-bottom: 16px;
        padding: 12px;
        border: 1px solid #eee;
        border-radius: 12px;
    }

    .sgh-live-search.is-filters-open .sgh-live-search__facets {
        display: block;
    }

    .sgh-live-search__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .sgh-live-search__card--skeleton:nth-child(n+5) {
        display: none;
    }

    .sgh-live-search__main {
        scroll-margin-top: 8px;
    }

    .sgh-live-search__idle {
        padding-top: 8px;
    }

    .sgh-live-search__idle-hero {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .sgh-live-search__idle-prompt {
        font-size: 22px;
    }

    .sgh-live-search__idle-starters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .sgh-live-search__idle-tile-name {
        font-size: 11px;
    }
}
