/* ========================================
   Insomnia Café — Listino  |  Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&family=Kaushan+Script&display=swap');

:root {
    --bg:            #0C0C0E;
    --bg-deep:       #070708;
    --surface:       #16161A;
    --red:           #E3262B;
    --red-dk:        #B81C21;
    --red-glow:      rgba(227, 38, 43, .22);
    --text:          #F2F0ED;
    --text-muted:    #A09DA8;
    --white:         #FFFFFF;
    --border:        rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .2);
    --nav-h:         64px;
    --radius:        14px;
}

/* ---- Base ---- */
html { scroll-behavior: auto; }

body {
    background: radial-gradient(900px 420px at 50% -160px, var(--red-glow), transparent 70%) no-repeat,
                var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: .95rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--white);
}

::selection { background: var(--red); color: var(--white); }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* ---- Logo (INSOMNIA café + bicchiere) ---- */
.brand-logo {
    display: inline-flex;
    align-items: flex-end;
    line-height: 1;
    color: var(--white);
    white-space: nowrap;
}
.brand-main {
    font-family: 'Anton', sans-serif;
    font-size: 1.55rem;
    letter-spacing: .04em;
}
.brand-sub {
    font-family: 'Kaushan Script', cursive;
    font-size: 1.15rem;
    color: var(--red);
    margin-left: .3rem;
    transform: translateY(.3rem);
}
.brand-glass {
    width: .95rem;
    height: 1.35rem;
    margin-left: .3rem;
    flex-shrink: 0;
}
.brand-glass-liquid { fill: var(--red); stroke: none; }

.brand-logo--lg .brand-main  { font-size: 2.6rem; }
.brand-logo--lg .brand-sub   { font-size: 1.9rem; transform: translateY(.45rem); }
.brand-logo--lg .brand-glass { width: 1.6rem; height: 2.25rem; }

/* ---- Navbar ---- */
nav.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--nav-h);
    padding: 0;
    background: rgba(12, 12, 14, .82) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
nav.navbar > .container { min-height: var(--nav-h); }

.navbar-brand-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

/* Selettore lingua (IT | EN) */
.lang-switch {
    display: inline-flex;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 3px;
}
.lang-switch a {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--text-muted);
    text-decoration: none;
    padding: .45rem .8rem;
    border-radius: 999px;
    transition: color .2s, background-color .2s;
}
.lang-switch a:hover { color: var(--white); }
.lang-switch a.active {
    background: var(--red);
    color: var(--white);
}

/* ---- Filtri categoria (sticky) ---- */
.cat-nav-sticky {
    position: sticky;
    top: var(--nav-h);
    z-index: 1020;
    background: rgba(12, 12, 14, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}

/* Schede macro-sezione (Food / Beverage) */
.macro-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    max-width: 480px;
    margin: 0 auto .75rem;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
}
.macro-tab {
    font-family: 'Anton', sans-serif;
    font-size: 1.2rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: .5rem 1rem;
    transition: color .2s, background-color .2s, box-shadow .2s;
}
.macro-tab:hover { color: var(--white); }
.macro-tab.active {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 6px 20px var(--red-glow);
}

/* Categorie della sezione attiva */
.cat-nav {
    gap: .45rem !important;
}
.cat-nav .nav-item { flex-shrink: 0; }

.cat-nav .nav-link {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: .5rem 1.1rem;
    cursor: pointer;
    transition: color .2s, border-color .2s, background-color .2s;
}
.cat-nav .nav-link:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, .45);
}
.cat-nav .nav-link.active {
    background: var(--white);
    border-color: var(--white);
    color: var(--bg);
}

/* Su mobile le categorie scorrono in orizzontale invece di andare a capo */
@media (max-width: 767.98px) {
    .cat-nav {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5);
        padding-inline: calc(var(--bs-gutter-x, 1.5rem) * .5);
    }
    .cat-nav::-webkit-scrollbar { display: none; }
}

/* ---- Sezioni categoria ---- */
.cat-section {
    padding-top: 1rem;
}

.cat-title {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: .25rem;
    line-height: 1.1;
}

