/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0f;
    color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
}
.hidden { display: none !important; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; color: inherit; font-family: inherit; }

/* ===== SPLASH SCREEN ===== */
.splash-screen {
    position: fixed; inset: 0;
    z-index: 1000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    max-width: 480px; margin: 0 auto;
    cursor: pointer;
}
.splash-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.splash-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}
.splash-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 60px;
    text-align: center;
}
.splash-logo-frame {
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}
.splash-logo-img {
    width: 180px;
    height: auto;
    border-radius: 8px;
}
.splash-tap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tap-icon-ring {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    animation: pulse-ring 2s ease-in-out infinite;
    color: #fff;
}
@keyframes pulse-ring {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}
.tap-text { font-size: 0.8rem; color: rgba(255,255,255,0.8); letter-spacing: 1px; }
.splash-bottom {
    position: absolute; bottom: 30px; left: 0; right: 0;
    z-index: 2; display: flex; justify-content: center;
}
.splash-social { display: flex; gap: 20px; }
.social-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: background 0.3s;
}
.social-icon:hover { background: rgba(255,255,255,0.3); }

/* Splash exit animation */
.splash-screen.fade-out {
    animation: splashFadeOut 0.6s ease forwards;
}
@keyframes splashFadeOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

/* ===== MENU HEADER ===== */
.menu-header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
}
.header-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem; font-weight: 600;
    color: #1a1a1a; letter-spacing: 4px;
    text-transform: lowercase;
}
.header-btn { padding: 6px; color: #1a1a1a; }
.hamburger-btn { display: flex; flex-direction: column; gap: 5px; padding: 8px 4px; }
.hamburger-btn span {
    width: 22px; height: 2px;
    background: #1a1a1a; border-radius: 2px;
    transition: all 0.3s;
}
.search-btn { display: flex; align-items: center; justify-content: center; }

/* ===== SEARCH BAR ===== */
.search-bar {
    position: sticky; top: 56px; z-index: 99;
    padding: 10px 16px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.search-input-wrapper {
    display: flex; align-items: center; gap: 10px;
    background: #f2f2f2; border-radius: 12px;
    padding: 10px 14px; color: #888;
}
.search-input-wrapper input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 0.95rem; font-family: inherit; color: #1a1a1a;
}
.search-input-wrapper input::placeholder { color: #aaa; }
.search-close { display: flex; color: #888; }

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px 16px 100px;
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: calc(100dvh - 56px);
    animation: fadeInUp 0.5s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.category-card {
    display: flex; flex-direction: column;
    border-radius: 8px; overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:active { transform: scale(0.96); }
.category-card-img {
    width: 100%; aspect-ratio: 1;
    object-fit: cover;
    background: #f0f0f0;
}
.category-card-label {
    padding: 6px 4px 8px;
    text-align: center;
}
.category-card-label span {
    display: inline-block;
    background: #2a2a2a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    line-height: 1.2;
    width: 100%;
}

/* ===== BACK BUTTON ===== */
.back-btn {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    max-width: 480px;
}
.back-btn:active { transform: translateX(-50%) scale(0.92); }

/* ===== CATEGORY DETAIL ===== */
.category-detail {
    padding: 0 0 100px;
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: calc(100dvh - 56px);
    animation: fadeInUp 0.4s ease;
}
.detail-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem; font-weight: 600;
    color: #1a1a1a; text-align: center;
    padding: 20px 16px 16px;
    letter-spacing: 2px;
}
.items-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }

.menu-item {
    display: flex; gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    animation: itemFadeIn 0.4s ease both;
}
.menu-item:nth-child(1) { animation-delay: 0.05s; }
.menu-item:nth-child(2) { animation-delay: 0.1s; }
.menu-item:nth-child(3) { animation-delay: 0.15s; }
.menu-item:nth-child(4) { animation-delay: 0.2s; }
.menu-item:nth-child(5) { animation-delay: 0.25s; }
@keyframes itemFadeIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}
.menu-item-img {
    width: 80px; height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.menu-item-info {
    flex: 1;
    display: flex; flex-direction: column;
    justify-content: center; gap: 4px;
}
.menu-item-name {
    font-weight: 600; font-size: 0.9rem;
    color: #1a1a1a; line-height: 1.3;
}
.menu-item-desc {
    font-size: 0.75rem; color: #888;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.menu-item-price {
    font-weight: 700; font-size: 0.95rem;
    color: #e67e22; margin-top: 2px;
}

/* ===== SIDE NAV ===== */
.side-nav-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
    max-width: 480px; margin: 0 auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.side-nav {
    position: fixed; top: 0; left: 50%; z-index: 210;
    transform: translateX(max(-240px, calc(-50% + 0px)));
    width: min(280px, 75vw); height: 100%;
    background: #fff; color: #1a1a1a;
    display: flex; flex-direction: column;
    animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
@keyframes slideIn { from { transform: translateX(calc(max(-240px, calc(-50% + 0px)) - 100%)); } }
.side-nav-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}
.side-nav-logo-img {
    width: 140px;
    height: auto;
    border-radius: 4px;
}
.side-nav-list {
    list-style: none; flex: 1; overflow-y: auto;
    padding: 12px 0;
}
.side-nav-list li {
    padding: 12px 24px;
    font-size: 0.9rem; font-weight: 500;
    cursor: pointer; transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}
.side-nav-list li:hover, .side-nav-list li.active {
    background: #f8f6f1;
    border-left-color: #e67e22;
    color: #e67e22;
}
.side-nav-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
}
.side-nav-social { display: flex; gap: 16px; margin-bottom: 8px; }
.side-nav-social a {
    color: #888; transition: color 0.2s;
}
.side-nav-social a:hover { color: #e67e22; }
.side-nav-home-link {
    display: block;
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e67e22;
    margin-bottom: 12px;
    transition: color 0.2s;
}
.side-nav-home-link:hover { color: #d35400; }
.side-nav-copy { font-size: 0.7rem; color: #bbb; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

/* ===== DESKTOP CENTERING ===== */
@media (min-width: 481px) {
    body { box-shadow: 0 0 40px rgba(0,0,0,0.3); }
    .side-nav {
        left: 50%;
        transform: translateX(-240px);
    }
    @keyframes slideIn {
        from { transform: translateX(calc(-240px - 280px)); }
        to { transform: translateX(-240px); }
    }
}

/* ===== SEARCH HIGHLIGHT ===== */
.highlight { background: rgba(230,126,34,0.3); border-radius: 2px; padding: 0 1px; }
