/* ==============================================
   FOOD EXPLORE - DESIGN UBER EATS / DELIVEROO
   ============================================== */

/* === VARIABLES === */
:root {
    --food-primary: #f97316;
    --food-primary-dark: #ea580c;
    --food-secondary: #fbbf24;
    --food-accent: #ef4444;
    --food-green: #22c55e;
    --food-text: #1f2937;
    --food-text-light: #6b7280;
    --food-bg: #fafafa;
    --food-card: #ffffff;
    --food-radius: 16px;
    --food-radius-sm: 10px;
    --food-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --food-shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
}

/* === PAGE CONTAINER === */
.food-explore-page {
    min-height: 100vh;
    background: var(--food-bg);
    padding-bottom: 80px;
}

/* === HERO SECTION === */
.food-hero {
    position: relative;
    padding: 60px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--food-primary) 0%, #fb923c 50%, var(--food-secondary) 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.food-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.food-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin: 0 0 32px;
}

/* === BARRE DE RECHERCHE HERO === */
.hero-search {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: var(--food-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 700px;
    margin: 0 auto;
}

.search-input-wrap,
.location-input-wrap {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f3f4f6;
    border-radius: var(--food-radius-sm);
}

.search-input-wrap i,
.location-input-wrap i {
    color: var(--food-primary);
    font-size: 1.1rem;
}

.search-input-wrap input,
.location-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--food-text);
    outline: none;
}

.search-input-wrap input::placeholder,
.location-input-wrap input::placeholder {
    color: var(--food-text-light);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--food-primary), var(--food-primary-dark));
    color: white;
    border: none;
    border-radius: var(--food-radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

/* === CATÉGORIES HORIZONTALES === */
.categories-section {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    padding: 0 16px;
}

.categories-container {
    max-width: 1200px;
    margin: 0 auto;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 16px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: white;
    border-radius: var(--food-radius);
    text-decoration: none;
    box-shadow: var(--food-shadow);
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 80px;
    border: 2px solid transparent;
}

.category-chip:hover {
    transform: translateY(-4px);
    box-shadow: var(--food-shadow-lg);
    border-color: var(--food-primary);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--food-primary), var(--food-secondary));
    border-color: var(--food-primary);
}

.category-chip.active .cat-label {
    color: white;
}

.cat-emoji {
    font-size: 1.8rem;
}

.cat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--food-text);
    white-space: nowrap;
}

/* === FILTRES === */
.filters-bar {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-left {
    flex: 1;
}

.results-count {
    color: var(--food-text-light);
    font-size: 0.95rem;
}

.results-count strong {
    color: var(--food-text);
    font-weight: 700;
}

.filters-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown select {
    appearance: none;
    padding: 10px 40px 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--food-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--food-text);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-dropdown select:hover,
.filter-dropdown select:focus {
    border-color: var(--food-primary);
    outline: none;
}

.filter-dropdown i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--food-text-light);
    pointer-events: none;
    font-size: 0.8rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid #e5e7eb;
    border-radius: var(--food-radius-sm);
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--food-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--food-primary);
    color: var(--food-primary);
}

/* === FILTRES AVANCÉS === */
.advanced-filters {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.advanced-filters.open {
    max-height: 300px;
}

.advanced-filters form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--food-text);
    margin-bottom: 10px;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-range input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--food-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

.price-range span {
    font-weight: 700;
    color: var(--food-primary);
    min-width: 60px;
}

.filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--food-text);
}

.checkbox-wrap input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-wrap input:checked + .checkmark {
    background: var(--food-primary);
    border-color: var(--food-primary);
}

.checkbox-wrap input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.btn-reset {
    padding: 10px 20px;
    background: #f3f4f6;
    color: var(--food-text);
    border-radius: var(--food-radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #e5e7eb;
}

.btn-apply {
    padding: 10px 24px;
    background: var(--food-primary);
    color: white;
    border: none;
    border-radius: var(--food-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply:hover {
    background: var(--food-primary-dark);
}

/* === GRILLE RESTAURANTS === */
.restaurants-section {
    padding: 32px 16px;
}

.restaurants-container {
    max-width: 1200px;
    margin: 0 auto;
}

.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* === CARTE RESTAURANT === */
.restaurant-card {
    background: white;
    border-radius: var(--food-radius);
    overflow: hidden;
    box-shadow: var(--food-shadow);
    transition: all 0.4s ease;
}

.restaurant-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--food-shadow-lg);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fdba74);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.restaurant-card:hover .card-image img {
    transform: scale(1.1);
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--food-primary), var(--food-secondary));
}

.card-image.no-image img {
    display: none;
}

.card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge.delivery {
    color: var(--food-green);
}

.badge.distance {
    color: var(--food-primary);
}

.dishes-count {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: white;
    color: var(--food-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.card-body {
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.card-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--food-text);
    line-height: 1.3;
}

.status {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status.open {
    background: #dcfce7;
    color: var(--food-green);
}

.status.closed {
    background: #fee2e2;
    color: var(--food-accent);
}

.card-categories {
    color: var(--food-text-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--food-text-light);
}

.card-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-footer i {
    color: var(--food-primary);
}

.avg-price {
    font-weight: 600;
    color: var(--food-text);
}

/* === ACTIONS CARTE === */
.card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.btn-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--food-primary), var(--food-primary-dark));
    color: white;
    border-radius: var(--food-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-menu:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-profile {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: var(--food-text-light);
    border-radius: var(--food-radius-sm);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-profile:hover {
    background: #e5e7eb;
    color: var(--food-text);
}

/* === ÉTAT VIDE === */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--food-radius);
    box-shadow: var(--food-shadow);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--food-text);
    margin: 0 0 12px;
}

.empty-state p {
    color: var(--food-text-light);
    margin: 0 0 24px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--food-primary);
    color: white;
    border-radius: var(--food-radius-sm);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--food-primary-dark);
}

/* === PAGINATION === */
.pagination-wrap {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* === STATS FOOTER === */
.stats-section {
    padding: 40px 16px;
    background: linear-gradient(135deg, var(--food-primary), var(--food-secondary));
}

.stats-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .food-hero {
        padding: 40px 16px 70px;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .food-hero h1 {
        font-size: 1.8rem;
    }
    
    .food-hero p {
        font-size: 1rem;
    }
    
    .hero-search {
        flex-direction: column;
    }
    
    .search-input-wrap,
    .location-input-wrap {
        min-width: 100%;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .category-chip {
        padding: 12px 16px;
        min-width: 70px;
    }
    
    .cat-emoji {
        font-size: 1.5rem;
    }
    
    .cat-label {
        font-size: 0.7rem;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-right {
        justify-content: space-between;
    }
    
    .restaurants-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        height: 160px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 24px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .food-hero h1 {
        font-size: 1.5rem;
    }
    
    .filter-dropdown select {
        padding: 8px 32px 8px 12px;
        font-size: 0.85rem;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .card-header h3 {
        font-size: 1rem;
    }
    
    .btn-menu {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
}