.cat-desc {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.section-divider {
    width: 48px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    margin: .75rem 0 1.4rem;
}

/* ---- Cards prodotto ---- */
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.product-card:hover {
    border-color: rgba(227, 38, 43, .55);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
    transform: translateY(-2px);
}

.product-img {
    height: 200px;
    object-fit: cover;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: .2rem;
    line-height: 1.3;
}

.product-desc {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.product-price {
    font-size: .95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--white);
    background: var(--red);
    padding: .3rem .75rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
}

/* ---- Ordini (WhatsApp / telefono) ---- */
.order-box {
    text-align: center;
    margin-bottom: 2.5rem;
}

.order-title {
    font-family: 'Kaushan Script', cursive;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.order-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 300px));
    justify-content: center;
    gap: .75rem;
}

.order-link {
    display: flex;
    flex-direction: column;
    color: var(--text);
    text-decoration: none;
}

/* Etichetta bianca con i bordi strappati */
.order-banner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .6rem .9rem;
    background: var(--white);
    clip-path: polygon(0 0, 100% 0, 98% 12%, 100% 25%, 97.5% 38%, 100% 50%, 98% 63%, 100% 75%, 97.5% 88%, 100% 100%,
                       0 100%, 2% 88%, 0 75%, 2.5% 63%, 0 50%, 2% 38%, 0 25%, 2.5% 12%);
    transition: transform .15s;
}
.order-link:hover .order-banner {
    transform: translateY(-2px);
}
.order-banner i {
    font-size: 1.75rem;
    line-height: 1;
}
.order-whatsapp .order-banner { color: #15803D; }
.order-telefono .order-banner { color: var(--red-dk); }

.order-banner-text {
    text-align: left;
    line-height: 1.1;
}
.order-banner-label {
    display: block;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.order-banner-number {
    display: block;
    font-family: 'Anton', sans-serif;
    font-size: 1.25rem;
    letter-spacing: .03em;
}

.order-hint {
    display: block;
    margin-top: .4rem;
    font-size: .78rem;
    text-decoration: underline;
}

.order-hours {
    margin: .9rem 0 0;
    font-size: .82rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .order-banner {
        gap: .4rem;
        padding: .55rem .7rem;
    }
    .order-banner i { font-size: 1.3rem; }
    .order-banner-label {
        font-size: .56rem;
        letter-spacing: .02em;
    }
    .order-banner-number { font-size: 1.1rem; }
}

/* ---- Footer ---- */
footer.site-footer {
    background: var(--bg-deep);
    color: var(--text-muted);
    padding: 2.5rem 0 2rem;
    margin-top: 4rem;
    border-top: 2px solid var(--red);
}

footer.site-footer small {
    font-size: .74rem;
    letter-spacing: .05em;
}

.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.5rem;
    margin-bottom: 1rem;
}
.footer-contacts a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    color: var(--text);
    font-size: .9rem;
    text-decoration: none;
}
.footer-contacts a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-hours {
    margin-bottom: 1.25rem;
    color: var(--text);
    font-size: .9rem;
}
.footer-hours i {
    margin-right: .45rem;
}

.footer-admin-link {
    color: rgba(255, 255, 255, .18);
    font-size: .8rem;
    text-decoration: none;
    transition: color .2s;
}
.footer-admin-link:hover {
    color: rgba(255, 255, 255, .6);
}

/* ---- Alert stato vuoto ---- */
.menu-empty-alert {
    border: 1px dashed var(--border-strong);
    background: var(--surface);
    border-radius: var(--radius);
    color: var(--text-muted);
    padding: 3rem 2rem;
}

/* ---- Più sedi (solo con MULTI_SEDE = true) ---- */
.navbar-sede-badge {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--red);
    color: var(--white);
    padding: .2rem .55rem;
    border-radius: 999px;
    margin-left: .75rem;
}

.btn-sede-switch {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}
.btn-sede-switch:hover { color: var(--white); }

.sede-selector-title {
    font-family: 'Anton', sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.sede-card {
    color: inherit;
}
.sede-card-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.sede-card:hover .sede-card-inner {
    border-color: var(--red);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
    transform: translateY(-3px);
}
.sede-card-icon {
    font-size: 2rem;
    color: var(--red);
    display: block;
    margin-bottom: .75rem;
}
.sede-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
}
.sede-card-desc {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .4rem;
}

/* ---- Login ---- */
.login-card {
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .sede-card-inner { transition: none; }
    .product-card:hover,
    .sede-card:hover .sede-card-inner { transform: none; }
}
