@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&f[]=zodiak@400,700&display=swap');

:root {
    --bg-color: #e2cbbc;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(220, 25, 21, 0.3);
    --primary: #dc1915;
    --primary-hover: #b91512;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --accent: #dc1915;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'General Sans', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, .zodiak {
    font-family: 'Zodiak', serif;
}

.background-orbs {
    display: none; /* Quitamos los orbes para un diseño limpio e institucional */
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 1rem;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.locator-header {
    background: linear-gradient(rgba(240, 230, 221, 0.6), rgba(240, 230, 221, 0.6)), url('/static/banner-pc.jpg?v=12');
    background-size: 100% 100%;
    aspect-ratio: 1920 / 240;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary);
    margin-bottom: 2rem;
    padding: 0.5rem 1rem; /* Reduced to fit glassmorphism container */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .locator-header {
        background: linear-gradient(rgba(240, 230, 221, 0.75), rgba(240, 230, 221, 0.75)), url('/static/banner-mobile.jpg?v=6');
        background-size: cover;
        background-position: center;
        aspect-ratio: auto;
        padding: 2rem;
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    height: 60px;
    border-radius: 0;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.title-group h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge {
    display: inline-block;
    background: rgba(220, 25, 21, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    border: 2px solid #f5ecd5;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="date"], select, input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #f5ecd5;
    color: #1a1a1a;
    font-weight: 700;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

select option {
    background-color: var(--bg-color);
    color: var(--text-main);
}

input[type="date"]:focus, select:focus, input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(220, 25, 21, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(220, 25, 21, 0.3);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.comments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem;
    color: var(--primary);
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border: 1px dashed rgba(220, 25, 21, 0.3);
    font-family: 'Zodiak', serif;
}

/* Modificamos comment-card y store-card para que parezcan listas limpias */
.comment-card, .store-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(220, 25, 21, 0.4);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    transition: transform 0.3s ease;
}
.comment-card:hover, .store-card:hover {
    transform: translateX(5px);
}

.card-header, .store-header {
    padding: 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.user-info, .store-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--primary);
}
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(220, 25, 21, 0.1);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.9rem;
    border: 1px solid var(--primary);
}
.username, .store-header h3 {
    font-family: 'General Sans', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary);
}
.store-header h3 {
    text-transform: uppercase;
}
.timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-body, .store-body {
    padding: 0;
    flex-grow: 1;
}

.original-comment, .store-address {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 500;
}

.ai-response-box {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(220, 25, 21, 0.2);
    border-radius: 6px;
    padding: 1.5rem 1rem 1rem 1rem;
    position: relative;
}
.ai-badge {
    position: absolute;
    top: -10px; right: 15px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.ai-response {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
}

/* Store links */
.store-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.store-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .dashboard {
        padding: 0.5rem;
    }
    .glass-panel {
        padding: 0.5rem 1rem;
        position: relative !important; /* Un-stick header on mobile */
        top: 0 !important;
    }
    /* Logo and title row */
    .glass-panel > div:first-child {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .title-group, .header-titles {
        text-align: center !important;
    }
    .logo {
        height: 45px !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
    /* Controls and filters row */
    .controls, .filters-container {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: stretch !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }
    .input-group {
        width: 100% !important;
    }
    .filter-group {
        flex: 1 1 45% !important;
        width: auto !important;
        min-width: 120px;
    }
    .filter-group:last-child {
        flex: 1 1 100% !important; /* Button takes full width */
    }
    .btn-search, .btn-primary, .btn-maps {
        width: 100% !important;
        margin-top: 0.25rem;
    }
}
