/* =========================================
   ESTILOS RINO PERNO - DARK INDUSTRIAL 
   ========================================= */

/* 1. Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)), 
                url('../img/fondo/fondo-2.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: #121212; 
    overflow-x: hidden;
}

h1, h2, h3, h4, .menu-principal a {
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Cabecera */
.cabecera-principal {
    background-color: #000000;
    padding: 15px 0;
    border-bottom: 3px solid #e65c2e;
}

.cabecera-principal .contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 75px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.contacto-cabecera {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
}

.item-contacto {
    display: flex;
    flex-direction: column;
    text-align: right; 
}

.item-contacto small {
    color: #e65c2e;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.item-contacto a {
    text-decoration: none;
    color: #cccccc;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.item-contacto a:hover {
    color: #ecd609;
    transform: translateX(-5px);
}

/* 3. Navegación e Interactividad */
.barra-navegacion {
    background-color: #000000;
    border-bottom: 1px solid #222;
}

.menu-principal {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.menu-principal a {
    font-family: 'Montserrat', sans-serif;
    padding: 15px 25px;
    color: #fa590e;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.menu-principal a:hover, 
.menu-principal a.activo { 
    color: #ecd609; 
    background-color: #1a1a1a; 
}

.barra-interactiva {
    background-color: #e65c2e;
    padding: 10px 0;
}

.barra-interactiva .contenedor {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.buscador form {
    display: flex;
    background: white;
    padding: 2px;
    border-radius: 4px;
}

.buscador input {
    border: none;
    padding: 8px 15px;
    width: 250px;
    outline: none;
    font-size: 13px;
}

.buscador button { 
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0 15px; 
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s;
}

.buscador button:hover {
    background-color: #ecd609;
    color: #000;
}

.carrito-resumen {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #000;
    font-weight: bold;
    white-space: nowrap;
}

.carrito-resumen a { 
    background: #000;
    color: #fff;
    padding: 6px 12px;
    text-decoration: none; 
    border-radius: 4px;
    font-size: 12px;
    transition: 0.3s;
}

.carrito-resumen a:hover {
    background: #ecd609;
    color: #000;
}

/* 4. Hero */
.hero-industrial {
    padding: 5px 0;
    text-align: left;
}

.contenido-hero {
    animation: entradaHero 1.2s ease-out;
}

.etiqueta-seo {
    color: #e65c2e;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-size: 14px;
    display: block;
    text-transform: uppercase;
}

.contenido-hero h2 {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 10px;
    color: #fff;
}

.contenido-hero p {
    font-size: 18px;
    color: #d1d1d1;
    max-width: 650px;
    line-height: 1.5;
}

.contenido-hero strong {
    color: #e65c2e;
}

@keyframes entradaHero {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. Cuerpo y Sidebar */
.flex-cuerpo {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 10px 0;
}

.sidebar {
    width: 260px;
    background: #1e1e1e;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    height: auto;
    border: 1px solid #333;
    animation: aparecerIzquierda 1s ease-out;
}

.sidebar .titulo-seccion {
    background: #e65c2e;
    color: #fff;
    padding: 15px;
    font-size: 18px;
    margin: 0;
}

.lista-categorias {
    list-style: none;
}

.lista-categorias li a { 
    display: block;
    padding: 12px 15px;
    color: #ccc;
    text-decoration: none; 
    border-bottom: 1px solid #333;
    transition: 0.3s;
    text-align: left; 
}

.lista-categorias li a:hover {
    background: #2a2a2a;
    color: #e65c2e;
    padding-left: 25px;
}

/* Rejilla de Productos */
.productos {
    flex-grow: 1;
    animation: aparecerDerecha 1s ease-out;
}

.productos .titulo-seccion {
    border-left: 5px solid #e65c2e;
    padding-left: 15px;
    margin-bottom: 5px;
    color: #fff;
}

.rejilla-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.tarjeta-producto {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 8px;
    transition: 0.3s;
}


/* --- EFECTO ZOOM EN PRODUCTOS (OPTIMIZADO) --- */

/* 1. Contenedor de la imagen */
.tarjeta-producto .imagen-contenedor {
    width: 100%;
    height: 180px; 
    overflow: hidden; 
    border-radius: 4px;
    margin-bottom: 10px;
    background: #ffffff; /* Fondo blanco para que el producto resalte */
}

/* 2. La imagen con ajuste técnico */
.tarjeta-producto img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Muestra el producto completo sin cortes */
    padding: 10px; /* Pequeño aire para que no toque los bordes del fondo blanco */
    transition: transform 0.5s ease; 
}

/* 3. El efecto al pasar el mouse */
.tarjeta-producto:hover img {
    transform: scale(1.1); /* Zoom elegante sin perder calidad */
}



.tarjeta-producto:hover {
    border-color: #e65c2e;
    transform: translateY(-5px);
}

.btn-agregar { 
    background: #e65c2e;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%; 
    cursor: pointer;
    font-family: 'Oswald';
    margin-top: 10px;
    border-radius: 4px;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-agregar:hover {
    background: #fff;
    color: #e65c2e;
    border: 1px solid #e65c2e;
}

@keyframes aparecerIzquierda {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes aparecerDerecha {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Diferenciadores */
.diferenciadores {
    background: transparent;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #333;
}
.grid-diferenciadores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}
.bloque-dif i {
    font-size: 35px;
    color: #e65c2e;
    margin-bottom: 15px;
}
.bloque-dif h4 {
    font-size: 18px;
    margin-bottom: 5px;
}
.bloque-dif p {
    font-size: 14px;
    color: #aaa;
}

/* Logos Marcas */
.logos-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
}

.logos-flex img {
    height: 40px;
    transition: transform 0.3s;
    filter: none;
    opacity: 1;
}

.logos-flex img:hover {
    transform: scale(1.3);
    filter: drop-shadow(0px 10px 15px rgba(230, 92, 46, 0.4));
    cursor: pointer;
}

/* --- Carrusel Infinito --- */
.slider-container {
    width: 100%;
    overflow: hidden; 
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.slider-track {
    display: flex;
    width: calc(210px * 12); 
    animation: scroll-infinito 30s linear infinite;
}

.slide {
    width: 210px; 
    padding: 10px 0;
    text-align: center;
    flex-shrink: 0;
}

.slide img {
    width: 100%;
    height: 300px;
    object-fit: cover; 
    clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
    outline: 2px solid #e65c2e; 
    outline-offset: -2px;
    transition: transform 0.3s;
}

.slide p {
    margin-top: 10px;
    font-family: 'Oswald', sans-serif;
    color: #fff;
    font-size: 14px;
}

.slide:hover img {
    transform: scale(1.05);
    outline-color: #ecd609;
}

@keyframes scroll-infinito {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-210px * 6)); } 
}

/* 6. Pie de Página */
.pie-pagina {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../img/fondo/footer-2.jpg') no-repeat center center;
    background-size: cover;
    border-top: 4px solid #e65c2e;
    padding: 60px 0 0 0;
    margin-top: 50px;
    clear: both;
}

.grid-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-descripcion p {
    font-size: 15px;
    line-height: 1.4;
    color: #cccccc;
    text-align: justify;
    margin-bottom: 18px;
}

.footer-descripcion strong { color: #e65c2e; font-weight: bold; }

.redes-sociales {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.redes-sociales a i {
    font-size: 28px;
    color: #e65c2e;
    transition: transform 0.3s, color 0.3s;
}

.redes-sociales a i:hover {
    color: #fff;
    transform: scale(1.2);
}

.footer-col h3 {
    border-left: 4px solid #e65c2e;
    padding-left: 15px;
    margin-bottom: 25px;
}

.footer-col ul li a {
    color: #d1a71e;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 10px;
}

.sectores-seo {
    color: #e65c2e;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.mapa-seo {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    filter: grayscale(40%);
    transition: 0.5s;
}

.footer-col:hover .mapa-seo {
    filter: grayscale(0);
    border-color: #e65c2e;
    box-shadow: 0 0 25px rgba(230, 92, 46, 0.4);
}

/* =========================================
   7. MEDIA QUERIES (CONFIGURACIÓN FINAL)
   ========================================= */

/* Tablets y Laptops */
@media (max-width: 992px) {
    .flex-cuerpo {
        flex-direction: column;
    }
    .sidebar {
        width: fit-content; 
        min-width: 200px; 
        margin-bottom: 30px;
    }
    .grid-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-descripcion p {
        text-align: center;
    }
}

/* Celular Horizontal (Landscape) - FORZAR 3 COLUMNAS */
@media (min-width: 601px) and (max-width: 1024px) {
    .rejilla-productos {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px;
    }
    .tarjeta-producto h3 {
        font-size: 14px;
    }
}

/* Celular Vertical (Portrait) - FORZAR 2 COLUMNAS */
@media (max-width: 600px) {
    .cabecera-principal .contenedor {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    .logo img { height: 45px; }
    .contacto-cabecera { gap: 10px; }
    .item-contacto small { font-size: 8px; }
    .item-contacto a { font-size: 13px; }

    .rejilla-productos {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .tarjeta-producto { padding: 10px; }
    .tarjeta-producto h3 { font-size: 13px; }
    .btn-agregar { font-size: 11px; }

    .grid-diferenciadores {
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 10px;
    }
    .bloque-dif i { font-size: 25px; }
    .bloque-dif h4 { font-size: 11px; }
    .bloque-dif p { display: none; }
}

/* =========================================
   ESTILOS DE FICHA TÉCNICA (DETALLE.PHP)
   ========================================= */

/* Estructura de dos columnas */
.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 40px;
    padding: 30px 0;
    align-items: start;
}

.detalle-imagen {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #333;
}
.detalle-imagen img {
    width: 100%;
    height: auto;
    display: block;
}

.detalle-info h1 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 15px;
    border-bottom: 2px solid #e65c2e;
    padding-bottom: 10px;
}

.etiqueta-cat {
    color: #e65c2e;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
}

.descripcion-producto p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 10px;
}

.titulo-tabla {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #ecd609; 
    font-size: 20px;
    border-left: 4px solid #e65c2e;
    padding-left: 10px;
}

.tabla-responsive {
    overflow-x: auto;
}

.tabla-tecnica {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    font-size: 15px;
}

.tabla-tecnica th {
    background: #000;
    color: #e65c2e;
    padding: 12px;
    text-align: left;
    text-transform: uppercase;
    font-size: 13px;
    border-bottom: 2px solid #333;
}

.tabla-tecnica td {
    padding: 12px;
    border-bottom: 1px solid #333;
    color: #ddd;
}

.tabla-tecnica tr:nth-child(even) {
    background-color: #252525;
}

.tabla-tecnica tr:hover {
    background-color: #333;
}

.badge-stock {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}
.badge-stock.in { background: rgba(37, 211, 102, 0.2); color: #25d366; }
.badge-stock.out { background: rgba(230, 92, 46, 0.2); color: #e65c2e; }

.btn-tabla-ws {
    display: inline-block;
    background: #25d366;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: 0.3s;
}
.btn-tabla-ws:hover {
    background: #fff;
    color: #25d366;
}

@media (max-width: 768px) {
    .detalle-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .detalle-info h1 { font-size: 28px; }
}

/* --- TABLA DE PRODUCTOS (CARRITO/ADICIÓN) --- */
.input-n {
    width: 65px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.btn-añadir-tabla {
    background-color: #bdc3c7; 
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8em;
}

.btn-añadir-tabla.añadido {
    background-color: #27ae60 !important;
    color: #fff !important;
}

/* CONTACTO Y OTROS */
.btn-whatsapp-grande {
    width: 100%;
    background-color: #25d366;
    color: white;
    padding: 18px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}

.btn-whatsapp-grande:hover {
    background-color: #128c7e;
}

.rejilla-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.tarjeta-producto {
    display: flex;
    flex-direction: column;
    background: #1e1e1e; 
    border: 1px solid #333;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
    height: 100%;
}



/*carrito de compras*/

    .error-texto { color: #e65c2e; font-size: 12px; font-weight: bold; display: block; margin-top: 5px; }
    .tabla-tecnica td { vertical-align: middle; }
    .btn-borrar { color: #cc0000; font-size: 1.2rem; transition: transform 0.2s; }
    .btn-borrar:hover { transform: scale(1.2); }

    /* Forzamos que las filas NO cambien de color */
    .tabla-tecnica tbody tr:hover {
        background-color: transparent !important;
        color: inherit !important;
    }
    
    /* Estilo para el título resaltado */
    .titulo-cotizacion {
        font-family: 'Oswald', sans-serif;
        color: #ecd609 !important; /* Amarillo Rino */
        text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
        margin: 0;
    }
