/* ========================================
   COFFEE SHOP THEME - MOBILE FIRST
   Warm, modern, food-focused design
   Orange/Amber primary with clean cards
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Coffee Shop Theme Colors */
    --primary: #FF8C00;          /* Warm Orange */
    --primary-dark: #E67E00;     /* Darker Orange */
    --secondary: #D2691E;        /* Chocolate Brown */
    --accent: #FFA500;           /* Light Orange */
    --bg: #F5F5F5;               /* Light Gray */
    --bg-card: #FFFFFF;          /* White Cards */
    --text: #2C2C2C;             /* Dark Gray Text */
    --text-light: #757575;       /* Light Gray Text */
    --border: #E0E0E0;           /* Light Border */
    --success: #4CAF50;
    --danger: #F44336;
    
    /* Spacing */
    --min-touch: 48px;
    --spacing: 16px;
    --radius: 16px;
    --radius-small: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 90px;
}

/* ========================================
   LOADING & ERROR SCREENS
   ======================================== */

.loading-screen,
.error-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: var(--spacing);
    background: var(--bg);
}

.loading-spinner {
    font-size: 56px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

.error-screen p {
    color: var(--danger);
    font-size: 16px;
}

/* ========================================
   POP-UP AD MODAL
   ======================================== */

.popup-ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing);
    animation: fadeIn 0.3s ease;
}

.popup-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.popup-ad-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.popup-ad-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.popup-ad-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.popup-ad-poster {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.popup-ad-video {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

.popup-ad-info {
    padding: 24px;
}

.popup-ad-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.popup-ad-description {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.popup-ad-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-small);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    transition: all 0.2s;
}

.popup-ad-cta:active {
    transform: scale(0.97);
}

/* ========================================
   1️⃣ MOBILE HEADER
   ======================================== */

.mobile-header {
    background: var(--bg-card);
    padding: 16px var(--spacing);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--border);
}

.header-content {
    margin-bottom: 12px;
}

.restaurant-name-header {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.location-header {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--min-touch);
    flex: 1;
    transition: all 0.2s;
}

.header-btn:active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(0.98);
}

/* ========================================
   2️⃣ DAILY SPECIALS / AD BANNER (WITH POSTERS)
   ======================================== */

.ad-banner-swipe {
    padding: var(--spacing);
    background: var(--bg-card);
    overflow: hidden;
    margin-bottom: 8px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-cards-container {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.ad-cards-container::-webkit-scrollbar {
    display: none;
}

.ad-card {
    min-width: 280px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.ad-card:active {
    transform: scale(0.97);
}

.ad-card-poster {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.ad-card-video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.ad-card-body {
    padding: 16px;
}

.ad-card-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.ad-card-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.4;
}

.ad-card-cta {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Rest of the CSS remains the same from line 395 onwards */
.category-bar {
    background: var(--bg-card);
    padding: 12px var(--spacing) 16px;
    position: sticky;
    top: 106px;
    z-index: 90;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border);
}

.category-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    background: var(--bg);
    color: var(--text);
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s;
}

.category-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.category-tab:active {
    transform: scale(0.95);
}

.menu-list {
    background: var(--bg);
    padding: var(--spacing);
}

.menu-category-section {
    scroll-margin-top: 180px;
    margin-bottom: 24px;
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-left: 4px;
    letter-spacing: -0.3px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
}

.menu-item:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-small);
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-small);
}

.item-image-fallback {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-small);
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.item-left {
    flex: 1;
    min-width: 0;
}

.item-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
}

.item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-veg {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-nonveg {
    background: #FFEBEE;
    color: #C62828;
}

.badge-unavailable {
    background: var(--border);
    color: var(--text-light);
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.item-description {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.item-add-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
}

.item-add-btn:active {
    transform: scale(0.9);
    background: var(--primary-dark);
}

.menu-item.unavailable {
    opacity: 0.5;
}

.menu-item.unavailable .item-add-btn {
    display: none;
}

.bottom-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 14px var(--spacing);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 999;
}

.bottom-ad-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-ad-text {
    flex: 1;
}

.bottom-ad-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.bottom-ad-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.bottom-ad-btn {
    background: white;
    color: var(--primary);
    padding: 14px 28px;
    border-radius: var(--radius-small);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    min-height: var(--min-touch);
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.bottom-ad-btn:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    body {
        max-width: 600px;
        margin: 0 auto;
        box-shadow: 0 0 24px rgba(0,0,0,0.12);
    }
    
    .ad-card {
        min-width: 320px;
    }
}

.landing-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px var(--spacing);
    min-height: 100vh;
}

.landing-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 40px;
}

.landing-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.landing-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.landing-subtitle {
    font-size: 15px;
    color: var(--text-light);
}

.restaurant-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.restaurant-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 140, 0, 0.15);
    border-color: var(--primary);
}

.restaurant-card-icon {
    font-size: 40px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.restaurant-card-content {
    flex: 1;
}

.restaurant-card-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.restaurant-card-location {
    font-size: 13px;
    color: var(--text-light);
}

.restaurant-card-arrow {
    color: var(--text-light);
    font-size: 20px;
}

.hidden {
    display: none !important;
}

button, .category-tab, .ad-card, .menu-item, .restaurant-card {
    -webkit-user-select: none;
    user-select: none;
}
