/* Fonts loaded via <link> in index.html */

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
    --primary: #F5C518;
    --primary-glow: rgba(245, 197, 24, 0.28);
    --primary-hover: #FFD740;
    --primary-deep: #C49B0A;
    --primary-text: #0A0A0A;
    --accent: #F5C518;
    --accent-glow: rgba(245, 197, 24, 0.15);
    --accent-green: #2A9D8F;

    /* Pure blacks */
    --bg-dark: #090909;
    --bg-elevated: #111111;
    --bg-card: #151515;
    --bg-card-hover: #1C1C1C;
    --bg-surface: #181818;
    --bg-glass: rgba(255, 255, 255, 0.025);

    --text-primary: #F8F8F8;
    --text-secondary: rgba(248, 248, 248, 0.72);
    --text-muted: rgba(248, 248, 248, 0.48);
    --text-dim: rgba(248, 248, 248, 0.26);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.09);
    --border-active: rgba(245, 197, 24, 0.5);

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.3), 0 2px 10px rgba(0,0,0,0.22);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.42), 0 12px 36px rgba(0,0,0,0.28);
    --shadow-lg: 0 12px 44px rgba(0,0,0,0.55), 0 24px 60px rgba(0,0,0,0.38);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.35), 0 8px 28px rgba(0,0,0,0.25);
    --shadow-card-hover: 0 8px 32px rgba(0,0,0,0.5), 0 20px 52px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 40px rgba(245, 197, 24, 0.10);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Poppins', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 180ms var(--ease-out);
    --transition-normal: 280ms var(--ease-out);
    --transition-slow: 480ms var(--ease-out);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-primary   { color: var(--primary); }
.text-accent    { color: var(--accent); }
.serif-font     { font-family: var(--font-display); }
.w-100          { width: 100%; }
.mt-3           { margin-top: 1rem; }

.text-muted {
    color: var(--text-muted);
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(9, 9, 9, 0.92);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-normal);
}

.logo-link {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
    transition: transform var(--transition-fast);
    transform: scale(2.2);
    transform-origin: left center;
}

.brand-logo:hover {
    transform: scale(2.35);
    transform-origin: left center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    color: var(--primary);
    background: rgba(245, 197, 24, 0.08);
}

.icon-btn:active {
    transform: scale(0.9);
}

.position-relative {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    background: var(--primary);
    color: var(--primary-text);
    font-size: 0.63rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-dark);
    animation: badgePulse 2.4s ease infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--bg-dark); }
    50%       { box-shadow: 0 0 0 2px var(--bg-dark), 0 0 0 4px rgba(245, 197, 24, 0.3); }
}

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: white;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000 url('../img/subhouse bg.png') center 25% / cover no-repeat;
    will-change: transform;
    z-index: 0;
    animation: heroBgFadeIn 1.4s var(--ease-out) both;
}

@keyframes heroBgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(9, 9, 9, 0.25) 0%,
        rgba(9, 9, 9, 0.05) 35%,
        rgba(9, 9, 9, 0.55) 85%,
        rgba(9, 9, 9, 1.00) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 1.5rem;
    margin: 0 auto;
    animation: heroFadeIn 0.9s 0.2s var(--ease-out) both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(245, 197, 24, 0.10);
    color: rgba(245, 197, 24, 0.90);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 3px;
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.8rem;
    border: 1px solid rgba(245, 197, 24, 0.25);
    text-transform: uppercase;
    animation: heroFadeIn 0.9s 0.1s var(--ease-out) both;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.8rem, 13vw, 7rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -3px;
    text-transform: uppercase;
    margin-bottom: 2.4rem;
    animation: heroFadeIn 0.9s 0.3s var(--ease-out) both;
}

.hero-title .text-accent {
    color: var(--accent);
}

.hero-cta-btn {
    animation: heroFadeIn 0.9s 0.5s var(--ease-out) both;
    font-size: 0.92rem;
    padding: 0.9rem 2.4rem;
    border-radius: var(--radius-md);
    letter-spacing: 0.3px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.2px;
    font-family: var(--font-body);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-fast);
    background: linear-gradient(135deg, rgba(255,255,255,0.14), transparent);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-text);
    box-shadow: 0 3px 14px rgba(245, 197, 24, 0.22);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 22px rgba(245, 197, 24, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.18);
}

.btn-out-of-stock {
    background: var(--bg-surface);
    color: var(--text-dim);
    cursor: not-allowed;
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

.btn-out-of-stock:hover {
    transform: none;
    box-shadow: none;
}

.btn-out-of-stock::after {
    display: none;
}

.btn-outline-white {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-add {
    border-radius: var(--radius-sm);
    padding: 0.58rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

#menu-section {
    scroll-margin-top: 68px;
}

/* ========================================
   CATEGORY NAVIGATION
   ======================================== */
.categories {
    margin-bottom: 3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 65px;
    z-index: 50;
    background: var(--bg-dark);
    padding-top: 1rem;
    padding-bottom: 1px;
    margin-top: -1rem;
}

.categories::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-subtle);
}

