/* ==========================================================================
   LMH Catalog v2 — neon redesign for lines, carousels, drink feed
   Matches top / home neon language
   ========================================================================== */

body.lmh-neon-ui.lmh-home-v2 {
    --cat-panel: rgba(12, 14, 18, 0.94);
    --cat-border: rgba(212, 255, 77, 0.16);
    --cat-border-hot: rgba(212, 255, 77, 0.28);
    --cat-glow: rgba(212, 255, 77, 0.12);
}

/* === Shared neon section shell === */
body.lmh-neon-ui .lmh-cat-v2 {
    position: relative;
    margin: 0 0 10px;
    padding: 12px 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--cat-border);
    background:
        radial-gradient(100% 80% at 100% 0%, rgba(212, 255, 77, 0.05), transparent 55%),
        var(--cat-panel);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    overflow: clip;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.4s var(--neon-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        transform 0.4s var(--neon-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

body.lmh-neon-ui .lmh-cat-v2.is-in,
body.lmh-neon-ui .lmh-cat-v2.lmh-neon-block.is-in {
    opacity: 1;
    transform: translateY(0);
}

/* reveal without needing neon-block class */
body.lmh-neon-ui .lmh-catalog-v2 .lmh-cat-v2 {
    opacity: 1;
    transform: none;
}

body.lmh-neon-ui .lmh-cat-v2:hover {
    border-color: var(--cat-border-hot);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 20px var(--cat-glow);
}

body.lmh-neon-ui .lmh-cat-v2__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

body.lmh-neon-ui .lmh-cat-v2__eyebrow {
    margin: 0 0 2px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neon-accent-dim, #8bc34a);
}

body.lmh-neon-ui .lmh-cat-v2__title {
    margin: 0;
    font-family: var(--lmh-display, "Bebas Neue", sans-serif);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0f2f4;
    line-height: 1;
}

body.lmh-neon-ui .lmh-cat-v2__empty {
    margin: 4px 0 0;
    padding: 14px;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    border: 1px dashed rgba(212, 255, 77, 0.14);
}

/* === Horizontal tracks (carousels only) === */
body.lmh-neon-ui .lmh-cat-v2__track,
body.lmh-neon-ui .lmh-carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
    scroll-padding: 4px;
    padding: 4px 2px 10px;
    margin: 0 -2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 255, 77, 0.4) rgba(0, 0, 0, 0.25);
}

body.lmh-neon-ui .lmh-cat-v2__track::-webkit-scrollbar,
body.lmh-neon-ui .lmh-carousel-track::-webkit-scrollbar {
    height: 5px;
}

body.lmh-neon-ui .lmh-cat-v2__track::-webkit-scrollbar-track,
body.lmh-neon-ui .lmh-carousel-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

body.lmh-neon-ui .lmh-cat-v2__track::-webkit-scrollbar-thumb,
body.lmh-neon-ui .lmh-carousel-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--neon-accent, #d4ff4d), rgba(139, 195, 74, 0.65));
    border-radius: 4px;
}

