/* ════════════════════════════════════════════════════════
   Serigest Grid Order – Frontend styles  v1.2.1
   Minimal · Clean · Modern
   ════════════════════════════════════════════════════════ */

:root {
    --sgo-accent:        #16a34a;
    --sgo-accent-bg:     #f0fdf4;
    --sgo-accent-ring:   rgba(22,163,74,.18);
    --sgo-border:        #e4e7ec;
    --sgo-border-focus:  #9ca3af;
    --sgo-bg:            #f9fafb;
    --sgo-surface:       #ffffff;
    --sgo-text:          #111827;
    --sgo-muted:         #6b7280;
    --sgo-danger:        #dc2626;
    --sgo-radius:        8px;
    --sgo-font:          -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

/* ── Hide default WC form when grid is active ─────── */
body.sgo-active .variations_form,
body.sgo-active .single_add_to_cart_button,
body.sgo-active .woocommerce-variation-add-to-cart,
body.sgo-active .woocommerce-variation-description {
    display: none !important;
}

/* ── Intro heading ─────────────────────────────────── */
.sgo-intro {
    margin-bottom: 14px;
}
.sgo-intro__title {
    display: block;
    font-family: var(--sgo-font);
    font-size: 20px;
    font-weight: 700;
    color: var(--sgo-text);
    margin-bottom: 4px;
}
.sgo-intro__sub {
    font-family: var(--sgo-font);
    font-size: 13px;
    color: var(--sgo-muted);
    margin: 0;
}

/* ── Base container ────────────────────────────────── */
.sgo-container {
    margin: 0 0 20px;
    font-family: var(--sgo-font);
    font-size: 15px;
    color: var(--sgo-text);
    line-height: 1.5;
}

/* ── Section card ──────────────────────────────────── */
.sgo-card {
    background: var(--sgo-surface);
    border: 1px solid var(--sgo-border);
    border-radius: var(--sgo-radius);
}

/* ── Label / overline text ─────────────────────────── */
.sgo-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sgo-muted);
    margin-bottom: 12px;
}

/* ════════════════════════════════════════════════════
   SWATCHES
   ════════════════════════════════════════════════════ */
.sgo-swatches-section {
    background: #f5f6f8;
    border: 1px solid var(--sgo-border);
    border-radius: var(--sgo-radius);
    padding: 18px 20px;
    margin-bottom: 12px;
}

.sgo-swatches-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sgo-muted);
    margin: 0 0 14px;
}

.sgo-swatches-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.sgo-swatch {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    flex-shrink: 0;
}

.sgo-swatch--light {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.sgo-swatch:hover {
    box-shadow: 0 0 0 3px var(--sgo-accent-ring);
}

.sgo-swatch.is-selected {
    border-color: var(--sgo-accent);
    box-shadow: 0 0 0 3px var(--sgo-accent-ring);
}

/* SVG check inside swatch */
.sgo-swatch__check {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
}
.sgo-swatch__check svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
}
.sgo-swatch.is-selected .sgo-swatch__check {
    display: flex;
}

/* Badge counter */
.sgo-swatch__num {
    display: none;
    position: absolute;
    top: -14px;
    right: -13px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--sgo-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
    font-family: var(--sgo-font);
}
.sgo-swatch.is-selected .sgo-swatch__num {
    display: flex;
}

/* ════════════════════════════════════════════════════
   CONTENT (tabs + panels)
   ════════════════════════════════════════════════════ */
.sgo-content {
    background: var(--sgo-surface);
    border: 1px solid var(--sgo-border);
    border-radius: var(--sgo-radius);
    overflow: hidden;
    animation: sgoFadeIn .18s ease;
}
@keyframes sgoFadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: none; }
}

/* ── Tabs nav ─────────────────────────────────────── */
.sgo-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--sgo-border);
    overflow-x: auto;
    scrollbar-width: none;
    background: #f5f6f8;
}
.sgo-tabs-nav::-webkit-scrollbar { display: none; }

