/*
 * QUZYN - Buyer Theme
 * Date: December 20, 2025
 * Theme: Red/Orange (appetite-driven, warm, inviting)
 * Target: Buyer-facing pages
 */

/* ========================================
 * PWA APP-LIKE BEHAVIOR
 * Disable pull-to-refresh and prevent unwanted gestures
 * ======================================== */

html, body {
    /* Disable pull-to-refresh gesture */
    overscroll-behavior-y: contain;

    /* Prevent text selection on double-tap (app-like) */
    -webkit-user-select: none;
    user-select: none;

    /* Disable touch callout (long-press context menu on images/links) */
    -webkit-touch-callout: none;

    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Allow text selection in input fields and textareas */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

/* Prevent zoom on input focus (iOS Safari) */
input, select, textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
}

/* Disable double-tap zoom */
* {
    touch-action: manipulation;
}

:root {
    /* Primary Colors - Red (Appetite-Driven) */
    --color-primary: #e50000;
    --color-primary-light: rgba(229, 0, 0, 0.1);
    --color-primary-dark: #b30000;

    --color-secondary: #ffa500;
    --color-secondary-light: rgba(255, 165, 0, 0.1);
    --color-secondary-dark: #ff8c00;

    /* Accent Colors */
    --color-success: #10b981;
    --color-success-light: rgba(16, 185, 129, 0.1);
    --color-success-dark: #059669;

    --color-danger: #ef4444;
    --color-danger-light: rgba(239, 68, 68, 0.1);
    --color-danger-dark: #dc2626;

    --color-warning: #ffd700;
    --color-warning-light: rgba(255, 215, 0, 0.1);
    --color-warning-dark: #ffa500;

    --color-info: #3b82f6;
    --color-info-light: rgba(59, 130, 246, 0.1);
    --color-info-dark: #2563eb;

    /* Background Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-muted: #f3f4f6;

    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Border */
    --border-color: #e5e7eb;
    --border-radius: 8px;
    --border-radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-h1: 2.5rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.75rem;
    --font-size-h4: 1.5rem;
    --font-size-h5: 1.25rem;
    --font-size-h6: 1rem;

    /* Buyer-Specific Gradient */
    --gradient-primary: linear-gradient(135deg, #e50000 0%, #ffa500 100%);
    --gradient-secondary: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);

    /* Buyer-Specific Aliases (used by Checkout, Cart, Confirmation views) */
    --buyer-primary: var(--color-primary);
    --buyer-primary-dark: var(--color-primary-dark);
    --buyer-primary-rgb: 229, 0, 0;
    --buyer-text: var(--text-primary);
    --buyer-text-secondary: var(--text-secondary);
    --buyer-text-muted: var(--text-muted);
    --buyer-bg: var(--bg-primary);
    --buyer-bg-secondary: var(--bg-secondary);
    --buyer-card-bg: var(--bg-secondary);
}

/* ========================================
 * BUYER HOME PAGE STYLES
 * Designer Spec: WHITE background, red/orange as ACCENT only
 * ======================================== */

/* Buyer-specific custom styles */
.buyer-home {
    min-height: 100vh;
    background: var(--bg-primary);  /* WHITE/Light gray background - NOT red gradient */
    padding: 0;  /* Remove excessive padding - let components handle their own */
}

/* Auto-detect Location Overlay */
.location-autodetect-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.autodetect-card {
    text-align: center;
    padding: 2rem;
}

.autodetect-card h2 {
    color: var(--text-primary);
    font-size: var(--font-size-h4);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.autodetect-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.autodetect-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Location Selector (First Time User) */
.location-selector-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);  /* White background */
}

.location-selector-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 100%;
    width: 100%;
    box-shadow: none;  /* Remove shadow for cleaner mobile look */
}

.location-selector-card h1 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.location-input-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.location-input-group input {
    flex: 1;
}

/* Style the new PlaceAutocompleteElement container */
.autocomplete-container {
    flex: 1;
    min-width: 0; /* Allow shrinking in flex layout */
}

