.afc-menu {
    --afc-menu-grafito: #20242A;
    --afc-menu-claro: #F7F8FA;
    --afc-menu-rojo: #B90720;
    --afc-menu-acento: #FF536A;
    --afc-menu-texto: #243043;
    --afc-menu-borde: #d5dee8;
    position: relative;
    z-index: 1000;
    width: min(1260px, calc(100% - 40px));
    margin: 14px auto 0;
    color: var(--afc-menu-claro);
    font-family: Arial, Helvetica, sans-serif;
}

.afc-menu * {
    box-sizing: border-box;
}

.afc-menu a {
    text-decoration: none;
}

.afc-menu__barra {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr) auto;
    grid-template-areas: "logo navegacion acciones";
    align-items: center;
    gap: 8px clamp(16px, 2vw, 30px);
    min-height: 88px;
    padding: 8px clamp(16px, 2.2vw, 28px);
    border: 1px solid var(--afc-menu-grafito);
    border-radius: 16px;
    background: var(--afc-menu-grafito);
    box-shadow: 0 4px 0 rgba(36, 48, 67, 0.07);
}

.afc-menu__logo {
    grid-area: logo;
    display: block;
    width: 144px;
    height: 68px;
    border-radius: 5px;
}

.afc-menu__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.afc-menu__nav {
    grid-area: navegacion;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 clamp(14px, 2.3vw, 36px);
    min-width: 0;
}

.afc-menu__enlace {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 8px 0;
    color: var(--afc-menu-claro);
    font-size: clamp(1rem, 1.45vw, 1.2rem);
    line-height: 1.25;
    white-space: nowrap;
}

.afc-menu summary {
    list-style: none;
    cursor: pointer;
}

.afc-menu summary::-webkit-details-marker {
    display: none;
}

.afc-menu summary::after {
    width: 7px;
    height: 7px;
    margin: 0 2px 4px 0;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    content: "";
}

.afc-menu__grupo[open] > summary::after {
    margin-bottom: -3px;
    transform: rotate(225deg);
}

.afc-menu__enlace:hover {
    color: var(--afc-menu-acento);
}

.afc-menu__enlace[aria-current],
.afc-menu__grupo[open] > summary {
    font-weight: 700;
}

.afc-menu__enlace[aria-current]::before {
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    border-radius: 3px;
    background: var(--afc-menu-acento);
    content: "";
}

.afc-menu__grupo:not([open]) > .afc-menu__panel {
    display: none;
}

.afc-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    z-index: 1;
    padding: 12px;
    border: 1px solid var(--afc-menu-borde);
    border-radius: 13px;
    background: #fff;
    color: var(--afc-menu-texto);
    box-shadow: 0 4px 0 rgba(36, 48, 67, 0.07);
}

.afc-menu__panel--productos {
    inset-inline: clamp(16px, 15vw, 208px) clamp(16px, 2vw, 28px);
}

