/* ═══════════════════════════════════════════════════════
   Shared Menu Page Styles
   Used by: /menu/{slug} and /menu/{slug}/order/table/{id}
   ═══════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────── */
.menu-hero {
    position: relative;
    padding: 3rem 0 2.5rem;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: center;
}

.menu-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #000000 0%, #764ba2 100%);
  z-index: 0;
}

.menu-hero-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
    animation: hero-float 12s ease-in-out infinite;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.menu-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
}

.menu-hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.menu-hero-logo:hover { transform: scale(1.05); }

.menu-hero-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1rem;
    border: 2px solid rgba(255,255,255,0.3);
}

.menu-hero-name {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 16px rgba(0,0,0,0.2);
    letter-spacing: -0.02em;
}

.menu-hero-desc {
    font-size: 0.95rem;
    opacity: 0.88;
    margin: 0 auto 0.75rem;
    max-width: 480px;
    line-height: 1.5;
}

.menu-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.menu-hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.menu-table-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

/* ── Sticky Toolbar ───────────────────────────────────── */
.menu-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.75rem 0;
}

.menu-toolbar-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Search ───────────────────────────────────────────── */
.menu-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.menu-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
}

.menu-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.875rem;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.menu-search-input:focus {
    border-color: #000000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* ── Filter Pills ─────────────────────────────────────── */
.menu-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.menu-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    line-height: 1;
}

.menu-filter-pill:hover {
    border-color: #c7d2fe;
    color: #4f46e5;
    background: #eef2ff;
}

.menu-filter-pill.active-all {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: transparent;
    color: white;
}

.menu-filter-pill.active-veg {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: transparent;
    color: white;
}

.menu-filter-pill.active-vegan {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-color: transparent;
    color: white;
}

.menu-filter-pill.active-nonveg {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: transparent;
    color: white;
}

.menu-filter-count {
    background: rgba(255,255,255,0.28);
    border-radius: 20px;
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ── Cart Summary (toolbar right) ────────────────────── */
.menu-cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 10px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #065f46;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Category Section ─────────────────────────────────── */
.menu-category {
    margin-bottom: 2.5rem;
}

.menu-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-left: 4px solid #000000;
    border-radius: 0 10px 10px 0;
    margin-bottom: 1rem;
}

.menu-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-category-title i { color: #000000; }

.menu-category-count {
    background: #000000;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.menu-category-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0.25rem 0 0;
}

/* ── Menu Card (Grid) ─────────────────────────────────── */
.menu-card-new {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: card-in 0.35s ease both;
}

.menu-card-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.menu-card-img {
    width: 110px;
    min-height: 110px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.menu-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.menu-card-img-placeholder {
    width: 110px;
    min-height: 110px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
}

.menu-card-featured-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.92);
    color: #f59e0b;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.menu-card-body-new {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.menu-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.menu-card-title-new {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.menu-card-price-new {
    font-size: 0.92rem;
    font-weight: 800;
    color: #059669;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-card-desc-new {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0 0 0.4rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-card-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.mc-pill {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    line-height: 1.3;
    width: fit-content;
}

.mc-pill-veg    { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mc-pill-vegan  { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.mc-pill-nonveg { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.mc-pill-gf     { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.mc-pill-spicy  { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

.menu-card-meta-row {
    display: flex;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: #9ca3af;
    margin-bottom: 0.4rem;
}

.menu-card-action-row {
    margin-top: auto;
    padding-top: 0.4rem;
}

/* ── Add / Qty Controls ───────────────────────────────── */
.mc-add-btn-new {
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mc-add-btn-new:hover {
    background: #4338ca;
    transform: scale(1.04);
}

.mc-qty-new {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.mc-qty-btn-new {
    width: 30px;
    height: 30px;
    border: none;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.mc-qty-btn-new:hover { background: #e5e7eb; }

.mc-qty-val-new {
    min-width: 1.8rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: #111827;
}

/* ── No Results ───────────────────────────────────────── */
.menu-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.menu-no-results i { font-size: 3rem; margin-bottom: 0.75rem; display: block; }

/* ── Cart Footer ──────────────────────────────────────── */
.menu-cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0.875rem 0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 -4px 20px rgba(79,70,229,0.3);
    animation: slide-up 0.3s ease;
}

@keyframes slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.menu-cart-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    gap: 1rem;
}

.menu-cart-footer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-cart-footer-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.menu-cart-footer-total {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.menu-cart-footer-count {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 0.15rem;
}

.menu-cart-footer-btn {
    background: #10b981;
    border: none;
    color: white;
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(16,185,129,0.35);
    animation: pulse-btn 2.5s infinite;
}

.menu-cart-footer-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 4px 12px rgba(16,185,129,0.35); }
    50%       { box-shadow: 0 6px 20px rgba(16,185,129,0.55); }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
    .menu-hero { padding: 2rem 0 1.75rem; min-height: 200px; }
    .menu-hero-name { font-size: 1.6rem; }
    .menu-toolbar-inner { gap: 0.5rem; }
    .menu-search-wrap { flex: 0 0 100%; }
    .menu-category-select-wrap { flex: 1; min-width: 200px; }
    .menu-category-select { width: 100%; }
    .menu-filter-pill { padding: 0.3rem 0.65rem; font-size: 0.75rem; }

    /* Card: stack image on top of body on very small screens */
    .menu-card-new {
        flex-direction: column;
    }

    .menu-card-img,
    .menu-card-img-placeholder {
        width: 100%;
        min-height: 120px;
        height: 120px;
    }

    .menu-card-body-new {
        padding: 0.75rem;
    }

    /* Ensure title and price don't collapse */
    .menu-card-top-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .menu-card-title-new {
        flex: 1 1 100%;
        font-size: 0.88rem;
    }

    .menu-card-price-new {
        font-size: 0.88rem;
    }

    .menu-cart-footer-inner { gap: 0.5rem; }
    .menu-cart-footer-btn { padding: 0.55rem 1rem; font-size: 0.85rem; }
}

/* ── Category Navigation Bar ─────────────────────────────────────────────── */
.menu-category-nav {
    position: sticky;
    top: 56px;          /* sits just below the toolbar */
    z-index: 99;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.45rem 0;
}

.menu-category-nav .container {
    overflow-x: auto;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}

.menu-category-nav .container::-webkit-scrollbar { display: none; }

.menu-category-nav-inner {
    display: flex;
    gap: 0.45rem;
    white-space: nowrap;
    padding: 0.1rem 0.25rem;
}

.menu-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    user-select: none;
    flex-shrink: 0;
}

.menu-cat-pill:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #4f46e5;
    transform: translateY(-1px);
}

.menu-cat-pill.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: transparent;
    color: #fff;
}

.menu-cat-pill i {
    font-size: 0.65rem;
    opacity: 0.8;
}

/* ── Category Jump Select ─────────────────────────────────────────────────── */
.menu-category-select-wrap {
    flex: 1;   /* fixed slot in the flex row — never wraps, never grows */
    min-width: 200px;
}

.menu-category-select {
    width: 100%;       /* fills the fixed-width wrapper */
}
