/**
 * Customer Dashboard - Yemeksepeti/Lieferando Style
 * FIXED: Bootstrap-kompatibel, keine Grid-Konflikte
 * CSP-konform
 */

/* === Global === */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f8f8;
    color: #333;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* === Top Header === */
.top-header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.top-header .container {
    max-width: 1440px;
    margin: 0 auto;
}

.top-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

/* === Header Logo === */
.header-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .header-logo {
        height: 32px;
        max-width: 150px;
    }
}

.address-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.address-badge i {
    color: var(--theme-primary, #E87722);
}

.change-address-btn {
    color: var(--theme-primary, #E87722) !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
}

.change-address-btn:hover {
    text-decoration: underline !important;
}

/* === Main Container === */
.container {
    max-width: 1440px;
    margin: 0 auto;
}

.container.mt-4 {
    margin-top: 24px;
}


/* === Search Bar === */
.search-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.search-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.search-input:focus {
    border-color: var(--theme-primary, #E87722);
}

.form-select {
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
}

/* === Quick Filter Buttons === */
.filter-btn {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 24px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: var(--theme-primary, #E87722);
    color: var(--theme-primary, #E87722);
}

.filter-btn.active {
    background: var(--theme-primary, #E87722);
    border-color: var(--theme-primary, #E87722);
    color: white;
}

/* === Section Titles === */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    font-size: 24px;
}

/* === Restaurant Grid === */
.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Bootstrap Grid Override für Sidebar */
.col-lg-3.col-md-4 {
    flex: 0 0 auto;
    width: 280px;
}

.col-lg-9.col-md-8 {
    flex: 1 1 auto;
}

/* === Loading === */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
}

.spinner-border {
    width: 48px;
    height: 48px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--theme-primary, #E87722);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    margin-top: 20px;
    color: #999;
    font-size: 16px;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    display: none;
}

.empty-icon {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 24px;
}

.empty-text {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.empty-state p {
    color: #999;
    font-size: 15px;
    margin-bottom: 32px;
}

.empty-state .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--theme-primary, #E87722);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.empty-state .btn:hover {
    background: color-mix(in srgb, var(--theme-primary, #E87722) 85%, black);
}

/* === Sponsored Section === */
.sponsored-section {
    margin-bottom: 40px;
}

.regular-section {
    margin-bottom: 40px;
}

/* === Responsive === */
@media (max-width: 1200px) {
    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .col-lg-3.col-md-4 {
        width: 100%;
        margin-bottom: 24px;
    }

    .col-lg-9.col-md-8 {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .top-header h2 {
        font-size: 22px;
    }

    .restaurant-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-filters {
        padding: 16px;
    }
}

/* === Accessibility === */
:focus-visible {
    outline: 2px solid var(--theme-primary, #E87722);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
