/* assets/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-solid: #ffffff;
    --primary: #1e1b4b; /* Deep Indigo */
    --accent: #4f46e5;  /* Classic Indigo */
    --accent-hover: #4338ca;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.06);
    --border-light: rgba(255, 255, 255, 0.4);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.03), 0 8px 10px -6px rgb(0 0 0 / 0.03);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
}

/* Glass & Grain Utilities */
.glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

.glass-grain {
    position: relative;
    overflow: hidden;
}

.glass-grain::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
}

/* Glassmorphism Background Orbs */
body::before, body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

body::before {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: rgba(79, 70, 229, 0.25);
}

body::after {
    bottom: -10%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: rgba(236, 72, 153, 0.2);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Header */
.menu-header {
    background: transparent;
    color: var(--primary);
    padding: 6rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.menu-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.restaurant-logo {
    height: 100px;
    width: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.menu-header-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.menu-header-text p {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Category Nav */
.category-nav {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.category-nav .container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px;
}

.category-nav .container::-webkit-scrollbar {
    display: none;
}

.category-nav-link {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-full);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border: 1px solid transparent;
}

.category-nav-link:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.category-nav-link.is-active,
.category-nav-link[aria-current="true"] {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 27, 75, 0.15);
    border-color: var(--primary);
}

/* Main Content */
main {
    padding: 3rem 0 5rem;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section h2 {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

/* Menu Item Card */
.menu-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.menu-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(30, 27, 75, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
}

.item-img {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-item:hover .item-img img {
    transform: scale(1.08);
}

.item-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.item-header h3 {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent);
    font-size: 1.25rem;
    background: rgba(79, 70, 229, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    flex-grow: 1;
}

.ingredients {
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.ingredients strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Status Pills */
.statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
}

.icon-status {
    width: 14px;
    height: 14px;
}

/* Status variants - Modern Tones */
.status-vegan { background: rgba(240, 253, 244, 0.7); color: #166534; border-color: rgba(187, 247, 208, 0.8); }
.status-vegetarian { background: rgba(240, 253, 244, 0.7); color: #166534; border-color: rgba(187, 247, 208, 0.8); }
.status-spicy { background: rgba(254, 242, 242, 0.7); color: #991b1b; border-color: rgba(254, 202, 202, 0.8); }
.status-gluten-free { background: rgba(255, 251, 235, 0.7); color: #92400e; border-color: rgba(254, 243, 199, 0.8); }
.status-sugar-free { background: rgba(248, 250, 252, 0.7); color: #334155; border-color: rgba(226, 232, 240, 0.8); }
.status-popular { background: rgba(238, 242, 255, 0.7); color: #3730a3; border-color: rgba(224, 231, 255, 0.8); }

.item-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: auto;
}

.macros-details {
    width: 100%;
}

.macros-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.macros-summary::-webkit-details-marker {
    display: none;
}

.macros-summary:hover {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.7);
}

.macro-group-left,
.macro-group-right {
    display: flex;
    align-items: center;
}

.macro-group-left {
    gap: 1rem;
}

.macro-group-right {
    gap: 0.25rem;
}

.macro-title {
    font-weight: 700;
}

.macro-hint {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.macro-main-val {
    margin-right: 0.25rem;
    color: var(--accent);
    font-family: var(--font-heading);
    font-weight: 800;
}

.icon-chevron {
    width: 14px;
    height: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.macros-details[open] .icon-chevron {
    transform: rotate(180deg);
}

.macros-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: none;
    margin-top: -4px;
}

.macro-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    align-items: center;
    text-align: center;
}

.macro-value {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
    font-family: var(--font-heading);
}

.macro-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Footer */
.menu-footer {
    padding: 6rem 0;
    background: transparent;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-footer p {
    opacity: 0.8;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-header { padding: 4rem 0 2rem; }
    .menu-header-text h1 { font-size: 2.75rem; }
    .items-grid { grid-template-columns: 1fr; gap: 2rem; }
    .category-nav-link { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
}
