/* ── St. Ermin's Pub Menu — Frontend CSS v2.3 ── */

/* ── RESET & BASE ── */
.sepm-wrap *,
.sepm-wrap *::before,
.sepm-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

.sepm-wrap {
    background: var(--sepm-bg);
    color:      var(--sepm-text);
    font-family: var(--sepm-font-b);
    font-size:   var(--sepm-base);
    line-height: 1.5;
    min-height:  100vh;
}

/* ── NOISE TEXTURE ── */
.sepm-noise { position: relative; }
.sepm-noise::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .035;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
.sepm-wrap > * { position: relative; z-index: 1; }

/* ── HERO ── */
.sepm-hero {
    background: var(--sepm-bg2);
    border-bottom: 1px solid var(--sepm-amber-pale);
    padding: 60px 20px 50px;
    text-align: center;
}
.sepm-hero-compact { padding: 30px 20px; }
.sepm-hero-inner { max-width: 680px; margin: 0 auto; }

.sepm-eyebrow {
    font-family: var(--sepm-font-b);
    font-size: calc(var(--sepm-base) * 0.85);
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--sepm-amber);
    margin-bottom: 16px;
}

.sepm-logo {
    max-height: 130px;
    max-width: 360px;
    width: auto;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}
.sepm-hero-compact .sepm-logo { max-height: 80px; }

.sepm-pub-name {
    font-family: var(--sepm-font-d);
    font-size: clamp(2.4rem, 6vw, 4rem);
    color: var(--sepm-amber);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 12px;
}

.sepm-tagline {
    font-size: calc(var(--sepm-base) * 1.05);
    color: var(--sepm-text-dim);
    letter-spacing: .05em;
}

/* ═══════════════════════════════════════════════
   ── SPECIALI DEL MESE SLIDER ──
═══════════════════════════════════════════════ */
.sepm-specials-wrap {
    background: var(--sepm-bg2);
    border-bottom: 1px solid var(--sepm-amber-pale);
    padding: 20px 16px 16px;
    overflow: hidden;
}

.sepm-specials-label {
    text-align: center;
    font-family: var(--sepm-font-b);
    font-size: calc(var(--sepm-base) * 0.78);
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--sepm-amber);
    margin-bottom: 14px;
    font-weight: 600;
}

/* The scrollable track */
.sepm-specials-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
    max-width: 960px;
    margin: 0 auto;
}
.sepm-specials-track::-webkit-scrollbar { display: none; }

/* Individual special card */
.sepm-special-card {
    flex: 0 0 calc(50% - 8px);
    min-width: 260px;
    scroll-snap-align: start;
    background: var(--sepm-bg3);
    border: 1px solid var(--sepm-amber-pale);
    border-top: 3px solid var(--sepm-amber);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform .2s, box-shadow .2s;
}
.sepm-special-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.4);
}

/* Photo inside special card */
.sepm-special-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--sepm-bg2);
}
.sepm-special-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.sepm-special-card:hover .sepm-special-image img {
    transform: scale(1.04);
}

/* Card body (below photo) */
.sepm-special-body {
    padding: 16px 18px 16px;
}

/* Only one card? centre it */
.sepm-specials-track:has(.sepm-special-card:only-child) .sepm-special-card {
    flex: 0 0 min(480px, 100%);
    margin: 0 auto;
}

/* Badge pill */
.sepm-special-badge {
    display: inline-block;
    font-family: var(--sepm-font-b);
    font-size: calc(var(--sepm-base) * 0.73);
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff;
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 12px;
    line-height: 1;
}

.sepm-special-title {
    font-family: var(--sepm-font-d);
    font-size: calc(var(--sepm-base) * 1.35);
    color: var(--sepm-text);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.sepm-special-subtitle {
    font-size: calc(var(--sepm-base) * 0.95);
    color: var(--sepm-amber-lt);
    font-style: italic;
    margin-bottom: 12px;
}

.sepm-special-ingredients {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px dashed var(--sepm-amber-pale);
    padding-top: 10px;
}

.sepm-special-ingredients li {
    font-size: calc(var(--sepm-base) * 0.88);
    color: var(--sepm-text-dim);
    padding: 3px 0 3px 14px;
    position: relative;
    line-height: 1.3;
}
.sepm-special-ingredients li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--sepm-amber);
    font-size: 1.2em;
    line-height: 1;
    top: 3px;
}

/* Dots navigation */
.sepm-specials-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.sepm-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sepm-amber-pale);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.sepm-dot.is-active {
    background: var(--sepm-amber);
    transform: scale(1.3);
}