.sgo-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    font-family: var(--sgo-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--sgo-muted);
    white-space: nowrap;
    transition: color .12s, border-color .12s;
    outline: none;
}
.sgo-tab:hover:not(.is-active) {
    color: var(--sgo-text);
}
.sgo-tab.is-active {
    color: var(--sgo-text);
    border-bottom-color: var(--sgo-text);
    background: var(--sgo-surface);
    font-weight: 600;
}

.sgo-tab__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.1);
}

/* × remove button on tab (desktop only) */
.sgo-tab__remove {
    display: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid transparent;
    color: var(--sgo-muted);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s, color .12s, border-color .12s;
    margin-left: 2px;
}
.sgo-tab__remove:hover {
    background: #fee2e2;
    border-color: var(--sgo-danger);
    color: var(--sgo-danger);
}
@media (min-width: 901px) {
    .sgo-tab__remove {
        display: inline-flex;
    }
}

/* ── Panel ────────────────────────────────────────── */
.sgo-panels-area {
    min-height: 200px;
}

.sgo-panel__layout {
    display: flex;
    min-height: 200px;
}

.sgo-panel__image {
    width: 420px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border-right: 1px solid var(--sgo-border);
}
.sgo-panel__image img {
    max-width: 100%;
    max-height: 440px;
    width: 100%;
    object-fit: contain;
    display: block;
}

.sgo-panel__sizes {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
}

.sgo-panel__sizes-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sgo-muted);
    margin: 0 0 16px;
}

/* ── Size grid ────────────────────────────────────── */
.sgo-size-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sgo-size-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--sgo-border);
}
.sgo-size-row:last-child { border-bottom: none; }

.sgo-size-row__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sgo-text);
    letter-spacing: .02em;
    width: 52px;
    flex-shrink: 0;
}

/* Qty control */
.sgo-size-row__input {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sgo-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--sgo-surface);
    transition: border-color .12s, box-shadow .12s;
}
.sgo-size-row__input.has-qty {
    border-color: var(--sgo-accent);
    box-shadow: 0 0 0 2px var(--sgo-accent-ring);
}

.sgo-qty-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sgo-text);
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    transition: background .1s;
    flex-shrink: 0;
    touch-action: manipulation;
}
.sgo-qty-btn:hover:not(:disabled) {
    background: var(--sgo-bg);
}
.sgo-qty-btn:disabled {
    opacity: .3;
    cursor: default;
}

.sgo-qty-field {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--sgo-border);
    border-right: 1px solid var(--sgo-border);
    background: transparent;
    text-align: center;
    font-family: var(--sgo-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--sgo-text);
    padding: 0;
    -moz-appearance: textfield;
    outline: none;
}
.sgo-qty-field::-webkit-outer-spin-button,
.sgo-qty-field::-webkit-inner-spin-button { -webkit-appearance: none; }

.sgo-size-row__stock {
    font-size: 11px;
    color: var(--sgo-muted);
    white-space: nowrap;
    margin-left: auto;
}

.sgo-size-row.is-out-of-stock .sgo-size-row__name,
.sgo-size-row.is-out-of-stock .sgo-size-row__stock {
    color: #d1d5db;
}
.sgo-size-row.is-out-of-stock .sgo-size-row__input {
    opacity: .4;
    pointer-events: none;
}

/* Actions row (remove + add color) */
.sgo-panel__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Remove colour button */
.sgo-btn-remove-color {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--sgo-danger);
    border-radius: 50px;
    padding: 8px 20px;
    font-family: var(--sgo-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--sgo-danger);
    cursor: pointer;
    transition: background .15s;
    letter-spacing: .01em;
}
.sgo-btn-remove-color:hover {
    background: #fef2f2;
}

/* Add color button — visibile solo su mobile */
.sgo-btn-add-color {
    display: none; /* hidden on desktop */
    align-items: center;
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 50px;
    padding: 8px 20px;
    font-family: var(--sgo-font);
    font-size: 13px;
    font-weight: 500;
    color: #111;
    cursor: pointer;
    transition: background .15s, color .15s;
    letter-spacing: .01em;
}
.sgo-btn-add-color:hover {
    background: #111;
    color: #fff;
}