/* Style the PlaceAutocompleteElement web component to match form-control */
.autocomplete-container gmp-place-autocomplete {
    width: 100%;
    --gmpx-color-surface: var(--bg-surface, #fff);
    --gmpx-color-on-surface: var(--text-primary, #333);
    --gmpx-font-size-base: 14px;
}

.map-preview {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: var(--bg-muted);
    border-radius: var(--border-radius);
}

/* Drag-to-adjust: fixed center pin overlaid on location selector map */
.map-wrapper {
    position: relative;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
}

.map-wrapper #map {
    width: 100%;
    height: 100%;
}

.map-center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%); /* anchor bottom of pin to center */
    z-index: 10;
    pointer-events: none; /* allow map interaction through the pin */
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    transition: transform 0.15s ease;
}

/* Subtle lift animation while user is dragging the map */
.map-center-pin.dragging {
    transform: translate(-50%, -115%);
}

.map-drag-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted, #888);
    margin-top: 6px;
}

/* Provider Listing Container */
.providers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.location-header {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.location-header h2 {
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.location-display {
    color: var(--text-secondary);
    margin: 0;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
}

/* Provider Cards Grid */
.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.provider-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.provider-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.provider-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.provider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    font-size: 4rem;
}

.available-now-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--color-warning);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    font-weight: bold;
    font-size: var(--font-size-sm);
}

.provider-info {
    padding: var(--spacing-lg);
}

.provider-info h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
}

.provider-type {
    color: var(--color-primary);
    font-weight: 500;
    margin: 0 0 var(--spacing-sm) 0;
}

.provider-address {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0 0 var(--spacing-md) 0;
}

