:root {
    --bg-main: #faf9f6;        /* Alabaster white, super premium */
    --text-main: #1a1a1a;      /* Deep charcoal, not pure black */
    --text-muted: #666666;     /* Elegant grey for descriptions */
    --primary-color: #4a5240;  /* Deep olive green accent */
    --accent-light: #e8e6df;   /* Light organic sand for active states */
    --line-color: #e0ded6;     /* Subtle divider color */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.app-container {
    width: 100%;
    max-width: 600px; /* Narrower max-width for better reading measure */
    margin: 0 auto;
    padding: 2rem 1.2rem;
    padding-bottom: 5rem;
}

/* Header */
.app-header {
    text-align: center;
    margin: -2rem -1.2rem 2rem -1.2rem;
    padding: 4rem 1.2rem 2rem 1.2rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(250, 249, 246, 0.8) 70%, rgba(250, 249, 246, 1) 100%), url('../food-drink-images/cover-menu.jpg') center 30%/cover no-repeat;
    animation: fadeInDown 0.8s ease;
}

.logo-wrapper {
    margin-bottom: 2rem;
}

.logo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* iOS Style Segmented Control */
.type-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.type-toggle {
    display: inline-flex;
    position: relative;
    background-color: var(--accent-light);
    border-radius: 30px;
    padding: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.type-toggle input[type="radio"] {
    display: none;
}

.type-toggle label {
    position: relative;
    z-index: 2;
    padding: 0.6rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.type-toggle input[type="radio"]:checked + label {
    color: var(--text-main);
}

/* The slider background */
.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    background-color: #fff;
    border-radius: 26px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

#type-drink:checked ~ .toggle-slider {
    transform: translateX(100%);
}

/* Sticky Nav for Categories */
.sticky-nav-wrapper {
    position: sticky;
    top: 0;
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    margin: 0 -1.2rem 2.5rem -1.2rem; /* bleed out of container */
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--line-color);
}

.category-nav {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.category-nav::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.nav-item {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Menu Layout */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Category Sections */
.menu-category {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.menu-category h3 {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--text-main);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-align: center;
}

.items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Items */
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    position: relative;
    gap: 1rem; 
}

.menu-item.has-image {
    align-items: flex-start; /* Image and text start at the top */
    gap: 1.5rem;
    padding: 0.5rem 0;
}

/* Image Styling */
.item-img-container {
    flex-shrink: 0;
    height: 120px;
    max-width: 45%; /* Prevent extremely wide images from breaking layout */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    background-color: transparent;
}

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

.menu-item:hover .item-img {
    transform: scale(1.05);
}

/* Content wrappers */
.item-info {
    flex: 1;
    padding-right: 1rem;
    background-color: var(--bg-main); 
    z-index: 2;
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.item-content h4, .item-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
    margin-bottom: 0.1rem;
}

.item-content p.item-desc, .item-info p {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Limit description to 2 lines for items with images */
.item-content p.item-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.item-content p.item-desc.expanded {
    -webkit-line-clamp: unset;
}

/* Optional Dotted Leader (Classic Menu Style) */
.menu-item.no-image::after {
    content: "";
    position: absolute;
    bottom: 0.8rem;
    left: 0;
    right: 50px;
    border-bottom: 1px dotted var(--line-color);
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

.item-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--bg-main);
    padding-left: 0.5rem;
    z-index: 2;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 0.2rem;
}

.item-content .item-price {
    padding-left: 0;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    background-color: transparent;
}

/* Footer */
.app-footer {
    text-align: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line-color);
}

.app-footer p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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