@media (max-width: 900px) {
    .sgo-btn-add-color {
        display: inline-flex;
    }
}

/* ════════════════════════════════════════════════════
   FULL-WIDTH LAYOUT (grid + sticky sidebar)
   ════════════════════════════════════════════════════ */
.sgo-below-product {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    margin: 32px 0 24px;
    clear: both;
    font-family: var(--sgo-font);
}

.sgo-below-main {
    min-width: 0;
}
.sgo-below-main .sgo-container { margin: 0 0 12px; }

/* Pulsante carrello: sotto griglia + personalizzazioni (non più in sidebar) */
.sgo-below-main .sgo-cart-bar--main {
    margin-top: 28px;
}

.sgo-below-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e4e7ec transparent;
}

/* ════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════ */
.sgo-sidebar {
    background: #f4f6f8;
    border: 1px solid var(--sgo-border);
    border-radius: var(--sgo-radius);
    overflow: hidden;
}

.sgo-sidebar__title {
    font-family: var(--sgo-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sgo-muted);
    margin: 0;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--sgo-border);
}

/* Tiers section */
.sgo-sidebar__tiers {
    padding: 14px 18px;
    border-bottom: 1px solid var(--sgo-border);
}
.sgo-sidebar__tiers h4 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sgo-muted);
    margin: 0 0 10px;
}

.sgo-tiers-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--sgo-font);
    font-size: 14px;
}
.sgo-tiers-table td {
    padding: 5px 4px;
    vertical-align: middle;
}
.sgo-tiers-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--sgo-border);
}
.sgo-tier-row__qty   { color: var(--sgo-muted); }
.sgo-tier-row__price { font-weight: 600; text-align: right; padding-right: 8px; }
.sgo-tier-row__badge { text-align: right; }

.sgo-tiers-vat-note {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--sgo-muted);
    line-height: 1.4;
}

.sgo-tier-row.is-active {
    background: var(--sgo-accent-bg);
}
.sgo-tier-row.is-active td {
    color: #15803d;
    font-weight: 700;
}

.sgo-tier-badge {
    display: inline-block;
    background: #15803d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: .02em;
}

/* Empty state */
.sgo-sidebar__empty {
    padding: 24px 18px;
}
.sgo-sidebar__empty p {
    font-size: 13px;
    color: var(--sgo-muted);
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

/* Active summary */
.sgo-sidebar__active {
    padding: 14px 18px;
}

/* Section heading */
.sgo-summary-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--sgo-text);
    margin: 0 0 10px;
}

/* Per-size rows */
.sgo-sum-size {
    padding: 7px 0;
    border-bottom: 1px solid var(--sgo-border);
}
.sgo-sum-size:last-child { border-bottom: none; }

.sgo-sum-size__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.sgo-sum-size__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sgo-text);
}
.sgo-sum-size__qty {
    font-size: 12px;
    font-weight: 700;
    color: var(--sgo-text);
    flex-shrink: 0;
}

/* Color breakdown */
.sgo-sum-size__colors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 2px;
}
.sgo-sum-color {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--sgo-muted);
}
.sgo-sum-color__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.1);
    display: inline-block;
}
.sgo-sum-color__label {
    white-space: nowrap;
    color: var(--sgo-muted);
}

/* Base total */
.sgo-summary-total {
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--sgo-border);
}
.sgo-summary-total__qty {
    font-size: 12px;
    color: var(--sgo-muted);
    margin-bottom: 3px;
}
.sgo-summary-total__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--sgo-text);
    line-height: 1.2;
}
.sgo-summary-total__price del {
    font-size: 13px;
    font-weight: 400;
    color: var(--sgo-muted);
    margin-right: 4px;
}