.categories::-webkit-scrollbar {
    display: none;
}

#category-list {
    display: flex;
    list-style: none;
    gap: 8px;
    min-width: max-content;
    padding-bottom: 14px;
}

#category-list li {
    padding: 0.52rem 1.3rem;
    background: transparent;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
}

#category-list li:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

#category-list li.active {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
    box-shadow: 0 2px 14px rgba(245, 197, 24, 0.30);
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.3rem;
}

/* ========================================
   MENU GRID & CARDS
   ======================================== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    position: relative;
    cursor: default;
    box-shadow: var(--shadow-card);
    animation: cardReveal 0.45s var(--ease-out) both;
}

.menu-card:nth-child(1)  { animation-delay: 0ms; }
.menu-card:nth-child(2)  { animation-delay: 60ms; }
.menu-card:nth-child(3)  { animation-delay: 120ms; }
.menu-card:nth-child(4)  { animation-delay: 180ms; }
.menu-card:nth-child(5)  { animation-delay: 240ms; }
.menu-card:nth-child(6)  { animation-delay: 300ms; }
.menu-card:nth-child(n+7) { animation-delay: 360ms; }

.menu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-normal);
    background: linear-gradient(145deg, rgba(245, 197, 24, 0.06), transparent 55%);
    pointer-events: none;
    z-index: 1;
}

.menu-card:hover {
    transform: translateY(-7px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-card-hover), var(--shadow-glow);
}

.menu-card:hover::before {
    opacity: 1;
}

.card-img-wrapper {
    position: relative;
    height: 248px;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ease-out);
}

.menu-card:hover .card-img {
    transform: scale(1.07);
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, var(--bg-card), transparent);
    pointer-events: none;
}

.tag-veg {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(42, 157, 143, 0.88);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 1.3rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
    gap: 0.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.card-price {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

/* ========================================
   LOADING STATE
   ======================================== */
.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 5rem 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* ========================================
   FLOATING CART BAR (sticky bottom)
   ======================================== */
.floating-cart-bar {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 95;
    width: calc(100% - 1.5rem);
    max-width: 560px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.55rem 0.55rem 0.85rem;
    background: rgba(17, 17, 17, 0.96);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    border: 1px solid rgba(245, 197, 24, 0.22);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 197, 24, 0.08);
    cursor: pointer;
    transform: translate(-50%, 150%);
    opacity: 0;
    transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-out);
    pointer-events: none;
}

.floating-cart-bar.visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.floating-cart-bar:hover,
.floating-cart-bar:focus-visible {
    border-color: rgba(245, 197, 24, 0.45);
    outline: none;
}

.floating-cart-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.floating-cart-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 197, 24, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(245, 197, 24, 0.25);
}

.floating-cart-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.floating-cart-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.floating-cart-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.floating-cart-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.floating-cart-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--primary-text);
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.1;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.floating-cart-bar:hover .floating-cart-btn {
    background: var(--primary-hover);
}

.floating-cart-btn-price {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.floating-cart-btn-label {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ========================================
   CART SIDEBAR
   ======================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.38s var(--ease-out);
    overflow: hidden;
    overscroll-behavior: contain;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header,
.cart-footer {
    padding: 1.2rem 1.5rem;
    flex-shrink: 0;
}

.cart-header {
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.cart-footer {
    border-top: 1px solid rgba(245, 197, 24, 0.18);
    background: var(--bg-surface);
    margin-top: auto;
}

.cart-footer .btn-primary {
    border-radius: var(--radius-md);
    padding: 0.9rem;
    font-size: 0.92rem;
}

.special-instructions {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    resize: none;
    outline: none;
    margin-bottom: 0.7rem;
    transition: border-color var(--transition-fast);
}

.special-instructions:focus {
    border-color: rgba(245, 197, 24, 0.40);
}

.special-instructions::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.order-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0.7rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.order-type-btn {
    padding: 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.order-type-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-card-hover);
}

.order-type-btn.active {
    background: var(--primary);
    color: var(--primary-text);
}

/* ── Size selector (modal) ── */
.required-star {
    color: var(--primary);
}

.size-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 0.4rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: border-color var(--transition-fast);
}

.size-btn {
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.size-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-card-hover);
}

.size-btn.active {
    background: var(--primary);
    color: var(--primary-text);
}

.size-upcharge {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.80;
}

.size-toggle--error {
    border-color: var(--primary);
    animation: size-shake 0.35s var(--ease-out);
}