/* === Flavor cards in carousels === */
body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card,
body.lmh-neon-ui .lmh-catalog-feed .lmh-flavor-card {
    flex: 0 0 128px;
    scroll-snap-align: start;
    border-radius: 10px;
    border: 1px solid rgba(212, 255, 77, 0.1);
    background: linear-gradient(165deg, rgba(22, 25, 32, 0.98), rgba(10, 12, 16, 0.99));
    overflow: hidden;
    transition:
        transform 0.2s var(--neon-ease, cubic-bezier(0.22, 1, 0.36, 1)),
        border-color 0.15s ease,
        box-shadow 0.2s ease;
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card:hover,
body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card:focus-visible,
body.lmh-neon-ui .lmh-catalog-feed .lmh-flavor-card:hover,
body.lmh-neon-ui .lmh-catalog-feed .lmh-flavor-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(212, 255, 77, 0.32);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 16px rgba(212, 255, 77, 0.12);
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__art,
body.lmh-neon-ui .lmh-catalog-feed .lmh-flavor-card__art {
    height: 118px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px 6px 4px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(212, 255, 77, 0.08), transparent 70%),
        rgba(0, 0, 0, 0.25);
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__img,
body.lmh-neon-ui .lmh-catalog-feed .lmh-flavor-card__img {
    max-height: 100px;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease;
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card:hover .lmh-flavor-card__img {
    transform: scale(1.06);
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__meta {
    padding: 6px 8px 9px;
    gap: 2px;
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #eef0f2;
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__line {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.38);
}

body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__rating {
    font-family: var(--lmh-display, "Bebas Neue", sans-serif);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: var(--neon-accent, #d4ff4d);
}

/* Hide old carousel title if any leftover */
body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-carousel-section__title {
    display: none;
}

/* === Drink feed — compact, no panel (previous format + neon polish) === */
body.lmh-neon-ui .lmh-drink-feed-bar {
    border: none;
    background: transparent;
    padding: 2px 0 0;
    margin: 0 0 6px;
    box-shadow: none;
}

body.lmh-neon-ui .lmh-drink-feed-section--neon {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

body.lmh-neon-ui .lmh-drink-feed__label {
    margin: 0 0 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-accent-dim, #8bc34a);
}

body.lmh-neon-ui .lmh-drink-feed__track {
    display: flex;
    gap: 0;
    padding: 4px 0 2px;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
}

body.lmh-neon-ui .lmh-drink-feed__track::-webkit-scrollbar {
    display: none;
}

body.lmh-neon-ui .lmh-drink-feed__card {
    flex: 0 0 auto;
    width: 52px;
    padding: 0;
    gap: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

body.lmh-neon-ui .lmh-drink-feed__card:hover {
    background: transparent;
    border: none;
    transform: none;
}

body.lmh-neon-ui .lmh-drink-feed__can {
    width: 52px;
    height: 32px;
    border: 0;
    border-radius: 4px;
    background: transparent;
}

body.lmh-neon-ui .lmh-drink-feed__can:hover,
body.lmh-neon-ui .lmh-drink-feed__can:focus-visible {
    transform: scale(1.08);
    filter: drop-shadow(0 0 8px rgba(212, 255, 77, 0.35));
}

body.lmh-neon-ui .lmh-drink-feed__nick {
    margin-top: 2px;
    max-width: 52px;
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.lmh-neon-ui .lmh-drink-feed__nick:hover {
    color: var(--neon-accent, #d4ff4d);
}

body.lmh-neon-ui .lmh-drink-feed__time {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.32);
    line-height: 1.2;
}

body.lmh-neon-ui .lmh-drink-feed__empty {
    margin: 0;
    padding: 4px 0;
    text-align: left;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.42);
    border: none;
    background: transparent;
}

/* === Lines nav — fixed height ≈ 2 carousel rows, scroll inside === */
body.lmh-neon-ui .lmh-catalog-layout {
    align-items: start;
}

body.lmh-neon-ui .lmh-lines-nav {
    --lmh-lines-h: 500px;
    align-self: start;
    height: var(--lmh-lines-h);
    max-height: var(--lmh-lines-h);
    min-height: 0;
    overflow: hidden;
}

body.lmh-neon-ui .lmh-lines-nav__panel {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--cat-border);
    background:
        radial-gradient(90% 60% at 0% 0%, rgba(212, 255, 77, 0.05), transparent 50%),
        var(--cat-panel);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

body.lmh-neon-ui .lmh-lines-nav__panel::before {
    display: none;
}

body.lmh-neon-ui .lmh-lines-nav__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 0 0 auto;
    margin-bottom: 10px;
    padding: 0 2px;
}

body.lmh-neon-ui .lmh-lines-nav__title {
    margin: 0;
    font-family: var(--lmh-display, "Bebas Neue", sans-serif);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0f2f4;
    line-height: 1;
}

body.lmh-neon-ui .lmh-lines-nav__title::after {
    display: none;
}

body.lmh-neon-ui .lmh-lines-nav__search-wrap {
    flex: 0 0 auto;
}

body.lmh-neon-ui .lmh-lines-nav__search-field {
    margin-bottom: 8px;
}

body.lmh-neon-ui .lmh-lines-nav__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 255, 77, 0.35) transparent;
}

body.lmh-neon-ui .lmh-lines-nav__scroll::-webkit-scrollbar {
    width: 4px;
}

body.lmh-neon-ui .lmh-lines-nav__scroll::-webkit-scrollbar-thumb {
    background: rgba(212, 255, 77, 0.35);
    border-radius: 4px;
}

/* In line-view keep same cap so sidebar doesn't explode */
body.lmh-neon-ui .lmh-catalog.is-line-view .lmh-lines-nav {
    height: var(--lmh-lines-h);
    max-height: var(--lmh-lines-h);
}

body.lmh-neon-ui .lmh-catalog-feed {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.lmh-neon-ui .lmh-catalog-highlights {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.lmh-neon-ui .lmh-lines-nav__search-input,
body.lmh-neon-ui .lmh-lines-nav__search .lmh-header-search__input {
    border-radius: 999px !important;
    border: 1px solid rgba(212, 255, 77, 0.14) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #eef0f2 !important;
    font-size: 0.78rem !important;
}

body.lmh-neon-ui .lmh-lines-nav__search-input:focus,
body.lmh-neon-ui .lmh-lines-nav__search .lmh-header-search__input:focus {
    border-color: rgba(212, 255, 77, 0.35) !important;
    box-shadow: 0 0 0 2px rgba(212, 255, 77, 0.08) !important;
    outline: none;
}

body.lmh-neon-ui .lmh-lines-nav__link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 8px 10px;
    margin: 0 0 4px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.lmh-neon-ui .lmh-lines-nav__link:hover {
    background: rgba(212, 255, 77, 0.05);
    border-color: rgba(212, 255, 77, 0.12);
    color: #eef0f2;
}

body.lmh-neon-ui .lmh-lines-nav__link.is-active {
    background: rgba(212, 255, 77, 0.1);
    border-color: rgba(212, 255, 77, 0.28);
    color: var(--neon-accent, #d4ff4d);
    box-shadow: 0 0 16px rgba(212, 255, 77, 0.08);
}

body.lmh-neon-ui .lmh-lines-nav__link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body.lmh-neon-ui .lmh-lines-nav__label {
    font-size: 0.78rem;
    font-weight: 600;
}

body.lmh-neon-ui .lmh-lines-nav__count {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

body.lmh-neon-ui .lmh-lines-nav__link.is-active .lmh-lines-nav__count {
    color: rgba(212, 255, 77, 0.7);
}

body.lmh-neon-ui .lmh-lines-nav__progress {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.lmh-neon-ui .lmh-lines-nav__progress-track {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

body.lmh-neon-ui .lmh-lines-nav__progress-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--neon-accent-dim, #8bc34a), var(--neon-accent, #d4ff4d));
    box-shadow: 0 0 6px rgba(212, 255, 77, 0.35);
}

body.lmh-neon-ui .lmh-lines-nav__progress-label {
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.35);
    font-variant-numeric: tabular-nums;
}

/* === Line view panel === */
body.lmh-neon-ui .lmh-catalog-line-view {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--cat-border);
    background: var(--cat-panel);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body.lmh-neon-ui .lmh-catalog-line-view__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 255, 77, 0.1);
}

body.lmh-neon-ui .lmh-catalog-line-view__back {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(212, 255, 77, 0.18);
    background: rgba(212, 255, 77, 0.06);
    color: var(--neon-accent, #d4ff4d);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body.lmh-neon-ui .lmh-catalog-line-view__back:hover {
    background: rgba(212, 255, 77, 0.12);
    border-color: rgba(212, 255, 77, 0.32);
}

body.lmh-neon-ui .lmh-catalog-line-view__title {
    margin: 0;
    font-family: var(--lmh-display, "Bebas Neue", sans-serif);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f0f2f4;
}

body.lmh-neon-ui .lmh-catalog-line-view__lead {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.42);
}

body.lmh-neon-ui .lmh-catalog-line-view .lmh-flavors-grid {
    gap: 10px;
}

body.lmh-neon-ui .lmh-catalog-line-view .lmh-flavor-card {
    border-radius: 10px;
    border: 1px solid rgba(212, 255, 77, 0.1);
    background: linear-gradient(165deg, rgba(22, 25, 32, 0.98), rgba(10, 12, 16, 0.99));
}

body.lmh-neon-ui .lmh-catalog-line-view .lmh-flavor-card:hover {
    border-color: rgba(212, 255, 77, 0.3);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3), 0 0 14px rgba(212, 255, 77, 0.1);
    transform: translateY(-3px);
}

/* Override old home-v2 drink-feed / carousel double-box styles */
body.lmh-home-v2 .lmh-catalog-v2 .lmh-drink-feed-bar {
    border: none;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 720px) {
    body.lmh-neon-ui .lmh-lines-nav {
        height: auto;
        max-height: none;
        --lmh-lines-h: auto;
    }

    body.lmh-neon-ui .lmh-lines-nav__panel {
        height: auto;
        max-height: none;
    }

    body.lmh-neon-ui .lmh-lines-nav__scroll {
        max-height: 200px;
    }

    body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card {
        flex: 0 0 112px;
    }

    body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__art {
        height: 100px;
    }

    body.lmh-neon-ui .lmh-cat-v2--carousel .lmh-flavor-card__img {
        max-height: 86px;
    }

    body.lmh-neon-ui .lmh-cat-v2--feed .lmh-drink-feed__card {
        flex: 0 0 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.lmh-neon-ui .lmh-cat-v2,
    body.lmh-neon-ui .lmh-flavor-card,
    body.lmh-neon-ui .lmh-drink-feed__card {
        transition: none;
    }
}
