* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header con logo a la izquierda */
.header {
    margin-bottom: 30px;
}

.header-contenido {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.header-logo {
    width: auto;
    height: 71px;
    display: block;
    flex-shrink: 0;
}

.header-texto {
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.header-texto h1 {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.8rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.header-texto p {
    color: #5f6368;
    font-size: 0.95rem;
}

/* Sección búsqueda */
.busqueda-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(26,115,232,0.1);
}

.busqueda-container {
    display: flex;
    gap: 12px;
}

.input-icon {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon svg {
    position: absolute;
    left: 16px;
    pointer-events: none;
    z-index: 1;
}

.input-icon #buscador {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-family: inherit;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.input-icon #buscador:focus {
    outline: none;
    border-color: #1a73e8;
    background: white;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
}

#btnBuscar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

#btnBuscar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26,115,232,0.4);
}

#btnBuscar:active {
    transform: translateY(0);
}

.contador-base {
    text-align: right;
    font-size: 13px;
    color: #5f6368;
    margin-top: 12px;
    font-weight: 500;
}

.contador-base span {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
}

/* Filtros */
.filtros-section {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filtro-grupo {
    flex: 1;
    min-width: 160px;
}

.filtro-grupo label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filtro-grupo select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filtro-grupo select:hover {
    border-color: #1a73e8;
}

.filtro-grupo select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.limpiar-container {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.btn-limpiar {
    padding: 10px 24px;
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-limpiar:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
}

.btn-limpiar:hover svg {
    stroke: #1a73e8;
}

.contador {
    margin: 15px 0 20px 0;
    font-size: 14px;
    color: #5f6368;
    text-align: right;
    font-weight: 500;
}

/* Tarjetas */
.resultados {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tarjeta {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.tarjeta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.marca-tarjeta {
    color: #1a73e8;
    font-size: 1.2rem;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eaed;
    font-weight: 600;
}

.tabla-interna {
    width: 100%;
    margin-bottom: 12px;
}

.fila-tabla {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}

.fila-tabla:last-child {
    border-bottom: none;
}

.celda {
    font-size: 14px;
}

.celda.etiqueta {
    color: #5f6368;
    font-weight: 500;
    width: 100px;
}

.celda.valor {
    color: #202124;
    text-align: right;
    flex: 1;
}

.precio-destacado {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cobertura-tag {
    background: #e8f0fe;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1a73e8;
    display: inline-block;
}

.laboratorio-tarjeta {
    font-size: 12px;
    color: #5f6368;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #e8eaed;
    text-align: right;
}

.mensaje-inicial {
    text-align: center;
    color: #5f6368;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    font-size: 1rem;
    border: 2px dashed #e0e0e0;
}

.mensaje-inicial svg {
    margin-bottom: 16px;
}

/* Skeleton Loader */
.skeleton-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
    height: 28px;
    width: 60%;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    margin-bottom: 16px;
    animation: shimmer 1.5s infinite;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 12px;
    animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 24px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e8eaed;
}

.footer-contenido {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-aviso {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #5f6368;
    text-align: left;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
}

.footer-aviso strong {
    color: #1a73e8;
    font-weight: 600;
}

.footer-actualizacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #5f6368;
    background: #e8f0fe;
    padding: 10px 16px;
    border-radius: 12px;
    margin: 8px 0;
}

.footer-actualizacion strong {
    color: #1a73e8;
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #5f6368;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1a73e8;
}

.footer-mis-proyectos {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.footer-mis-proyectos a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #f0f2f5;
    border-radius: 40px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.footer-mis-proyectos a:hover {
    background: #e8f0fe;
    transform: translateY(-2px);
}

.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: #9aa0a6;
    text-align: center;
}

/* Estilos para páginas legales (privacidad.html y terminos.html) */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.legal-container h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.legal-container h2 {
    color: #1a73e8;
    font-size: 1.3rem;
    margin: 28px 0 12px 0;
}

.legal-container p, .legal-container li {
    color: #5f6368;
    line-height: 1.6;
}

.legal-container ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.legal-container .fecha {
    color: #5f6368;
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e8eaed;
}

.legal-container .resumen {
    background: #e8f0fe;
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
    border-left: 4px solid #1a73e8;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Botón volver para páginas legales */
.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    text-decoration: none;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-volver:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26,115,232,0.4);
}

/* Responsive para páginas legales */
@media (max-width: 600px) {
    .legal-container {
        padding: 20px;
    }
}

/* Responsive general */
@media (max-width: 800px) {
    .header-texto {
        position: static;
        transform: none;
        white-space: normal;
    }
    
    .header-contenido {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }
    
    .header-logo {
        height: 50px;
    }
    
    .header-texto h1 {
        font-size: 1.3rem;
    }
    
    .header-texto p {
        font-size: 0.8rem;
    }
    
    .busqueda-section {
        padding: 16px;
    }
    
    .busqueda-container {
        flex-direction: column;
    }
    
    .input-icon #buscador {
        padding: 14px 14px 14px 44px;
    }
    
    #btnBuscar {
        padding: 14px;
        justify-content: center;
    }
    
    .filtros-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .filtro-grupo {
        min-width: 100%;
    }
    
    .limpiar-container {
        justify-content: stretch;
    }
    
    .btn-limpiar {
        width: 100%;
        justify-content: center;
    }
    
    .celda.etiqueta {
        width: 85px;
        font-size: 12px;
    }
    
    .celda.valor {
        font-size: 12px;
    }
    
    .precio-destacado {
        font-size: 1.1rem;
    }
    
    .marca-tarjeta {
        font-size: 1rem;
    }
    
    .tarjeta {
        padding: 14px;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .footer-aviso {
        font-size: 10px;
    }
    
    .footer-actualizacion {
        font-size: 10px;
    }
    
    .footer-mis-proyectos a {
        font-size: 11px;
        padding: 6px 16px;
    }
}