.sgo-discount-badge {
    display: inline-block;
    background: var(--sgo-accent-bg);
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Personalizzazioni extra */
.sgo-summary-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 9px 0;
    border-top: 1px dashed var(--sgo-border);
    font-size: 13px;
    gap: 8px;
}
.sgo-summary-extra__label {
    color: var(--sgo-muted);
    font-weight: 500;
}
.sgo-summary-extra__amount {
    font-weight: 600;
    color: var(--sgo-text);
}

/* Grand total */
.sgo-summary-grand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--sgo-border);
    gap: 8px;
}
.sgo-summary-grand span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--sgo-muted);
}
.sgo-summary-grand strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--sgo-text);
}

/* ════════════════════════════════════════════════════
   CART BUTTON
   ════════════════════════════════════════════════════ */
.sgo-cart-bar {
    margin-top: 12px;
}

.sgo-btn-cart {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: var(--sgo-accent);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-family: var(--sgo-font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    text-align: center;
    transition: background .15s, opacity .15s;
}
.sgo-btn-cart:hover:not(:disabled) {
    background: #15803d;
}
.sgo-btn-cart:disabled {
    opacity: .35;
    cursor: default;
}
.sgo-btn-cart.sgo-btn-cart--done {
    background: var(--sgo-accent);
}

/* ════════════════════════════════════════════════════
   MOBILE: bottom bar + drawer
   ════════════════════════════════════════════════════ */
.sgo-mobile-bar {
    display: none;
}

.sgo-mobile-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}
.sgo-mobile-drawer.is-open { display: block; }

.sgo-mobile-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}

.sgo-mobile-drawer__sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sgo-surface);
    border-radius: 12px 12px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 12px);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: sgoSheetUp .26s cubic-bezier(.32,1,.37,1);
}
@keyframes sgoSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.sgo-mobile-drawer__handle {
    width: 36px;
    height: 3px;
    background: #d1d5db;
    border-radius: 3px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

.sgo-mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--sgo-border);
}
.sgo-mobile-drawer__header strong {
    font-family: var(--sgo-font);
    font-size: 15px;
    font-weight: 600;
    color: var(--sgo-text);
}

.sgo-mobile-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--sgo-bg);
    border: 1px solid var(--sgo-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--sgo-muted);
    padding: 0;
    transition: background .12s;
}
.sgo-mobile-drawer__close:hover { background: #f3f4f6; }
.sgo-mobile-drawer__close svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

.sgo-mobile-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    -webkit-overflow-scrolling: touch;
}

