/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F5F5F7;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ===== MENU OVERLAY ===== */
.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 998;
    opacity: 0; visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}
.menu-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* ===== MENU LATERAL RE-DISEÑADO ===== */
.menu-lateral {
    position: fixed; top: 0; left: -285px; width: 285px; height: 100%;
    background: #ffffff;
    z-index: 1000;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    padding: 0;
}
.menu-lateral.active { left: 0; }

.menu-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
    position: sticky; top: 0; z-index: 10;
}
.menu-title { font-size: 1.2rem; font-weight: 800; color: #111827; letter-spacing: -0.5px; }
.menu-close { 
    font-size: 1.5rem; color: #6b7280; 
    width: 32px; height: 32px; 
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #f9fafb;
    transition: background 0.2s;
}
.menu-close:hover { background: #f3f4f6; color: #111827; }

.menu-list { padding: 0 16px 12px 16px; }
#adminMenuItem { position: relative; z-index: 9999; }
.menu-list li { margin-bottom: 4px; }

.menu-list li a,
.accordion-toggle {
    display: flex; align-items: center; width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem; font-weight: 600; color: #374151;
    border-radius: 12px;
    transition: all 0.25s ease;
    text-align: left;
    gap: 10px;
    cursor: pointer;
}

.menu-list li a:hover,
.accordion-toggle:hover { 
    background: #f3f4f6; 
    color: #111827;
}

.menu-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    color: #6b7280;
    flex-shrink: 0 !important;
    transition: color 0.2s;
    display: block;
}
li a:hover .menu-icon,
.accordion-toggle:hover .menu-icon {
    color: #111827;
}

/* Items especiales */
.menu-item-admin { background: #f9fafb !important; color: #111827 !important; border: 1px solid #f3f4f6; margin-bottom: 12px !important; }
.menu-item-alta { color: #059669 !important; }
.menu-item-alta .menu-icon { color: #059669; }

/* Acordeones */
.accordion-toggle { justify-content: space-between; border-bottom: none; }
.accordion-toggle .arrow {
    font-size: 0.75rem; transition: transform 0.3s ease; color: #9ca3af;
}
.accordion-toggle.active .arrow { transform: rotate(90deg); }

.accordion-content { 
    overflow: hidden; 
    transition: max-height 0.3s ease-out;
    background: #ffffff;
    padding-left: 12px;
}
.accordion-content li { margin-bottom: 2px; }
.accordion-content li a {
    font-size: 0.88rem; font-weight: 500; color: #4b5563;
    padding: 10px 16px;
}
.accordion-content .accordion-toggle { font-size: 0.88rem; font-weight: 500; color: #4b5563; }

/* Botón Salir */
.menu-item-logout {
    margin-top: 16px !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fee2e2;
}
.menu-item-logout .menu-icon { color: #dc2626; }
.menu-item-logout:hover { background: #fee2e2 !important; }

/* ===== HEADER - MOBILE FIRST ===== */
.header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 100;
    width: 100%;
}
.header-bar {
    display: flex;
    align-items: center;
    padding: 14px 14px;
    gap: 12px;
}
.header-auth-actions {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}
.bell-header-btn { color: #DC2626; }
@media (max-width: 600px) {
    .header .bell-header-btn { display: none !important; }
}

/* Campana reclamaciones flotante (solo móvil) */
.bell-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #DC2626;
    border: none;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
    cursor: pointer;
    z-index: 140;
    align-items: center;
    justify-content: center;
    padding: 0;
}
@media (max-width: 600px) {
    .bell-fab { display: flex; }
}
.bell-fab-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #fff;
    color: #DC2626;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.btn-header-login,
.btn-header-register {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #1f2937;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    line-height: 1;
}
.btn-header-login {
    background: #111827;
    color: #fff;
    border-color: #111827;
}
.btn-header-salir {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #333;
}
.session-avatar {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.session-dot-online {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1004;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
}
.auth-modal {
    width: min(420px, 96vw);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.25);
    padding: 18px 18px 16px;
    position: relative;
}
.auth-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    line-height: 1;
}
.auth-modal-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    text-align: center;
}
.modal-login-label {
    display: block;
    margin: 10px 0 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
}
.modal-login-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 11px;
    font-size: 0.88rem;
}
.modal-login-submit {
    width: 100%;
    margin-top: 12px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 11px 12px;
    cursor: pointer;
}
.auth-modal-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: 0.8rem;
    text-align: center;
}
.auth-modal button {
    text-align: center;
    font-size: 0.85rem;
}

/* Hamburguesa a la izquierda */
.hamburger {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px 6px;
    flex-shrink: 0;
}
.hamburger span {
    display: block; width: 24px; height: 2.5px;
    background: #444; border-radius: 2px;
}

/* Logo grande y protagonista */
.logo-img {
    height: 70px;
    width: auto;
    flex-shrink: 0;
    filter: saturate(1.3) !important;
    opacity: 1 !important;
    -webkit-filter: saturate(1.3) !important;
}

/* Barra de accesos - franja oscura debajo del logo */
.header-accesos {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 6px 6px;
    background: #444;
    overflow: hidden;
}
.acceso-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    flex: 1;
    background: rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
    line-height: 1.2;
}
.acceso-btn:hover {
    background: rgba(255,255,255,0.22);
}

/* Eslogan oculto (ya está en el logo) */
.slogan { display: none; }

/* ===== BUSCADOR ===== */
.buscador {
    padding: 16px 12px 12px;
    background: #F5F5F7;
}
.buscador-wrapper {
    display: flex;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
    position: relative;
    border: 2px solid #e0e0e0;
}
.buscador-input {
    flex: 1;
    border: none; outline: none;
    padding: 14px 14px;
    font-size: 17px;
    color: #333;
    background: transparent;
    min-width: 0;
}
.buscador-input::placeholder { color: #aaa; }
.buscador-btn {
    padding: 14px 18px;
    background: #333;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: 0 10px 10px 0;
}
.buscador-btn svg { width: 18px; height: 18px; }
.buscador-btn:hover { background: #333; }

/* ===== BUSCADOR HERO (home) ===== */
.buscador-hero {
    padding: 20px 12px 14px;
    background: #F5F5F7;
}
.buscador-hero .buscador-input {
    padding: 16px 14px;
    font-size: 17px;
}
.buscador-hero .buscador-btn {
    padding: 16px 20px;
    background: #1a1a2e;
}
.buscador-hero .buscador-btn:hover {
    background: #0f3460;
}

/* ===== CARRUSEL CATEGORÍAS (pills) ===== */
.cat-carousel {
    padding: 10px 0 6px;
    overflow: hidden;
}
.cat-carousel-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 8px;
    scrollbar-width: none;
}
.cat-carousel-track::-webkit-scrollbar { display: none; }
.cat-pill {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 50px;
    background: #f0f0f0;
    color: #333;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.cat-pill:hover, .cat-pill:active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* ===== CTA BANNER FINO ===== */
.cta-banner {
    display: block;
    text-align: center;
    padding: 10px 16px;
    margin: 4px 12px 12px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
}
.cta-banner:hover { opacity: 0.9; }

/* ===== BLOQUE DESTACADOS HOME ===== */
.home-destacados {
    padding: 8px 4px 0;
}
.home-destacados-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 2px;
    padding-left: 2px;
}
.home-destacados-sub {
    font-size: 0.78rem;
    color: #888;
    margin: 0 0 10px;
    padding-left: 2px;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-top: 1px solid #f0f0f0;
    transition: background 0.15s;
    gap: 8px;
}
.autocomplete-item:first-child { border-top: none; }
.autocomplete-item:hover { background: #f5f5f7; }
.autocomplete-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
}
.ac-icon-negocio {
    background: #2563EB;
}
.ac-icon-negocio::after { content: 'N'; }
.ac-icon-keyword {
    background: #888;
}
.ac-icon-keyword::after { content: 'K'; }
.autocomplete-text {
    font-size: 0.88rem;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.autocomplete-context {
    font-size: 0.75rem;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}
.autocomplete-type-negocio .autocomplete-text {
    color: #2563EB;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main {
    padding: 10px 8px 24px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.categorias-titulo,
.grupo-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    padding-left: 2px;
}

/* ===== MODAL ÚLTIMOS NEGOCIOS ===== */
.modal-ultimos-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.modal-ultimos-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 36px 24px 28px;
    width: 100%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
}
.modal-ultimos-logo {
    display: block;
    height: 54px;
    width: auto;
    margin: 0 auto 20px;
}
.modal-ultimos-titulo {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a1a2e;
    text-align: center;
    letter-spacing: 0.8px;
    margin: 0 0 24px;
    line-height: 1.3;
}
.modal-ultimos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.modal-ultimos-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    transition: transform 0.15s, box-shadow 0.15s;
}
.modal-ultimos-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.modal-ultimos-card img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}
.modal-ultimos-card span {
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-ultimos-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.modal-ultimos-btn:hover {
    background: #0f3460;
}
.modal-ultimos-btn:active {
    transform: scale(0.97);
}
@media (min-width: 900px) {
    .modal-ultimos-content {
        max-width: 880px;
        padding: 44px 36px 36px;
    }
    .modal-ultimos-logo {
        height: 64px;
        margin-bottom: 24px;
    }
    .modal-ultimos-titulo {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }
    .modal-ultimos-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
        margin-bottom: 36px;
    }
    .modal-ultimos-btn {
        width: auto;
        margin: 0 auto;
        display: block;
        padding: 14px 48px;
    }
}

