/* FUENTES PERSONALIZADAS SINERGIAVET */
:root {
--primary-dark: #1A4250;
--primary-orange: #DD6118;
--secondary-orange: #E4942A;
--accent-yellow: #FFBB47;
--light-bg: #FFF5EA;
--text-dark: #1f2937;
--text-light: #6b7280;
--white: #ffffff;
}



*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Muli', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


h1, h2, h3, .header-lab, .footer-logo, .header-info h1 {
font-family: 'Raleway', sans-serif !important;
}


/* BODY */
body {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-orange) 50%, var(--accent-yellow) 100%);
padding: 20px;
min-height: 100vh;
color: var(--text-dark);
}


/* CONTAINER */
.container {
max-width: 1400px;
margin: 0 auto;
background: var(--white);
border-radius: 20px;
box-shadow: 0 60px 60px var(--shadow);
overflow: hidden;
}


/* LOGO IMAGEN */
.logo {
display: flex;
align-items: center;
text-decoration: none;
}


.logo-img {
height: 120px;
width: 120px;
display: block;
transition: transform 0.3s ease;
border-radius: 8px;
box-shadow: 0 8px 25px rgba(26,66,80,0.2);
}


.logo-img:hover {
transform: scale(2.05);
}

/* Estilo general para el logo */
header img, .logo {
    max-width: 100%;    /* El logo nunca será más ancho que la pantalla */
    height: 100%;       /* Mantiene la proporción para que no se vea estirado */
    display: block;
    margin: 0 auto;     /* Lo centra horizontalmente */
}

/* Ajuste específico para celulares */
@media screen and (max-width: 600px) {
    header img, .logo {
        max-width: 80%; /* En celular, que ocupe el 80% del ancho para dejar margen */
        margin-top: 100px;
        margin-bottom: 10px;
    }
    
    /* Si el contenedor del logo tiene un fondo o padding excesivo, redúcelo */
    .header-container {
        padding: 10px;
    }
}

/* HEADER */
.header {
background: radial-gradient(circle at 20% 50%, rgba(26,66,80,0.3) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(221,97,24,0.3) 0%, transparent 50%);
color: var(--white);
padding: 35px 30px;
position: relative;
overflow: hidden;
}


.header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 20% 50%, rgba(26,66,80,0.3) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(221,97,24,0.3) 0%, transparent 50%);
z-index: 0;
}


.header-content {
display: flex;
align-items: center;
gap: 40px;
max-width: 1200px;
margin: 0 auto;
position: relative;
z-index: 1;
}


.header-info h1 {
font-size: 2.8em;
font-weight: 700;
margin: 0;
color: var(--primary-orange) !important; 
letter-spacing: -1px;
text-shadow: 0 2px 10px rgba(245, 9, 9, 0.3);
}


/* FILTROS */
.filtros {
padding: 30px;
background: var(--light-bg);
border-top: 4px solid var(--primary-dark);
display: flex;
gap: 20px;
align-items: center;
flex-wrap: wrap;
}


.filtro-group {
position: relative;
display: flex;
align-items: center;
min-width: 280px;
background: var(--white);
padding: 5px 15px;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(26,66,80,0.1);
}


.filtro-group > *:first-child {
margin-right: 12px;
font-size: 1.3em;
color: var(--primary-dark);
}


#buscador, #laboratorio {
flex: 1;
padding: 15px 20px;
border: 2px solid transparent;
border-radius: 10px;
font-size: 16px;
background: transparent;
font-weight: 500;
}


#buscador:focus, #laboratorio:focus {
border-color: var(--primary-orange);
outline: none;
box-shadow: 0 0 0 3px rgba(221,97,24,0.15);
}


#resultadoCount {
margin-left: auto;
font-weight: 600;
color: var(--primary-dark);
background: var(--accent-yellow);
padding: 8px 16px;
border-radius: 20px;
}


/* TABLAS */
.tablas-container {
padding: 30px;
max-height: 70vh;
overflow-y: auto;
}


.tabla-laboratorio {
margin-bottom: 30px;
border: 3px solid var(--light-bg);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 15px 40px rgba(26,66,80,0.15);
}


