/**
 * STELLARIS — Public CSS
 * Ristorante Da Tonino — Warm Italian Trattoria aesthetic
 * Colors: Deep wine red + warm gold + cream
 */

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --wine: #722F37;
    --wine-deep: #5A1E24;
    --wine-light: #8B3A42;
    --gold: #C5A572;
    --gold-light: #D4BC8E;
    --gold-pale: #E8DCC8;
    --cream: #FDFBF7;
    --cream-dark: #F5F1EC;
    --charcoal: #2D2D2D;
    --charcoal-light: #4A4A4A;
    --text-muted: #7A7A7A;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-accent: 'Lora', Georgia, serif;
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--charcoal);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--wine); text-decoration: none; transition: color .2s; }
a:hover { color: var(--wine-light); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ================================================
   HEADER
   ================================================ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(253,251,247,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gold-pale);
    transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 72px; gap: 32px;
}

.logo { display: flex; flex-direction: column; text-decoration: none; }
.logo-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--wine); letter-spacing: .5px; line-height: 1.1; }
.logo-sub { font-size: 11px; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
    font-size: 14px; font-weight: 500; color: var(--charcoal-light);
    letter-spacing: .3px; position: relative; padding: 4px 0;
}
.main-nav a::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
    background: var(--wine); transition: width .25s ease;
}
.main-nav a:hover { color: var(--wine); text-decoration: none; }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { font-size: 13px; color: var(--charcoal-light); font-weight: 500; }
.btn-cta {
    display: inline-block; padding: 10px 24px; background: var(--wine); color: #fff;
    font-size: 13px; font-weight: 600; border-radius: 4px; letter-spacing: .5px;
    text-transform: uppercase; transition: all .2s; border: none; cursor: pointer;
}
.btn-cta:hover { background: var(--wine-deep); color: #fff; text-decoration: none; transform: translateY(-1px); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 44px; height: 44px; position: relative; z-index: 201; -webkit-tap-highlight-color: transparent; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--charcoal); position: absolute; left: 11px; transition: all .3s ease; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-toggle.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
body.nav-open { overflow: hidden; }
body.nav-open .site-header { z-index: 200; }
body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 149; }

/* ================================================
   HERO
   ================================================ */
