/* ═══════════════════════════════════════════════════════
   ZOFLY — Restaurantes Públicos
   Estilos para listado de restaurantes con estrellas
   ═══════════════════════════════════════════════════════ */

/* ─── User Menu (Navbar) ─── */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: rgba(139, 47, 201, 0.12);
    border: 1px solid rgba(139, 47, 201, 0.2);
    border-radius: 9999px;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(139, 47, 201, 0.4);
}

.user-name-sm {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-logout {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.15);
    transition: all 0.2s ease;
}

.user-logout:hover {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

/* ─── Hero Mini ─── */
.rest-hero {
    padding: 140px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rest-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(139, 47, 201, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(61, 214, 140, 0.08) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.rest-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.rest-hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    margin-bottom: var(--space-md);
}

.rest-hero-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto;
}

/* ─── Hero Auth State ─── */
.hero-user-welcome {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--space-xl);
    padding: 10px 20px 10px 10px;
    background: rgba(139, 47, 201, 0.1);
    border: 1px solid rgba(139, 47, 201, 0.2);
    border-radius: 9999px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.5s ease;
}

.hero-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(139, 47, 201, 0.4);
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Listing Section ─── */
.rest-listing-section {
    padding-top: 0 !important;
}

/* ─── Category Tabs ─── */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.category-tab {
    padding: var(--space-sm) var(--space-lg);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-body);
}

.category-tab:hover {
    border-color: rgba(139, 47, 201, 0.3);
    color: var(--text-primary);
    background: var(--glass-hover);
}

.category-tab.active {
    background: var(--gradient-cta);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 15px rgba(139, 47, 201, 0.3);
}

/* ─── Results Bar ─── */
.rest-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
}

.rest-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ─── Restaurant Grid ─── */
.rest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* ─── Restaurant Card ─── */
.rest-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
}

.rest-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(139, 47, 201, 0.2);
}

/* Card Image */
.rest-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 47, 201, 0.1), rgba(61, 214, 140, 0.1));
}

.rest-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.rest-card:hover .rest-card-image img {
    transform: scale(1.05);
}

.rest-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, rgba(139, 47, 201, 0.08), rgba(61, 214, 140, 0.08));
}

.rest-tier-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

.tier-alta_cocina {
    background: rgba(168, 232, 76, 0.2);
    color: var(--lime);
    border: 1px solid rgba(168, 232, 76, 0.3);
}

.tier-cocina_casual {
    background: rgba(59, 95, 233, 0.2);
    color: var(--blue);
    border: 1px solid rgba(59, 95, 233, 0.3);
}

.tier-destino_oculto {
    background: rgba(139, 47, 201, 0.2);
    color: var(--purple-light);
    border: 1px solid rgba(139, 47, 201, 0.3);
}

.tier-evento {
    background: rgba(43, 168, 158, 0.2);
    color: var(--teal);
    border: 1px solid rgba(43, 168, 158, 0.3);
}

/* Card Body */
.rest-card-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}

.rest-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.rest-card-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Categories Tags */
.rest-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: var(--space-xs);
}

.rest-cat-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    background: rgba(91, 63, 217, 0.12);
    border: 1px solid rgba(91, 63, 217, 0.18);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    white-space: nowrap;
}

.rest-cat-more {
    background: rgba(139, 47, 201, 0.15);
    border-color: rgba(139, 47, 201, 0.25);
    color: var(--purple-light);
}

/* ─── Star Rating ─── */
.rest-card-rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.stars-interactive {
    display: flex;
    gap: 2px;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.15);
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.star-btn.active {
    color: #FFC107;
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
}

.star-btn.hovered {
    color: #FFD54F;
    transform: scale(1.15);
    text-shadow: 0 0 12px rgba(255, 193, 7, 0.5);
}

.star-btn:hover {
    transform: scale(1.2);
}

.rating-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rating-text strong {
    color: #FFC107;
    font-weight: 700;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── Card Action Buttons ─── */
.rest-card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.rest-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-secondary);
}

.rest-btn:hover {
    transform: translateY(-1px);
}

.rest-btn-wa {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.25);
    color: #25D366;
}

.rest-btn-wa:hover {
    background: rgba(37, 211, 102, 0.22);
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.rest-btn-ig {
    background: rgba(225, 48, 108, 0.1);
    border-color: rgba(225, 48, 108, 0.2);
    color: #E1306C;
}

.rest-btn-ig:hover {
    background: rgba(225, 48, 108, 0.2);
    box-shadow: 0 0 12px rgba(225, 48, 108, 0.2);
    color: #E1306C;
}

.rest-btn-detail {
    background: rgba(139, 47, 201, 0.1);
    border-color: rgba(139, 47, 201, 0.2);
    color: var(--purple-light);
}

.rest-btn-detail:hover {
    background: rgba(139, 47, 201, 0.2);
    box-shadow: 0 0 12px rgba(139, 47, 201, 0.2);
    color: var(--purple-light);
}

/* ─── Empty State ─── */
.rest-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.rest-empty .empty-icon {
    font-size: 5rem;
    display: block;
    margin-bottom: var(--space-lg);
}

.rest-empty h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.rest-empty p {
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

/* ═══════ MODAL ═══════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0 !important;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--purple) transparent;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.4);
    transform: scale(1.1);
}

/* Modal Image */
.modal-image-wrap {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(139, 47, 201, 0.1), rgba(61, 214, 140, 0.1));
}

.modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

/* Modal Body */
.modal-body {
    padding: var(--space-xl);
}

.modal-tier {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.modal-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.modal-address {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: var(--radius-sm);
}

.modal-stars {
    display: flex;
    gap: 3px;
    font-size: 1.4rem;
}

.modal-stars .star-filled { color: #FFC107; }
.modal-stars .star-empty { color: rgba(255, 255, 255, 0.12); }

.modal-rating-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-cats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.modal-cat-tag {
    padding: 5px 14px;
    background: rgba(91, 63, 217, 0.12);
    border: 1px solid rgba(91, 63, 217, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

.modal-desc:empty {
    display: none;
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.modal-actions .rest-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .rest-grid {
        grid-template-columns: 1fr;
    }

    .rest-hero {
        padding: 120px 0 40px;
    }

    .modal-image-wrap {
        height: 200px;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px var(--space-xl) var(--space-xl);
        gap: var(--space-md);
        transition: right var(--transition-normal);
        border-left: 1px solid var(--glass-border);
        z-index: 1000;
    }

    .navbar-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .rest-card-actions {
        flex-direction: column;
    }

    .rest-btn {
        justify-content: center;
    }

    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}
