/* ── PLAYFUL — Nunito, palette vivace ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --p1: #f472b6;
    --p2: #a855f7;
    --p3: #fb923c;
    --bg: #fdf4ff;
    --dark: #2d1b4e;
}

.mep-body {
    font-family: 'Nunito', Arial, sans-serif;
    background: var(--bg);
    color: var(--dark);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.mep-header {
    background: linear-gradient(90deg, var(--p2) 0%, var(--p1) 100%);
    padding: 0 28px; height: 79px;
    display: flex; align-items: center;
    flex-shrink: 0;
}
.mep-header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 8px;
}
.mep-logo { max-height: 50px; }
.mep-logo-text { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.01em; }

.mep-hero {
    background: linear-gradient(135deg, var(--p2) 0%, var(--p1) 60%, var(--p3) 100%);
    background-size: cover; background-position: center;
    position: relative; padding: 88px 28px;
}
.mep-hero::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(45,27,78,.45);
}
.mep-hero-overlay { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; text-align: center; }
.mep-hero-title {
    font-size: clamp(26px, 5vw, 50px); font-weight: 800;
    color: #fff; line-height: 1.2; margin-bottom: 14px;
}
.mep-hero-desc { font-size: 17px; color: rgba(255,255,255,.9); line-height: 1.65; font-weight: 400; }

.mep-main { flex: 1; max-width: 1100px; width: 100%; margin: 44px auto; padding: 0 28px; }

.mep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}

.mep-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 4px 20px rgba(168,85,247,.1);
    transition: transform .18s, box-shadow .18s;
}
.mep-card:hover { transform: translateY(-6px) rotate(.3deg); box-shadow: 0 12px 40px rgba(168,85,247,.2); }

.mep-card-img-wrap { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.mep-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mep-card:hover .mep-card-img { transform: scale(1.06); }

.mep-card-placeholder {
    background: linear-gradient(135deg, #fce7f3 0%, #ede9fe 100%);
    display: flex; align-items: center; justify-content: center;
}
.mep-placeholder-icon { font-size: 54px; }

.mep-card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mep-card-date {
    font-size: 12px; font-weight: 700; color: var(--p2);
    text-transform: uppercase; letter-spacing: .06em;
}
.mep-card-time { font-weight: 600; }
.mep-card-title { font-size: 18px; font-weight: 800; color: var(--dark); line-height: 1.3; }
.mep-card-desc { font-size: 13px; color: #6b7280; line-height: 1.6; flex: 1; }
.mep-card-footer { display: flex; align-items: center; margin-top: 12px; gap: 12px; }
.mep-price { font-size: 16px; font-weight: 800; color: var(--dark); }
.mep-cta {
    margin-left: auto;
    padding: 9px 18px;
    background: linear-gradient(90deg, var(--p2), var(--p1));
    color: #fff; border-radius: 999px; text-decoration: none;
    font-size: 13px; font-weight: 800;
    box-shadow: 0 4px 14px rgba(168,85,247,.35);
    transition: opacity .15s, transform .15s;
    white-space: nowrap;
}
.mep-cta:hover { opacity: .9; transform: scale(1.04); }

.mep-empty { text-align: center; padding: 80px 24px; }
.mep-empty-icon { font-size: 60px; margin-bottom: 14px; }
.mep-empty p { font-size: 17px; color: #9ca3af; font-weight: 600; }

.mep-footer {
    background: var(--dark); color: rgba(255,255,255,.5);
    padding: 18px 28px; text-align: center; font-size: 13px; font-weight: 600;
}
.mep-footer-inner { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.mep-footer-sep { opacity: .3; }
.mep-footer-link { color: var(--p1); text-decoration: none; }

.mep-single_theme .mep-card-img-wrap { display: none; }
.mep-single_theme .mep-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
.mep-single_theme .mep-card { border-radius: 14px; }

@media (max-width: 640px) { .mep-grid { grid-template-columns: 1fr; } }

/* ── SINGLE THEME SPLIT LAYOUT ── */
.mep-body.mep-single_theme { height: 100vh; overflow: hidden; }
.mep-single-split {
    display: grid;
    grid-template-columns: 42% 58%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.mep-single-info {
    overflow-y: auto;
    height: 100%;
    min-height: 0;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    background: #fff;
    border-left: 3px solid var(--p2);
}
.mep-single-img {
    width: 100%;
    max-height: 45vh;
    object-fit: cover;
    border-radius: 20px;
}
.mep-single-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce7f3 0%, #ede9fe 100%);
    font-size: 48px;
    border-radius: 20px;
}
.mep-single-entity {
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.6;
    color: var(--dark);
}
.mep-single-meta { font-size: 13px; opacity: 0.75; margin-bottom: 2px; color: var(--dark); }
.mep-single-row-meta { font-size: 11px; opacity: 0.7; margin-top: 2px; color: var(--dark); }
.mep-single-title { font-size: 28px; font-weight: 800; line-height: 1.3; color: var(--dark); }
.mep-single-desc { font-size: 14px; line-height: 1.6; opacity: 0.85; color: var(--dark); }