.hero {
    position: relative; min-height: 85vh; display: flex; align-items: center;
    background: linear-gradient(135deg, var(--wine-deep) 0%, var(--wine) 50%, var(--wine-light) 100%);
    overflow: hidden; margin-top: 72px;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(197,165,114,0.08)" stroke-width=".5"/></svg>') repeat;
    background-size: 120px;
}
.hero-content { position: relative; z-index: 2; text-align: center; width: 100%; padding: 60px 24px; }
.hero-label { font-family: var(--font-accent); font-size: 14px; color: var(--gold); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(40px, 7vw, 72px); font-weight: 700; color: #fff; line-height: 1.1; margin-bottom: 20px; }
.hero-text { font-family: var(--font-accent); font-size: 18px; color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary { padding: 14px 36px; background: var(--gold); color: var(--wine-deep); font-weight: 600; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; border-radius: 4px; transition: all .2s; }
.btn-hero-primary:hover { background: var(--gold-light); color: var(--wine-deep); text-decoration: none; transform: translateY(-2px); }
.btn-hero-secondary { padding: 14px 36px; border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; border-radius: 4px; transition: all .2s; }
.btn-hero-secondary:hover { border-color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }

/* ================================================
   SECTIONS
   ================================================ */
.section { padding: 80px 0; }
.section-alt { background: var(--cream-dark); }
.section-dark { background: var(--charcoal); color: #fff; }
.section-wine { background: var(--wine); color: #fff; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-label { font-family: var(--font-accent); font-size: 13px; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; }
.section-title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); font-weight: 700; color: var(--wine); line-height: 1.2; }
.section-dark .section-title { color: #fff; }
.section-divider { width: 60px; height: 2px; background: var(--gold); margin: 16px auto 0; }

/* ================================================
   MENU PAGE
   ================================================ */
.menu-categories { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.menu-cat-btn {
    padding: 8px 20px; border: 1px solid var(--gold-pale); background: #fff; color: var(--charcoal);
    font-size: 13px; font-weight: 500; border-radius: 24px; cursor: pointer; transition: all .2s;
}
.menu-cat-btn:hover, .menu-cat-btn.active { background: var(--wine); color: #fff; border-color: var(--wine); }

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.menu-item {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 16px 0; border-bottom: 1px solid var(--gold-pale);
}
.menu-item-info { flex: 1; padding-right: 20px; }
.menu-item-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--charcoal); }
.menu-item-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.menu-item-price { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--wine); white-space: nowrap; }
.menu-item-tags { display: flex; gap: 4px; margin-top: 4px; }
.menu-tag { font-size: 10px; padding: 2px 6px; border-radius: 3px; background: var(--cream-dark); color: var(--text-muted); }

.menu-category-title {
    font-family: var(--font-display); font-size: 26px; font-weight: 700;
    color: var(--wine); margin: 40px 0 20px; padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    grid-column: 1 / -1;
}

/* ================================================
   BOOKING FORM
   ================================================ */
.booking-section { background: var(--cream-dark); }
.booking-card {
    max-width: 640px; margin: 0 auto; background: #fff; border-radius: 12px;
    padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.booking-card h3 { font-family: var(--font-display); font-size: 24px; margin-bottom: 24px; text-align: center; color: var(--wine); }

.form-row-pub { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group-pub { margin-bottom: 16px; }
.form-group-pub label { display: block; font-size: 13px; font-weight: 500; color: var(--charcoal-light); margin-bottom: 6px; }
.form-group-pub input, .form-group-pub select, .form-group-pub textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--gold-pale); border-radius: 6px;
    font-size: 15px; font-family: var(--font-body); background: #fff; transition: border-color .2s;
}
.form-group-pub input:focus, .form-group-pub select:focus, .form-group-pub textarea:focus {
    outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(114,47,55,.1);
}
.btn-book {
    width: 100%; padding: 14px; background: var(--wine); color: #fff; border: none;
    font-size: 15px; font-weight: 600; border-radius: 6px; cursor: pointer;
    letter-spacing: .5px; transition: all .2s;
}
.btn-book:hover { background: var(--wine-deep); transform: translateY(-1px); }

/* ================================================
   CONTACT
   ================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info h3 { font-family: var(--font-display); font-size: 28px; color: var(--wine); margin-bottom: 20px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 16px; }
.contact-icon { width: 40px; height: 40px; background: var(--wine); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.contact-item-text { font-size: 15px; }
.contact-item-text strong { display: block; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }

.map-container { width: 100%; height: 350px; border-radius: 12px; overflow: hidden; border: 1px solid var(--gold-pale); }
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ================================================
   FEATURES / INFO CARDS
   ================================================ */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature-card { text-align: center; padding: 32px 24px; }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.feature-text { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ================================================
   CTA BANNER
   ================================================ */
.cta-banner {
    background: linear-gradient(135deg, var(--wine-deep), var(--wine));
    padding: 60px 0; text-align: center; color: #fff;
}
.cta-banner h2 { font-family: var(--font-display); font-size: 32px; margin-bottom: 12px; }
.cta-banner p { font-size: 16px; opacity: .85; margin-bottom: 24px; }

/* ================================================
   FOOTER
   ================================================ */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,.8); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col h4 { font-family: var(--font-display); font-size: 18px; color: #fff; margin-bottom: 16px; }
.footer-col p { font-size: 14px; line-height: 1.8; }
.footer-col a { color: var(--gold-light); }
.footer-col a:hover { color: var(--gold); }
.social-links { display: flex; gap: 12px; }
.social-links a { padding: 6px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; font-size: 13px; color: rgba(255,255,255,.7); transition: all .2s; }
.social-links a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.5); }

/* ================================================
   RESPONSIVE
   ================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .header-inner { gap: 16px; }
    .main-nav { gap: 16px; }
    .main-nav a { font-size: 13px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .menu-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--cream); }

    /* Header mobile */
    .main-nav {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: 70%; max-width: 320px;
        background: var(--cream); flex-direction: column;
        padding: 80px 24px 24px; gap: 0;
        z-index: 150; overflow-y: auto;
        display: flex;
        transform: translateX(100%);
        transition: transform .3s ease;
        box-shadow: -8px 0 32px rgba(0,0,0,.15);
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav a { padding: 16px 0; border-bottom: 1px solid var(--gold-pale); font-size: 17px; font-weight: 500; color: var(--charcoal) !important; }
    .main-nav a.active { color: var(--wine) !important; font-weight: 700; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .header-phone { display: none; }
    .header-actions .btn-cta { padding: 8px 16px; font-size: 12px; }

    /* Hero mobile */
    .hero { min-height: 70vh; margin-top: 72px; }
    .hero h1 { font-size: clamp(28px, 8vw, 40px); }
    .hero-text { font-size: 15px; margin-bottom: 24px; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 12px; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; max-width: 280px; text-align: center; padding: 14px 24px; }

    /* Sections */
    .section { padding: 48px 0; }
    .section-header { margin-bottom: 32px; }
    .section-title { font-size: clamp(24px, 6vw, 32px); }

    /* Features */
    .features-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 24px 16px; }

    /* Menu */
    .menu-grid { grid-template-columns: 1fr; }
    .menu-categories { gap: 6px; }
    .menu-cat-btn { padding: 6px 14px; font-size: 12px; }
    .menu-category-title { font-size: 22px; margin: 32px 0 16px; }
    .menu-item { padding: 12px 0; }
    .menu-item-name { font-size: 15px; }
    .menu-item-price { font-size: 16px; }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr; gap: 24px; }
    .map-container { height: 260px; }

    /* Booking */
    .form-row-pub { grid-template-columns: 1fr; }
    .booking-card { padding: 24px 16px; }
    .booking-card h3 { font-size: 20px; }

    /* CTA */
    .cta-banner { padding: 40px 0; }
    .cta-banner h2 { font-size: 24px; }
    .cta-banner p { font-size: 14px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* Small mobile */
@media (max-width: 420px) {
    .hero { min-height: 60vh; }
    .hero-content { padding: 40px 16px; }
    .hero-label { font-size: 12px; letter-spacing: 2px; }
    .logo-name { font-size: 18px; }
    .section { padding: 36px 0; }
    .feature-card { padding: 20px 12px; }
    .booking-card { padding: 20px 12px; margin: 0 -4px; }
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; animation: fadeInUp .6s ease forwards; }
.fade-in-d1 { animation-delay: .1s; }
.fade-in-d2 { animation-delay: .2s; }
.fade-in-d3 { animation-delay: .3s; }

/* === HEADER VARIANTS === */
.header-transparent { background: transparent; box-shadow: none; }
.header-transparent.scrolled { background: var(--cream, #fff); box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.header-transparent:not(.scrolled) .logo-name { color: #fff; }
.header-transparent:not(.scrolled) .logo-sub { color: rgba(255,255,255,.7); }
.header-transparent:not(.scrolled) .main-nav a { color: rgba(255,255,255,.85); }
.header-transparent:not(.scrolled) .main-nav a:hover { color: #fff; }
.header-transparent:not(.scrolled) .header-phone { color: rgba(255,255,255,.7); }
.header-transparent:not(.scrolled) .nav-toggle span { background: #fff; }

.header-centered .header-inner { flex-direction: column; gap: 8px; padding-top: 16px; padding-bottom: 12px; }
.header-centered .logo { align-items: center; text-align: center; }
.header-centered .main-nav { order: 2; }
.header-centered .header-actions { order: 3; }

.header-minimal .header-inner { justify-content: space-between; }
.header-minimal .main-nav { margin-left: auto; }

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

/* === SOCIAL ICON LINKS === */
.social-icon-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.7); transition: all .2s; text-decoration: none; }
.social-icon-link:hover { border-color: var(--gold, #c8a97e); color: var(--gold, #c8a97e); background: rgba(200,169,126,.1); transform: translateY(-2px); }
.social-icon-link svg { flex-shrink: 0; }

/* === FOOTER LAYOUT VARIANTS === */
.footer-3col { grid-template-columns: 2fr 1fr 1fr; }
.footer-2col { grid-template-columns: 1fr 1fr; }
.footer-centered { display: block; text-align: center; }

@media(max-width:768px) {
    .header-centered .header-inner { gap: 4px; padding-top: 8px; }
    .footer-3col, .footer-2col { grid-template-columns: 1fr; }
}

/* === PRINT CSS specifico per menù === */
@media print {
    .menu-categories { display: none !important; }
    .menu-category-group { display: block !important; }
    .menu-category-title { font-size: 16pt; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin: 16pt 0 8pt; }
    .menu-item { page-break-inside: avoid; padding: 4pt 0; border-bottom: 1px dotted #ddd; }
    .menu-item-name { font-size: 12pt; }
    .menu-item-price { font-size: 12pt; }
    .menu-item-desc { font-size: 10pt; }
    .menu-item-badges { display: none; }
    .section-header button { display: none !important; }
    .section-label { display: none; }
    .section-title { font-size: 24pt; text-align: center; margin-bottom: 12pt; }
    .section-divider { display: none; }
}

/* === DROPDOWN SUBMENU === */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-arrow { font-size: 10px; opacity: .5; transition: transform .2s; }
.nav-dropdown:hover .nav-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--cream, #fff); border-radius: 12px; padding: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12); border: 1px solid rgba(0,0,0,.06);
    min-width: 200px; opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s; transform: translateX(-50%) translateY(8px);
    z-index: 101;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-menu a {
    display: block; padding: 10px 16px; border-radius: 6px;
    font-size: 14px; color: var(--charcoal, #333); white-space: nowrap;
    transition: background .15s;
}
.nav-dropdown-menu a:hover { background: var(--gold-pale, #f5f0e8); color: var(--wine, #722f37); text-decoration: none; }
@media(max-width:768px) {
    .nav-dropdown-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: 0 0 0 16px; }
    .nav-dropdown-menu a { padding: 10px 0; border-bottom: 1px solid var(--gold-pale, #f5f0e8); font-size: 15px; }
    .nav-arrow { display: none; }
}

/* === DARK MODE === */
html.dark-mode { --cream: #1a1a1a; --charcoal: #e8e5e0; --wine: #c8a97e; --wine-deep: #b8975e; --gold: #c8a97e; --gold-light: #d4b88c; --gold-pale: #2a2520; }
html.dark-mode body { background: #111; color: #ddd; }
html.dark-mode .site-header { background: #1a1a1a; }
html.dark-mode .site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.3); }
html.dark-mode .site-footer { background: #0a0a0a; }
html.dark-mode .main-nav a { color: #ccc; }
html.dark-mode .nav-dropdown-menu { background: #1a1a1a; border-color: #333; }
html.dark-mode .nav-dropdown-menu a { color: #ccc; }
html.dark-mode .nav-dropdown-menu a:hover { background: #2a2520; }
html.dark-mode .main-nav { background: #1a1a1a; box-shadow: -8px 0 32px rgba(0,0,0,.4); }
html.dark-mode .main-nav a { border-bottom-color: #333; }
html.dark-mode .nav-toggle span { background: #e8e5e0; }
html.dark-mode body.nav-open::after { background: rgba(0,0,0,.6); }
html.dark-mode #cookie-banner { background: #1a1a1a; }



/* === FLOATING ELEMENTS STACK === */
@media(max-width:768px) {
    .floating-book-btn { bottom: 16px !important; left: 16px !important; font-size: 13px !important; padding: 10px 20px !important; }
    #dark-mode-toggle { width: 36px !important; height: 36px !important; font-size: 16px !important; }
}

/* ================================================
   PAGE TEMPLATE UTILITIES (sessione 24)
   ================================================ */
.page-section { margin-top: 72px; padding-top: 48px; }
.page-center { text-align: center; }
.page-narrow { max-width: 700px; margin: 0 auto; }
.page-max-800 { max-width: 800px; margin: 0 auto; }
.page-empty { text-align: center; color: var(--text-muted, #7A7A7A); padding: 48px 0; }

/* Grid generiche */
.pg-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pg-grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.pg-grid-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pg-flex-center { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pg-flex-between { display: flex; justify-content: space-between; align-items: center; }
.pg-flex-col-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* Spacing */
.pg-mt-sm { margin-top: 12px; }
.pg-mt-md { margin-top: 24px; }
.pg-mt-lg { margin-top: 36px; }
.pg-mt-xl { margin-top: 48px; }
.pg-mb-sm { margin-bottom: 8px; }
.pg-mb-md { margin-bottom: 16px; }
.pg-mb-lg { margin-bottom: 40px; }
.pg-py-lg { padding: 80px 24px; }

/* Card overlay immagine */
.pg-card-img { height: 200px; overflow: hidden; border-radius: 12px 12px 0 0; margin: -24px -24px 16px -24px; }
.pg-card-img-sm { height: 180px; }
.pg-card-img img { width: 100%; height: 100%; object-fit: cover; }

/* Gallery item */
.pg-gallery-item { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.pg-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pg-gallery-item:hover img { transform: scale(1.05); }

/* Tipografia pagine */
.pg-title-lg { font-family: var(--font-display); font-size: 18px; }
.pg-cat-title { font-family: var(--font-display); font-size: 22px; color: var(--wine); margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--gold); }
.pg-meta { color: var(--text-muted, #888); font-size: 13px; }
.pg-label { font-size: 13px; font-weight: 600; color: #666; display: block; margin-bottom: 6px; }

/* Order card */
.pg-order-card { background: #fff; border: 2px solid var(--gold-pale); border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; transition: border-color .2s; }
.pg-order-card:hover { border-color: var(--gold); }
.pg-order-card .icon { font-size: 32px; margin-bottom: 8px; }
.pg-order-card h4 { font-family: var(--font-display); margin: 0; }
.pg-order-card p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Order row */
.pg-order-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gold-pale); }
.pg-order-row .name { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.pg-order-row .desc { font-size: 13px; color: var(--text-muted); }
.pg-order-row .price { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--wine); }
.pg-order-row .actions { display: flex; align-items: center; gap: 12px; }

/* CTA box */
.pg-cta-box { text-align: center; padding: 24px; background: var(--cream-dark); border-radius: 8px; }
.pg-cta-box .title { font-family: var(--font-accent); font-size: 16px; color: var(--wine); margin-bottom: 8px; }
.pg-cta-box p { font-size: 14px; color: var(--text-muted); }
.pg-cta-box a { font-weight: 600; }

/* Password page */
.pg-lock-page { min-height: 60vh; }
.pg-lock-icon { font-size: 48px; margin-bottom: 16px; }
.pg-lock-title { font-family: var(--font-display); font-size: 28px; margin: 0 0 12px; }
.pg-lock-text { color: #888; font-size: 15px; margin: 0 0 28px; line-height: 1.6; }
.pg-error-box { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.pg-lock-input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; margin-bottom: 16px; font-family: inherit; }
.pg-lock-btn { width: 100%; padding: 14px; background: var(--gold, #c8a97e); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .2s; }
.pg-lock-btn:hover { background: var(--wine, #722f37); }
.pg-back-link { display: inline-block; margin-top: 20px; color: #888; font-size: 13px; text-decoration: none; }

/* Pagination */
.pg-pagination { text-align: center; margin-top: 32px; }
.pg-pagination a { display: inline-block; padding: 8px 14px; margin: 2px; border-radius: 6px; background: var(--cream-dark, #f5f1ec); text-decoration: none; color: var(--charcoal); transition: all .2s; }
.pg-pagination a.active { background: var(--wine, #722f37); color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .pg-grid-2 { grid-template-columns: 1fr; }
    .pg-grid-auto { grid-template-columns: 1fr; }
    .pg-grid-gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ================================================
   BLOCCHI PAGINA DINAMICA (sessione 24)
   ================================================ */
.blk-wrapper { margin-top: 72px; }
.blk-text { margin-bottom: 24px; }
.blk-title-h2 { font-family: var(--font-display); font-size: 28px; margin: 32px 0 16px; line-height: 1.3; }
.blk-title-h3 { font-family: var(--font-display); font-size: 22px; margin: 32px 0 16px; line-height: 1.3; }
.blk-title-h4 { font-family: var(--font-display); font-size: 18px; margin: 32px 0 16px; line-height: 1.3; }
.blk-figure { margin: 24px 0; }
.blk-figure img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
.blk-figure figcaption { color: #888; font-size: 13px; margin-top: 8px; text-align: center; }
.blk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 24px 0; }
.blk-gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; }
.blk-quote { border-left: 4px solid var(--gold, #c8a97e); padding: 16px 24px; margin: 24px 0; background: #faf8f5; border-radius: 0 8px 8px 0; font-style: italic; font-size: 18px; line-height: 1.6; }
.blk-quote footer { font-style: normal; font-size: 14px; color: #888; margin-top: 8px; }
.blk-sep-space { height: 48px; }
.blk-sep-deco { text-align: center; margin: 32px 0; color: var(--gold, #c8a97e); font-size: 20px; letter-spacing: 8px; }
.blk-sep-line { border: none; border-top: 1px solid #e0dcd5; margin: 32px 0; }
.blk-cta { text-align: center; margin: 32px 0; }
.blk-cta p { font-size: 18px; margin-bottom: 16px; }
.blk-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 24px 0; border-radius: 12px; }
.blk-video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.blk-map { margin: 24px 0; border-radius: 12px; overflow: hidden; height: 300px; }
.blk-map iframe { width: 100%; height: 100%; border: 0; }
.blk-list { margin: 16px 0; padding-left: 24px; line-height: 1.8; }
.blk-columns { display: grid; gap: 24px; margin: 24px 0; }
.blk-columns-2 { grid-template-columns: repeat(2, 1fr); }
.blk-columns-3 { grid-template-columns: repeat(3, 1fr); }
.blk-empty-title { font-family: var(--font-display); font-size: 36px; margin-bottom: 32px; line-height: 1.3; }
.blk-empty-text { color: #888; }
@media (max-width: 768px) {
    .blk-columns-2, .blk-columns-3 { grid-template-columns: 1fr; }
    .blk-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* === Blog Layout con Sidebar === */
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.blog-main { min-width: 0; }
.blog-sidebar { position: sticky; top: 100px; }
.blog-sidebar-box { background: var(--cream-dark, #f5f1ec); border-radius: 12px; padding: 1.2rem; margin-bottom: 1rem; }
.blog-sidebar-box h4 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 .8rem; color: var(--charcoal, #2d2d2d); }
.blog-sidebar-link { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid rgba(0,0,0,.06); text-decoration: none; color: var(--charcoal-light, #4a4a4a); font-size: .85rem; transition: color .2s; }
.blog-sidebar-link:last-child { border-bottom: none; }
.blog-sidebar-link:hover { color: var(--wine, #722f37); }
.blog-sidebar-title { flex: 1; }
.blog-sidebar-date, .blog-sidebar-count { font-size: .75rem; color: var(--text-muted, #7a7a7a); margin-left: .5rem; }
.blog-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.blog-tag { padding: .15rem .5rem; background: rgba(200,169,126,.15); color: var(--wine, #722f37); border-radius: 4px; font-size: .72rem; }
@media (max-width: 900px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 600px) {
    .blog-sidebar { grid-template-columns: 1fr; }
}

/* === Language Selector === */
.lang-selector { position: relative; }
.lang-current { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: background .2s; }
.lang-current:hover { background: var(--gold-pale, #e8dcc8); }
.lang-dropdown { position: absolute; top: 100%; right: 0; background: #fff; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.15); padding: 6px; min-width: 160px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all .2s; z-index: 100; }
.lang-selector:hover .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a { display: block; padding: 8px 12px; border-radius: 6px; font-size: .85rem; color: var(--charcoal, #333); text-decoration: none; transition: background .15s; }
.lang-dropdown a:hover { background: var(--gold-pale, #f5f0e8); }
.lang-dropdown a.active { font-weight: 700; color: var(--wine, #722f37); }
html.dark-mode .lang-dropdown { background: #1a1a1a; }
html.dark-mode .lang-dropdown a { color: #ccc; }
html.dark-mode .lang-dropdown a:hover { background: #2a2520; }

/* === PWA Install Banner === */
.pwa-banner { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--wine, #722f37); color: #fff; padding: 12px 24px; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.25); display: none; align-items: center; gap: 12px; z-index: 9990; font-size: .9rem; }
.pwa-banner.show { display: flex; }
.pwa-banner button { background: #fff; color: var(--wine, #722f37); border: none; padding: 6px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: .85rem; }
.pwa-banner .close-pwa { background: none; color: #fff; opacity: .7; font-size: 1.2rem; padding: 0 4px; }

/* === Fix inline residui (sessione 24 finale) === */
.pg-404-wrap { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pg-404-emoji { font-size: 5rem; margin: 0; }
.pg-404-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* === Prenotazione Mappa Tavoli === */
.book-step-hidden { display: none !important; }
.book-step-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.book-back { background: none; border: none; color: var(--wine, #722f37); font-size: .9rem; cursor: pointer; padding: 4px 0; font-weight: 600; }
.book-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.book-tab { padding: 8px 20px; border-radius: 8px; border: 2px solid var(--gold-pale, #e8dcc8); background: transparent; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .2s; color: var(--charcoal, #333); }
.book-tab.active { border-color: var(--wine, #722f37); background: var(--wine, #722f37); color: #fff; }
.book-mappa-container { display: flex; justify-content: center; padding: 12px; background: var(--cream-dark, #f5f1ec); border-radius: 12px; overflow: hidden; min-height: 250px; }
.book-mappa-canvas { position: relative; border-radius: 8px; background: #e8e5e0; }
.book-tavolo { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default; transition: all .2s; border: 2px solid transparent; }
.book-tav-quadrato, .book-tav-rettangolare { border-radius: 6px; }
.book-tav-rotondo { border-radius: 50%; }
.book-tav-ovale { border-radius: 50%; }
.book-tav-disponibile { background: rgba(34,197,94,.2); border-color: #22c55e; cursor: pointer; }
.book-tav-disponibile:hover { background: rgba(34,197,94,.4); transform: scale(1.08); box-shadow: 0 4px 16px rgba(34,197,94,.3); z-index: 10; }
.book-tav-occupato { background: rgba(148,163,184,.15); border-color: #94a3b8; opacity: .5; }
.book-tav-capienza { background: rgba(99,102,241,.1); border-color: #818cf8; opacity: .6; }
.book-tav-selected { background: rgba(200,169,126,.35) !important; border-color: var(--wine, #722f37) !important; box-shadow: 0 0 0 3px rgba(114,47,55,.25); opacity: 1 !important; z-index: 10; }
.book-tav-num { font-size: .75rem; font-weight: 700; color: var(--charcoal, #333); line-height: 1; }
.book-tav-posti { font-size: .6rem; color: var(--text-muted, #7a7a7a); }
.book-legenda { display: flex; gap: 16px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.book-leg-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--charcoal-light, #4a4a4a); }
.book-leg-dot { width: 14px; height: 14px; border-radius: 4px; border: 2px solid; }
.book-leg-disponibile { background: rgba(34,197,94,.2); border-color: #22c55e; }
.book-leg-occupato { background: rgba(148,163,184,.15); border-color: #94a3b8; }
.book-leg-capienza { background: rgba(99,102,241,.1); border-color: #818cf8; }
.book-tavolo-info { background: var(--cream-dark, #f5f1ec); border-radius: 10px; padding: 12px 16px; margin-top: 12px; text-align: center; border-left: 4px solid var(--wine, #722f37); }
.book-tavolo-nome { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--wine, #722f37); }
.book-tavolo-dettagli { font-size: .85rem; color: var(--charcoal-light, #4a4a4a); margin-top: 2px; }
@media (max-width: 600px) {
    .book-mappa-container { padding: 8px; }
    .book-tabs { gap: 4px; }
    .book-tab { padding: 6px 14px; font-size: .78rem; }
    .book-legenda { gap: 8px; }
}

/* S103 PWA cliente — Link Account nell'header pubblico */
.header-account { font-size: 13px; color: var(--charcoal-light); font-weight: 500; padding: 6px 12px; border: 1px solid rgba(0,0,0,.08); border-radius: 20px; transition: all .2s; text-decoration: none; }
.header-account:hover { background: var(--charcoal-light, #333); color: #fff; border-color: transparent; }
.header-transparent:not(.scrolled) .header-account { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.25); }
.header-transparent:not(.scrolled) .header-account:hover { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.35); }
@media (max-width: 768px) { .header-account { padding: 4px 10px; font-size: 12px; } }

/* ⚠⚠⚠ S363 — QUESTO BLOCCO STA IN `public.css` E NON IN
   `form-public-prenotazioni.css`, dove l'avevo scritto per primo.
   Quel foglio lo caricano conferma, cancellazione, preordine e privacy — le
   pagine A VALLE — ma NON il modulo di prenotazione, che prende tutto dal
   layout pubblico. Il CSS era giusto e non arrivava sulla pagina: le pastiglie
   sarebbero rimaste senza forma e i consensi attaccati, cioe' esattamente il
   difetto che doveva togliere.
   ⚠ L'ha trovato `caccia_classi`, contando tre classi usate e mai definite.
     Uno scanner che conta le classi non sembra granche' finche' non ti dice che
     il foglio di stile che hai scritto non lo legge nessuno. */

/* ⚠⚠ S363bis — qui stava lo stile delle pastiglie degli allergeni, tolto
   insieme alle caselle: l'allergia la chiede il cameriere al tavolo. Uno stile
   senza niente da vestire e' codice morto come qualunque altro. */

/* ⚠⚠ S363 — I CONSENSI ANDAVANO A CAPO IN MEZZO ALLA FRASE.
   Erano tre etichette in fila che si spezzavano l'una dentro l'altra: si leggeva
   «...promozionali ☐ Accetto di ricevere SMS» tutto attaccato, e una casella di
   consenso che non si capisce dove comincia e dove finisce non e' un consenso
   informato. Una per riga. */
.gdpr-consensi { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.gdpr-consensi label {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 14px; line-height: 1.35; min-height: 24px;
}
.gdpr-consensi input { margin-top: 3px; flex: 0 0 auto; }
