/* =========================================
   PRICE-SEARCH.CSS - EXAKTES DESIGN WIE SCREENSHOTS
   ========================================= */

/* ---------------- VARIABLEN ---------------- */
:root {
    --primary-color: #b54b2a;
    --primary-dark: #8b3a1f;
    --accent-color: #E7A800;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #007bff;
    --text-dark: #333;
    --text-muted: #666;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

/* ---------------- MOBILE LAYOUT (max-width: 768px) ---------------- */
@media (max-width: 768px) {
    /* Desktop-Elemente ausblenden */
    .desktop-layout,
    .desktop-only-search {
        display: none !important;
    }
    
    .price-search-container {
        padding: 0;
        background: var(--bg-light);
        min-height: calc(100vh - 60px);
        padding-bottom: 80px;
    }
    
    /* Mobile Search Section */
    .mobile-search-section {
        background: white;
        padding: 15px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-search-form {
        width: 100%;
    }
    
    .mobile-search-wrapper {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .mobile-search-input {
        width: 100%;
        padding: 14px 18px;
        border: 2px solid #ddd;
        border-radius: 50px;
        font-size: 15px;
        outline: none;
        transition: border-color 0.3s;
    }
    
    .mobile-search-input:focus {
        border-color: var(--primary-color);
    }
    
    .mobile-search-button {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        border: none;
        border-radius: 50px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    /* Mobile Stats Row (4 Boxen) */
    .mobile-stats-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 15px;
        background: white;
        margin-bottom: 5px;
    }
    
    .mobile-stat-item {
        text-align: center;
        padding: 10px 5px;
        background: #f8f9fa;
        border-radius: 8px;
        border-bottom: 2px solid transparent;
    }
    
    .mobile-stat-item.count {
        border-bottom-color: var(--info-color);
    }
    
    .mobile-stat-item.lowest {
        border-bottom-color: var(--success-color);
    }
    
    .mobile-stat-item.highest {
        border-bottom-color: var(--danger-color);
    }
    
    .mobile-stat-item.average {
        border-bottom-color: var(--warning-color);
    }
    
    .mobile-stat-number {
        font-size: 14px;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 2px;
    }
    
    .mobile-stat-item.lowest .mobile-stat-number {
        color: var(--success-color);
    }
    
    .mobile-stat-item.highest .mobile-stat-number {
        color: var(--danger-color);
    }
    
    .mobile-stat-item.average .mobile-stat-number {
        color: var(--warning-color);
    }
    
    .mobile-stat-label {
        font-size: 8px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Horizontale Scroll-Kategorien */
    .mobile-categories-section {
        background: white;
        padding: 12px 0;
        margin-bottom: 5px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-categories-scroll {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 0 15px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .mobile-categories-scroll::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-category-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 16px;
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-dark);
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .mobile-category-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    
    .mobile-category-btn.jumbo {
        background: #FFF3E0;
        border-color: #FFB74D;
        color: #E65100;
    }
    
    .mobile-category-btn.jumbo.active {
        background: #E65100;
        color: white;
    }
    
    .mobile-category-btn.beer {
        background: #FFF8E1;
        border-color: #FFD700;
        color: #FF9800;
    }
    
    .mobile-category-btn.beer.active {
        background: #FF9800;
        color: white;
    }
    
    .mobile-category-btn.cola {
        background: #FFE5E7;
        border-color: #F40009;
        color: #C60C30;
    }
    
    .mobile-category-btn.cola.active {
        background: #F40009;
        color: white;
    }
    
    .mobile-category-btn.cedevita {
        background: #FFF3E0;
        border-color: #FF9800;
        color: #FF6F00;
    }
    
    .mobile-category-btn.cedevita.active {
        background: #FF9800;
        color: white;
    }
    
    /* Mobile Tabs */
    .mobile-tabs {
        display: flex;
        background: white;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-tab {
        flex: 1;
        padding: 15px 10px;
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-tab.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
        font-weight: 600;
    }
    
    /* Mobile Results */
    .mobile-results {
        padding: 15px;
    }
    
    .mobile-result-card {
        background: white;
        border-radius: 12px;
        padding: 18px;
        margin-bottom: 15px;
        box-shadow: var(--shadow);
        position: relative;
        border: 1px solid #eee;
    }
    
    .mobile-result-card.cheapest {
        border: 2px solid var(--success-color);
        box-shadow: 0 2px 12px rgba(40, 167, 69, 0.2);
    }
    
    .mobile-cheapest-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: var(--danger-color);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 12px;
        animation: glow 2s infinite alternate;
    }
    
    @keyframes glow {
        from { box-shadow: 0 0 5px rgba(220, 53, 69, 0.5); }
        to { box-shadow: 0 0 20px rgba(220, 53, 69, 0.8); }
    }
    
    .mobile-type-badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        margin-bottom: 10px;
    }
    
    .mobile-type-badge.cafe {
        background: var(--info-color);
        color: white;
    }
    
    .mobile-type-badge.restaurant {
        background: var(--success-color);
        color: white;
    }
    
    .mobile-place-name {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 5px;
    }
    
    .mobile-item-name {
        font-size: 14px;
        color: var(--text-muted);
        margin-bottom: 12px;
    }
    
    .mobile-price {
        font-size: 28px;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 12px;
    }
    
    .mobile-address {
        font-size: 13px;
        color: var(--text-muted);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .mobile-city {
        font-size: 13px;
        color: var(--text-muted);
        font-weight: 500;
        margin-bottom: 10px;
    }
    
    .mobile-rating {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
        color: var(--warning-color);
        font-size: 14px;
        font-weight: 600;
    }
    
    .mobile-rating .veg-icon {
        color: var(--success-color);
    }
    
    .mobile-features {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
        color: var(--text-muted);
        font-size: 14px;
    }
    
    .mobile-features i {
        width: 30px;
        height: 30px;
        background: #f8f9fa;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-details-btn {
        display: block;
        width: 100%;
        padding: 12px;
        background: var(--info-color);
        color: white;
        text-align: center;
        text-decoration: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        transition: background 0.2s;
    }
    
    .mobile-details-btn:hover {
        background: #0056b3;
    }
    
    .mobile-map-view {
        height: calc(100vh - 250px);
        background: #e5e5e5;
    }
    
    #mobileResultsMap {
        width: 100%;
        height: 100%;
    }
    
    .mobile-no-results {
        text-align: center;
        padding: 60px 20px;
        color: var(--text-muted);
    }
    
    .mobile-no-results i {
        font-size: 50px;
        margin-bottom: 20px;
        color: #ddd;
    }
    
    /* Desktop Header ausblenden auf Mobile */
    .desktop-only-search {
        display: none !important;
    }
}

/* ---------------- DESKTOP LAYOUT (min-width: 769px) ---------------- */
@media (min-width: 769px) {
    /* Mobile-Elemente ausblenden */
    .mobile-layout {
        display: none !important;
    }
    
    .price-search-container {
        padding: 30px 0;
        background: #f8f9fa;
        min-height: calc(100vh - 200px);
    }
    
    .desktop-layout {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    /* Desktop Header Section */
    .desktop-header-section {
        text-align: center;
        margin-bottom: 30px;
        padding: 40px 30px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 15px;
        color: white;
    }
    
    .desktop-header-section h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
        color: white;
    }
    
    .desktop-header-section .subtitle {
        font-size: 1.1rem;
        opacity: 0.95;
    }
    
    .desktop-header-section .subtitle strong {
        color: var(--accent-color);
        font-style: italic;
    }
    
    /* Desktop Stats Row */
    .desktop-stats-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .desktop-stat-item {
        background: white;
        padding: 25px;
        border-radius: 12px;
        text-align: center;
        box-shadow: var(--shadow);
        border-bottom: 4px solid transparent;
        transition: transform 0.3s;
    }
    
    .desktop-stat-item:hover {
        transform: translateY(-5px);
    }
    
    .desktop-stat-item.count {
        border-bottom-color: var(--info-color);
    }
    
    .desktop-stat-item.lowest {
        border-bottom-color: var(--success-color);
    }
    
    .desktop-stat-item.highest {
        border-bottom-color: var(--danger-color);
    }
    
    .desktop-stat-item.average {
        border-bottom-color: var(--warning-color);
    }
    
    .desktop-stat-number {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 5px;
        color: var(--text-dark);
    }
    
    .desktop-stat-item.lowest .desktop-stat-number {
        color: var(--success-color);
    }
    
    .desktop-stat-item.highest .desktop-stat-number {
        color: var(--danger-color);
    }
    
    .desktop-stat-item.average .desktop-stat-number {
        color: var(--warning-color);
    }
    
    .desktop-stat-label {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    /* Desktop Table */
    .desktop-table-container {
        background: white;
        border-radius: 12px;
        box-shadow: var(--shadow);
        overflow: hidden;
        margin-bottom: 40px;
    }
    
    .desktop-results-table {
        width: 100%;
        border-collapse: collapse;
    }
    
    .desktop-results-table thead {
        background: #f8f9fa;
        border-bottom: 2px solid var(--border-color);
    }
    
    .desktop-results-table th {
        padding: 15px;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .desktop-results-table tbody tr {
        border-bottom: 1px solid #f0f0f0;
        transition: background 0.2s;
    }
    
    .desktop-results-table tbody tr:hover {
        background: #f8f9fa;
    }
    
    .desktop-results-table tbody tr.cheapest-row {
        background: #e8f5e9;
        border-left: 3px solid var(--success-color);
    }
    
    .desktop-results-table td {
        padding: 15px;
        font-size: 14px;
        color: var(--text-dark);
    }
    
    .rank-cell {
        font-weight: 700;
        color: var(--text-muted);
        width: 40px;
    }
    
    .name-cell {
        font-weight: 600;
    }
    
    .table-cheapest-badge {
        background: var(--success-color);
        color: white;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 10px;
        margin-left: 8px;
    }
    
    .type-cell .type-badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .type-badge.cafe {
        background: var(--info-color);
        color: white;
    }
    
    .type-badge.restaurant {
        background: var(--success-color);
        color: white;
    }
    
    .price-cell {
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-color);
    }
    
    .price-cell.cheapest-price {
        color: var(--success-color);
    }
    
    .location-cell small {
        color: var(--text-muted);
    }
    
    .stars {
        color: var(--warning-color);
        font-size: 12px;
    }
    
    .stars span {
        color: var(--text-muted);
        margin-left: 5px;
    }
    
    .btn-details {
        display: inline-block;
        padding: 8px 16px;
        background: var(--warning-color);
        color: #333;
        text-decoration: none;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        transition: all 0.2s;
    }
    
    .btn-details:hover {
        background: #e0a800;
        transform: translateY(-2px);
    }
    
    .veg-badge {
        color: var(--success-color);
        margin-left: 5px;
    }
    
    .cafe-icons i {
        margin-right: 8px;
        color: var(--info-color);
    }
    
    /* Desktop Categories */
    .desktop-categories {
        margin-top: 40px;
    }
    
    .category-section {
        background: white;
        padding: 25px;
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: var(--shadow);
    }
    
    .category-section h4 {
        margin-bottom: 20px;
        color: var(--text-dark);
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .coffee-section h4 {
        color: #1976D2;
        border-bottom: 2px solid #BBDEFB;
        padding-bottom: 10px;
    }
    
    .food-section h4 {
        color: #388E3C;
        border-bottom: 2px solid #C8E6C9;
        padding-bottom: 10px;
    }
    
    .category-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cat-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 12px 20px;
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
        border-radius: 25px;
        text-decoration: none;
        color: var(--text-dark);
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s;
    }
    
    .cat-btn:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(181, 75, 42, 0.3);
    }
    
    .cat-btn.jumbo {
        background: #FFF3E0;
        border-color: #FFB74D;
        color: #E65100;
    }
    
    .cat-btn.jumbo:hover {
        background: #E65100;
        color: white;
    }
    
    .cat-btn.beer {
        background: #FFF8E1;
        border-color: #FFD700;
        color: #FF9800;
    }
    
    .cat-btn.beer:hover {
        background: #FF9800;
        color: white;
    }
    
    .cat-btn.cola {
        background: #FFE5E7;
        border-color: #F40009;
        color: #C60C30;
    }
    
    .cat-btn.cola:hover {
        background: #F40009;
        color: white;
    }
    
    .cat-btn.cedevita {
        background: #FFF3E0;
        border-color: #FF9800;
        color: #FF6F00;
    }
    
    .cat-btn.cedevita:hover {
        background: #FF9800;
        color: white;
    }
    
    /* Desktop Search in Header */
    .desktop-only-search {
        display: block;
        margin-top: 15px;
    }
    
    .desktop-only-search .search-container {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* ---------------- AUTOCOMPLETE DROPDOWN ---------------- */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.autocomplete-name {
    font-weight: 600;
    font-size: 14px;
}

.autocomplete-city {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.autocomplete-loading,
.autocomplete-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ---------------- ANPASSUNGEN FÜR VIRTUAL ASSISTANT ---------------- */
@media (max-width: 768px) {
    .virtual-assistant-button,
    .gladan-zedan-button {
        display: none !important;
    }
}

/* ---------------- LEAFLET POPUP STYLES ---------------- */
.leaflet-popup-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 200px;
}

.leaflet-popup-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-dark);
}

/* ---------------- PRINT STYLES ---------------- */
@media print {
    .main-header,
    .main-footer,
    .footer-nav,
    .mobile-categories-section {
        display: none !important;
    }
}