.header-lab {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-orange) 100%);
color: var(--white);
padding: 22px 28px;
font-size: 1.4em;
font-weight: 700;
box-shadow: 0 4px 15px rgba(26,66,80,0.3);
}


.header-lab .count {
font-size: 0.95em;
opacity: 0.95;
margin-left: 12px;
background: rgba(255,255,255,0.2);
padding: 4px 10px;
border-radius: 15px;
}
/* 1. ESTRUCTURA BASE - Limpia y fija */
.tabla-precios {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; 
    background-color: white;
    margin-bottom: 30px;
}

/* --- SECCIÓN DE COLUMNAS CORREGIDA --- */

/* 1. Aseguramos que la celda de acción no sea un gigante de 56% */
.tabla-precios th:nth-child(6), 
.tabla-precios td:nth-child(6) { 
    width: 15%;            /* Un ancho razonable */
    text-align: center !important; 
    padding: 10px;
}

/* 2. Redistribuimos el resto para que nada se encime */
.tabla-precios th:nth-child(1), .tabla-precios td:nth-child(1) { width: 15%; text-align: left; }   /* Lab */
.tabla-precios th:nth-child(2), .tabla-precios td:nth-child(2) { width: 15%; text-align: left; }   /* Producto */
.tabla-precios th:nth-child(3), .tabla-precios td:nth-child(3) { width: 10%; text-align: center; } /* Unidad */
.tabla-precios th:nth-child(4), .tabla-precios td:nth-child(4) { width: 12%; text-align: center; } /* Público */
.tabla-precios th:nth-child(5), .tabla-precios td:nth-child(5) { width: 13%; text-align: center; } /* MVZ */
/* Esto obliga a la sexta columna a centrar todo lo que tenga dentro */
.tabla-precios td:nth-child(6) {
    width: 16% !important;
    text-align: center !important;
    vertical-align: middle !important;
    display: table-cell !important; /* Evita que el modo móvil lo rompa en PC */
}
.copiar-btn {
    /* 1. Cambiamos a flex para que el texto e icono interno se centren */
    display: inline-flex !important; 
    align-items: center;
    justify-content: center;
    
    /* 2. Forzamos el centrado respecto a la celda */
    margin: 0 auto !important; 
    
    /* 3. Estética */
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    min-width: 120px;
}

/* 5. FIX PARA MÓVIL (Para que no se rompa el centrado) */
@media screen and (max-width: 600px) {
    .tabla-precios td:last-child {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .copiar-btn {
        width: 20%; /* Más ancho en celular para que sea fácil picarle */
    }
}


/* Efecto hover en la fila */
.tabla-precios tr:hover {
    background-color: #fffbeb;
}

/* FOOTER */
.footer {
background: var(--primary-dark);
color: var(--white);
padding: 25px 30px;
}


.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
flex-wrap: wrap;
gap: 20px;
}


.footer-logo img {
height: 45px;
filter: brightness(0) invert(1);
}


/* SCROLLBAR */
.tablas-container::-webkit-scrollbar {
width: 10px;
}


.tablas-container::-webkit-scrollbar-track {
background: var(--light-bg);
border-radius: 10px;
}


.tablas-container::-webkit-scrollbar-thumb {
background: linear-gradient(var(--primary-orange), var(--secondary-orange));
border-radius: 10px;
}

/* Ajuste general para el logo */
.logo-img {
  width: 80px;         /* Cambia este número (ej. 100px o 120px) hasta que tenga el tamaño que buscas */
  height: auto;        /* Mantiene la proporción para que no se estire feo */
  object-fit: contain; /* Asegura que la imagen se acomode bien en su espacio */
  display: inline-block;
  vertical-align: middle;
}