.provider-stats {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.provider-stats .highlight {
    color: var(--color-warning-dark);
    font-weight: 600;
}

.provider-meta {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* No Results State */
.no-results {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 4rem 2rem;
    text-align: center;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* ========================================
 * NEW DESIGN - APP HEADER & SIDEBAR
 * ======================================== */

/* Hamburger Menu Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.profile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: var(--bg-secondary);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.profile-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: var(--spacing-xl);
    background: var(--gradient-primary);
    color: white;
}

.user-profile-card {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-lg);
}

.user-info p {
    margin: 0;
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.user-email {
    font-size: var(--font-size-xs);
}

.edit-profile {
    color: white;
    text-decoration: none;
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: inline-block;
}

.reward-points {
    text-align: center;
}

.points-badge {
    background: white;
    color: var(--color-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 20px;
    font-weight: bold;
    font-size: var(--font-size-lg);
    margin-top: var(--spacing-sm);
}

.sidebar-menu {
    padding: var(--spacing-md) 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.menu-item:hover {
    background: var(--bg-muted);
}

.menu-icon {
    font-size: 1.25rem;
}

.menu-item-form {
    margin: 0;
    padding: 0;
}

.logout-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* App Header - Designer Spec: White background, avatar left, cleaner layout */
.app-header {
    background: var(--bg-secondary);  /* WHITE background */
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    /* Ensure full width without clipping */
    width: 100%;
    box-sizing: border-box;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-avatar-placeholder {
    font-size: 1.5rem;
}

.header-location {
    flex: 1;
    min-width: 0;
}

.welcome-text {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.location-dropdown {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
}

.location-label {
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.location-icon {
    color: var(--color-primary);
    font-size: 0.875rem;
}

.location-text {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.dropdown-arrow {
    font-size: 0.625rem;
    color: var(--text-muted);
}

/* Notification Bell (Buyer header) */
.notification-bell-link {
    position: relative;
    font-size: 1.25rem;
    text-decoration: none;
    flex-shrink: 0;
    padding: 4px;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.notification-badge.visible {
    display: flex;
}

.profile-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: var(--bg-muted);
    flex-shrink: 0;
}

.profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Legacy hamburger - hidden in new design but kept for sidebar toggle */
.hamburger-btn {
    display: none;
}

/* Search Bar - Designer Spec: Rounded with search icon */
.search-container {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-secondary);  /* WHITE background */
    width: 100%;
    box-sizing: border-box;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    color: var(--text-muted);
    font-size: 1.125rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-muted);
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background: var(--bg-secondary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-bottom: 80px; /* Space for bottom nav */
    background: var(--bg-secondary);  /* WHITE background */
    width: 100%;
    box-sizing: border-box;
}

/* Tab Buttons - Designer Spec: All 3 as bordered pills, 'All' filled red */
/* View Toggle (Map/List) */
.view-toggle {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    padding: 0;
}

.view-btn {
    flex: 1;
    max-width: 120px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 25px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.view-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Map View */
.map-view {
    display: none;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
    min-height: 200px;
    position: relative;
}

.map-view.active {
    display: block;
}

.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #e8f5e9 0%, #fff9c4 100%);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(0,0,0,.03) 35px, rgba(0,0,0,.03) 36px),
        repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(0,0,0,.03) 35px, rgba(0,0,0,.03) 36px);
}

.map-pin {
    position: absolute;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease;
}

.map-pin:hover {
    transform: scale(1.2);
    z-index: 20;
}

.pin-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 3px solid var(--color-primary);
}

.pin-chef .pin-icon {
    border-color: var(--color-secondary);
}

.pin-restaurant .pin-icon {
    border-color: var(--color-primary);
}

/* Provider name label on map markers (visible at zoom >= 14) */
.marker-name-label {
    transform: translateY(22px);
    background: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: none;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.pin-tooltip {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.map-pin:hover .pin-tooltip {
    opacity: 1;
    visibility: visible;
    top: -90px;
}

.tooltip-content {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
    text-align: center;
}

.tooltip-content strong {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.tooltip-type {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.tooltip-rating {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* List View */
.list-view {
    display: none;
}

.list-view.active {
    display: block;
}

/* Search Results Header */
.search-results-header {
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.search-results-header strong {
    color: var(--text-primary);
}

/* Provider List Cards - Designer Spec: 2-column grid with compact cards */
.providers-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 480px) {
    .providers-list {
        grid-template-columns: 1fr;
    }
}

.provider-list-card {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.provider-list-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Online indicator dot */
.provider-online-indicator {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-success);
    border: 2px solid var(--bg-secondary);
    z-index: 2;
}

.provider-list-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.provider-list-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: var(--border-radius, 8px);
    overflow: hidden;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.provider-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.provider-list-avatar-placeholder {
    font-size: 2rem;
}

.provider-list-title {
    flex: 1;
    min-width: 0;
}

.provider-list-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.provider-list-name-row h3 {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.provider-share-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.provider-list-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: 2px;
}

.rating-badge {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    font-size: var(--font-size-xs);
    padding: 2px 6px;
    border-radius: 4px;
}

.review-count {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.provider-list-specialties {
    margin-top: var(--spacing-xs);
}

.specialties-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-success);
    display: block;
}

.specialties-list {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Status Badge - Designer Spec: Green "Available Now" / "Ready to Cook" badges */
.provider-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-top: var(--spacing-xs);
}

.provider-status-badge.available {
    background: var(--color-success-light);
    color: var(--color-success);
}

.provider-status-badge.ready {
    background: var(--color-success-light);
    color: var(--color-success);
}

.provider-status-badge.closed {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

/* Delivery info row */
.provider-list-delivery-info {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    flex-wrap: wrap;
}

.delivery-tag {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    background: var(--bg-muted);
    padding: 2px 8px;
    border-radius: 12px;
}

.delivery-tag.delivery-free {
    color: var(--color-success);
    background: var(--color-success-light);
    font-weight: 500;
}

/* Dish preview */
.provider-list-dish-preview {
    margin-top: var(--spacing-xs);
}

.dish-preview-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Location/Schedule - Designer Spec: Gray pill badges */
.provider-list-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.meta-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--bg-muted);
    border-radius: var(--border-radius);
    text-align: center;
}

.meta-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

/* Legacy support */
.meta-item {
    display: flex;
    flex-direction: column;
}

.closed-text {
    color: var(--color-danger);
}

/* Cuisine Section - Designer Spec: White background with dark text labels */
.cuisine-section {
    margin: var(--spacing-sm) 0;
    padding: var(--spacing-xs) 0;
    background: var(--bg-secondary);  /* WHITE background */
}

.cuisine-icons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 var(--spacing-sm);
}

.cuisine-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    background: none;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    flex-shrink: 0;
}

.cuisine-btn:hover {
    transform: translateY(-2px);
}

.cuisine-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: 50%;
    transition: background 0.2s ease;
}

.cuisine-btn:hover .cuisine-icon {
    background: var(--color-primary-light);
}

.cuisine-btn.active {
    transform: translateY(-2px);
}

.cuisine-btn.active .cuisine-icon {
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cuisine-btn.active span {
    color: var(--color-primary);
    font-weight: 600;
}

/* Designer Spec: DARK text for cuisine labels - NOT gold/yellow */
.cuisine-btn span {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-primary);  /* Dark text, not secondary/muted */
}

/* Featured Sections */
.featured-section {
    margin: var(--spacing-md) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
}

.view-all {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

/* Horizontal Scroll Container */
.horizontal-scroll {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-md);
    scroll-snap-type: x mandatory;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: var(--bg-muted);
    border-radius: 3px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

/* Dish Cards */
.dish-card {
    min-width: 200px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    scroll-snap-align: start;
}

.dish-image {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--bg-muted);
}

.add-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.add-btn:hover {
    transform: scale(1.1);
}

.dish-info {
    padding: var(--spacing-sm);
}

.dish-info h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-base);
}

.dish-desc {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0 0 var(--spacing-sm) 0;
}

.rating {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* Chef Cards */
.chefs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.chef-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-sm);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.chef-card:hover {
    transform: translateY(-4px);
}

.chef-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto var(--spacing-sm);
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.chef-card h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-base);
}

