/**
 * Mage Menu Module - Public Stylesheet
 * Matches Mage Hookah Lounge dark-neon aesthetic
 */

:root {
    --bg: #07080b;
    --bg-2: #0d1017;
    --card: #111524;
    --card-2: #0f1320;
    --text: #e8ecf3;
    --muted: #aab2c3;
    --line: rgba(255, 255, 255, 0.08);

    --neon-blue: #78A1BB;
    --neon-teal: #2180A2;
    --neon-purple: #391047;
    --gold: #E1B929;

    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-neon: 0 0 0 1px rgba(120, 161, 187, 0.12), 0 0 30px rgba(57, 16, 71, 0.25);

    --maxw: 1200px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(900px circle at 10% -10%, rgba(57, 16, 71, 0.55), transparent 60%),
        radial-gradient(700px circle at 90% -20%, rgba(33, 128, 162, 0.45), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.menu-container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.menu-hero {
    background: linear-gradient(180deg, rgba(17, 21, 36, 0.9), rgba(7, 8, 11, 0));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow-soft), var(--shadow-neon);
    margin-bottom: 22px;
}

.menu-hero h1 {
    margin: 0 0 6px 0;
    font-size: 32px;
    letter-spacing: 0.3px;
    font-weight: 800;
}

.menu-hero p {
    margin: 0 0 14px 0;
    color: var(--muted);
    max-width: 720px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Buttons */
.btn {
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.15s transform ease, 0.15s background ease, 0.15s border ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(120, 161, 187, 0.5);
}

.btn-primary {
    background: linear-gradient(90deg, rgba(57, 16, 71, 0.9), rgba(33, 128, 162, 0.9));
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
}

/* Category Sections */
.category-section {
    margin-top: 22px;
    background: rgba(13, 16, 23, 0.7);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.category-section:hover {
    background: rgba(13, 16, 23, 0.9);
    border-color: rgba(120, 161, 187, 0.5);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: transform 0.2s, background 0.2s;
    outline: none;
    flex-shrink: 0;
}

.section-toggle:hover {
    background: rgba(120, 161, 187, 0.1);
}

.section-toggle .toggle-icon {
    transition: transform 0.2s;
    display: block;
}

.category-section:not(.collapsed) .section-toggle .toggle-icon {
    transform: rotate(90deg);
}

.category-section.collapsed .items-grid {
    display: none;
}

.category-section.collapsed .section-head {
    margin-bottom: 0;
}

.section-title h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.2px;
    font-weight: 800;
}

.section-title .tag {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--bg-2);
}

.section-sub {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Item Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
}

@media (max-width: 1000px) {
    .items-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 680px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Item Card */
.item-card {
    grid-column: span 4;
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft), var(--shadow-neon);
    display: flex;
    flex-direction: column;
    min-height: 285px;
    position: relative;
    transition: 0.18s transform ease, 0.18s border ease;
}

.item-card:hover {
    transform: translateY(-2px);
    border-color: rgba(120, 161, 187, 0.45);
}

.item-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    filter: saturate(1.05) contrast(1.02);
    background: #111;
}

.item-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.item-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.item-card-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
    min-height: 38px;
}

.price-row {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.price {
    background: rgba(120, 161, 187, 0.12);
    border: 1px solid rgba(120, 161, 187, 0.25);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
    transition: all 0.2s ease;
    color: var(--text);
}

.price .label {
    color: var(--muted);
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.9;
}

.price.vip {
    background: linear-gradient(135deg, rgba(225, 185, 41, 0.2) 0%, rgba(225, 185, 41, 0.1) 100%);
    border-color: rgba(225, 185, 41, 0.4);
    box-shadow: 0 2px 8px rgba(225, 185, 41, 0.2);
    color: var(--gold);
}

.price.vip .label {
    color: var(--gold);
    opacity: 1;
}

.price.upg {
    background: rgba(33, 128, 162, 0.15);
    border-color: rgba(33, 128, 162, 0.3);
    color: var(--neon-blue);
}

.price.upg .label {
    color: var(--neon-blue);
    opacity: 1;
}

.hookah-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(7, 8, 11, 0.8);
    border: 1px solid rgba(120, 161, 187, 0.55);
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(120, 161, 187, 0.35);
    z-index: 1;
}

.item-card-cta {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}