@keyframes size-shake {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    50%  { transform: translateX(6px); }
    75%  { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* --- Inline validation message + button shake (missing mandatory field) --- */
.validation-message {
    display: none;
    margin: 0.75rem 0 0.25rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    color: var(--primary);
    background: rgba(245, 197, 24, 0.08);
    border: 1px solid rgba(245, 197, 24, 0.35);
    border-radius: 10px;
    letter-spacing: 0.01em;
}

.validation-message.visible {
    display: block;
    animation: validation-fade-in 0.25s ease-out;
}

@keyframes validation-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-shake {
    animation: size-shake 0.4s var(--ease-out);
}

.cart-item-size-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(245, 197, 24, 0.10);
    border-radius: var(--radius-full);
    padding: 0.15rem 0.55rem;
    margin-top: 0.25rem;
    letter-spacing: 0.02em;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem 1.5rem;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cart-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item h4 {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 3px;
    line-height: 1.3;
}

.cart-item-mods {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cart-item-right {
    text-align: right;
    flex-shrink: 0;
}

.cart-item-price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.cart-remove-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-body);
    padding: 0;
    margin-top: 4px;
    transition: color var(--transition-fast);
    display: block;
}

.cart-remove-btn:hover {
    color: var(--primary);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.cart-total span:first-child {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.cart-total span:last-child {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: -0.4px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    touch-action: none;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -47%) scale(0.96);
    background: var(--bg-elevated);
    color: var(--text-primary);
    width: 90%;
    max-width: 460px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-card);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.32s var(--ease-spring);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.modal h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
    padding-right: 2rem;
    letter-spacing: -0.3px;
}

.modal .text-muted {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.separator {
    border: 0;
    height: 1px;
    background: var(--border-subtle);
    margin: 1.2rem 0;
}

.modal-section-label {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 10px;
}

.ingredient-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    font-size: 0.88rem;
    background: var(--bg-surface);
    transition: all var(--transition-fast);
    cursor: pointer;
    color: var(--text-primary);
}

.ingredient-label:hover {
    border-color: var(--border-active);
    background: rgba(245, 197, 24, 0.05);
}

.ingredient-label input[type="checkbox"] {
    display: none;
}

.mod-icon {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    color: transparent;
}

/* Remove: checked → red X */
input[data-type="remove"]:checked + .mod-icon {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
input[data-type="remove"]:checked + .mod-icon::after { content: '✕'; }

/* Add: checked → green check */
input[data-type="add"]:checked + .mod-icon {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}
input[data-type="add"]:checked + .mod-icon::after { content: '✓'; }

/* Row tint when selected */
.ingredient-label:has(input[data-type="remove"]:checked) {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.04);
}
.ingredient-label:has(input[data-type="add"]:checked) {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.04);
}

.modal .btn-primary {
    border-radius: var(--radius-md);
    padding: 0.9rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* ========================================
   FLAVOR INPUT — Drinks
   ======================================== */
.flavor-input-wrapper {
    margin-top: 0;
}

.flavor-input-wrapper--spaced {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-subtle);
}

.flavor-input {
    width: 100%;
    padding: 0.78rem 1rem;
    margin-top: 8px;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.flavor-input:focus {
    border-color: rgba(245, 197, 24, 0.45);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.08);
}

.flavor-input::placeholder {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.cart-item-flavor-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(245, 197, 24, 0.08);
    border: 1px solid rgba(245, 197, 24, 0.18);
    border-radius: var(--radius-xs);
    padding: 2px 8px;
    margin-bottom: 3px;
    letter-spacing: 0.2px;
}

/* ========================================
   SUB PICK — Mega Meal combo
   ======================================== */
.sub-pick-counter {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    transition: color var(--transition-fast);
}

.sub-pick-error {
    color: var(--primary) !important;
    animation: size-shake 0.35s var(--ease-out);
}

.sub-pick-maxed {
    opacity: 0.35;
    pointer-events: none;
}

/* ========================================
   MODIFIER SECTIONS
   ======================================== */
.modifier-section {
    margin-bottom: 0.5rem;
}

.modifier-label-remove {
    color: #FF6B75;
}

.modifier-label-add {
    color: var(--accent-green);
}

.mod-name {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.mod-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.mod-price-tag {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xs);
    padding: 2px 8px;
    white-space: nowrap;
}

.mod-price-positive {
    color: var(--accent-green);
    border-color: rgba(42, 157, 143, 0.3);
}

.mod-price-negative {
    color: #FF6B75;
    border-color: rgba(255, 107, 117, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    .hero {
        min-height: 80vh;
    }

    .hero-title {
        font-size: clamp(3rem, 15vw, 5rem);
        letter-spacing: -2px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-img-wrapper {
        height: 220px;
    }

    .container {
        padding: 1.5rem 1rem 4rem;
    }

    .categories {
        top: 57px;
    }
}

@media (min-width: 768px) {
    .card-img-wrapper {
        height: 270px;
    }
}

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-img-wrapper {
        height: 290px;
    }
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
    background: var(--primary);
    color: var(--primary-text);
}

/* ========================================
   FOCUS STATES
   ======================================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible) {
    outline: none;
}