.cuisine-type {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    margin: 0 0 var(--spacing-sm) 0;
}

/* Restaurant Cards */
.restaurant-card {
    min-width: 160px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    scroll-snap-align: start;
}

.restaurant-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.restaurant-card h4 {
    margin: var(--spacing-sm);
    font-size: var(--font-size-base);
}

.restaurant-info {
    margin: 0 var(--spacing-sm) var(--spacing-sm);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* Promotional Banner */
.promo-banner {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    color: white;
    margin: var(--spacing-md) 0;
}

.promo-content h2 {
    font-size: 2rem;
    margin: 0;
}

.promo-content p {
    font-size: var(--font-size-lg);
    margin: var(--spacing-sm) 0;
}

.promo-code {
    background: white;
    color: var(--color-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    margin-top: var(--spacing-md);
}

/* Favourite Cards */
.favourite-card {
    min-width: 200px;
    background: var(--bg-secondary);
    border-radius: 50px;
    overflow: hidden;
    display: flex;
    box-shadow: var(--shadow-md);
    scroll-snap-align: start;
}

.favourite-image {
    width: 80px;
    height: 80px;
    background: var(--bg-muted);
    flex-shrink: 0;
}

.favourite-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.favourite-info h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-base);
}

/* Recommended Cards */
.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.recommended-card {
    min-height: 200px;
    border-radius: var(--border-radius-lg);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.recommended-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: var(--spacing-lg);
}

.recommended-overlay h3 {
    margin: 0 0 var(--spacing-xs) 0;
}

.recommended-overlay p {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.order-btn {
    background: var(--color-warning);
    color: var(--text-primary);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    margin-top: var(--spacing-sm);
}

/* Bottom Navigation - Designer Spec: White background with subtle shadow */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);  /* WHITE background */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-sm) 0;
    z-index: 100;
    /* Safe area for notched phones */
    padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Profile Initials (fallback when no avatar image) */
.profile-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
}

/* Chef Avatar Placeholder */
.chef-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--bg-muted);
}

/* Featured Dishes Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chefs-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .recommended-grid {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        width: 280px;
        right: -280px;
    }
}

/* ========================================
 * GLOBAL FIXES - Prevent horizontal overflow/clipping
 * ======================================== */

/* Ensure buyer-home takes full width without overflow */
.buyer-home {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure all major containers don't cause horizontal scroll */
.buyer-home > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for PWA standalone mode - account for status bar */
@media all and (display-mode: standalone) {
    .buyer-home {
        padding-top: env(safe-area-inset-top);
    }

    .app-header {
        padding-top: max(var(--spacing-sm), env(safe-area-inset-top));
    }
}

/* Ensure body doesn't have horizontal scroll */
body.buyer-app {
    overflow-x: hidden;
    background: var(--bg-secondary);  /* White background for body */
}
