:root {
    --primary: #fec027;        /* giallo principale */
    --primary-dark: #d19a1e;   /* giallo leggermente più scuro */
    --primary-soft: #fff4cf;   /* giallo chiarissimo di sfondo */
    --bg: #f7f7f7;
    --text: #222;
    --muted: #777;
    --topbar-height: 56px;
    --radius: 14px;
    --shadow: 0 4px 10px rgba(0,0,0,0.08);
    --transition: 0.25s ease;
}

/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.no-scroll {
    overflow: hidden;
}

/* STATO APP CHIUSA */

.closed-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #111;
    color: #fff;
}

.closed-wrapper {
    max-width: 480px;
    padding: 24px;
    text-align: center;
    background: #222;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.closed-main-msg {
    font-size: 18px;
    margin: 12px 0 8px;
}

.closed-info {
    color: #ccc;
    margin-bottom: 12px;
}

.closed-contact {
    font-size: 14px;
    color: #aaa;
}

.closed-body .footer {
    margin-top: 16px;
    padding-bottom: 16px;
    color: #aaa;
}

/* TOPBAR */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 1000;
}

/* Spacer fisico: spinge il contenuto sotto il topbar */
.topbar-spacer {
    height: var(--topbar-height);
    flex-shrink: 0;
}

.topbar__logo {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 16px;
}

/* HAMBURGER */

.hamburger {
    width: 32px;
    height: 32px;
    padding: 6px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    border: none;
    background: transparent;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    border-radius: 999px;
    background: #333;
    transition: var(--transition);
}

/* SIDE MENU */

/* ═══ SIDE MENU — C3 Accordion Inline ═══ */

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 82%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 6px 0 24px rgba(0,0,0,0.1);
    z-index: 999;
}

.sm-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Header ── */

.sm-header {
    padding: 24px 20px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sm-header__logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #FFF8E1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sm-header__name {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a2e;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f5f5f5;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sm-close:hover { background: #eee; }

/* ── Scrollable Body ── */

.sm-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px;
    -webkit-overflow-scrolling: touch;
}

/* ── Menu Item (Homepage, Carrello, etc.) ── */

.sm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    color: #444;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    margin-bottom: 2px;
}

.sm-item:hover { background: #f8f8f8; }

.sm-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sm-item__label {
    flex: 1;
    text-align: left;
}

.sm-item__badge {
    background: #FF3B30;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-item__chevron {
    color: #ddd;
    font-size: 16px;
    font-weight: 500;
}

/* Secondary items - smaller */
.sm-item--secondary {
    padding: 11px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.sm-item--secondary .sm-item__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f8f8f8;
    font-size: 15px;
}

/* ── Separator ── */

.sm-separator {
    margin: 6px 12px;
    height: 1px;
    background: #f0f0f0;
}

/* ── Accordion (Menù) ── */

.sm-accordion {
    background: #fafafa;
    border-radius: 16px;
    margin-bottom: 4px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.sm-accordion__head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sm-accordion__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #FFE082;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sm-accordion__label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    flex: 1;
    text-align: left;
}

.sm-accordion__arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.25s ease;
}

/* Accordion body */
.sm-accordion__body {
    padding: 0 8px 8px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* ── Category items inside accordion ── */

.sm-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 10px;
    margin-bottom: 2px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    color: #777;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sm-cat:hover {
    background: rgba(255,255,255,0.8);
}

.sm-cat--active {
    background: #fff;
    border-color: #FFE082;
    color: #1a1a2e;
    font-weight: 700;
}

.sm-cat__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.sm-cat__icon--active {
    background: var(--primary);
}

.sm-cat__name {
    flex: 1;
    text-align: left;
}

.sm-cat__count {
    font-size: 10px;
    font-weight: 600;
    color: #aaa;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 8px;
}

.sm-cat--active .sm-cat__count {
    background: #FFF8E1;
    color: #C68A00;
}

/* ── Footer CTA ── */

.sm-footer {
    padding: 12px 16px 20px;
}

