/** LG Wine List Widget — CSS */

/* ===== Container ===== */
.lg-wine {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 24px;
    min-height: 80vh;
}
body.admin-bar .lg-wine { padding-top: 128px; }

/* ===== Sidebar (desktop only) ===== */
.lg-wine__sidebar {
    width: 224px;
    flex-shrink: 0;
    position: sticky;
    top: 96px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
    border: 1px solid rgba(var(--lge-foreground-rgb),.05);
    background: var(--lge-surface);
}
.lg-wine__sidebar::-webkit-scrollbar { display: none; }
body.admin-bar .lg-wine__sidebar { top: 128px; max-height: calc(100vh - 152px); }
.lg-wine__nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

/* Sidebar group button */
.lg-wine__nav-group { border-bottom: 1px solid rgba(var(--lge-foreground-rgb),.05); }
.lg-wine__nav-group:last-child { border-bottom: none; }
.lg-wine__nav-group-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--lge-muted-fg);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color .3s;
}
.lg-wine__nav-group-btn:hover { color: var(--lge-foreground); }
.lg-wine__nav-group-btn.is-active { color: #EF7A23 !important; }
.lg-wine__nav-group-btn:focus,
.lg-wine__nav-group-btn:focus-visible { outline: none; }

/* Sidebar subcategories */
.lg-wine__nav-subcats {
    display: none;
    flex-direction: column;
    padding-bottom: 8px;
}
.lg-wine__nav-item {
    display: block;
    padding: 8px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: none;
    color: rgba(var(--lge-foreground-rgb),.6);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color .2s;
}
.lg-wine__nav-item:hover { color: var(--lge-foreground); }
.lg-wine__nav-item.is-active {
    color: #EF7A23;
    border-left-color: #EF7A23;
    padding-left: 18px;
}

@media (min-width: 1024px) {
    .lg-wine__sidebar { display: block; }
    .lg-wine__mobile-tabs { display: none !important; }
    .lg-wine__fab { display: none !important; }
    .lg-wine__fab-menu { display: none !important; }
}

/* ===== Mobile Tab Bar (in-flow, fixed via JS when scrolled past navbar) ===== */
.lg-wine__mobile-tabs {
    display: none;
    align-items: stretch;
    background: var(--lge-background);
    border-bottom: none;
    position: relative;
    z-index: 1000;
}
@media (max-width: 1023px) {
    .lg-wine__sidebar { display: none; }
    .lg-wine__mobile-tabs { display: flex; }
    .lg-wine__mobile-tabs:not(.is-stuck) {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    .lg-wine__mobile-tabs.is-stuck {
        position: fixed;
        z-index: 1000;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,.5);
        /* top, left, width set by JS */
    }
    .lg-wine { padding: 0; flex-direction: column; gap: 0; min-height: auto; }
    body.admin-bar .lg-wine { padding-top: 0; }
    .lg-wine__content { padding: 24px 16px; }
    /* Reduce Elementor container padding above wine widget */
    .elementor-element-84ecff6 { --padding-top: 0px !important; }
}
.lg-wine__mobile-tabs-placeholder { display: none; }

/* Group dropdown (static for wine — single group) */
.lg-wine__mobile-group-dropdown {
    flex-shrink: 0;
    background: var(--lge-surface);
    border-right: 1px solid rgba(var(--lge-foreground-rgb),.05);
}
.lg-wine__mobile-group-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 16px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--lge-foreground) !important;
    background: none !important;
    border: none !important;
    cursor: default;
    white-space: nowrap;
}
.lg-wine__mobile-group-btn svg { display: none; }

/* Subcats wrapper with scroll arrows */
.lg-wine__mobile-subcats-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
}
.lg-wine__mobile-subcats {
    display: flex;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
}
.lg-wine__mobile-subcats::-webkit-scrollbar { display: none; }

/* Subcategory tabs */
.lg-wine__mobile-subcat {
    flex-shrink: 0;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--lge-muted-fg) !important;
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
}
.lg-wine__mobile-subcat:hover { color: var(--lge-foreground) !important; }
.lg-wine__mobile-subcat.is-active {
    color: #EF7A23 !important;
    border-bottom: 2px solid #EF7A23 !important;
}

/* Scroll arrows with gradient fade */
.lg-wine__scroll-arrow {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 2;
    border: none !important;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--lge-foreground) !important;
    padding: 0 !important;
    transition: opacity .15s;
}
.lg-wine__scroll-arrow--left {
    left: 0;
    background: linear-gradient(to right, var(--lge-background) 40%, transparent) !important;
}
.lg-wine__scroll-arrow--right {
    right: 0;
    background: linear-gradient(to left, var(--lge-background) 40%, transparent) !important;
}
.lg-wine__scroll-arrow.is-visible { display: flex; }