/* Burger-type: slight warm tint */
.sepm-special-burger { border-top-color: #c8851a; }
/* Pizza-type: slight red tint */
.sepm-special-pizza  { border-top-color: #a83232; }

/* ═══════════════════════════════════════════════
   ── NAV TABS ──
═══════════════════════════════════════════════ */
.sepm-nav {
    background: var(--sepm-bg2);
    border-bottom: 2px solid var(--sepm-amber-pale);
    z-index: 100;
}
.sepm-nav-sticky { position: sticky; top: 0; }

.sepm-nav-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4px;
}
.sepm-nav-inner::-webkit-scrollbar { display: none; }

.sepm-nav-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--sepm-text-dim);
    cursor: pointer;
    font-family: var(--sepm-font-b);
    font-size: calc(var(--sepm-base) * 0.9);   /* was 0.85 — bigger */
    font-weight: 600;
    letter-spacing: .04em;
    padding: 16px 18px 13px;                   /* was 12px 14px 10px — taller touch target */
    min-height: 52px;                           /* explicit min touch target */
    text-transform: uppercase;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}
.sepm-nav-btn:hover { color: var(--sepm-amber-lt); }
.sepm-nav-btn.is-active {
    color: var(--sepm-amber);
    border-bottom-color: var(--sepm-amber);
}
.sepm-nav-label { line-height: 1; }

/* ── MAIN ── */
.sepm-main { max-width: 1200px; margin: 0 auto; padding: 0 16px 60px; }

/* ── SECTION ── */
.sepm-section { display: none; }
.sepm-section.is-active { display: block; animation: sepm-fadein .25s ease; }

@keyframes sepm-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sepm-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 40px 0 24px;
    border-bottom: 1px solid var(--sepm-amber-pale);
    margin-bottom: 28px;
}
.sepm-section-icon {
    font-size: calc(var(--sepm-section) * 0.7);
    line-height: 1;
    opacity: .8;
}
.sepm-section-title {
    font-family: var(--sepm-font-d);
    font-size: var(--sepm-section);
    color: var(--sepm-amber);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1;
}

/* ── ITEMS GRID ── */
.sepm-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* ── ITEM CARD ── */
.sepm-item {
    background: var(--sepm-bg3);
    padding: 18px 20px;
    transition: transform .15s, box-shadow .15s;
}
.sepm-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
}

.sepm-card-border .sepm-item {
    border: 1px solid var(--sepm-amber-pale);
    border-top: 3px solid var(--sepm-amber);
    border-radius: 4px;
}
.sepm-card-filled .sepm-item {
    background: var(--sepm-bg2);
    border-left: 4px solid var(--sepm-amber);
    border-radius: 0 4px 4px 0;
}
.sepm-card-minimal .sepm-item {
    background: transparent;
    border-bottom: 1px solid var(--sepm-amber-pale);
    border-radius: 0;
    padding: 14px 4px;
}
.sepm-card-minimal .sepm-item:hover { transform: none; box-shadow: none; }

/* ── ITEM TOP ROW ── */
.sepm-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.sepm-item-meta { flex: 1; min-width: 0; }

.sepm-item-code {
    display: inline-block;
    font-size: calc(var(--sepm-base) * 0.8);
    color: var(--sepm-amber);
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 3px;
    font-family: var(--sepm-font-b);
}

.sepm-item-name {
    font-family: var(--sepm-font-b);
    font-size: var(--sepm-item);
    font-weight: 600;
    color: var(--sepm-text);
    line-height: 1.25;
    letter-spacing: .01em;
}

/* ── PRICING ── */
.sepm-item-pricing { flex-shrink: 0; text-align: right; }

.sepm-price {
    display: block;
    font-family: var(--sepm-font-d);
    font-size: var(--sepm-price);
    color: var(--sepm-amber);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.sepm-dual-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}
