/* ==========================================================================
   ToGo Specialty Coffee — Menu Page Styles
   Builds on index.css design system (variables, fonts, header, footer)
   ========================================================================== */

/* ── Menu Hero ─────────────────────────────────────────────────────────── */
.menu-hero {
    padding: 140px 0 60px;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-glass);
}

.menu-hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.menu-hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--brand-white);
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.menu-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ── Category Tabs (sticky) ────────────────────────────────────────────── */
.cat-tabs-wrapper {
    position: sticky;
    top: 80px;
    z-index: 900;
    background: rgba(7, 11, 22, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

.cat-tabs-scroll {
    display: flex;
    gap: 4px;
    padding: 10px 24px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

.cat-tabs-scroll::-webkit-scrollbar { display: none; }

.cat-tab {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.cat-tab:hover {
    color: var(--brand-white);
    background: rgba(255, 255, 255, 0.05);
}

.cat-tab.active {
    color: var(--brand-white);
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    box-shadow: 0 0 16px rgba(0, 71, 171, 0.4);
}

/* ── Menu Section ──────────────────────────────────────────────────────── */
.menu-section {
    padding: 72px 0 48px;
    border-bottom: 1px solid var(--border-glass);
}

.menu-section:last-of-type {
    border-bottom: none;
    padding-bottom: 100px;
}

/* Section header with left accent bar */
.menu-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    padding-left: 20px;
    border-left: 4px solid var(--brand-blue);
}

.menu-cat-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-white);
    margin: 0;
}

.menu-cat-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: auto;
}

/* Category accent colours */
.coffee-accent     { border-left-color: #0047AB; }
.matcha-accent     { border-left-color: #4E9F3D; }
.desserts-accent   { border-left-color: #E53E3E; }
.sandwiches-accent { border-left-color: #D97706; }
.frappuccino-accent{ border-left-color: #7C3AED; }
.smoothie-accent   { border-left-color: #9333EA; }
.mojito-accent     { border-left-color: #059669; }
.iced-tea-accent   { border-left-color: #0891B2; }
.beans-accent      { border-left-color: #92400E; }
.specials-accent   { border-left-color: #D97706; }

/* ── Menu Grid ─────────────────────────────────────────────────────────── */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Menu Card ─────────────────────────────────────────────────────────── */
.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-premium);
    background: var(--bg-card-hover);
}

/* Wide variant for 2-item sections (Coffee Beans) */
.menu-card-wide {
    grid-column: span 2;
}

/* ── Photo Placeholder ─────────────────────────────────────────────────── */
.menu-photo-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0b1020;
    flex-shrink: 0;
}

.menu-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0d1528 0%, #111c35 100%);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.menu-card:hover .menu-photo-placeholder {
    background: linear-gradient(135deg, #101a30 0%, #152038 100%);
}

/* Camera icon via pseudo-element */
.menu-photo-placeholder::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.18;
}

.menu-photo-placeholder::after {
    content: 'Photo coming soon';
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.18);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Real image when uploaded (replaces the placeholder div) */
.menu-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover .menu-photo-wrapper img {
    transform: scale(1.05);
}

/* Sale badge on photo wrapper */
.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--brand-red);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* ── Card Info ─────────────────────────────────────────────────────────── */
.menu-card-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.menu-item-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-white);
    margin-bottom: 6px;
    line-height: 1.3;
}

.menu-item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 14px;
}

.menu-item-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-blue);
    background: linear-gradient(to right, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item-price-original {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
    -webkit-text-fill-color: var(--text-muted);
}

/* Active nav link on menu page */
.menu-nav-active {
    color: var(--brand-white) !important;
}

.menu-nav-active::after {
    width: 100% !important;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
    .menu-card-wide { grid-column: span 1; }
}

@media (max-width: 768px) {
    .menu-hero-title { font-size: 2.2rem; }
    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .menu-card-wide { grid-column: span 1; }
    .menu-section { padding: 52px 0 36px; }
    .menu-section-header { padding-left: 14px; }
    .menu-cat-title { font-size: 1.4rem; }
    .cat-tabs-scroll { padding: 8px 16px; }
}

@media (max-width: 480px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .menu-item-name { font-size: 0.88rem; }
    .menu-item-desc { font-size: 0.75rem; }
    .menu-card-info { padding: 12px; }
}

/* ── Light appearance: menu elements that hardcode white text ─────────────
   (.menu-cat-title also carries an inline category colour, which still wins.) */
html[data-theme="light"] .menu-hero-title,
html[data-theme="light"] .menu-item-name,
html[data-theme="light"] .menu-cat-title { color: #11161f; }
html[data-theme="light"] .cat-tabs-wrapper { background: rgba(255, 255, 255, 0.92); }
html[data-theme="light"] .cat-tab { color: #586173; }
html[data-theme="light"] .cat-tab:hover { color: #11161f; background: rgba(15, 21, 38, 0.05); }
html[data-theme="light"] .cat-tab.active { color: #fff; }
/* Active "Menu" nav link: --brand-white is invisible on the light header → brand-blue (matches its underline + the .nav-link:hover light fix). */
html[data-theme="light"] .menu-nav-active { color: var(--brand-blue) !important; }
