/* Vonn Cafe - Master Style */
:root {
    --primary: #d4a373;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-main: #fefae0;
    --text-muted: #aaaaaa;
    --gold: #ffd700;
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    /* Global Ambient Background */
    background-image: url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?w=1000&q=80');
    /* Coffee beans dark */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay;
    color: var(--text-main);
    overflow-x: hidden;
}

/* View System */
.view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    /* Use rgba instead of solid color to let background show through slightly */
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(5px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 20;
}

#home-view.active {
    transform: translateX(0);
}

/* Home View Styling */
.main-header {
    text-align: center;
    padding: 60px 20px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1559925393-8be0ec4767c8?w=1000&q=80');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-header h1 {
    font-size: 3rem;
    color: var(--primary);
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.main-header p {
    color: #fff;
    font-weight: 300;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.category-cards-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 50px;
}

.category-card {
    height: 250px;
    /* Taller for more impact */
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

.category-card:active {
    transform: scale(0.98);
}

/* Lighter gradient to show more image */
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 100%);
    transition: background 0.3s ease;
}

.category-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    /* Glassmorphism badge for text */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-content h2 {
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
    margin: 0;
    line-height: 1.1;
}

.category-content p {
    font-size: 1rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Menu View Styling */
.menu-header {
    position: sticky;
    top: 0;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 15px;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
}

.search-box {
    grid-column: span 2;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    font-size: 1rem;
    outline: none;
}

.menu-hero {
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: -30px;
    z-index: 0;
}

.menu-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
}

.products-container {
    padding: 0 20px 80px;
    position: relative;
    z-index: 1;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 140px;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    animation: fadeInUp 0.5s ease backwards;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #333;
    /* Fallback color */
}

.product-item:active {
    transform: scale(0.98);
}

/* Thumb is removed, background is set via JS */

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.product-details h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
}

.product-details p {
    font-size: 0.9rem;
    color: #e0e0e0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    /* Limit to 1 line to keep it clean */
    -webkit-box-orient: vertical;
}

.price-tag {
    color: var(--gold);
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 5px;
    display: inline-block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    align-self: flex-start;
    margin-bottom: 5px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-details {
    padding: 25px;
}

.modal-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modal-desc {
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-price {
    display: inline-block;
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 800;
    font-size: 1.5rem;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}