.sepm-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.sepm-price-group .sepm-price { font-size: calc(var(--sepm-price) * 0.85); }
.sepm-price-lbl {
    font-size: calc(var(--sepm-base) * 0.75);
    color: var(--sepm-text-dim);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.sepm-price-sep {
    color: var(--sepm-text-dim);
    margin: 0 4px;
    font-size: var(--sepm-price);
}

/* ── DESCRIPTION ── */
.sepm-item-desc {
    font-size: calc(var(--sepm-base) * 0.92);
    color: var(--sepm-text-dim);
    line-height: 1.45;
    margin-bottom: 10px;
    font-style: italic;
}

/* ── BADGES ── */
.sepm-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sepm-badge {
    display: inline-flex;
    align-items: center;
    font-size: calc(var(--sepm-base) * 0.75);
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1;
}

/* ═══════════════════════════════════════════════
   ── ALLERGENI EU (Reg. 1169/2011) ──
═══════════════════════════════════════════════ */
.sepm-allergens {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--sepm-amber-pale);
}
.sepm-allergen-label {
    font-size: calc(var(--sepm-base) * 0.78);
    font-weight: 700;
    color: var(--sepm-text-dim);
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.8;
    margin-right: 2px;
    flex-shrink: 0;
}
.sepm-allergen-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
/* Each allergen pill: number bold + name */
.sepm-allergen-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(200, 133, 26, 0.12);
    border: 1px solid var(--sepm-amber-pale);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: calc(var(--sepm-base) * 0.78);
    color: var(--sepm-text-dim);
    line-height: 1.5;
    white-space: nowrap;
}
.sepm-allergen-pill strong {
    color: var(--sepm-amber);
    font-weight: 800;
    font-size: calc(var(--sepm-base) * 0.82);
}

/* ── FOOTER LEGEND ── */
.sepm-footer {
    background: var(--sepm-bg2);
    border-top: 1px solid var(--sepm-amber-pale);
    padding: 28px 20px;
}
.sepm-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    font-size: calc(var(--sepm-base) * 0.9);
    color: var(--sepm-text-dim);
}
.sepm-footer-inner p strong { color: var(--sepm-amber); }

/* Allergen legend at bottom of footer */
.sepm-allergen-legend {
    width: 100%;
    border-top: 1px solid var(--sepm-amber-pale);
    padding-top: 20px;
    margin-top: 8px;
}
.sepm-allergen-legend-title {
    font-family: var(--sepm-font-b);
    font-size: calc(var(--sepm-base) * 0.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--sepm-amber);
    margin-bottom: 12px;
}
.sepm-allergen-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px 16px;
    margin-bottom: 14px;
}
.sepm-allergen-legend-item {
    font-size: calc(var(--sepm-base) * 0.82);
    color: var(--sepm-text-dim);
    line-height: 1.4;
}
.sepm-allergen-legend-item strong {
    color: var(--sepm-amber);
    font-weight: 800;
    margin-right: 3px;
}
.sepm-allergen-note {
    width: 100%;
    font-size: calc(var(--sepm-base) * 0.82);
    font-style: italic;
    color: var(--sepm-text-dim);
    line-height: 1.5;
}

/* ── EMPTY ── */
.sepm-empty { color: var(--sepm-text-dim); font-style: italic; padding: 20px 0; }

/* ═══════════════════════════════════════════════
   ── RESPONSIVE — MOBILE ──
═══════════════════════════════════════════════ */
@media (max-width: 700px) {
    .sepm-special-card { flex: 0 0 85vw; min-width: 0; }
    .sepm-specials-track { gap: 12px; }
}

@media (max-width: 600px) {
    /* Hero */
    .sepm-hero { padding: 40px 16px 32px; }
    .sepm-logo { max-height: 90px; }
    .sepm-pub-name { font-size: 2rem; }

    /* Section */
    .sepm-section-title { font-size: calc(var(--sepm-section) * 0.7); }
    .sepm-section-header { padding: 28px 0 18px; }

    /* Grid */
    .sepm-items-grid { grid-template-columns: 1fr; gap: 12px; }

    /* ── NAV BUTTONS — mobile: min 48px touch target, leggibili ── */
    .sepm-nav-btn {
        padding: 14px 14px 12px;        /* was 10px 10px 8px */
        font-size: calc(var(--sepm-base) * 0.88);  /* was 0.78 — più leggibile */
        min-height: 48px;               /* WCAG AA 48px touch target */
    }

    /* Items */
    .sepm-item { padding: 14px 16px; }
    .sepm-item-name { font-size: calc(var(--sepm-item) * 1.0); } /* no downscale */
    .sepm-price { font-size: calc(var(--sepm-price) * 0.9); }

    /* Allergen pills: stack more comfortably */
    .sepm-allergen-pill {
        font-size: calc(var(--sepm-base) * 0.82);
        padding: 3px 8px;
    }

    /* Footer */
    .sepm-footer-inner { flex-direction: column; gap: 6px; }
    .sepm-allergen-legend-grid { grid-template-columns: repeat(2, 1fr); }
}
