﻿
/* ===============================
   AFC POWER EQUIPMENT
   ESTILOS GENERALES
================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --afc-fondo-claro: #eff2f5;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #111;
}

a {
    text-decoration: none;
}

/* ===============================
   MENÚ SUPERIOR
================================= */

.header {
    width: 100%;
    background: #111;
    min-height: 90px;
}

.contenedor-header {
    max-width: 1250px;
    margin: auto;
    padding: 0 20px;
    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* LOGO AFC */

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.logo-afc {
    color: #ed0016;
    font-size: 45px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
}

.logo-texto {
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* NAVEGACIÓN */

.menu {
    display: flex;
    align-items: center;
    height: 90px;
}

.menu a {
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 0 16px;
    height: 100%;

    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.menu a:hover {
    background: #cc0011;
}

.menu a.activo {
    background: #e60012;
}

/* BUSCADOR */

.buscador {
    display: flex;
    height: 43px;
    min-width: 220px;
}

.buscador input {
    width: 220px;
    padding: 12px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.buscador button {
    width: 50px;
    border: none;
    background: #ed0016;
    color: white;
    font-size: 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* CONTENIDO PRINCIPAL */

main {
    padding: 30px;
}

main h1 {
    margin-bottom: 10px;
}

/* ADAPTACIÓN A PANTALLAS PEQUEÑAS */

@media (max-width: 1000px) {

    .contenedor-header {
        flex-wrap: wrap;
        justify-content: center;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .menu {
        height: 55px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu a {
        padding: 10px;
    }
}

@media (max-width: 600px) {

    .menu {
        height: auto;
    }

    .buscador {
        width: 100%;
    }

    .buscador input {
        width: 100%;
    }
}

/* ===================================
   BANNER PRINCIPAL AFC
=================================== */

main {
    padding: 0;
}

.hero {
    width: 100%;
    min-height: 470px;
    display: flex;
    position: relative;
    overflow: hidden;
    background: #f4f4f4;
}

/* CONTENIDO IZQUIERDO */

.hero-contenido {
    width: 50%;
    padding: 65px 7%;
    position: relative;
    z-index: 2;
}

.hero-etiqueta {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 5px;
    color: #111;
}

.hero-linea {
    width: 65px;
    height: 5px;
    background: #ed0016;
    margin-top: 15px;
    margin-bottom: 22px;
}

/* TÍTULO PRINCIPAL */

.hero h1 {
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 900;
    font-style: italic;
    line-height: 0.98;
    letter-spacing: -2px;
    margin: 0 0 24px;
    color: #080808;
}

.hero h1 span {
    display: block;
    color: #d50012;
}

/* DESCRIPCIÓN */

.hero-descripcion {
    font-size: 21px;
    line-height: 1.35;
    max-width: 430px;
    margin-bottom: 30px;
}

/* BOTÓN ROJO */

.hero-boton {
    display: inline-flex;
    align-items: center;
    gap: 20px;

    padding: 16px 26px;
    background: linear-gradient(
        180deg, #ed0016, #bd0010
    );

    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
}

.hero-boton:hover {
    background: #99000d;
    transform: translateY(-3px);
}

/* SECCIÓN DERECHA: GENERADOR */

.hero-imagen {
    width: 50%;
    min-height: 470px;
    position: relative;

    background: linear-gradient(
        135deg, #35383d, #a9adb3
    );

    display: flex;
    align-items: center;
    justify-content: center;
}

/* FRANJA ROJA DIAGONAL */

.hero-imagen::before {
    content: "";
    position: absolute;
    left: -55px;
    top: 0;

    width: 65px;
    height: 100%;
    background: #e60012;

    transform: skewX(-25deg);
    z-index: 1;
}

/* TEXTO TEMPORAL DE IMAGEN */

.hero-placeholder {
    text-align: center;
    color: white;
    padding: 25px;
}

.hero-placeholder strong {
    font-size: 25px;
}

.hero-placeholder p {
    margin-top: 12px;
}

/* RESPONSIVE */

@media (max-width: 768px) {

    .hero {
        flex-direction: column;
    }

    .hero-contenido {
        width: 100%;
        padding: 50px 25px;
    }

    .hero-imagen {
        width: 100%;
        min-height: 300px;
    }

    .hero-imagen::before {
        display: none;
    }

    .hero-descripcion {
        font-size: 18px;
    }
}

/* ==================================
   IMAGEN REAL GENERADOR AFC10000
================================== */

.hero-imagen {
    background: linear-gradient(
        135deg,
        #e5e7ea,
        #b8bdc3
    );

    padding: 20px;
}

.hero-foto {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    max-height: 440px;
    object-fit: contain;

    position: relative;
    z-index: 2;

    filter: drop-shadow(
        0px 15px 15px rgba(0,0,0,0.25)
    );
}

/* =====================================
   SECCIÓN BENEFICIOS AFC
===================================== */

.beneficios {
    width: 100%;
    background: #ffffff;
    padding: 30px 20px;
}

.beneficios-contenedor {
    max-width: 1250px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
}

.beneficio {
    text-align: center;
    padding: 0 20px;
}

/* LÍNEAS SEPARADORAS */

.beneficio + .beneficio {
    border-left: 2px solid #d3d5d9;
}

/* ICONOS ROJOS */

.beneficio svg {
    width: 55px;
    height: 55px;
    fill: none;
    stroke: #e60012;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 8px;
}

/* TÍTULOS */

.beneficio h2 {
    font-size: 22px;
    font-weight: 800;
    color: #080808;
    margin-bottom: 8px;
}

/* DESCRIPCIONES */

.beneficio p {
    font-size: 15px;
    line-height: 1.4;
    color: #444;
}

/* ADAPTACIÓN PARA CELULARES */

@media (max-width: 768px) {

    .beneficios-contenedor {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .beneficio {
        padding: 15px;
    }

    .beneficio + .beneficio {
        border-left: none;
        border-top: 1px solid #ddd;
        padding-top: 25px;
    }
}

/* =====================================
   SECCIÓN BENEFICIOS AFC
===================================== */

.beneficios {
    width: 100%;
    background: #ffffff;
    padding: 30px 20px;
}

.beneficios-contenedor {
    max-width: 1250px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
}

.beneficio {
    text-align: center;
    padding: 0 20px;
}

/* LÍNEAS SEPARADORAS */

.beneficio + .beneficio {
    border-left: 2px solid #d3d5d9;
}

/* ICONOS ROJOS */

.beneficio svg {
    width: 55px;
    height: 55px;
    fill: none;
    stroke: #e60012;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 8px;
}

/* TÍTULOS */

.beneficio h2 {
    font-size: 22px;
    font-weight: 800;
    color: #080808;
    margin-bottom: 8px;
}

/* DESCRIPCIONES */

.beneficio p {
    font-size: 15px;
    line-height: 1.4;
    color: #444;
}

/* ADAPTACIÓN PARA CELULARES */

@media (max-width: 768px) {

    .beneficios-contenedor {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .beneficio {
        padding: 15px;
    }

    .beneficio + .beneficio {
        border-left: none;
        border-top: 1px solid #ddd;
        padding-top: 25px;
    }
}

/* ======================================
   CATEGORÍAS DE PRODUCTOS AFC
====================================== */

.categorias {
    width: 100%;
    background: linear-gradient(
        135deg, #e8e9eb, #f5f6f7
    );
    padding: 45px 5% 60px;
}

/* TÍTULO */

.categorias-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.categorias-titulo h2 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 4px;
    text-align: center;
    white-space: nowrap;
}

.categorias-titulo span {
    width: 55px;
    height: 4px;
    background: #e60012;
}

/* CONTENEDOR */

.categorias-contenedor {
    max-width: 1250px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* RADIO OCULTO PERO ACCESIBLE */

.categoria-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* TARJETAS */

.categoria-tarjeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    min-height: 145px;
    padding: 25px;

    background: white;
    border: 2px solid transparent;
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

/* ICONOS */

.categoria-tarjeta svg {
    width: 75px;
    height: 75px;
    flex-shrink: 0;

    fill: none;
    stroke: #111;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* NOMBRE */

.categoria-tarjeta h3 {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: #111;
}

/* FLECHA */

.categoria-flecha {
    color: #e60012;
    font-size: 22px;
    font-weight: bold;
}

/* EFECTO HOVER */

.categoria-tarjeta:hover {
    transform: translateY(-5px);
    border-color: #e60012;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* CATEGORÍA SELECCIONADA */

.categoria-radio:checked + .categoria-tarjeta {
    border-color: #e60012;
    background: #fffafa;
}

.categoria-radio:checked + .categoria-tarjeta svg {
    stroke: #e60012;
}

.categoria-radio:focus-visible + .categoria-tarjeta {
    outline: 3px solid #111;
    outline-offset: 3px;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .categorias-contenedor {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .categorias-titulo h2 {
        font-size: 17px;
        letter-spacing: 2px;
    }

    .categorias-titulo {
        gap: 12px;
    }

    .categorias-titulo span {
        width: 25px;
    }
}
/* =====================================
   SUBMENÚ PRODUCTOS
===================================== */

.menu-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.menu-link-dropdown {
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.menu-link-dropdown:hover {
    background: #cc0011;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #111;
    border-top: 3px solid #e60012;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.submenu a {
    display: block;
    padding: 14px 18px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s;
}

.submenu a:hover {
    background: #e60012;
}

.menu-dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* =====================================
   SECCIÓN PRODUCTOS AFC
===================================== */

.productos-afc {
    width: 100%;
    background: var(--afc-fondo-claro);
    padding: 55px 5% 70px;
}

.productos-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 22px;
}

.productos-subtitulo {
    margin-bottom: 12px;
    color: #20242a;
    font-size: clamp(1.125rem, 2.3vw, 1.5rem);
    font-weight: 800;
    text-align: center;
}

.productos-titulo h1 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 4px;
    text-align: center;
    white-space: nowrap;
}

.productos-titulo span {
    width: 55px;
    height: 4px;
    background: #e60012;
}

.productos-filtros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.productos-filtros a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #dedee0;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-size: 0.9375rem;
    font-weight: 700;
    text-align: center;
    scroll-margin-top: 5rem;
}

.productos-filtros a:hover {
    border-color: #a90010;
}

.productos-filtros a[aria-current="true"] {
    border-color: #a90010;
    background: #e60012;
    color: #fff;
}

.productos-filtros a:focus-visible {
    outline: 3px solid #bc0010;
    outline-offset: 3px;
}

.productos-grid {
    max-width: 1250px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.producto-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.producto-imagen {
    height: 260px;
    background: linear-gradient(135deg, #ececec, #d7dbe0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.producto-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.producto-info {
    padding: 22px;
}

.producto-categoria {
    color: #e60012;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.producto-info :is(h3, h4) {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
    color: #111;
}

.producto-potencias {
    display: grid;
    gap: 6px;
    color: #444;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.producto-potencias > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
}

.producto-potencias dd {
    color: #111;
    font-weight: 700;
}

@media (max-width: 1000px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .productos-titulo h1 {
        font-size: 17px;
        letter-spacing: 2px;
    }

    .productos-titulo {
        gap: 12px;
    }

    .productos-titulo span {
        width: 25px;
    }

    .producto-imagen {
        height: 220px;
    }
}

/* PAGINA INDEPENDIENTE DE PRODUCTOS */

.pagina-productos .productos-grid {
    max-width: 950px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.productos-diesel {
    max-width: 950px;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 30px);
    border: 1px solid #cdd4dc;
    border-radius: 12px;
    background: #fff;
}

.productos-grid:not([hidden]) + .productos-diesel {
    margin-top: 24px;
}

.productos-diesel__encabezado {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px clamp(18px, 4vw, 32px);
    padding-bottom: 18px;
    border-bottom: 1px solid #cdd4dc;
}

.productos-diesel__logo {
    position: relative;
    flex: 0 0 auto;
    width: clamp(124px, 15vw, 166px);
    overflow: hidden;
    aspect-ratio: 7 / 2;
}

.productos-diesel__logo img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 156%;
    max-width: none;
    height: auto;
    transform: translate(-50%, -50%);
}

.productos-diesel__texto {
    flex: 1 1 270px;
    min-width: 0;
}

.productos-diesel__texto h3 {
    margin: 0 0 4px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.15;
    color: #111;
}

.productos-diesel__marca {
    color: #505b65;
    line-height: 1.4;
}

.productos-diesel__productos {
    margin-top: 22px;
}

.productos-diesel__productos .producto-imagen {
    height: clamp(190px, 34vw, 250px);
    padding: 14px 22px;
    background: #e1e5ea;
}

.productos-diesel__productos .producto-imagen img {
    width: auto;
    height: 100%;
    max-width: 100%;
    transform: translateY(var(--ajuste-altura-foto-jcl, 0));
}

/* Compensa el margen transparente de las fotos para alinear las bases. */
.productos-diesel__productos img[src="img/generador-jcl-10000.png"] {
    --ajuste-altura-foto-jcl: -3.2%;
}

.productos-diesel__productos img[src="img/generador-jcl-gfs-75.png"] {
    --ajuste-altura-foto-jcl: 5.5%;
}

.productos-diesel__productos .producto-info h4 {
    margin: 0 0 4px;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.15;
}

.productos-diesel__productos .producto-marcas {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    margin: 0 0 10px;
    color: #505b65;
    font-size: .9375rem;
    font-weight: 600;
}

.productos-diesel__productos .producto-potencias {
    gap: 0;
    margin-top: 14px;
    border-top: 1px solid #cdd4dc;
}

.productos-diesel__productos .producto-potencias > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 7px 0;
}

.productos-diesel__productos .producto-potencias > div + div {
    border-top: 1px solid #e2e6ea;
}

.productos-diesel__productos .producto-potencias dd {
    text-align: right;
}

.productos-diesel__productos .producto-card:only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 490px);
}

.productos-grid[hidden],
.producto-card[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .pagina-productos .productos-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    .pagina-productos .productos-afc {
        padding: 30px 14px 42px;
    }

    .pagina-productos .productos-titulo {
        gap: 10px;
        margin-bottom: 12px;
    }

    .pagina-productos .productos-titulo h1 {
        white-space: normal;
        letter-spacing: .11em;
    }

    .pagina-productos .productos-titulo span {
        flex: 0 1 24px;
    }

    .pagina-productos .productos-filtros {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 18px;
    }

    .pagina-productos .productos-filtros a {
        justify-content: center;
        padding-inline: 8px;
        font-size: .875rem;
        line-height: 1.2;
        scroll-margin-top: 6rem;
    }

    .pagina-productos .productos-grid {
        gap: 16px;
    }

    .pagina-productos .productos-grid .producto-imagen {
        height: clamp(190px, 55vw, 240px);
    }

    .pagina-productos .productos-grid .producto-info {
        padding: 16px;
    }

    .pagina-productos .productos-grid .producto-info :is(h3, h4) {
        font-size: 1.45rem;
    }

    .pagina-productos .productos-grid .producto-potencias > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .pagina-productos .productos-grid .producto-potencias dd {
        text-align: right;
    }

    .productos-diesel {
        padding: 12px;
    }

    .productos-diesel__encabezado {
        gap: 8px 12px;
        padding-bottom: 12px;
    }

    .productos-diesel__logo {
        width: 106px;
    }

    .productos-diesel__texto {
        flex-basis: 145px;
    }

    .productos-diesel__texto h3 {
        font-size: 1.25rem;
    }

    .productos-diesel__marca {
        font-size: .875rem;
    }

    .productos-diesel__productos {
        margin-top: 14px;
    }

    .pagina-busqueda .busqueda-afc {
        padding-block: 26px 40px;
    }
}

/* OCULTAR PRODUCTOS SEGÚN CATEGORÍA */

.producto-card.oculto {
    display: none !important;
}

/* CORRECCIÓN BOTÓN VER GENERADORES */

.hero-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    background: #e60012;
    color: #ffffff;

    padding: 16px 26px;
    border-radius: 6px;

    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border: none;
}

.hero-boton span {
    color: white;
    font-size: 20px;
    line-height: 1;
}

/* TARJETAS DE CATEGORÍAS COMO ENLACES */

.categoria-tarjeta {
    text-decoration: none;
    color: #111111;
    cursor: pointer;
}

.categoria-tarjeta:hover {
    background: #fffafa;
    border-color: #e60012;
}

.categoria-tarjeta:hover svg {
    stroke: #e60012;
}

/* ===================================
   LOGOTIPO OFICIAL AFC
=================================== */

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-imagen {
    display: block;
    width: 145px;
    max-height: 76px;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-imagen:hover {
    transform: scale(1.05);
}

@media (max-width: 600px) {
    .logo-imagen {
        width: 125px;
    }
}

/* PRODUCTOS ACTIVO EN COLOR ROJO */

.menu-dropdown:has(> .menu-link-dropdown.activo) {
    background-color: #e60012;
}

.menu-dropdown > .menu-link-dropdown.activo {
    background-color: #e60012;
    color: #ffffff;
}

/* CONSERVAR EL ROJO AL PASAR EL MOUSE */

.menu-dropdown:hover > .menu-link-dropdown {
    background-color: #d50012;
}

/* FILTRO DE PRODUCTOS */

.producto-card.oculto {
    display: none !important;
}

/* MENSAJE SIN RESULTADOS */

#sin-resultados {
    text-align: center;
    font-size: 18px;
    color: #555;
    padding: 35px 20px;
}

#sin-resultados[hidden] {
    display: none;
}

/* CORRECCIÓN ENCABEZADO Y BUSCADOR AFC */

.contenedor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.buscador {
    display: flex;
    flex: 0 0 270px;
    width: 270px;
    height: 44px;
    margin: 0;
}

.buscador input {
    flex: 1;
    min-width: 0;
    width: auto;
}

.buscador button {
    flex: 0 0 50px;
}

@media (max-width: 1000px) {
    .contenedor-header {
        flex-wrap: wrap;
        justify-content: center;
    }

    .buscador {
        flex: 0 1 270px;
    }
}

/* =====================================
   BUSCADOR INTELIGENTE AFC
===================================== */

.buscador {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 270px;
    width: 270px;
    height: 44px;
    margin: 0;
    z-index: 2000;
}

.buscador .buscador-campo {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 6px 0 0 6px;
    background: #ffffff;
    color: #111111;
    font-size: 14px;
    outline: none;
}

.buscador .buscador-campo:focus {
    box-shadow: inset 0 0 0 2px #e60012;
}

/* BOTÓN ROJO CON LUPA BLANCA */

.buscador .buscador-lupa {
    width: 50px;
    min-width: 50px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0 6px 6px 0;
    background: #e60012;
    cursor: pointer;
}

.buscador .buscador-lupa:hover {
    background: #b90010;
}

.buscador .buscador-lupa svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* PANEL DE RESULTADOS */

.buscador-resultados {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(390px, calc(100vw - 24px));
    padding: 10px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.22);
    z-index: 9999;
}

.buscador-resultados[hidden],
.buscador-opcion[hidden],
.buscador-vacio[hidden] {
    display: none !important;
}

/* CABECERA */

.buscador-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px 12px;
    color: #777777;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.buscador .buscador-cerrar {
    width: 28px;
    min-width: 28px;
    height: 28px;
    background: transparent;
    color: #777777;
    border: none;
    border-radius: 5px;
    font-size: 23px;
    cursor: pointer;
}

.buscador .buscador-cerrar:hover {
    background: #eeeeee;
}

/* RESULTADOS CON FOTOGRAFÍAS */

.buscador-opcion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 7px;
    background: #f5f5f5;
    color: #111111;
    text-decoration: none;
    transition: background 0.2s;
}

.buscador-opcion:hover {
    background: #ffe9eb;
}

.buscador-opcion img {
    width: 75px;
    height: 65px;
    object-fit: contain;
    flex-shrink: 0;
}

.buscador-opcion div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.buscador-opcion strong {
    font-size: 16px;
    color: #111111;
}

.buscador-opcion small {
    font-size: 12px;
    color: #666666;
}

.resultado-flecha {
    color: #e60012;
    font-size: 20px;
}

.buscador-vacio {
    padding: 20px 10px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

@media (max-width: 1000px) {
    .buscador {
        flex: 0 1 320px;
        width: 100%;
    }
}

/* OCULTAR ELEMENTOS DEL BUSCADOR */

.buscador-resultados[hidden],
.buscador-opcion[hidden],
.buscador-vacio[hidden] {
    display: none !important;
}

/* ======================================
   ENCABEZADO UNIFICADO AFC
====================================== */

.header {
    position: relative;
    z-index: 100;
    background: #111111;
}

.header .contenedor-header {
    width: 100%;
    max-width: 1300px;
    min-height: 90px;
    margin: 0 auto;
    padding: 0 24px;

    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 270px;
    align-items: center;
    gap: 20px;
}

/* LOGO */

.header .logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header .logo-imagen {
    width: 145px;
    height: auto;
    max-height: 76px;
    object-fit: contain;
}

/* MENÚ */

.header .menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    height: 90px;
    min-width: 0;
}

.header .menu > a,
.header .menu-dropdown > .menu-link-dropdown {
    display: flex;
    align-items: center;
    height: 90px;
    padding: 0 13px;

    color: white;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    text-decoration: none;
}

.header .menu-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 90px;
}

/* PÁGINA ACTIVA */

.pagina-inicio .header .menu > a[href="index.html"] {
    background: #e60012;
}

.pagina-productos .header
.menu-dropdown > .menu-link-dropdown {
    background: #e60012;
}

/* EFECTO AL PASAR EL CURSOR */

.header .menu > a:hover,
.header .menu-dropdown:hover > .menu-link-dropdown {
    background: #c90012;
}

/* SUBMENÚ */

.header .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 245px;

    background: #111;
    border-top: 3px solid #e60012;

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
    z-index: 1000;
}

.header .menu-dropdown:hover .submenu,
.header .menu-dropdown:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header .submenu a {
    display: block;
    height: auto;
    padding: 15px;
    color: white;
    font-size: 14px;
    white-space: nowrap;
}

.header .submenu a:hover {
    background: #e60012;
}

/* BUSCADOR */

.header .buscador {
    position: relative;
    display: flex;
    width: 270px;
    min-width: 0;
    max-width: 270px;
    height: 44px;
    margin: 0;
    z-index: 1001;
}

.header .buscador-campo {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 6px 0 0 6px;
    background: white;
    color: #111;
    outline: none;
}

.header .buscador-lupa {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    width: 50px;
    height: 44px;
    background: #e60012;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.header .buscador-lupa svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* RESULTADOS DEL BUSCADOR */

.header .buscador-resultados {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(390px, calc(100vw - 24px));
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.buscador-resultados[hidden],
.buscador-opcion[hidden],
.buscador-vacio[hidden] {
    display: none !important;
}

/* ADAPTACIÓN A PANTALLAS PEQUEÑAS */

@media (max-width: 1100px) {
    .header .contenedor-header {
        grid-template-columns: 160px 1fr;
        grid-template-areas:
            "logo buscador"
            "menu menu";
        padding: 10px 20px;
    }

    .header .logo {
        grid-area: logo;
    }

    .header .menu {
        grid-area: menu;
        height: 54px;
    }

    .header .menu > a,
    .header .menu-dropdown,
    .header .menu-dropdown > .menu-link-dropdown {
        height: 54px;
    }

    .header .buscador {
        grid-area: buscador;
        justify-self: end;
    }
}

@media (max-width: 600px) {
    .header .contenedor-header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "menu"
            "buscador";
    }

    .header .menu {
        width: 100%;
        overflow-x: auto;
    }

    .header .buscador {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }
}

.pagina-busqueda {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.busqueda-afc {
    flex: 1;
    width: min(850px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(30px, 6vw, 64px) 0;
}

.busqueda-afc h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.busqueda-afc__estado {
    color: #444;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.busqueda-afc__resultados {
    margin-top: 20px;
    list-style: none;
}

.busqueda-afc__resultados li + li {
    margin-top: 10px;
}

.busqueda-afc__resultados a {
    display: block;
    padding: 16px 18px;
    border: 1px solid #dedee0;
    border-radius: 8px;
    background: #fff;
    color: #a90010;
}

.busqueda-afc__resultados a:hover strong {
    text-decoration: underline;
}

.busqueda-afc__resultados a:focus-visible {
    outline: 3px solid #bc0010;
    outline-offset: 3px;
}

.busqueda-afc__resultados span {
    display: block;
    margin-top: 5px;
    color: #444;
    line-height: 1.5;
}

/* =====================================
   FOOTER OFICIAL AFC
===================================== */

.footer-afc {
    width: 100%;
    background: #0b0b0b;
    color: #ffffff;
    padding: 24px 30px;
    border-top: 1px solid #252525;
}

.footer-contenedor {
    max-width: 1250px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 20px;
}

/* LOGO */

.footer-logo {
    display: inline-flex;
    justify-self: start;
    align-items: center;
}

.footer-logo img {
    width: 110px;
    height: auto;
    object-fit: contain;
}

/* DERECHOS RESERVADOS */

.footer-copyright {
    text-align: center;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* ENLACE VOLVER AL INICIO */

.footer-volver {
    justify-self: end;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-volver:hover {
    color: #e60012;
}

/* ADAPTACIÓN A CELULARES */

@media (max-width: 700px) {

    .footer-contenedor {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 15px;
    }

    .footer-logo,
    .footer-volver {
        justify-self: center;
    }

    .footer-copyright {
        text-align: center;
    }
}
/* MANTENER FOOTER AL FINAL */

body.pagina-inicio,
body.pagina-productos {
    min-height: 100vh;
    background: var(--afc-fondo-claro);
    display: flex;
    flex-direction: column;
}

body.pagina-inicio > main,
body.pagina-productos > main {
    flex: 1;
}
.submenu a {
    text-transform: uppercase;
}