.mep-single-list {
    padding: 1.5rem;
    overflow-y: auto;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}
.mep-single-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid rgba(168, 85, 247, .15);
    border-radius: 14px;
}
.mep-single-row-next { border-color: var(--p2); }
.mep-single-row-soldout { opacity: 0.55; }
.mep-badge-next {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #7c3aed;
    margin-bottom: 4px;
}
.mep-badge-soldout {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #6b7280;
    margin-bottom: 4px;
}
.mep-single-row-date {
    font-size: 18px;
    font-weight: 700;
    color: var(--p2);
    letter-spacing: 0.2px;
}
.mep-single-row-name {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--dark);
}
.mep-cta-small { font-size: 13px; padding: 8px 16px; white-space: nowrap; }
.mep-cta-disabled {
    font-size: 13px;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #9ca3af;
    background: transparent;
    white-space: nowrap;
}
.mep-body.mep-single_theme .mep-main,
.mep-body.mep-single_theme .mep-footer { display: none; }
.mep-single-credit {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    z-index: 5;
}
.mep-single-credit a { text-decoration: none; color: var(--dark); opacity: 0.5; }
.mep-single-credit a:hover { opacity: 0.85; }
@media (max-width: 480px) { .mep-single-credit { display: none; } }

@media (max-width: 768px) {
    .mep-header { height: 76px; }
    .mep-logo { max-height: 42px; }
    .mep-header-inner { flex-direction: column; justify-content: center; gap: 4px; padding-left: 0; text-align: center; }
    .mep-logo-text { font-size: 13px; }
    .mep-body.mep-single_theme { height: auto; overflow: visible; }
    .mep-single-split { height: auto; grid-template-columns: 1fr; }
    .mep-single-info { overflow-y: visible; height: auto; border-left: none; border-top: 3px solid var(--p2); padding: 1.5rem; }
    .mep-single-list { overflow-y: visible; height: auto; padding: 1rem 1.5rem 1.5rem; }
}

/* ── MULTI_THEME STICKY HEADER ── */
.mep-multi_theme .mep-header {
    position: sticky;
    top: 0;
    z-index: 10;
    transition: box-shadow 0.2s ease;
}
.mep-multi_theme .mep-header.mep-header-scrolled {
    box-shadow: 0 4px 20px rgba(168,85,247,0.15);
}

/* ── CARD ARRICCHITE ── */
.mep-card-location { font-size: 13px; opacity: 0.7; margin: 4px 0 8px; color: var(--dark); line-height: 1.5; }
.mep-card-address { opacity: 0.8; }

.mep-details-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.mep-details-link {
    background: none; border: none; padding: 0; cursor: pointer;
    font-size: 12px; font-weight: 800; text-decoration: underline;
    color: var(--p2);
}
.mep-details-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 260px;
    max-width: 80vw;
    background: #fff;
    border: 1px solid rgba(168,85,247,.2);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(168,85,247,0.15);
    z-index: 20;
    color: var(--dark);
}
@media (hover: hover) {
    .mep-details-wrap:hover .mep-details-popup { display: block; }
}
.mep-details-wrap.mep-details-open .mep-details-popup { display: block; }

.mep-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: nowrap; }
.mep-card-prices { font-size: 13px; font-weight: 800; opacity: 0.85; white-space: nowrap; color: var(--dark); line-height: 1.5; flex-shrink: 0; }
.mep-card-footer .mep-cta,
.mep-card-footer .mep-cta-disabled { flex-shrink: 0; white-space: nowrap; }

.mep-card-soldout { opacity: 0.6; }
.mep-badge-soldout-card {
    position: absolute;
    top: 10px; left: 10px;
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(0,0,0,0.6); color: #fff;
}