/* ===== GRID DE TARJETAS - MOBILE FIRST ===== */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 0 2px;
}

.nivel2, .seccion-publica {
    max-width: 100%;
    overflow-x: hidden;
}

.cat-card {
    background: #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}
.cat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.13);
    background: #ddd;
}
.cat-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}
.cat-card span {
    display: block;
    padding: 10px 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    line-height: 1.25;
}

/* Cat-cards CON imagen (subcategorias): aspecto tarjeta */
.cat-card:has(img) {
    background: #fff;
    display: block;
    min-height: auto;
    align-items: initial;
    justify-content: initial;
}
.cat-card:has(img) span {
    padding: 7px 5px;
}
/* ===== BOTON VOLVER ===== */
.seccion-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.seccion-topbar .btn-volver {
    margin-bottom: 0;
}
.btn-volver {
    display: inline-block;
    padding: 8px 16px;
    margin-bottom: 10px;
    background: #444;
    color: #fff;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}
.btn-volver:hover { background: #333; }
.pub-btn-inline {
    padding: 7px 14px;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.pub-btn-inline:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 18px 12px;
    color: #999;
    font-size: 0.78rem;
    border-top: 1px solid #e8e8e8;
    margin-top: 16px;
    background: #fff;
}

/* =============================================
   RESPONSIVE - SOLO AJUSTES PARA PANTALLAS GRANDES
   ============================================= */

/* Tablets */
@media (min-width: 480px) {
    .categorias-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .cat-card img { height: 140px; }
    .cat-card span { font-size: 0.85rem; padding: 10px 8px; }
    .main { padding: 12px 12px 24px; }
    .acceso-btn { font-size: 0.78rem; }
}

/* Tablets grandes */
@media (min-width: 768px) {
    .categorias-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .cat-card img { height: 160px; }
    .cat-card span { font-size: 0.88rem; }
    .logo-img { height: 75px; }
    .acceso-btn { font-size: 0.82rem; }
    .header-accesos { max-width: none; }
    .main { max-width: 900px; margin: 0 auto; }
    .buscador-wrapper { max-width: 500px; margin: 0 auto; }
}

/* Desktop */
@media (min-width: 1024px) {
    .categorias-grid { grid-template-columns: repeat(5, 1fr); }
    .cat-card img { height: 180px; }
    .main { max-width: 1100px; }
    .buscador-wrapper { max-width: 600px; }
}

/* ===== ADMIN PANEL ===== */
.admin-panel-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-panel-btn:hover { background: #eee; }

.admin-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}
.admin-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    outline: none;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}
.admin-input:focus { border-color: #555; }
select.admin-input { appearance: auto; }

.admin-input-file {
    display: block;
    width: 100%;
    padding: 8px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 12px;
    background: #fafafa;
}
.admin-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-submit-btn:hover { background: #222; }

.btn-volver-panel {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.btn-volver-panel:hover { background: #e0e0e0; }

.admin-cat-group { border-bottom: 1px solid #f0f0f0; }
.admin-cat-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}
.admin-cat-toggle:hover { background: #f9f9f9; }
.admin-cat-toggle::after { content: '\25B6'; font-size: 0.6rem; color: #aaa; transition: transform 0.2s; }
.admin-cat-toggle.open::after { transform: rotate(90deg); }

.admin-cat-checks {
    padding: 4px 12px 8px 12px;
    background: #fafafa;
}
.admin-check {
    display: block;
    padding: 6px 0;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
}
.admin-check input { margin-right: 8px; }

.admin-interes-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.admin-interes-row span { flex: 1; font-size: 0.88rem; color: #333; }
.admin-interes-row .interes-tel { color: #666; font-size: 0.82rem; }
.admin-interes-row button {
    padding: 4px 8px;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.btn-edit-interes { background: #e0e0e0; color: #333; }
.btn-del-interes { background: #FEE2E2; color: #DC2626; }

/* ===== SECCIONES PUBLICAS ===== */
.pub-add-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.pub-add-btn:hover { background: #222; }

.pub-lista-vacia {
    text-align: center;
    padding: 40px 16px;
    color: #aaa;
    font-size: 0.9rem;
}
.pub-lista-vacia-cta {
    margin-top: 8px;
    color: #666;
    font-weight: 600;
    font-size: 0.92rem;
}

/* ===== SEO: SEGUNDA MANO ===== */
.seo-header-sm {
    margin-bottom: 18px;
    padding: 0 10px;
    text-align: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.seo-h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: center;
}
.seo-titulo {
    text-align: center;
    line-height: 1.2;
    font-size: 1.25rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 8px;
}
.seo-titulo .linea1,
.seo-titulo .linea2 { display: block; }
.seo-titulo .linea2 { font-size: 0.9em; font-weight: 600; color: #444; }
@media (max-width: 480px) {
    .seo-titulo { font-size: 1.1rem; }
}
.seo-intro {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.55;
    text-align: center;
}
.seo-subtexto {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 12px;
    padding-left: 2px;
    font-style: italic;
}
.seo-guia-sm {
    margin-top: 32px;
    padding: 20px 16px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #eee;
}
.seo-guia-sm h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}
.seo-guia-sm h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #444;
    margin-top: 14px;
    margin-bottom: 6px;
}
.seo-guia-sm p {
    font-size: 0.84rem;
    color: #555;
    line-height: 1.6;
}
.seo-enlaces-internos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
}
.seo-enlaces-internos span {
    font-size: 0.82rem;
    color: #888;
    font-weight: 600;
}
.seo-enlaces-internos a {
    font-size: 0.82rem;
    color: #2563EB;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    background: #EFF6FF;
    transition: background 0.2s;
}
.seo-enlaces-internos a:hover {
    background: #DBEAFE;
}
@media (max-width: 480px) {
    .seo-h1 { font-size: 1.1rem; }
    .seo-guia-sm { padding: 16px 12px; }
    .seo-enlaces-internos { flex-direction: column; align-items: flex-start; }
}

/* ===== SUBCATEGORÍA ACTIVA: OCULTA GRID EN MOBILE Y DESKTOP ===== */
.nivel2.subcat-activa > .categorias-grid,
.nivel2.subcat-activa > .grupo-titulo { display: none; }
.btn-volver-subcats { display: none; margin-bottom: 12px; margin-left: 8px; }
/* Solo un botón volver visible: ocultar el general (nivel 1) cuando hay subcategoría activa */
.nivel2.subcat-activa button.btn-volver[data-back]:not(.btn-volver-subcats) { display: none !important; }
.nivel2.subcat-activa > .btn-volver-subcats { display: inline-block !important; }

/* ===== SUGERENCIAS "TAMBIÉN TE PUEDE INTERESAR" ===== */
.subcat-sugerencias { display: none; margin-top: 20px; padding: 14px 0; border-top: 1px solid #eee; }
.subcat-sug-titulo { font-size: 0.82rem; color: #888; font-weight: 600; margin-bottom: 10px; }
.subcat-sug-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.subcat-sug-chip {
    flex-shrink: 0;
    padding: 8px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
}
.subcat-sug-chip:hover { background: #e8e8e8; }
.subcat-sug-chip:active { background: #ddd; }
@media (min-width: 601px) {
    .subcat-sugerencias { max-width: 700px; }
}

.pub-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.pub-card-nombre {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.pub-card-texto {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 8px;
}
.pub-card-tel {
    font-size: 0.82rem;
    color: #666;
}
.pub-card-tel a {
    color: #333;
    font-weight: 600;
    text-decoration: underline;
}
.pub-card-cat {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #666;
    margin-top: 6px;
}

.pub-tab {
    flex: 1;
    padding: 14px 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #f5f5f5;
    color: #555;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}
.pub-tab.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* ===== ADMIN KEYWORDS PANEL ===== */
.kw-accordion-cat {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 6px;
    overflow: hidden;
}
.kw-accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f9fafb;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.kw-accordion-header:hover { background: #f0f0f0; }
.kw-accordion-header.kw-accordion-open { background: #eef2ff; }
.kw-accordion-arrow {
    font-size: 0.7rem;
    color: #888;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.kw-accordion-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    flex: 1;
}
.kw-accordion-body {
    padding: 8px 14px 12px;
    border-top: 1px solid #e5e7eb;
}
.kw-chip-highlight {
    background: #FEF3C7 !important;
    border: 1px solid #F59E0B;
    color: #92400E !important;
}
.kw-admin-subcat {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.kw-admin-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kw-admin-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
}
.kw-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    padding: 0 6px;
}
.kw-badge-ok { background: #22C55E; }
.kw-badge-warn { background: #DC2626; }
.kw-admin-edit-btn {
    padding: 4px 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}
.kw-admin-edit-btn:hover { background: #eee; }
.kw-admin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.kw-chip {
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 0.7rem;
    color: #666;
}
.kw-admin-edit-panel {
    margin-top: 8px;
    padding: 8px;
    background: #FAFAFA;
    border-radius: 6px;
    border: 1px solid #eee;
}
.kw-admin-edit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.kw-chip-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    border-radius: 12px;
    font-size: 0.72rem;
    color: #2E7D32;
}
.kw-chip-del {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.kw-admin-add-btn {
    padding: 6px 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.pub-consent {
    display: block;
    font-size: 0.78rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
    cursor: pointer;
}
.pub-consent input { margin-right: 6px; }

.pub-legal {
    font-size: 0.72rem;
    color: #999;
    line-height: 1.4;
    margin-bottom: 14px;
    padding: 8px 10px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

/* ===== TARJETAS DE PRODUCTO (HOME) ===== */
.producto-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}
.producto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.producto-card-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}
.producto-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.producto-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #0369a1;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.producto-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.producto-card-negocio {
    font-size: 0.65rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.producto-card-titulo {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.producto-card-precio {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0369a1;
    margin-top: 2px;
}
.producto-card-precio-desde {
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
}

/* ===== GRID DE NEGOCIOS ===== */
.negocios-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
    max-width: 100%;
}
.negocios-resultado {
    max-width: 100%;
    overflow-x: hidden;
}
.negocio-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.negocio-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.negocio-card-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    position: relative;
}
.negocio-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.negocio-card-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}
.negocio-card-img-fallback img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
}
.negocio-card-body {
    height: 150px;
    padding: 10px 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex-shrink: 0;
}
.negocio-card-traza {
    font-size: 0.65rem;
    color: #b0b0b0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    line-height: 1.3;
    flex-shrink: 0;
}
.negocio-card-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    border: 2px solid #f0f0f0;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.negocio-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-shrink: 0;
}
.negocio-card-top .negocio-card-logo {
    margin-bottom: 0;
}
.negocio-card-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.nc-star {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.nc-star-count {
    font-size: 0.65rem;
    color: #999;
    margin-left: 2px;
}

.negocio-card-views {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    color: #aaa;
    margin-left: auto;
}
.nc-eye {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}


.negocio-card-nombre {
    font-size: 0.82rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin-bottom: 4px;
    overflow: hidden;
    max-height: 2.4em;
    flex-shrink: 0;
}
.negocio-card-desc {
    font-size: 0.72rem;
    color: #888;
    line-height: 1.35;
    overflow: hidden;
    flex: 1;
}
.negocio-card-tel {
    font-size: 0.72rem;
    color: #555;
    margin-top: auto;
    padding-top: 4px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ===== FICHA NEGOCIO MODAL ===== */
.ficha-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ficha-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.ficha-modal-scroll {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.ficha-close {
    position: absolute;
    top: 10px; right: 12px;
    background: rgba(0,0,0,0.5);
    border: none;
    cursor: pointer;
    z-index: 3;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0;
}
.ficha-close:hover { background: rgba(0,0,0,0.7); }
.ficha-img-dest {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
.ficha-body {
    padding: 20px 24px 24px;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.ficha-logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.ficha-logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    border: 2px solid #e8e8e8;
    flex-shrink: 0;
}
.ficha-nombre {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}
.ficha-desc {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}
.ficha-tel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #333;
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    transition: background 0.2s;
}
.ficha-tel:hover { background: #222; }
.ficha-contacto-row {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}
.ficha-contacto-row a {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.ficha-contacto-row a:first-child {
    background: #333;
    color: #fff;
}
.ficha-contacto-row a:first-child:hover { background: #222; }
.ficha-contacto-row a:last-child {
    background: #25D366;
    color: #fff;
}
.ficha-contacto-row a:last-child:hover { background: #1da851; }
.ficha-contacto-row a:active { transform: scale(0.97); }
.ficha-email-row {
    margin: -8px 0 16px;
}
.ficha-email-row a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #0f3460;
    text-decoration: none;
}
.ficha-email-row a:hover { text-decoration: underline; }
.ficha-galeria-titulo {
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.ficha-galeria {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 4px;
    -webkit-overflow-scrolling: touch;
}
.ficha-galeria img {
    height: 140px;
    min-width: 160px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.ficha-galeria img:hover { opacity: 0.85; }

/* Lightbox galería */
.galeria-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.galeria-lightbox.active {
    display: flex;
}
.galeria-lb-img {
    max-width: 88%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-select: none;
}
.galeria-lb-prev,
.galeria-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.galeria-lb-prev:hover,
.galeria-lb-next:hover {
    background: rgba(255,255,255,0.3);
}
.galeria-lb-prev { left: 12px; }
.galeria-lb-next { right: 12px; }
.galeria-lb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.galeria-lb-close:hover {
    background: rgba(255,255,255,0.3);
}
@media (max-width: 479px) {
    .galeria-lb-prev,
    .galeria-lb-next { width: 36px; height: 36px; font-size: 1.4rem; }
    .galeria-lb-prev { left: 6px; }
    .galeria-lb-next { right: 6px; }
    .galeria-lb-img { max-width: 94%; max-height: 80vh; }
}

/* ===== OPTIMIZACIÓN MODAL PRODUCTO (Fase UX) ===== */
.ficha-prod-img-wrap {
    padding: 16px 16px 0;
    text-align: center;
    overflow: hidden;
}
.prod-zoomable-img {
    width: 100%;
    max-width: 340px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 0 auto;
    display: block;
    cursor: pointer;
}

@media (min-width: 768px) {
    .ficha-prod-img-wrap {
        height: 180px; /* Reducción para evitar scroll en Desktop */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .prod-zoomable-img {
        max-height: 100%;
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    .prod-zoomable-img:hover {
        transform: scale(1.1);
    }
    .ficha-body {
        padding: 12px 20px 16px;
    }
    .ficha-nombre {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .ficha-body li span {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Zoom Overlay Simple (Móvil) */
.zoom-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 11000; /* Por encima de todo */
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}
.zoom-overlay img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.zoom-close {
    position: absolute;
    top: 25px; right: 25px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11001;
}
.zoom-close:hover { background: rgba(255,255,255,0.3); }

/* Fallback imagen/logo selectors */
.fallback-img-option, .fallback-logo-option {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px;
    text-align: center;
    transition: border-color 0.15s;
}
.fallback-img-option:has(input:checked), .fallback-logo-option:has(input:checked) {
    border-color: #6B21A8;
    background: #f3e8ff;
}
.fallback-img-option img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.fallback-img-option span {
    font-size: 0.68rem;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* Modal compacto para anuncios (objetos, segunda mano) */
.ficha-modal-compact {
    max-width: 420px;
}
.ficha-modal-compact .ficha-modal-scroll > img {
    height: 150px !important;
    width: 100%;
    object-fit: cover;
    display: block;
}
.ficha-anuncio-galeria {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 8px;
    -webkit-overflow-scrolling: touch;
}
.ficha-anuncio-galeria img {
    height: 100px;
    min-width: 100px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 479px) {
    .ficha-img-dest { height: 200px; }
    .ficha-body { padding: 16px; }
    .ficha-nombre { font-size: 1.1rem; }
    .ficha-contacto-row { flex-direction: column; }
    .ficha-contacto-row a { flex: none; }
    .ficha-galeria img { height: 110px; min-width: 130px; }
}

@media (min-width: 480px) {
    .negocios-grid { grid-template-columns: repeat(3, 1fr); }
    .negocio-card-img { height: 140px; }
}
@media (min-width: 768px) {
    .negocios-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .negocio-card-img { height: 150px; }
}
@media (min-width: 1024px) {
    .negocios-grid { grid-template-columns: repeat(4, 1fr); }
    .negocio-card-img { height: 160px; }
}

/* ===== ADMIN FORM LAYOUT ===== */
.admin-form-grid {
    display: block;
}
#adminCatAccordion {
    max-height: none;
    overflow: visible;
}
#catSearchHelper {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
}
#catSearchHelper:focus {
    border-color: #555;
}
@media (min-width: 768px) {
    .admin-modal > div {
        max-width: 960px !important;
        width: 94% !important;
        margin: auto !important;
        border-radius: 14px !important;
        max-height: 90vh !important;
    }
    .admin-modal-inner {
        max-width: 960px !important;
    }
    .admin-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 24px;
        align-items: start;
    }
    .admin-form-col-left,
    .admin-form-col-right {
        min-width: 0;
    }
    .admin-form-col-right {
        position: sticky;
        top: 60px;
        max-height: calc(90vh - 120px);
        overflow-y: auto;
    }
}

/* Botón Guardar bajo el grid (modal negocios) */
.negocio-form-actions {
    width: 100%;
    box-sizing: border-box;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px solid #eee;
}

/* ===== WIZARD ALTA PUBLICA ===== */
#wizardAlta {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 5vh 0;
}
.wizard-container {
    background: #fff;
    border-radius: 14px;
    max-width: 440px;
    width: 92%;
    max-height: none;
    overflow-y: visible;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    flex-shrink: 0;
}
.wizard-header {
    position: sticky;
    top: 0;
    background: #333;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    border-radius: 14px 14px 0 0;
}
.wizard-title {
    font-size: 1rem;
    font-weight: 700;
}
.wizard-close {
    font-size: 1.6rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.wizard-step-label {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    padding: 12px 0 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}
.wizard-step {
    padding: 12px 24px 8px;
}
.wizard-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
}
.wizard-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
    margin-top: 12px;
}
.wizard-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.wizard-input:focus {
    border-color: #555;
}
.wizard-input-file {
    width: 100%;
    padding: 8px;
    font-size: 0.82rem;
    border: 1.5px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    box-sizing: border-box;
}
.wizard-consent {
    display: block;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
    margin-top: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
.wizard-consent input {
    margin-right: 6px;
    accent-color: #333;
}
.wizard-resumen {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #444;
}
.wizard-resumen strong {
    color: #333;
}
.wizard-nav {
    display: flex;
    justify-content: space-between;
    padding: 12px 24px 20px;
    gap: 12px;
}
.wizard-btn-prev {
    padding: 10px 20px;
    background: none;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.wizard-btn-prev:hover {
    border-color: #999;
    color: #333;
}
.wizard-btn-next {
    padding: 10px 28px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    max-width: 220px;
    margin-left: auto;
}
.wizard-btn-next:hover {
    background: #222;
}
.wizard-btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.wizard-fallback-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 6px;
}
.wizard-fallback-grid label {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.wizard-fallback-grid label:has(input:checked) {
    border-color: #333;
}
.wizard-fallback-grid img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}
.wizard-logo-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
}
.wizard-logo-option {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
    transition: border-color 0.2s;
    background: #fafafa;
}
.wizard-logo-option:has(input:checked) {
    border-color: #333;
    background: #f0f0f0;
}
.wizard-logo-option svg {
    display: block;
    margin: 0 auto;
}
@media (max-width: 480px) {
    .header-auth-actions { gap: 4px; flex-direction: column; align-items: stretch; }
    .btn-header-login, .btn-header-register { padding: 8px 10px; font-size: 0.78rem; text-align: center; }

    #wizardAlta { padding: 2vh 0; }
    .wizard-container { width: 97%; border-radius: 10px; }
    .wizard-header { border-radius: 10px 10px 0 0; }
    .wizard-step { padding: 12px 14px 8px; }
    .wizard-nav { padding: 10px 14px 16px; }
}

/* ── Modal Alta Simple ── */
#altaSimpleSubmit:not(:disabled) {
    opacity: 1 !important;
}
#altaSimpleSubmit:not(:disabled):active {
    transform: scale(0.97);
}
#btnApareceAqui:active {
    transform: scale(0.96);
}

/* ── Hero sección negocios ── */
.negocios-hero {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    margin-bottom: 20px;
    background: url('../img/hero-negocios.jpg') center / cover no-repeat;
}
.negocios-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.negocios-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.65) 100%);
}
.negocios-hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}
.negocios-hero-line1 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.negocios-hero-line2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-top: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
@media (min-width: 600px) {
    .negocios-hero { height: 350px; }
    .negocios-hero-line1 { font-size: 2rem; }
    .negocios-hero-line2 { font-size: 1.3rem; }
}


/* ============================================================
   SOCIAL: Visitas, Estrellas, Comentarios
   ============================================================ */

/* — Contador visitas — */
.ficha-visitas {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #999;
    margin: -4px 0 10px;
}
.ficha-visitas svg { flex-shrink: 0; }

/* — Rating cabecera (solo lectura) — */
.ficha-header-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: -2px 0 8px;
}
.fhr-star {
    display: inline-flex;
}
.fhr-star svg {
    width: 16px;
    height: 16px;
}
.fhr-media {
    font-size: 0.82rem;
    font-weight: 700;
    color: #333;
    margin-left: 3px;
}
.fhr-votos {
    font-size: 0.75rem;
    color: #999;
}

/* — Estrellas (rating) — */
.ficha-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 6px;
    flex-wrap: wrap;
}
.ficha-stars {
    display: inline-flex;
    gap: 2px;
}
.ficha-stars .star {
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: transform 0.15s;
    color: #ddd;
}
.ficha-stars .star:hover { transform: scale(1.2); }
.ficha-stars .star.filled { color: #f59e0b; }
.ficha-stars .star.voted { cursor: default; }
.ficha-stars .star.voted:hover { transform: none; }
.ficha-rating-text {
    font-size: 0.8rem;
    color: #888;
}
.ficha-rating-text strong {
    color: #333;
    font-size: 0.9rem;
}

/* — Comentarios — */
.ficha-comments {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}
.ficha-comments-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
}
.ficha-comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.ficha-comment-form input,
.ficha-comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.ficha-comment-form input:focus,
.ficha-comment-form textarea:focus {
    outline: none;
    border-color: #6B21A8;
    box-shadow: 0 0 0 2px rgba(107,33,168,0.12);
}
.ficha-comment-form textarea {
    min-height: 70px;
    max-height: 160px;
}
.ficha-comment-form button {
    align-self: flex-end;
    background: #6B21A8;
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ficha-comment-form button:hover { background: #581c87; }
.ficha-comment-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.ficha-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ficha-comment-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 12px 14px;
}
.ficha-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.ficha-comment-autor {
    font-weight: 700;
    font-size: 0.82rem;
    color: #333;
}
.ficha-comment-fecha {
    font-size: 0.72rem;
    color: #aaa;
}
.ficha-comment-texto {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.45;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
.ficha-comments-empty {
    text-align: center;
    color: #bbb;
    font-size: 0.82rem;
    padding: 12px 0;
}

/* — Comentarios: moderación admin — */
.ficha-comment-oculto {
    opacity: 0.45;
    border-left: 3px solid #DC2626;
}
.ficha-comment-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.ficha-comment-badge-oculto {
    font-size: 0.7rem;
    font-weight: 600;
    color: #DC2626;
    background: #FEE2E2;
    padding: 2px 8px;
    border-radius: 4px;
}
.ficha-comment-toggle-hide {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6B7280;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.ficha-comment-toggle-hide:hover {
    background: #E5E7EB;
}

/* — Modal feature bloqueada — */
.modal-feature-blocked {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    padding: 20px;
}
.modal-feature-blocked-box {
    background: #fff;
    border-radius: 16px;
    max-width: 360px;
    width: 100%;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.2s ease;
}
.modal-feature-blocked-box .mfb-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.modal-feature-blocked-box h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #333;
}
.modal-feature-blocked-box p {
    margin: 0 0 20px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}
.modal-feature-blocked-box button {
    background: #6B21A8;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-feature-blocked-box button:hover { background: #581c87; }
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* — Responsive: estrellas en móvil — */
@media (max-width: 768px) {
    .fhr-star svg { width: 14px; height: 14px; }
    .ficha-stars .star { width: 18px; height: 18px; }
}
/* ===== RESENAS UNIFICADAS ===== */
.ficha-review-form {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}
.ficha-review-form-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}
.ficha-review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.ficha-review-stars .star {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: transform 0.15s;
    fill: none;
}
.ficha-review-stars .star:hover { transform: scale(1.15); }
.ficha-review-stars .star.filled { color: #f59e0b; fill: #f59e0b; }
.ficha-review-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.82rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 8px;
    font-family: inherit;
}
.ficha-review-form textarea:focus {
    outline: none;
    border-color: #6B21A8;
}
.ficha-review-form button {
    background: #6B21A8;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.ficha-review-form button:hover { background: #581c87; }
.ficha-review-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ficha-review-mini-stars {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
    margin: 0 6px;
}
.ficha-review-mini-stars .mini-star {
    width: 14px;
    height: 14px;
}
.ficha-review-toggle-hide {
    font-size: 0.72rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    color: #666;
    transition: background 0.2s;
}
.ficha-review-toggle-hide:hover {
    background: #e5e7eb;
}

/* ===== MODAL ANALISIS ===== */
.modal-analisis-box {
    background: #fff;
    border-radius: 14px;
    width: 92%;
    max-width: 860px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}
.modal-analisis-header {
    position: sticky;
    top: 0;
    background: #333;
    color: #fff;
    padding: 16px 20px;
    border-radius: 14px 14px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.anal-section {
    margin-bottom: 24px;
}
.anal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}
.anal-stats-grid {
    display: flex;
    gap: 12px;
}
.anal-stat {
    flex: 1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
}
.anal-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
}
.anal-stat-label {
    display: block;
    font-size: 0.72rem;
    color: #888;
    margin-top: 2px;
}
.anal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.anal-table th {
    text-align: left;
    font-weight: 600;
    color: #666;
    padding: 6px 8px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: uppercase;
}
.anal-table td {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.anal-table tr:last-child td {
    border-bottom: none;
}
.anal-empty {
    color: #aaa;
    font-size: 0.82rem;
    text-align: center;
    padding: 12px;
}
@media (max-width: 600px) {
    .modal-analisis-box { width: 100%; max-width: 100%; border-radius: 0; max-height: 100vh; }
    .modal-analisis-header { border-radius: 0; }
    .anal-stats-grid { flex-direction: column; gap: 8px; }
    .anal-stat-num { font-size: 1.2rem; }
}

/* ===== MODAL MAESTROS ===== */
.maestros-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 94%;
    max-width: 520px;
    height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.maestros-modal-header {
    background: #333;
    color: #fff;
    padding: 16px 20px;
    border-radius: 14px 14px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.maestros-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    transition: opacity 0.15s;
}
.maestros-create-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
    margin-bottom: 12px;
}
.maestros-create-input {
    flex: 1;
    font-size: 0.82rem !important;
    padding: 8px 10px !important;
    height: 36px;
    box-sizing: border-box;
}
.maestros-create-btn {
    height: 36px;
    padding: 0 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}
.maestros-create-btn:hover { background: #555; }
.maestros-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 5px;
    background: #fff;
    min-height: 46px;
}
.maestros-thumb-wrap {
    flex-shrink: 0;
    width: 46px;
    align-self: stretch;
    min-height: 46px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.maestros-thumb-wrap button {
    width: 100%;
    height: 100%;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.25rem;
    line-height: 1;
}
.maestros-thumb-wrap button:hover {
    background: #f3f4f6;
    color: #6b7280;
}
.maestros-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.maestros-row-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    cursor: default;
    display: flex;
    align-items: center;
    min-width: 0;
}
.maestros-img-zoom-box {
    position: relative;
    max-width: min(92vw, 720px);
    max-height: 88vh;
    background: #111;
    border-radius: 12px;
    padding: 12px 12px 52px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.maestros-img-zoom-box img {
    display: block;
    max-width: 100%;
    max-height: calc(88vh - 100px);
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}
.maestros-img-zoom-close {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 1.75rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    z-index: 2;
}
.maestros-img-zoom-delete {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    background: #b91c1c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.maestros-img-zoom-delete:hover {
    background: #991b1b;
}
.maestros-btn-edit,
.maestros-btn-toggle {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    padding: 0;
    flex-shrink: 0;
}
.maestros-btn-edit:hover { background: #eee; }
.maestros-btn-toggle:hover { background: #eee; }
.maestros-btn-open {
    padding: 5px 10px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.maestros-btn-open:hover { background: #555; }
.maestros-back-btn:hover { background: #f0f0f0 !important; }


/* === ADMIN PANEL: RESPONSIVE GRID === */
.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 768px) {
    .admin-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .admin-config-inner {
        max-width: 700px !important;
    }
}


/* === ADMIN PANEL: RESPONSIVE GRID === */
.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 768px) {
    .admin-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .admin-config-inner {
        max-width: 700px !important;
    }
}


/* === ADMIN PANEL: RESPONSIVE GRID === */
.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 768px) {
    .admin-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .admin-config-inner {
        max-width: 700px !important;
    }
}

/* === ESTADO + PROPIETARIO BAR === */
.negocio-status-bar { margin-bottom:14px; padding:10px 14px; background:#F9FAFB; border:1px solid #E5E7EB; border-radius:8px; }
.negocio-status-group { display:flex; align-items:center; gap:6px; }
.negocio-status-label { display:inline-block; width:130px; font-size:0.82rem; font-weight:700; color:#333; white-space:nowrap; }
.negocio-status-badge { padding:5px 12px; border:1px solid #D1D5DB; border-radius:6px; font-size:0.82rem; font-weight:600; background:#fff; }
#estadoNegocioSelect { width:140px; flex:0 0 auto; }
#ownerNegocioBar { display: flex !important; align-items: center; gap: 6px; flex-wrap: nowrap !important; margin-top:8px; }
#ownerNegocioNombre { display: inline-block; width:260px; flex:0 0 auto; margin-left:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; background:#D1FAE5; border:1px solid #10B981; color:#065F46 !important; font-weight:500; font-size:14px; line-height:1.2; }
.negocio-status-msg { font-size:0.75rem; color:#6B7280; }
.negocio-owner-row { display:flex; align-items:center; gap:6px; margin-top:8px; flex-wrap:nowrap; }
.negocio-search-wrap { position:relative; flex:1; min-width:0; max-width:240px; margin-left:6px; }
.negocio-search-input { width:100%; padding:5px 10px; border:1px solid #D1D5DB; border-radius:6px; font-size:0.82rem; outline:none; box-sizing:border-box; background:#fff; }
.negocio-search-input:focus { border-color:#333; }
.negocio-search-dropdown { display:none; position:absolute; top:100%; left:0; width:100%; background:#fff; border:1px solid #D1D5DB; border-radius:6px; z-index:1000; margin-top:2px; box-shadow:0 4px 12px rgba(0,0,0,0.1); }
/* dropdown visibility controlled by JS */
.negocio-search-results { max-height:220px; overflow-y:auto; }
@media (max-width:520px) {
  .negocio-owner-row:not(#ownerNegocioBar) { flex-wrap:wrap; }
  .negocio-owner-row:not(#ownerNegocioBar) .negocio-search-wrap { width:100%; flex:none; }
  
  #ownerNegocioBar { flex-wrap: wrap !important; align-items: flex-start; }
  #ownerNegocioBar .negocio-status-label { width: 100%; }
  #ownerNegocioBar #ownerNegocioNombre { width: 100%; margin-left: 0; }
  #ownerNegocioBar .negocio-search-wrap { width: 100% !important; max-width: none !important; margin-left: 0 !important; flex: none !important; }
}

/* ===== VEHÍCULOS (listado público) ===== */
.vehiculos-seccion .vehiculos-hero {
  position: relative;
  width: 100%;
  height: 220px;
  box-sizing: border-box;
  border-radius: 14px;
  overflow: hidden;
  background-color: #1f2937;
  background-image: url('../img/vehiculos-hero-banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.vehiculos-seccion .vehiculos-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  pointer-events: none;
}
.vehiculos-seccion .vehiculos-hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
  box-sizing: border-box;
}
.vehiculos-seccion .vehiculos-hero-title {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}
.vehiculos-seccion .vehiculos-hero-slogan {
  margin: 0;
  max-width: 26rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.vehiculos-seccion .vehiculos-seo-texto {
  margin: 0 0 14px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.vehiculos-seccion .vehiculos-h2-listado {
  margin-top: 4px;
}
@media (max-width: 768px) {
  .vehiculos-seccion .vehiculos-hero {
    height: 132px;
    max-height: none;
    border-radius: 12px;
  }
  .vehiculos-seccion .vehiculos-hero-inner {
    padding: 14px 16px;
  }
  .vehiculos-seccion .vehiculos-hero-title {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }
  .vehiculos-seccion .vehiculos-hero-slogan {
    font-size: 0.8rem;
    max-width: none;
  }
}
.vehiculos-seccion .vehiculos-page-wrap {
  max-width: 1180px;
  margin-left: 0;
  margin-right: auto;
  padding: 0 16px 28px 0;
  box-sizing: border-box;
}
.vehiculos-seccion .vehiculos-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-sizing: border-box;
}
.vehiculos-filtros {
  position: sticky;
  top: 20px;
}
.vehiculos-seccion .vehiculos-filtros {
  width: 288px;
  flex-shrink: 0;
  align-self: flex-start;
  max-height: none;
}
.vehiculos-seccion .vehiculos-filtros-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  box-sizing: border-box;
}
.vehiculos-seccion .vehiculos-filtros-card-head {
  flex-shrink: 0;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.vehiculos-seccion .vehiculos-filtros-titulo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #111827;
}
.vehiculos-seccion .vehiculos-filtros-card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 14px;
  box-sizing: border-box;
}
.vehiculos-seccion .vehiculos-filtros-dock {
  padding-top: 2px;
}
.vehiculos-seccion .vehiculos-listado {
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.vehiculos-seccion .vehiculos-listado-intro {
  margin-bottom: 18px;
}
.vehiculos-seccion .vehiculos-listado-intro .vehiculos-intro {
  margin: 0 0 14px;
}
.vehiculos-seccion .vehiculos-listado-intro .vehiculos-h1-principal {
  margin-top: 0;
}
.vehiculos-seccion .vehiculos-listado-intro .vehiculos-listado-lead {
  margin: 0;
}
.vehiculos-seccion .vehiculos-listado-intro .vehiculos-listado-lead .vehiculos-h2 {
  margin-top: 0;
}
.vehiculos-seccion .vehiculos-filtros .vehiculos-filtros-grid {
  grid-template-columns: 1fr;
  gap: 8px 10px;
}
.vehiculos-seccion .vehiculos-filtros .veh-filter-rango {
  grid-column: 1 / -1;
}
.vehiculos-seccion .vehiculos-filtros .vehiculos-filtros-acciones {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}
.btn-filtros-movil {
  display: none;
}
.vehiculos-seccion .filtros-overlay {
  display: none;
}
.vehiculos-seccion .filtros-panel {
  box-sizing: border-box;
}
.vehiculos-seccion .filtros-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.vehiculos-seccion .filtros-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #111827;
}
.vehiculos-seccion .filtros-cerrar-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
}
.vehiculos-seccion .filtros-cerrar-btn:hover {
  background: #e5e7eb;
}
.vehiculos-seccion .filtros-panel #aplicarFiltros {
  width: 100%;
  margin-top: 16px;
  box-sizing: border-box;
}
.vehiculos-seccion .filtros-panel .vehiculos-filtros-acciones #btnVehiculosAplicar {
  display: none;
}
@media (max-width: 768px) {
  .vehiculos-seccion .vehiculos-layout {
    display: block;
  }
  .vehiculos-seccion .vehiculos-filtros {
    display: none;
  }
  .btn-filtros-movil {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #1f2937;
    background: #1f2937;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
  }
  .vehiculos-seccion .filtros-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  .vehiculos-seccion .filtros-overlay.activo {
    display: block;
  }
  .vehiculos-seccion .filtros-panel {
    background: #fff;
    height: 100%;
    max-width: 100%;
    width: min(420px, 100%);
    margin-left: auto;
    overflow: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
  }
  .vehiculos-seccion #vehiculosFiltrosMovilMount {
    flex: 1;
    min-height: 0;
  }
  .vehiculos-seccion .filtros-panel .vehiculos-filtros-grid {
    grid-template-columns: 1fr;
  }
}
.vehiculos-bloque { margin-bottom: 20px; }
.vehiculos-h1-principal {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  margin: 0 0 10px;
}
.vehiculos-h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px;
}
.vehiculos-h3-seo {
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 10px;
}
.vehiculos-intro-texto {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4b5563;
  margin: 0;
  max-width: 42rem;
}
.vehiculos-sublead {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.5;
  margin: 0;
}
.vehiculos-filtros-ayuda {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0 0 10px;
}
.vehiculos-filtros-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.vehiculos-btn-limpiar {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}
.vehiculos-listado-wrap .vehiculos-lista-meta {
  font-size: 0.85rem;
  color: #555;
  margin: 6px 0 12px;
}
.vehiculos-paginacion {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0 0;
  flex-wrap: wrap;
}
.vehiculos-seo-final {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #374151;
}
.vehiculos-seo-final p { margin: 0 0 12px; }
.vehiculos-seo-final p:last-child { margin-bottom: 0; }
.vehiculos-filtros-wrap { margin-bottom: 0; }
.vehiculos-filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 12px;
  align-items: end;
}
.veh-filter-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
}
.veh-filter-select { font-size: 0.85rem !important; width: 100%; }
.veh-filter-rango {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  grid-column: span 2;
}
.veh-filter-rango-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  width: 100%;
}
.veh-filter-rango .admin-input { flex: 1; min-width: 90px; }
.vehiculos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
#vehiculosLista {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 769px) {
  #vehiculosLista {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  #vehiculosLista {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.vehiculo-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.vehiculo-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.vehiculo-card:focus { outline: 2px solid #6B21A8; outline-offset: 2px; }
.vehiculo-card-img {
  aspect-ratio: 16/10;
  background: #f3f4f6;
  overflow: hidden;
}
.vehiculo-card-img img { width: 100%; height: 100%; object-fit: cover; }
.vehiculo-card-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: #9ca3af;
}
.vehiculo-card-body { padding: 12px 14px 14px; position: relative; }
.vehiculo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.vehiculo-card-title { font-size: 0.95rem; font-weight: 700; color: #111827; line-height: 1.3; margin: 0 0 6px; }
.vehiculo-card-price { font-size: 1.1rem; font-weight: 800; color: #059669; margin: 0 0 4px; }
.vehiculo-card-meta { font-size: 0.8rem; color: #6b7280; margin: 0 0 6px; }
.vehiculo-card-neg { font-size: 0.78rem; color: #6B21A8; font-weight: 600; margin: 0; }
.veh-pag-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.veh-pag-btn:hover:not(:disabled) { background: #f9fafb; }
.vehiculo-ficha-gal {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: #f3f4f6;
  -webkit-overflow-scrolling: touch;
}
.vehiculo-ficha-gal img {
  height: 120px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  cursor: zoom-in;
}
/* Ampliar foto ficha vehículo (#vehiculoImageZoom) — sin librerías */
#vehiculoImageZoom.vehiculo-img-zoom {
  display: none;
  position: fixed;
  z-index: 10050;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 48px 16px 20px;
  background: rgba(0, 0, 0, 0.8);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#vehiculoImageZoom.vehiculo-img-zoom.vehiculo-img-zoom--open {
  display: flex;
}
.vehiculo-img-zoom-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.vehiculo-img-zoom-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.vehiculo-img-zoom-x:hover {
  background: rgba(0, 0, 0, 0.75);
}
.vehiculo-img-zoom-frame {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  padding: 0;
}
.vehiculo-img-zoom-img {
  max-width: min(100%, 100vw - 32px);
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}
.vehiculo-img-zoom-img:hover {
  cursor: default;
}
.vehiculo-ficha-specs { padding: 14px 16px 20px; }
.vehiculo-ficha-title { font-size: 1.15rem; font-weight: 800; color: #111827; margin: 0 0 8px; line-height: 1.25; }
.vehiculo-ficha-price-big { font-size: 1.35rem; font-weight: 800; color: #059669; margin: 0 0 12px; }
.vehiculo-spec-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
}
.vehiculo-spec-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f3f4f6; padding-bottom: 6px; }
.vehiculo-spec-list li span { color: #6b7280; font-weight: 600; }
.vehiculo-ficha-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #374151;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.vehiculo-btn-negocio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 16px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #6B21A8;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.vehiculo-btn-negocio:hover { filter: brightness(1.05); }

.vehiculos-sin-resultados {
  padding: 20px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  max-width: 520px;
  margin: 0 auto;
}
.vehiculos-seccion .vehiculos-listado .vehiculos-sin-resultados {
  max-width: none;
  margin: 12px 0 0;
  padding: 28px 22px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(165deg, #fafafa 0%, #f3f4f6 100%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  text-align: center;
}
.vehiculos-seccion .vehiculos-listado .vehiculos-sin-resultados-titulo {
  margin-bottom: 8px;
}
.vehiculos-sin-resultados-titulo {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 10px;
}
.vehiculos-sin-resultados-hint {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 12px 0 0;
}
.vehiculos-lista-meta:empty { display: none; }

/* ===== Modal añadir vehículo (admin / negocio) ===== */
#modalAddVehiculo.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10050;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px 12px;
}
#modalAddVehiculo.modal.activo {
  display: block;
}
.modal-add-vehiculo-content {
  background: #fff;
  margin: 20px auto;
  padding: 20px 18px 22px;
  width: 92%;
  max-width: 900px;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  position: relative;
  box-sizing: border-box;
}
#modalAddVehiculo .modal-content {
  max-width: 900px;
  width: 96%;
}
.modal-add-vehiculo-form .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.modal-add-vehiculo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: start;
}
.modal-add-vehiculo-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.modal-veh-fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px 14px;
  margin: 0;
  background: #fafafa;
}
.modal-veh-legend {
  font-weight: 700;
  font-size: 0.8rem;
  color: #374151;
  padding: 0 6px;
}
.modal-veh-fieldset .admin-label {
  margin-top: 10px;
}
.modal-veh-fieldset .admin-label:first-of-type {
  margin-top: 4px;
}
.modal-veh-fotos-hint {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0 0 8px;
  line-height: 1.35;
}
.modal-veh-file-input {
  padding: 8px;
  font-size: 0.85rem;
}
.modal-veh-fotos-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: #4b5563;
  max-height: 120px;
  overflow-y: auto;
}
.modal-veh-fotos-list li {
  padding: 2px 0;
  word-break: break-all;
}
.modal-add-vehiculo-actions {
  margin-top: 18px;
  padding-top: 4px;
  border-top: 1px solid #eee;
}
@media (max-width: 720px) {
  .modal-add-vehiculo-grid {
    grid-template-columns: 1fr;
  }
}
.modal-add-vehiculo-cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
}
.modal-add-vehiculo-cerrar:hover {
  background: #e5e7eb;
}
.modal-add-vehiculo-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 32px 14px 0;
  color: #111827;
}
.modal-add-vehiculo-error {
  font-size: 0.82rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 12px;
}
.modal-add-vehiculo-submit {
  margin-top: 0;
  width: 100%;
}

/* Panel admin / negocio — listado vehículos propios */
.admin-veh-mios-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}
.admin-veh-mios-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
}
.admin-veh-mios-hint {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.4;
}
.admin-veh-mios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px;
}
.admin-veh-mios-loading,
.admin-veh-mios-empty {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
  padding: 8px 0;
}
.admin-veh-mios-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}
.admin-veh-mios-card-img {
  aspect-ratio: 4/3;
  background: #e5e7eb;
  overflow: hidden;
}
.admin-veh-mios-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-veh-mios-card-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #9ca3af;
  min-height: 72px;
}
.admin-veh-mios-card-body {
  padding: 8px 8px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-veh-mios-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #92400e;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}
.admin-veh-mios-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-veh-mios-card-meta {
  font-size: 0.72rem;
  color: #6b7280;
}
.admin-veh-mios-card-neg {
  font-size: 0.7rem;
  color: #9ca3af;
}
.admin-veh-mios-edit-btn {
  margin-top: 6px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: #0f3460;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-veh-mios-edit-btn:hover {
  background: #16213e;
}

/* Fotos existentes en modal vehículo */
.veh-fotos-existentes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.veh-foto-ex-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.veh-foto-ex-thumb {
  aspect-ratio: 4/3;
  background: #f3f4f6;
}
.veh-foto-ex-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.veh-foto-ex-actions {
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.veh-foto-ex-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 4px;
}
.veh-foto-ex-del {
  font-size: 0.72rem;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: #fee2e2;
  color: #991b1b;
  cursor: pointer;
  font-weight: 600;
}
.veh-foto-ex-del:hover {
  background: #fecaca;
}

/* Pantalla dedicada: gestión de vehículos */
.veh-gestion-page {
  background: #f9fafb;
  min-height: 60vh;
}
.veh-gestion-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 14px 40px;
  box-sizing: border-box;
}
.veh-gestion-topbar {
  margin-bottom: 8px;
}
.veh-gestion-header {
  margin-bottom: 18px;
}
.veh-gestion-h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
}
.veh-gestion-lead {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.45;
  margin: 0;
}
.veh-gestion-msg {
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.veh-gestion-msg--warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}
.veh-gestion-toolbar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.veh-gestion-search {
  width: 100%;
}
.veh-gestion-input-search {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
}
.veh-gestion-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}
.veh-gestion-filter {
  min-width: 140px;
  flex: 1 1 140px;
}
.veh-gestion-filter--negocio {
  flex: 2 1 220px;
  max-width: 360px;
}
.veh-gestion-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}
.veh-gestion-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.veh-gestion-meta {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0 0 10px;
}
.admin-veh-mios-grid--page {
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.admin-veh-mios-estado-pub {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #1e40af;
  background: #dbeafe;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.admin-veh-mios-inactivo {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
}
.veh-gestion-paginacion {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.veh-gestion-pag-info {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0 0 10px;
}
.veh-gestion-pag-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.veh-gestion-pag-btn {
  min-width: 120px;
}
html.utrera-vp-vehiculos {
  overflow-x: visible;
}
html.utrera-vp-vehiculos body {
  overflow-x: visible;
}
html.utrera-vp-vehiculos .main {
  overflow-x: visible;
}
/* ===== VEHICULOS - AUDIT FRONT v2 2026-04-22 (overrides) ===== */

.vehiculos-seccion .vehiculos-page-wrap {
  max-width: none;
  margin: 0;
  padding: 0 8px 28px 0;
}
.vehiculos-seccion .vehiculos-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-left: 0;
  padding-left: 0;
}

.vehiculos-cabecera {
  margin: 4px 0 14px 0;
  padding: 0;
}
.vehiculos-cabecera-h1 {
  margin: 0;
  padding: 0;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  color: #111827;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.vehiculos-cabecera-sub {
  margin: 6px 0 0 0;
  padding: 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehiculos-seccion .vehiculos-filtros {
  position: sticky;
  top: 14px;
  width: 240px;
  flex-shrink: 0;
  margin-left: 0;
}
.vehiculos-seccion .vehiculos-filtros-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
}
.vehiculos-seccion .vehiculos-filtros-card-head {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}
.vehiculos-seccion .vehiculos-filtros-titulo {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vehiculos-seccion .vehiculos-filtros-card-body {
  padding: 10px 12px 12px;
  overflow-y: auto;
}
.vehiculos-seccion .vehiculos-filtros .vehiculos-filtros-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.vehiculos-seccion .vehiculos-filtros .veh-filter-label {
  font-size: 0;
  gap: 0;
  color: transparent;
}
.vehiculos-seccion .vehiculos-filtros .veh-filter-label .veh-filter-select,
.vehiculos-seccion .vehiculos-filtros .veh-filter-label select,
.vehiculos-seccion .vehiculos-filtros .veh-filter-label input {
  font-size: 0.85rem;
  color: #374151;
}
.vehiculos-seccion .vehiculos-filtros .veh-filter-label select,
.vehiculos-seccion .vehiculos-filtros .veh-filter-label input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.02);
}
.vehiculos-seccion .vehiculos-filtros .veh-filter-label select:focus,
.vehiculos-seccion .vehiculos-filtros .veh-filter-label input:focus {
  outline: none;
  border-color: #6b7280;
  box-shadow: 0 0 0 2px rgba(107,114,128,0.15);
}

.vehiculos-seccion .vehiculos-filtros .veh-filter-rango {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.vehiculos-seccion .vehiculos-filtros .veh-filter-rango-title {
  width: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin: 0;
}
.vehiculos-seccion .vehiculos-filtros .veh-filter-rango .admin-input {
  flex: 1;
  min-width: 80px;
  font-size: 0.82rem;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

.vehiculos-seccion .vehiculos-filtros .vehiculos-filtros-acciones {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
}
.vehiculos-btn-limpiar {
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.vehiculos-btn-limpiar:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.vehiculos-seccion .vehiculos-listado.vehiculos-listado-wrap {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.vehiculos-seccion .vehiculos-listado .vehiculos-lista-meta {
  margin: 0 0 10px 0;
  font-size: 0.82rem;
  color: #6b7280;
}

.vehiculo-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s, border-color 0.15s;
}
.vehiculo-card:hover {
  box-shadow: 0 4px 14px rgba(15,23,42,0.08);
  transform: translateY(-1px);
  border-color: #d1d5db;
}
.vehiculo-card:focus { outline: 2px solid #9ca3af; outline-offset: 2px; }
.vehiculo-card-img { background: #f3f4f6; }
.vehiculo-card-body { padding: 10px 12px 12px; }
.vehiculo-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  margin: 0 0 4px;
}
.vehiculo-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 4px;
}
.vehiculo-card-meta {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0 0 4px;
}
.vehiculo-card-neg {
  font-size: 0.76rem;
  color: #6b7280;
  font-weight: 600;
  margin: 0;
}
.vehiculo-badge {
  background: #4b5563;
  color: #fff;
}
.btn-filtros-movil {
  background: #4b5563;
  border-color: #4b5563;
}

@media (max-width: 768px) {
  .vehiculos-seccion .vehiculos-layout { display: block; }
  .vehiculos-seccion .vehiculos-filtros { display: none; }
  .vehiculos-cabecera-h1 { font-size: 1.5rem; }
  .vehiculos-cabecera-sub { white-space: normal; }
}

/* ===== VEHICULOS - SEO 2026-04-22 ===== */
.vehiculos-cabecera-h2 {
  margin: 6px 0 0 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #4b5563;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.vehiculos-seo-pie {
  margin: 28px 0 0 0;
  padding: 18px 18px 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.vehiculos-seo-pie-h2 {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.01em;
}
.vehiculos-seo-pie-texto {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #374151;
}
.vehiculos-seo-pie-texto strong { color: #111827; font-weight: 700; }
.seo-enlaces-internos-titulo {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 6px;
}
@media (max-width: 768px) {
  .vehiculos-cabecera-h2 { font-size: 0.9rem; }
}
/* === VEHICULOS - Submenu lateral + pagina formulario 2026-04-22 === */
.submenu-vehiculos { list-style:none; margin:4px 0 6px 28px; padding:0; display:flex; flex-direction:column; gap:2px; }
.submenu-vehiculos li { margin:0; }
.submenu-vehiculos a { display:block; padding:6px 10px; color:#374151; text-decoration:none; font-size:14px; border-radius:6px; }
.submenu-vehiculos a:hover { background:#f3f4f6; color:#111827; }
#vehiculos-form .veh-form-inner { max-width:1180px; margin:0 auto; padding:18px 20px 60px; }
#vehiculos-form .veh-form-header { margin-bottom:18px; }
#vehiculos-form .veh-form-h1 { font-size:24px; margin:0 0 6px; color:#111827; }
#vehiculos-form .veh-form-lead { margin:0; color:#4b5563; font-size:14px; }
#vehiculos-form .veh-form-msg { padding:12px 14px; border-radius:8px; margin-bottom:14px; font-size:14px; }
#vehiculos-form .veh-form-msg--warn { background:#fef3c7; color:#92400e; border:1px solid #fde68a; }
#vehiculos-form .veh-form-link { color:#1d4ed8; text-decoration:underline; }
#vehiculos-form .veh-form-host { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:18px; }
#vehiculos-form .veh-form-host .modal-content { box-shadow:none; max-width:none; margin:0; padding:0; background:transparent; position:static; transform:none; }
#vehiculos-form .veh-form-host .modal-add-vehiculo-cerrar { display:none !important; }
#vehiculos-form .veh-form-host .modal-add-vehiculo-titulo { display:none; }
#vehiculos-form .veh-form-actions-foot { margin-top:14px; display:flex; justify-content:flex-start; gap:10px; }

/* ===== MODAL PRODUCTO: layout dos columnas desktop ===== */
#previewProducto {
    aspect-ratio: unset !important;
    overflow: hidden;
    min-height: 120px;
}
#previewProducto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@media (min-width: 768px) {
    .producto-layout {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    .producto-form {
        flex: 2;
    }
    .producto-imagen {
        flex: 1;
    }
    .producto-imagen #previewProducto {
        height: 220px;
    }
}