.sgo-mobile-drawer__footer {
    padding: 12px 18px;
    flex-shrink: 0;
    border-top: 1px solid var(--sgo-border);
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media ( max-width: 900px ) {
    .sgo-below-product {
        grid-template-columns: 1fr;
    }

    /* Il carrello su mobile è solo nella barra fissa + drawer, non il bottone in main */
    .sgo-below-main .sgo-cart-bar--main {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .sgo-below-sidebar {
        display: none !important;
    }

    .sgo-mobile-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: var(--sgo-surface);
        border-top: 1px solid var(--sgo-border);
        box-shadow: 0 -2px 16px rgba(0,0,0,.08);
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
        align-items: center;
        gap: 12px;
        font-family: var(--sgo-font);
    }

    .sgo-mobile-bar__info {
        flex: 1;
        min-width: 0;
    }

    /* Placeholder — visibile solo quando non ci sono quantità */
    .sgo-mobile-bar__placeholder {
        display: block;
        font-size: 12px;
        color: var(--sgo-muted);
        font-style: italic;
    }
    .sgo-mobile-bar.has-qty .sgo-mobile-bar__placeholder { display: none; }

    .sgo-mobile-bar__qty {
        display: none;
        font-size: 11px;
        color: var(--sgo-muted);
        letter-spacing: .03em;
    }
    .sgo-mobile-bar.has-qty .sgo-mobile-bar__qty { display: block; }

    .sgo-mobile-bar__price {
        display: none;
        font-size: 17px;
        font-weight: 700;
        color: var(--sgo-text);
    }
    .sgo-mobile-bar.has-qty .sgo-mobile-bar__price { display: block; }

    .sgo-mobile-bar__actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    /* Aggiungi al carrello – pill verde */
    .sgo-mobile-bar__cart {
        background: #22c55e;
        color: #fff;
        border: none;
        border-radius: 6px;
        padding: 10px 14px;
        font-family: var(--sgo-font);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        transition: background .12s, opacity .12s;
    }
    .sgo-mobile-bar__cart:disabled,
    .sgo-mobile-bar__cart.smo-btn-blocked {
        opacity: .4;
        cursor: not-allowed;
        pointer-events: none;
    }
    .sgo-mobile-bar__cart:not(:disabled):not(.smo-btn-blocked):hover { background: #16a34a; }

    /* Riepilogo – icona + etichetta */
    .sgo-mobile-bar__recap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        background: none;
        border: none;
        padding: 6px 8px;
        cursor: pointer;
        color: var(--sgo-text);
    }
    .sgo-mobile-bar__recap-icon {
        width: 22px;
        height: 22px;
        display: block;
    }
    .sgo-mobile-bar__recap-label {
        font-family: var(--sgo-font);
        font-size: 10px;
        color: #999;
        line-height: 1;
        letter-spacing: .02em;
    }
    .sgo-mobile-bar__recap:hover .sgo-mobile-bar__recap-icon { opacity: .7; }

    /* La bar è sempre visibile, aggiungiamo padding fisso al body su single product */
    body.single-product .sgo-below-product,
    body.sgo-active .sgo-below-product {
        padding-bottom: 5px;
    }
}

@media ( max-width: 640px ) {
    .sgo-panel__layout {
        flex-direction: column;
    }
    .sgo-panel__image {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--sgo-border);
        padding: 16px;
    }
    .sgo-panel__image img { max-height: 300px; width: auto; margin: 0 auto; }
    .sgo-swatch { width: 32px; height: 32px; }
    .sgo-size-row { grid-template-columns: 44px 1fr auto; }
    .sgo-swatches-section { padding: 14px 16px; }
    .sgo-panel__sizes { padding: 16px; }
}

/* ── Product info bar ────────────────────────────────────────────────────────── */
.sgo-product-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 16px 0 20px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

.sgo-info-item {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 18px;
    border-right: 1px solid #e4e7ec;
}
.sgo-info-item:last-child { border-right: none; }

.sgo-info-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
}

.sgo-info-value {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.sgo-info-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sgo-size-pill {
    display: inline-block;
    padding: 2px 8px;
    background: #f4f6f8;
    border: 1px solid #e4e7ec;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    line-height: 1.6;
}

/* ── Hide SKU and categories on single product page ─────────────────────────── */
.single-product .product_meta,
.single-product .posted_in,
.single-product .tagged_as,
.single-product .sku_wrapper,
.wp-block-woocommerce-product-sku,
.wp-block-woocommerce-product-categories,
.wc-block-components-product-sku,
.wc-block-components-product-categories,
.wc-block-grid__product-categories,
[class*="product-categories"],
[class*="product-sku"],
.wp-block-post-terms.taxonomy-product_cat {
    display: none !important;
}

/* ── Alert "nessuna personalizzazione" ───────────────────────────────────── */
#sgo-no-perso-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
    line-height: 1.5;
    transition: opacity .2s, max-height .3s;
    overflow: hidden;
    max-height: 100px;
}

#sgo-no-perso-alert.sgo-no-perso-alert--hidden {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    pointer-events: none;
}

.sgo-no-perso-alert__icon {
    flex-shrink: 0;
    color: #f59e0b;
    margin-top: 1px;
}

.sgo-no-perso-alert__icon svg {
    display: block;
}

/* ── Disabilita auto-zoom iOS: font-size minimo 16px su mobile ── */
@media (max-width: 768px) {
    .sgo-qty-field {
        font-size: 16px !important;
    }
}