/* Si quieres que solo en pantallas de celular sea más grande */
@media (max-width: 480px) {
  .logo-img {
    width: 110px;      /* Tamaño asignado exclusivamente para pantallas de celulares */
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
.header-content { flex-direction: column; gap: 25px; text-align: center; }
.header-info h1 { font-size: 2.2em; }
.filtros { flex-direction: column; align-items: stretch; }
.filtro-group { min-width: auto; margin-bottom: 15px; }
.tabla-precios th, .tabla-precios td { padding: 14px 10px; font-size: 14px; }
}
/* HEADER VERTICAL - LOGO + TÍTULO DEBAJO */
.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    width: 100%;
}

.logo-img {
    height: 150px; /* Más grande */
    width: auto;
    transition: transform 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.logo-img:hover {
    transform: scale(2.05);
}

.header-info h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    color: var(--white) !important;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(26,66,80,0.6);
    max-width: 600px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .logo-section {
        gap: 15px;
    }
    
    .logo-img {
        height: 70px;
    }
    
    .header-info h1 {
        font-size: 1.8em;
        padding: 0 20px;
    }
}

/* FILTROS TOTALMENTE VERTICALES - SELECT SIEMPRE DEBAJO */
.filtros {
    flex-direction: column !important; /* ← FORZAR VERTICAL */
    align-items: stretch !important;
    gap: 18px !important;
}

.filtros .filtro-group {
    min-width: 100% !important; /* ← ANCHO COMPLETO */
    max-width: none !important;
}

#resultadoCount {
    margin-left: 0 !important; /* ← QUITAR MARGIN */
    order: 3; /* ← ABAJO DEL TODO */
    text-align: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-yellow), var(--secondary-orange));
    color: var(--primary-dark) !important;
    border-radius: 25px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 8px 25px rgba(255,187,71,0.4);
}

/* RESPONSIVE - SIEMPRE VERTICAL */
@media (min-width: 320px) and (max-width: 2000px) {
    .filtros {
        flex-direction: column !important;
    }
}
/* 1. Permitir desplazamiento lateral en tablas si son muy anchas */
.tabla-laboratorio {
    width: 100%;
    overflow-x: auto; /* Crea una barra de desplazamiento horizontal si es necesario */
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

/* 2. Ajustar el tamaño de fuente en móviles */
@media (max-width: 600px) {
    body {
        font-size: 14px; /* Texto un poco más pequeño para que quepa más */
    }

    .tabla-precios th, .tabla-precios td {
        padding: 8px 4px; /* Reducir espacio interno de las celdas */
    }

    /* Ocultar columnas menos importantes si el espacio es crítico (opcional) */
    .codigo {
        display: none; /* Oculta el código en celulares para dar espacio al nombre y precio */
    }
}

.filtro-group input {
    width: 100%;
    box-sizing: border-box; /* Evita que el padding agrande el input más allá del 100% */
    padding: 12px;
    margin-bottom: 10px;
}

@media screen and (max-width: 600px) {

    .tabla-precios thead {
        display: none !important;
    }
    /* 1. Reset de la fila para que se comporte como tarjeta */
    .tabla-precios tr {
        display: block !important;
        margin-bottom: 20px;
        padding: 10px;
        border: 1px solid #eee;
        border-radius: 12px;
        background: #fff;
    }

    /* 2. Forzar separación extrema entre Título y Valor */
    .tabla-precios td {
        display: flex !important;
        flex-direction: row !important; /* Asegura que estén en línea */
        justify-content: space-between !important; /* Empuja a los extremos */
        align-items: center !important;
        width: 100% !important;
        padding: 12px 5px !important;
        text-align: right !important;
        box-sizing: border-box;
    }

    /* 3. Estilo del Título (izquierda) */
    .tabla-precios td::before {
        content: attr(data-label);
        font-weight: 800 !important;
        color: #374151 !important;
        text-align: left !important;
        margin-right: 20px; /* Espacio mínimo de seguridad */
        flex-shrink: 0; /* Que el título no se achique */
    }

    /* 4. Ajuste del Botón al final de la tarjeta */
    .tabla-precios td:last-child {
        justify-content: center !important; /* Centra solo el botón */
        border-top: 1px solid #f3f4f6;
        margin-top: 10px;
        padding-top: 15px !important;
    }

    .copiar-btn {
        width: 100% !important;
        max-width: none !important;
    }
}