/* ===== Content ===== */
.lg-wine__content { flex: 1; min-width: 0; }
.lg-wine__group-content { transition: opacity .3s ease; }
.lg-wine__section { margin-bottom: 80px; }
.lg-wine__section-header { text-align: center; margin-bottom: 32px; }
.lg-wine__cat-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.875rem, 3vw, 2.25rem);
    color: var(--lge-foreground);
    font-weight: 400;
    margin: 0 0 8px;
}
.lg-wine__cat-desc {
    color: var(--lge-muted-fg);
    font-family: 'Inter', sans-serif;
    font-size: .875rem;
    margin: 0 0 12px;
}
.lg-wine__cat-divider { width: 48px; height: 1px; background: #C9A96E; margin: 0 auto; }

/* Table header */
.lg-wine__table-header {
    display: grid;
    grid-template-columns: 1fr 80px 96px;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(var(--lge-foreground-rgb),.1);
    margin-bottom: 8px;
}
.lg-wine__th-name, .lg-wine__th-glass, .lg-wine__th-bottle {
    color: #C9A96E;
    font-size: .7rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}
.lg-wine__th-glass, .lg-wine__th-bottle { text-align: right; }
@media (max-width: 768px) { .lg-wine__table-header { display: none; } }

/* Wine rows */
.lg-wine__row {
    display: grid;
    grid-template-columns: 1fr 80px 96px;
    gap: 8px 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(var(--lge-foreground-rgb),.05);
    align-items: start;
}
@media (max-width: 768px) {
    .lg-wine__row { grid-template-columns: 1fr; gap: 4px; }
    .lg-wine__row-glass::before { content: 'Glass: '; color: var(--lge-muted-fg); font-size: .7rem; }
    .lg-wine__row-bottle::before { content: 'Bottle: '; color: var(--lge-muted-fg); font-size: .7rem; }
}
.lg-wine__row-info { display: flex; flex-direction: column; gap: 4px; }
.lg-wine__row-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--lge-foreground);
}
.lg-wine__row-badge {
    font-size: .6rem;
    color: #EF7A23;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-left: 8px;
}
.lg-wine__row-meta {
    font-size: .75rem;
    color: var(--lge-muted-fg);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.lg-wine__row-desc {
    font-size: .75rem;
    color: rgba(138,138,138,.6);
    font-style: normal;
}
.lg-wine__row-glass, .lg-wine__row-bottle {
    color: #C9A96E;
    font-size: .875rem;
    text-align: right;
    white-space: nowrap;
}
.lg-wine__disclaimer {
    text-align: center;
    color: var(--lge-muted-fg);
    font-size: .75rem;
    margin-top: 40px;
}

/* ===== FAB (mobile only, moved to body by JS) ===== */
.lg-wine__fab {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #EF7A23 !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(239,122,35,.25);
    transition: transform .2s, box-shadow .2s;
}
.lg-wine__fab:hover {
    box-shadow: 0 20px 25px -5px rgba(239,122,35,.4);
    transform: scale(1.05);
}
/* Icon toggle */
.lg-wine__fab-icon--close { display: none; }
.lg-wine__fab.is-open .lg-wine__fab-icon--main { display: none; }
.lg-wine__fab.is-open .lg-wine__fab-icon--close { display: block; }

@media (min-width: 1024px) {
    .lg-wine__fab { display: none !important; }
    .lg-wine__fab-menu { display: none !important; }
}

/* FAB menu */
.lg-wine__fab-menu {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 99999;
    width: 224px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: none;
    background: var(--lge-surface);
    border: 1px solid rgba(var(--lge-foreground-rgb),.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    padding: 8px 0;
}
.lg-wine__fab-menu::-webkit-scrollbar { display: none; }
.lg-wine__fab-menu.is-open { display: block; }

/* FAB group button */
.lg-wine__fab-group-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--lge-muted-fg) !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    text-align: left;
    transition: color .2s;
}
.lg-wine__fab-group-btn:hover { color: var(--lge-foreground) !important; }
.lg-wine__fab-group-btn.is-active { color: #EF7A23 !important; }

/* FAB subcategories */
.lg-wine__fab-subcats { padding: 0; }
.lg-wine__fab-subcat {
    display: block;
    width: 100%;
    padding: 6px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: normal;
    text-transform: none;
    color: var(--lge-muted-fg) !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    text-align: left;
    transition: color .2s;
}
.lg-wine__fab-subcat:hover { color: var(--lge-foreground) !important; }
.lg-wine__fab-subcat.is-active { color: #EF7A23 !important; }