.item-card-cta .btn {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* Flavors Page */
.flavor-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 6px 0 12px 0;
    padding: 12px;
    background: rgba(13, 16, 23, 0.7);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.flavor-controls .filter-search-large {
    flex: 1;
    min-width: 300px;
}

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 4px;
    margin-left: auto;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    outline: none;
}

.view-btn:hover {
    color: var(--text);
    background: rgba(120, 161, 187, 0.1);
}

.view-btn.active {
    background: var(--card);
    color: var(--neon-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.view-btn svg {
    display: block;
}

.filter-select,
.filter-search {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.filter-search {
    min-width: 220px;
}

.filter-search-large {
    flex: 1;
    min-width: 300px;
    padding: 12px 18px;
    font-size: 16px;
}

.brand-block {
    margin-top: 10px;
    background: rgba(17, 21, 36, 0.55);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.brand-block:hover {
    background: rgba(17, 21, 36, 0.75);
    border-color: rgba(120, 161, 187, 0.5);
}

.brand-block a {
    pointer-events: auto;
    cursor: pointer;
}

.brand-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
}

.brand-name {
    font-weight: 900;
    letter-spacing: 0.3px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.brand-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: transform 0.2s, background 0.2s;
    outline: none;
    flex-shrink: 0;
}

.brand-toggle:hover {
    background: rgba(120, 161, 187, 0.1);
}

.brand-toggle .toggle-icon {
    transition: transform 0.2s;
    display: block;
}

.brand-block:not(.collapsed) .brand-toggle .toggle-icon {
    transform: rotate(90deg);
}

.brand-block.collapsed .brand-grid,
.brand-block.collapsed .brand-list {
    display: none;
}

.brand-block.collapsed .brand-head {
    margin-bottom: 0;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--neon-teal);
    box-shadow: 0 0 10px rgba(33, 128, 162, 0.9);
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    padding: 6px;
}

.flavor-card-link {
    grid-column: span 4;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
}

.flavor-card-link:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.flavor-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.flavor-card-link:hover .flavor-card {
    border-color: var(--neon-blue);
    box-shadow: 0 4px 16px rgba(33, 128, 162, 0.3);
    transform: translateY(-2px);
}

.flavor-img {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    flex: 0 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.flavor-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.flavor-title {
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
    letter-spacing: 0.2px;
}

.flavor-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flavor-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    align-items: center;
}

@media (max-width: 900px) {
    .flavor-card-link {
        grid-column: span 6;
    }
    
    .flavor-card {
        padding: 10px;
        gap: 10px;
    }
    
    .flavor-img {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .flavor-title {
        font-size: 15px;
    }
}

@media (max-width: 560px) {
    .flavor-card-link {
        grid-column: span 12;
    }
    
    .flavor-card {
        padding: 12px;
        gap: 12px;
    }
    
    .flavor-img {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .flavor-title {
        font-size: 14px;
    }
    
    .flavor-desc {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    
    .price {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* List View */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
}

.flavor-list-item {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
}

.flavor-list-item:hover {
    transform: translateX(2px);
    opacity: 0.95;
}

.flavor-list-content {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s;
}

.flavor-list-item:hover .flavor-list-content {
    border-color: var(--neon-blue);
}

.flavor-list-content .flavor-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: #111;
    flex: 0 0 auto;
}

.flavor-list-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.flavor-list-title {
    font-weight: 800;
    font-size: 15px;
    line-height: 1.3;
}

.flavor-list-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.flavor-list-price {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .flavor-controls {
        flex-wrap: wrap;
    }
    
    .view-switcher {
        display: none;
    }
    
    .flavor-list-content {
        padding: 10px;
        gap: 10px;
    }
    
    .flavor-list-content .flavor-img {
        width: 40px;
        height: 40px;
    }
    
    .flavor-list-title {
        font-size: 14px;
    }
    
    .flavor-list-desc {
        font-size: 12px;
    }
    
    .flavor-list-price {
        flex-direction: column;
        align-items: flex-end;
    }
}

/* Visit Mage Footer */
.visit-mage {
    margin-top: 18px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(17, 21, 36, 0.9), rgba(13, 16, 23, 0.9));
    border: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.visit-mage strong {
    display: block;
    font-size: 16px;
}

.visit-mage small {
    color: var(--muted);
    display: block;
    margin-top: 2px;
    font-size: 12px;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.fact {
    border: 1px solid var(--line);
    background: var(--bg-2);
    padding: 6px 8px;
    border-radius: 999px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