.afc-menu__categorias {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.afc-menu__categorias a {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 12px 16px;
    color: var(--afc-menu-texto);
    line-height: 1.3;
}

.afc-menu__categorias a + a {
    border-inline-start: 1px solid var(--afc-menu-borde);
}

.afc-menu__categorias strong {
    font-size: clamp(1rem, 1.45vw, 1.25rem);
}

.afc-menu__categorias span {
    color: #4a5e73;
    font-size: 1rem;
}

.afc-menu__todos,
.afc-menu__panel--soporte a {
    display: block;
    padding: 12px 16px;
    color: var(--afc-menu-texto);
    font-size: 1rem;
    line-height: 1.25;
}

.afc-menu__todos {
    margin-top: 8px;
    border-top: 1px solid var(--afc-menu-borde);
    color: var(--afc-menu-rojo);
    font-weight: 700;
}

.afc-menu__grupo--soporte {
    position: relative;
}

.afc-menu__panel--soporte {
    top: calc(100% + 24px);
    inset-inline-start: -16px;
    width: 242px;
    padding: 6px;
}

.afc-menu__panel a:hover,
.afc-menu__panel a[aria-current] {
    background: #f5f7fa;
    color: var(--afc-menu-rojo);
}

.afc-menu__acciones {
    grid-area: acciones;
    display: flex;
    gap: clamp(8px, 1.1vw, 16px);
    align-items: center;
    min-width: 0;
}

.afc-menu .buscador {
    position: static;
    z-index: auto;
    display: flex;
    flex: none;
    align-items: stretch;
    width: clamp(148px, 12vw, 166px);
    min-width: 0;
    height: 46px;
    margin: 0;
    border: 1px solid #748091;
    border-radius: 9px;
    background: #333A44;
}

.afc-menu .buscador-campo {
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    padding: 0 8px 0 0;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: transparent;
    color: var(--afc-menu-claro);
    color-scheme: dark;
    font: inherit;
}

.afc-menu .buscador-campo::placeholder {
    color: #DCE3EB;
}

.afc-menu .buscador-campo:focus {
    outline: none;
    box-shadow: none;
}

.afc-menu .buscador .buscador-lupa {
    order: -1;
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    min-width: 40px;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 8px 0 0 8px;
    background: transparent;
    cursor: pointer;
}

.afc-menu .buscador .buscador-lupa:hover {
    background: #434D5B;
}

.afc-menu .buscador-lupa svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #DCE3EB;
    stroke-linecap: round;
    stroke-width: 2.25;
}

.afc-menu__cotizar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(108px, 12vw, 162px);
    min-height: 46px;
    padding: 8px 16px;
    border-radius: 9px;
    background: var(--afc-menu-rojo);
    color: #fff;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    font-weight: 700;
}

.afc-menu__cotizar:hover {
    background: #a0061e;
}

.afc-menu :is(a, summary, button):focus-visible,
.afc-menu .buscador:focus-within {
    outline: 2px solid var(--afc-menu-acento);
    outline-offset: 3px;
}

.afc-menu__panel a:focus-visible {
    outline-color: var(--afc-menu-rojo);
}

.afc-menu .buscador-lupa:focus-visible {
    outline-offset: -3px;
}

@media (max-width: 920px) {
    .afc-menu__barra {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo acciones"
            "navegacion navegacion";
        gap: 2px 16px;
    }

    .afc-menu__panel--productos {
        inset-inline: 0;
    }
}

@media (max-width: 620px) {
    .afc-menu {
        width: calc(100% - 24px);
        margin-top: 10px;
    }

    .afc-menu__barra {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "logo acciones"
            "navegacion navegacion";
        gap: 4px 10px;
        padding: 8px 11px 6px;
    }

    .afc-menu__logo {
        width: clamp(74px, 22vw, 108px);
        height: 44px;
    }

    .afc-menu__nav {
        column-gap: clamp(6px, 2.3vw, 12px);
        justify-content: space-between;
        border-top: 1px solid #424850;
    }

    .afc-menu__enlace {
        gap: 5px;
        min-height: 44px;
        font-size: clamp(.8125rem, 3.6vw, .9375rem);
    }

    .afc-menu__acciones {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
    }

    .afc-menu .buscador {
        width: 100%;
        height: 44px;
    }

    .afc-menu .buscador-campo {
        font-size: 1rem;
    }

    .afc-menu .buscador .buscador-lupa {
        flex-basis: 32px;
        width: 32px;
        min-width: 32px;
    }

    .afc-menu .buscador-lupa svg {
        width: 18px;
        height: 18px;
    }

    .afc-menu__cotizar {
        min-width: 0;
        min-height: 44px;
        padding-inline: clamp(9px, 2.8vw, 15px);
        font-size: .9rem;
    }

    .afc-menu__grupo--soporte {
        position: static;
    }

    .afc-menu__panel--soporte {
        top: calc(100% + 6px);
        inset-inline: 0;
        width: auto;
    }

    .afc-menu__categorias {
        grid-template-columns: minmax(0, 1fr);
    }

    .afc-menu__categorias a + a {
        border-inline-start: 0;
        border-top: 1px solid var(--afc-menu-borde);
    }
}