.sm-footer__cta {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 14px;
    padding: 12px 16px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sm-footer__cta:active { transform: scale(0.98); }
.sm-footer__cta:hover { box-shadow: 0 4px 12px rgba(255,184,0,0.15); }

.sm-footer__emoji { font-size: 20px; }

.sm-footer__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sm-footer__text strong {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a2e;
}

.sm-footer__text small {
    font-size: 10px;
    color: #999;
}

.sm-footer__arrow {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
}

/* ── Open/Close states ── */

.side-menu--open {
    transform: translateX(0);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 900;
}

.overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

/* MAIN */

main {
    padding: 16px 16px 90px;
    position: relative;
}

/* BACK BUTTON */

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 20px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
    background: var(--primary);
    color: #fff;
}

.back-btn:active {
    transform: scale(0.92);
}

/* STICKY CATEGORY TABS */

.cat-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 10px 16px;
    margin: 0 -16px 16px;
    background: #fff;
    position: sticky;
    top: var(--topbar-height);
    z-index: 100;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    /* Fade hint on right edge */
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

.cat-tabs::-webkit-scrollbar {
    display: none;
}

/* Remove fade when scrolled to end */
.cat-tabs.scrolled-end {
    mask-image: linear-gradient(to left, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, #000 85%, transparent 100%);
}

.cat-tabs.scrolled-mid {
    mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 85%, transparent 100%);
}

.cat-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

.cat-tab__emoji {
    font-size: 22px;
    line-height: 1;
}

.cat-tab__name {
    line-height: 1.2;
}

.cat-tab:hover {
    background: #fafafa;
    color: #666;
}

.cat-tab--active {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-color: var(--primary);
}

/* FLOATING CART BAR (mobile) */

