/* Base Resets & Variables */
:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #8e8e93;
    --accent: #5e8b7e;
    --card-bg: #d7e5ed;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: 'Boxing';
    src: url('Assets/Fonts/ClashDisplay-Variable.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: #fff8e3; /* Darker bg for desktop view contrast */
    display: flex;
    justify-content: center;
}

/* Loader Screen */
.loader-container {
    position: fixed;
    inset: 0;
    background-color: #ffffff; /* Cream background */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Replace .loader-text with this */
.loader-logo {
    width: 750px; /* Adjust this value to make your logo larger or smaller */
    max-width: 80vw;
    height: auto;
    object-fit: contain;
    /* Optional: Add a subtle drop shadow if the logo needs separation from the background */
    /* filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.1)); */
}

.loader-percentage {
    font-family: 'Boxing', sans-serif;
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-size: 3rem;
    font-weight: bold;
    color: #ff4d00; /* Orange */
}

/* Mobile App Wrapper Constraint */
.app-container {
    width: 100%;
    max-width: 480px; /* Restricts width on desktop */
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    opacity: 0; /* For GSAP entry animation */
}

.location-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.icon-small {
    width: 16px;
    height: 16px;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
    font-style: italic;
}

.notification {
    position: relative;
    color: var(--text-main);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: #ff3b30;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}

/* GSAP Hero Slider */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 48vh;
    margin-bottom: 30px;
    opacity: 0; /* For GSAP entry animation */
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    touch-action: pan-y; /* Allows vertical scrolling, handles horizontal in JS */
}

.slide {
    flex: 0 0 100%; /* Each slide takes exactly 100% width */
    height: 100%;
    padding: 0 20px; 
}

.slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Updated Hero Overlay */
.slide-overlay {
    position: absolute;
    inset: 0;
    /* Slightly darker bottom gradient for better contrast with larger text */
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%);
    /* Changed bottom padding from 30px to 16px to push text lower */
    padding: 30px 24px 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.slide-overlay .tag {
    font-size: 0.95rem; /* Increased from 0.75rem */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px; /* Reduced from 8px */
    font-weight: 600;
    opacity: 0.9;
}

.slide-overlay h2 {
    font-size: 2.8rem; /* Increased from 2.2rem */
    font-weight: 800;
    margin-bottom: 0; /* Removed bottom margin since the price pill is gone */
    line-height: 1.1;
}

/* Slider Pagination Dots */
.slider-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}


.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #d1d1d6;
    transition: all 0.3s ease;
}

.dot.active {
    width: 20px;
    border-radius: 4px;
    background-color: var(--accent);
}

/* Menu Sections & Horizontal Scrolling */
.menu-section {
    padding: 0 0 24px 20px;
    opacity: 0; /* For GSAP entry animation */
}

.section-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-right: 20px;
    padding-bottom: 10px; /* Space for shadow */
    scroll-snap-type: x mandatory;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* Small Cards (Popular Items) */
.item-card-small {
    flex: 0 0 auto;
    width: 220px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    scroll-snap-align: start;
}

.item-card-small img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.item-info h4 {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.item-info p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.action-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Large Cards (For You) */
.item-card-large {
    flex: 0 0 auto;
    width: 160px;
    height: 200px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.item-card-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    padding: 16px;
    display: flex;
    align-items: flex-end;
}

.item-overlay h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.pb-100 {
    padding-bottom: 100px; /* Clearance for bottom nav */
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 16px 10px 24px 10px; /* Extra bottom padding for iOS home indicator */
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item i {
    width: 22px;
    height: 22px;
}


/* Category Full Screen Modal */
.category-modal {
    position: fixed; /* Changed from absolute to fixed to lock it to the screen */
    inset: 0;
    z-index: 50; 
    display: none; 
    opacity: 0;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: none; /* Prevents scroll events from bubbling to the main page */
}

.category-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* Dark shade over the background */
    backdrop-filter: blur(5px);
    z-index: 2;
}

.category-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 1. Push the header (title and close button) lower down the screen */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 20px 30px 20px; 
    color: #fff;
}

.category-header h2 {
    font-size: 2.5rem; 
    font-weight: 800;
    letter-spacing: 1px;
}
.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* 2. Start the grid items a bit lower */
.category-scroll-area {
    flex: 1; /* Takes up all remaining height below the header */
    overflow-y: auto; /* Enables vertical scrolling only inside this box */
    padding: 20px 20px 100px 20px; 
}

.category-scroll-area::-webkit-scrollbar {
    display: none;
}

/* 2-Column Grid & Glass Cards */
.item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
}

/* 3. Make the item cards taller by changing the image aspect ratio */
.grid-item img {
    width: 100%;
    /* Changed from 1 / 1 (square) to 3 / 4 (portrait/taller) */
    aspect-ratio: 3 / 4; 
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.grid-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.grid-item p {
    font-size: 0.95rem;
    font-weight: 800;
}

/* Cursor update for triggers */
.category-trigger {
    cursor: pointer;
}


/* Item Detail Modal */
.item-modal {
    position: fixed; /* Changed from absolute to fixed */
    inset: 0;
    z-index: 100; 
    display: none; 
    align-items: center;
    justify-content: center;
    padding: 20px;
    overscroll-behavior: none; /* Prevents scroll events from bubbling to the main page */
}

.item-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.item-modal-card {
    position: relative;
    background: var(--bg-color); /* Uses your clean white background */
    width: 100%;
    max-width: 340px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 101;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close-item-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.4);
    z-index: 2;
}

.item-modal-card img {
    width: 100%;
    /* Changed from 4 / 3 to 1 / 1 (a perfect square) to make the image taller */
    aspect-ratio: 1 / 1; 
    object-fit: cover;
}

.item-modal-info {
    /* Increased the top and bottom padding for more vertical space */
    padding: 32px 24px; 
    text-align: center;
}

.item-modal-info h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 800;
}

.item-modal-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.item-modal-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}