.cart-float {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 16px;
    padding: 14px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 900;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.cart-float--visible {
    display: flex;
}

.cart-float:active {
    transform: scale(0.97);
}

.cart-float__info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.cart-float__badge {
    background: var(--primary);
    color: #000;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.cart-float__action {
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* WELCOME HERO (schermata iniziale) */

.welcome-hero {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    max-width: 620px;
    margin: 0 auto;
}

/* ── Hero Banner ── */

.hero-banner {
    background: linear-gradient(145deg, #FFF8E1 0%, #FFECB3 100%);
    border-radius: 22px;
    padding: 32px 24px 28px;
    position: relative;
    overflow: hidden;
}

.hero-banner__decor {
    position: absolute;
    right: -8px;
    top: -10px;
    font-size: 110px;
    opacity: 0.1;
    transform: rotate(15deg);
    pointer-events: none;
    line-height: 1;
}

.hero-banner__content {
    position: relative;
}

.hero-banner__badge {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 14px;
    background: rgba(255,184,0,0.2);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #C68A00;
    text-transform: uppercase;
}

.hero-banner__title {
    font-size: 26px;
    font-weight: 900;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.15;
}

.hero-banner__subtitle {
    font-size: 13px;
    color: #8B7355;
    margin: 0 0 24px;
    line-height: 1.5;
}

.hero-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    border: none;
    border-radius: 14px;
    padding: 15px 36px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,184,0,0.35);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.hero-banner__btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(255,184,0,0.25);
}

.hero-banner__arrow {
    font-size: 18px;
    transition: transform 0.2s;
}

.hero-banner__btn:hover .hero-banner__arrow {
    transform: translateX(3px);
}

/* ── Hero Tags ── */

.hero-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.hero-tag {
    background: #f8f8f8;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
}

.hero-tag__icon {
    font-size: 14px;
}

/* ── Quick Access Cards ── */

.hero-quick {
    display: flex;
    gap: 10px;
}

.hero-quick__card {
    flex: 1;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.hero-quick__card:active {
    transform: scale(0.97);
}

.hero-quick__card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.hero-quick__emoji {
    font-size: 22px;
}

.hero-quick__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-quick__text strong {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.hero-quick__text small {
    font-size: 10px;
    color: #bbb;
}

/* TITOLO PAGINA (usato in menu.php) */

.page-title {
    margin-bottom: 8px;
}

.page-title h1 {
    font-size: 22px;
    margin: 0;
}

/* BUTTONS GENERICI */

.primary-btn,
.secondary-btn {
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.primary-btn {
    background: linear-gradient(135deg, #FFB800, #FF9500);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,149,0,0.3);
}

.primary-btn:hover {
    box-shadow: 0 6px 20px rgba(255,149,0,0.4);
    transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active {
    transform: scale(0.97);
}

.secondary-btn {
    background: #f0f0f0;
    color: #666;
    font-weight: 700;
}

/* CATEGORIE (micro, menu.php) */

.section-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.categories-wrapper {
    margin-bottom: 12px;
}

.categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

/* pill moderne */
.chip {
    border-radius: 999px;
    padding: 6px 16px;
    border: 1px solid rgba(0,0,0,0.06);
    background: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    color: #444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* PRODOTTI – 2 PER RIGA (menu.php) */

.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 100%;
    overflow: hidden;
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 10px 10px 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.product-card__image-wrap {
    width: 100%;
    padding-top: 75%; /* 4:3 */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fafafa;
    margin-bottom: 8px;
}

.product-card__image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card__image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--muted);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.product-card__title {
    margin: 0;
    font-size: 14px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.product-card__price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-card__price {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}

.old-price {
    display: block;
    font-size: 13px;
    color: var(--muted);
    text-decoration: line-through;
}

/* tasto Descrizione */
.product-card__details-btn {
    align-self: flex-start;
    border-radius: 999px;
    border: 1px solid var(--primary);
    padding: 4px 10px;
    font-size: 12px;
    background: var(--primary-soft);
    cursor: pointer;
    color: #333;
}

.product-card__details-btn:hover {
    background: var(--primary);
    color: #000;
}

/* testo descrizione usato solo dal JS per il modal */
.product-card__desc {
    display: none;
    font-size: 13px;
    color: var(--muted);
    margin: 4px 0 0;
}

.product-card__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.product-card__qty-add {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.qty-input {
    width: 48px;
    min-width: 0;
    padding: 6px 4px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    text-align: center;
    flex-shrink: 0;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart {
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    color: #000;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}

.add-to-cart:hover {
    background: var(--primary-dark);
}

.badge {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
}

/* BARRA CARRELLO – gialla con pulsante bianco (menu.php) */

.cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.25);
    z-index: 1000;
}

.cart-bar__info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    gap: 4px;
    color: #000;
}

.cart-bar__info-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-bar__info-line i {
    font-size: 14px;
}

.cart-bar__button {
    border-radius: 999px;
    border: none;
    padding: 10px 40px;
    background: #ffffff;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    min-width: 200px;
}

.cart-bar__button i {
    font-size: 16px;
}

/* Cart bar responsive: bottone più grande su mobile */
@media (max-width: 768px) {
    .cart-bar {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }
    .cart-bar__info {
        flex: 1;
        min-width: 0;
    }
    .cart-bar__button {
        min-width: 60%;
        justify-content: center;
        padding: 10px 24px;
        font-size: 15px;
        font-weight: 700;
    }
}

/* Badge quantità sulla card prodotto */
.product-card {
    position: relative;
}
.product-card__cart-qty-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary, #FFC72C);
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    animation: badgePop 0.25s ease-out;
}
@keyframes badgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* CART DRAWER (menu.php) */

.cart-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: #fafafa;
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    border-radius: 24px 0 0 24px;
}

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

.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1050;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.cart-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer__header {
    padding: 20px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer__header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.cart-drawer__close {
    border: none;
    background: #f0f0f0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.cart-drawer__close:hover {
    background: #e0e0e0;
    color: #333;
}

.cart-drawer__body {
    padding: 0 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.checkout-steps {
    list-style: none;
    display: flex;
    padding: 0 20px;
    margin: 0 0 16px;
    gap: 4px;
    font-size: 13px;
    background: #f0f0f0;
    border-radius: 12px;
    margin-left: 20px;
    margin-right: 20px;
    padding: 4px;
}

.checkout-steps li {
    padding: 8px 0;
    flex: 1;
    text-align: center;
    color: #999;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.checkout-steps li.active {
    color: #1a1a2e;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-weight: 700;
}

/* STEP CARRELLO */

.checkout-step {
    display: none;
}

.checkout-step--active {
    display: block;
}

/* RIGA CARRELLO – layout v8 */

.cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-line:last-of-type {
    border-bottom: none;
}

/* Colonna descrizione (QTA. X NOME) a sinistra */
.cart-line__info {
    flex: 1 1 auto;
}

.cart-line__qty-inline,
.cart-line__name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}

.cart-line__qty-inline {
    display: inline-block;
    min-width: 52px;
    color: #999;
    font-weight: 600;
    font-size: 13px;
}

.cart-line__name {
    display: inline;
}

/* Colonna centrale con - e + */
.cart-line__qty-controls {
    flex: 0 0 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Bottoni +/- tondi */
.cart-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.cart-qty-btn:hover {
    border-color: #FFB800;
    color: #FFB800;
}

.cart-qty-btn:active {
    transform: scale(0.92);
}

/* Colonna destra con prezzo e X rossa */
.cart-line__price-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.cart-line__price {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
}

/* Totali carrello, versione a singola riga */
.cart-drawer__totals--single {
    margin-top: 16px;
}

.cart-drawer__totals--single > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.cart-line__remove {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid #ffcdd2;
    background: #fff;
    color: #e53935;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.cart-line__remove:hover {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
}

.cart-drawer__totals {
    margin-top: 16px;
    border-top: 2px solid #1a1a2e;
    padding-top: 14px;
    font-size: 15px;
}

.cart-drawer__totals > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cart-drawer__totals span {
    font-weight: 700;
    color: #1a1a2e;
}

.cart-drawer__totals strong {
    font-weight: 800;
    font-size: 17px;
    color: #1a1a2e;
}

.full-width {
    width: 100%;
    margin-top: 16px;
}

/* FORM CHECKOUT v8 */

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    font-size: 14px;
}

.form-field span {
    margin-bottom: 6px;
    font-weight: 700;
    color: #1a1a2e;
    font-size: 13px;
}

.form-field input,
.form-field textarea,
.form-field select {
    border-radius: 14px;
    border: 1.5px solid #e0e0e0;
    padding: 12px 14px;
    font-size: 15px;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1a1a2e;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #FFB800;
    box-shadow: 0 0 0 3px rgba(255,184,0,0.15);
}

.form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
    cursor: pointer;
}

.form-field select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Flatpickr calendar legend */
.flatpickr-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #888;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.legend-dot--open { background: #4CAF50; }

/* Flatpickr v8 overrides */
.flatpickr-calendar {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    border: 1.5px solid #e0e0e0 !important;
    overflow: hidden;
}
.flatpickr-months .flatpickr-month {
    background: #fff !important;
    border-radius: 0 !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #1a1a2e !important;
    font-weight: 800 !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: #1a1a2e !important;
    color: #1a1a2e !important;
}
span.flatpickr-weekday {
    color: #1a1a2e !important;
    font-weight: 700 !important;
    background: #fff !important;
}
.flatpickr-weekdays {
    background: #fff !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #FFB800, #FF9500) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(255,149,0,0.3) !important;
}
.flatpickr-day.today {
    border-color: #FFB800 !important;
}
.flatpickr-day:hover {
    background: #FFF8E1 !important;
    border-color: #FFE082 !important;
}

/* Number input — hide native spinners */
.form-field input[type="number"] {
    -moz-appearance: textfield;
}
.form-field input[type="number"]::-webkit-outer-spin-button,
.form-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.legend-dot--closed { background: #ef5350; }

.form-field-group {
    display: flex;
    gap: 12px;
}

.form-field-group .form-field {
    flex: 1;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    margin: 10px 0;
    color: #666;
    line-height: 1.5;
}

.checkbox-field input {
    margin-top: 3px;
    accent-color: #FFB800;
}

.checkout-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

/* PAGAMENTO v8 */

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #e0e0e0;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.payment-option:has(input:checked) {
    border-color: #FFB800;
    background: #FFF8E1;
    box-shadow: 0 2px 8px rgba(255,184,0,0.12);
}

.payment-option input[type="radio"] {
    margin-right: 4px;
    accent-color: #FFB800;
}

.payment-option__content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.payment-option__icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    font-style: normal;
}

.payment-note {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    margin-top: 8px;
}

/* MODAL DESCRIZIONE PRODOTTO */

.desc-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.desc-modal--open {
    display: flex;
}

.desc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.desc-modal__dialog {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 90%;
    background: #fff;
    border-radius: 16px;
    padding: 16px 18px 18px;
    box-shadow: var(--shadow);
}

.desc-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.desc-modal__title {
    margin: 0 24px 8px 0;
    font-size: 17px;
}

.desc-modal__body {
    font-size: 14px;
    color: var(--text);
    max-height: 60vh;
    overflow-y: auto;
}

/* FOOTER */

.footer {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    padding: 12px 16px 80px;
    box-sizing: border-box;
}

/* su mobile lo alzo sopra la barra carrello fissa */
@media (max-width: 767.98px) {
    .footer {
        padding-bottom: 100px;
    }
}

/* DESKTOP */

@media (min-width: 768px) {

    .topbar {
        left: 280px;
    }

    .topbar-spacer {
        margin-left: 280px;
    }

    .side-menu {
        transform: translateX(0);
        max-width: 280px;
        box-shadow: 1px 0 0 #f0f0f0;
    }

    .hamburger {
        display: none;
    }

    main {
        margin-left: 280px;
        max-width: 960px;
        margin-right: auto;
        padding-inline: 32px;
    }

    .cat-tabs {
        margin: 0 -32px 16px;
        padding: 10px 32px;
    }

    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cart-drawer {
        max-width: 480px;
        border-radius: 24px 0 0 24px;
    }
}

/* ----- Order success: blocco Ordine / Apri tickets ----- */

.order-success__tickets-cta {
    margin-top: 20px;
    text-align: center;
}

.order-success__tickets-cta p {
    font-size: 14px;
    color: #888;
    margin: 0 0 12px;
}

.order-success__order-label {
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 18px;
    color: #1a1a2e;
}

.order-success__tickets-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #FFB800, #FF9500);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(255,149,0,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.order-success__tickets-btn:active {
    transform: scale(0.97);
}

.order-success__tickets-btn:hover {
    box-shadow: 0 6px 20px rgba(255,149,0,0.4);
    transform: translateY(-1px);
}

.order-success__mail-status {
    font-size: 13px;
    color: #888;
    background: #f8f8f8;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 10px 14px;
    margin: 12px 0;
}

.order-success__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.order-success__table th {
    text-align: left;
    padding: 10px 6px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-success__table td {
    padding: 8px 6px;
    border-bottom: 1px solid #f8f8f8;
    color: #444;
}

.order-success__table .text-center { text-align: center; }
.order-success__table .text-right { text-align: right; }

/* ----- Pagina tickets ----- */

.tickets-page {
    padding: 24px 16px 32px;
}

.tickets-page__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.tickets-summary-card {
    max-width: 900px;
    margin: 0 auto 18px;
    background: #f7f7f7;
    border-radius: 18px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tickets-summary-card p {
    margin: 2px 0;
}

.tickets-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ticket-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #f1e2b9;
}

.ticket-card__header {
    background: #f6d27a;
    padding: 8px 16px;
    text-align: center;
}

.ticket-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.03em;
}

.ticket-card__body {
    display: flex;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
}

.ticket-card__left {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-card__qr {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    border: 2px dashed #f6d27a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #000;
    background: #fffdf6;
}

.ticket-card__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.ticket-card__counts {
    text-align: right;
    font-size: 14px;
    line-height: 1.3;
}

.ticket-card__remaining {
    color: #d93025; /* rosso per "RIMASTI" */
    font-weight: 700;
}

.ticket-card__counts-sep {
    display: inline-block;
    margin: 0 4px;
}

.ticket-card__purchased {
    font-weight: 600;
    color: #333;
}

/* mobile: impilo QR e testo */
@media (max-width: 640px) {
    .ticket-card__body {
        flex-direction: column;
        align-items: center;
    }

    .ticket-card__right {
        justify-content: center;
    }

    .ticket-card__counts {
        text-align: center;
    }
}

/* ====== Tickets page ====== */

.tickets-hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.tickets-summary-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.tickets-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tickets-summary-card p {
    margin: 2px 0;
    font-size: 14px;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ====== Tickets page ====== */

.tickets-hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.tickets-summary-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.tickets-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tickets-summary-card p {
    margin: 2px 0;
    font-size: 14px;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ====== Singolo ticket stile biglietto ====== */

.ticket-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    background: #ffd76a;               /* giallo ticket */
    border-radius: 20px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    overflow: visible;
}

/* Fori laterali tipo biglietto */

.ticket-card::before,
.ticket-card::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    transform: translateY(-50%);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.04) inset;
}

.ticket-card::before {
    left: -12px;
}

.ticket-card::after {
    right: -12px;
}

/* “Staccatura” tra talloncino QR e corpo ticket */
.ticket-card__stub {
    padding: 12px 12px 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 2px dashed rgba(255, 255, 255, 0.7);
}

.ticket-card__qr-img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 14px;
    background: #ffffff;
    padding: 6px;
}

.ticket-card__body {
    padding: 12px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ticket-card__title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ticket-card__amount {
    padding: 12px 18px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
}

.ticket-card__remaining-main {
    font-size: 16px;
    font-weight: 700;
    color: #c5281c;
    text-transform: uppercase;
}

.ticket-card__remaining-sub {
    font-size: 12px;
    color: #444;
}

/* Responsive */

@media (max-width: 700px) {
    .ticket-card {
        grid-template-columns: 1fr;
    }

    .ticket-card__stub {
        border-right: none;
        border-bottom: 2px dashed rgba(255, 255, 255, 0.7);
        padding-bottom: 8px;
    }

    .ticket-card__amount {
        align-items: center;
        text-align: center;
    }

    .ticket-card::before,
    .ticket-card::after {
        display: none; /* su mobile tolgo i fori per non rompere il layout */
    }
}


/* ====== STATO TICKET ESAURITO + TESTI QUANTITÀ ====== */

/* Ticket esaurito: sfondo grigio, look "spento" */
.ticket-card--used {
    background: #e5e5e5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* lo stub del QR su ticket esaurito */
.ticket-card--used .ticket-card__stub {
    background: #f3f3f3;
}

/* nascondo il QR se esaurito */
.ticket-card--used .ticket-card__qr-img {
    display: none;
}

/* contenitore con X rossa + testo "ES AURITO" dentro lo stub */
.ticket-card__used-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 110px;
    height: 110px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px dashed #d4d4d4;
}

.ticket-card__used-icon {
    font-size: 26px;
    color: #c5281c;
}

.ticket-card__used-text {
    font-size: 12px;
    font-weight: 700;
    color: #c5281c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* testo quantità PIÙ GRANDE e più evidente */
.ticket-card__remaining-main {
    font-size: 18px;
    font-weight: 800;
}

.ticket-card__remaining-sub {
    font-size: 13px;
}

/* sulle card esaurite il testo passa al grigio */
.ticket-card--used .ticket-card__remaining-main {
    color: #555;
}

.ticket-card--used .ticket-card__remaining-sub {
    color: #777;
}
.topbar__logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Messaggi errore step 2 (Dati) */

.checkout-error {
    display: none;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff6e0;
    border: 1px solid #ffd66b;
    font-size: 14px;
    line-height: 1.4;
}

.checkout-error--visible {
    display: block;
}

.checkout-error__title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #b86600;
}

.checkout-error__text {
    margin-bottom: 6px;
    color: #5a4b2b;
}

.checkout-error__list {
    margin: 0;
    padding-left: 18px;
    color: #5a4b2b;
}

.checkout-error__list li {
    margin: 0;
    padding: 0;
}

/* Evidenziazione campi con errore */

.form-field--error input,
.form-field--error textarea,
.form-field--error select {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.form-field--error span,
.form-field--error label {
    color: #e53935;
}

/* Step heading (es. "Metodo di pagamento") */
.checkout-step h3 {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 4px;
}
.pwa-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.pwa-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pwa-banner__text strong {
  font-size: 14px;
  margin-bottom: 2px;
}

.pwa-banner__actions {
  display: flex;
  gap: 6px;
}

.pwa-banner__btn {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #ffbe1a;
  color: #000;
}

.pwa-banner__btn--ghost {
  background: transparent;
  color: #555;
}
.ios-install-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 9999;
    padding: 12px 16px;
    border-radius: 12px;
    background: #ffbe1a;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ios-install-banner--hidden {
    display: none !important;
}
/* Solo mobile: nascosto su desktop (>768px) */
@media (min-width: 769px) {
    .ios-install-banner {
        display: none !important;
    }
}
.ios-install-banner button {
    border: none;
    background: rgba(0,0,0,0.1);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #000;
}
.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #666666;
}

.checkbox-field .field-hint {
    margin-top: 2px;
    font-size: 11px;
    opacity: 0.9;
}
.tickets-header__actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.secondary-btn--inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.resume-cart-banner {
    background: #fff4cf;
    border: 1px solid #ffd36a;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.resume-cart-banner__btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #ffbe1a;
}

.resume-cart-banner__btn:hover {
    filter: brightness(0.97);
}
.last-order-banner {
    background: #e8f5ff;
    border: 1px solid #b5dcff;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.last-order-banner__form {
    margin: 0;
}

/* Banner actions (buttons + dismiss) */

.banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.banner-dismiss {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: none;
    background: rgba(0,0,0,.08);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}

.banner-dismiss:hover {
    background: rgba(0,0,0,.15);
    color: #333;
}

/* ── Stock checker toast ─────────────────────── */
.stock-error-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 99999;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    max-width: 90vw;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.stock-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.stock-toast--error { background: #ef5350; }
.stock-toast--warning { background: #ff9800; }
.stock-toast--success { background: #4CAF50; }

/* Bottone "Aggiungi" in stato verifica */
.add-to-cart--checking {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}
.add-to-cart--checking::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin-stock 0.6s linear infinite;
    right: 8px;
    top: 50%;
    margin-top: -7px;
}
@keyframes spin-stock {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════
   TIME PICKER — Visual slot selector (Mattina / Pomeriggio)
   ═══════════════════════════════════════════════════════ */
.time-picker-container {
    border: 1.5px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.time-picker-container:focus-within {
    border-color: #FFB800;
    box-shadow: 0 0 0 3px rgba(255,184,0,0.15);
}
.time-picker-placeholder {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.time-picker-loading {
    padding: 24px;
    text-align: center;
    color: #888;
    font-size: 14px;
}
.time-picker-loading .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #f0f0f0;
    border-top-color: #FFB800;
    border-radius: 50%;
    animation: spin-stock 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
.time-picker-empty {
    padding: 20px;
    text-align: center;
    color: #e53935;
    font-size: 14px;
    font-weight: 600;
}

/* ── Gruppo fascia (Mattina / Pomeriggio) ──── */
.time-group {
    border-bottom: 1px solid #f0f0f0;
}
.time-group:last-child {
    border-bottom: none;
}
.time-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
}
.time-group--mattina .time-group-header {
    background: #FFF8E1;
    color: #C68A00;
}
.time-group--sera .time-group-header {
    background: #f0f0f0;
    color: #1a1a2e;
}
.time-group-header .group-icon {
    font-size: 16px;
}
.time-group-header .group-range {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
}

/* ── Griglia slot ──── */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 6px;
    padding: 10px 14px 14px;
}
.time-slot-btn {
    padding: 8px 4px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.time-slot-btn:hover {
    border-color: #FFB800;
    background: #FFF8E1;
    color: #C68A00;
}
.time-slot-btn:active {
    transform: scale(0.95);
}
.time-slot-btn.selected {
    background: linear-gradient(135deg, #FFB800, #FF9500);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(255,149,0,0.3);
}
.time-slot-btn.selected .slot-remaining { color: rgba(255,255,255,0.85); }

/* ── Badge posti rimanenti ──── */
.slot-remaining {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: #999;
    margin-top: 1px;
    line-height: 1;
}
.slot-remaining--low {
    color: #e53935;
    font-weight: 700;
}

/* ── Selezione attuale ──── */
.time-picker-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: #FFF8E1;
    border-top: 1px solid #FFE082;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}
.time-picker-selection .selection-clear {
    font-size: 12px;
    color: #999;
    cursor: pointer;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 700;
    color: #FF9500;
}
.time-picker-selection .selection-clear:hover {
    color: #e53935;
}

/* ── Mobile ──── */
@media (max-width: 480px) {
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 5px;
        padding: 8px 10px 12px;
    }
    .time-slot-btn {
        padding: 10px 2px;
        font-size: 13px;
    }
}

/* ── Narrow screens (Samsung, small iPhones) ──── */
@media (max-width: 400px) {
    .product-card {
        padding: 8px 8px 10px;
    }
    .product-card__title {
        font-size: 13px;
    }
    .product-card__qty-add {
        gap: 4px;
    }
    .qty-input {
        width: 40px;
        padding: 5px 2px;
        font-size: 13px;
    }
    .add-to-cart {
        padding: 6px 10px;
        font-size: 12px;
    }
    .products {
        gap: 10px;
    }
}

/* === DA AGGIUNGERE IN FONDO A styles.css === */

/* Link legali nei checkbox del carrello */
.checkbox-field .legal-link {
    color: #d4900a;
    text-decoration: underline;
    font-weight: 500;
}
.checkbox-field .legal-link:hover {
    color: #b3790a;
}
.checkbox-field .field-hint .legal-link {
    font-size: 11px;
    font-weight: 500;
}
/* ── Cart Empty Toast ── */

.cart-empty-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
    animation: toastSlideUp 0.3s ease-out;
}

.cart-empty-toast__icon {
    font-size: 18px;
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══ SECONDARY PAGES — Shared Styles ═══ */

.sec-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

.sec-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.sec-header__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.sec-header__icon--yellow  { background: #FFF8E1; }
.sec-header__icon--green   { background: #E8F5E9; }
.sec-header__icon--blue    { background: #E3F2FD; }
.sec-header__icon--red     { background: #FFEBEE; }
.sec-header__icon--purple  { background: #F3E5F5; }

.sec-header__text h1 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 2px;
}

.sec-header__text p {
    font-size: 13px;
    color: #999;
    margin: 0;
}

.sec-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.sec-card + .sec-card {
    margin-top: 12px;
}

.sec-card h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 24px 0 12px;
}

.sec-card h3 {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    margin: 20px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sec-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 8px;
}

.sec-card hr {
    border: none;
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

.sec-card hr {
    border: none;
    height: 1px;
    background: #f0f0f0;
    margin: 16px 0;
}

/* Contact row */
.sec-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f8f8f8;
}

.sec-contact-row:last-child {
    border-bottom: none;
}

.sec-contact-row__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.sec-contact-row a {
    color: #333;
    text-decoration: none;
}

.sec-contact-row a:hover {
    color: var(--primary);
}

/* Social links */
.sec-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.sec-social a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    color: #555;
    transition: background 0.15s, transform 0.15s;
}

.sec-social a:hover {
    background: #FFF8E1;
    transform: scale(1.08);
}

/* Allergen item */
.sec-allergen {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #f8f8f8;
}

.sec-allergen:last-child {
    border-bottom: none;
}

.sec-allergen__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #FFF8E1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* Legal page (privacy, condizioni) */
.sec-legal {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

.sec-legal .sec-card {
    padding: 28px 24px;
    line-height: 1.7;
}

.sec-legal .sec-card h2 {
    font-size: 16px;
    color: #1a1a2e;
    margin: 24px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary);
}

.sec-legal .sec-card ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.sec-legal .sec-card li {
    font-size: 14px;
    margin-bottom: 6px;
    color: #555;
}

.sec-legal .sec-card a {
    color: #C68A00;
}

.sec-highlight {
    background: #FFF8E1;
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin: 14px 0;
    font-size: 14px;
    color: #555;
}

.sec-highlight--red {
    background: #FFF5F5;
    border-left-color: #e53e3e;
}

.sec-subtitle {
    font-size: 13px;
    color: #999;
    margin-bottom: 24px;
}

.sec-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #999;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    transition: color 0.15s;
}

.sec-back-link:hover {
    color: var(--primary);
}

/* Form styling (recover tickets) */
.sec-form__group {
    margin-bottom: 14px;
}

.sec-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.sec-form__input {
    width: 100%;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

.sec-form__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,184,0,0.12);
    background: #fff;
}

.sec-form__captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #555;
}

.sec-form__captcha input {
    width: 90px;
}

.sec-form__submit {
    margin-top: 8px;
    padding: 14px 32px;
    border-radius: 14px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255,184,0,0.25);
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sec-form__submit:active {
    transform: scale(0.97);
}

.sec-form__submit:hover {
    box-shadow: 0 6px 18px rgba(255,184,0,0.35);
}

.sec-form-status {
    margin: 10px 0 4px;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 10px;
}

.sec-form-status--success {
    color: #0a7b1f;
    background: #E8F5E9;
}

.sec-form-status--error {
    color: #c01919;
    background: #FFEBEE;
}

.sec-form-status--info {
    color: #555;
    background: #f5f5f5;
}

@media (max-width: 600px) {
    .sec-card {
        padding: 18px 16px;
    }
    .sec-header__icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .sec-header__text h1 {
        font-size: 19px;
    }
    .sec-legal .sec-card {
        padding: 20px 16px;
    }
}
