/* assets/css/ik-nav.css — v8: header de escritorio con las medidas y paneles de la referencia (vídeo de Alibaba).
   · El header ocupa todo el ancho con 40 px de margen lateral; el contenido del sitio usa un ancho útil de 1432 px.
   · En la portada el header no lleva borde inferior.
   · Paneles de la fila 2 (#ik8Panels): blancos, a todo el ancho, bajo la fila; la página se oscurece con un fundido
     de 150 ms y el contenido entra con un fundido + desplazamiento de 6 px (200 ms). Al cambiar de enlace solo se
     repite la entrada del contenido. Móvil y tablet no cambian. */

/* Ancho del contenido: 1480 − 2 × 24 px de margen = 1432 px útiles, como la referencia */
.container, .a5 .container { max-width: 1480px; }

@media (min-width: 1024px) {
    /* Header a todo el ancho (logo y acciones pegados a los bordes con 40 px) */
    #main-header > .container { max-width: none; padding-left: 40px; padding-right: 40px; }
    /* Sin borde bajo el header en la portada (la fila 2 tampoco lo dibuja) */
    body.a5-home #main-header, body.a5-home #main-header.has-bg, body.a5-home .ik6-row2 { border-bottom: 0 !important; box-shadow: none !important; }
    body.a5-home #main-header::after { display: none !important; }

    /* Subrayado negro persistente bajo el enlace cuyo panel está abierto */
    .ik6-row2-link.is-on::after, .ik6-row2-r a.is-on::after { transform: scaleX(1); }

    .ik8-panels { position: fixed; top: var(--ik7-top, var(--ik-header-h, 120px)); left: 0; right: 0; z-index: 80; background: #fff;
        opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease, visibility 0s linear .15s; white-space: normal; }
    .ik8-panels.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .15s ease, visibility 0s; }
    .ik8-panel { display: none; }
    .ik8-panel.is-on { display: block; }
    .ik8-panel.is-on .ik8-in { animation: ik8In .2s cubic-bezier(.2,.8,.2,1) both; }
    .ik8-in { padding: 20px 40px 26px; max-height: calc(100vh - var(--ik7-top, 120px) - 40px); overflow-y: auto; }
    @keyframes ik8In { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

    .ik8-grid { display: grid; gap: 12px; align-items: stretch; }
    .ik8-grid--hero { grid-template-columns: minmax(0, 1fr) 300px; }
    .ik8-grid--promo { grid-template-columns: minmax(0, 1fr) 520px; gap: 28px; }
    .ik8-grid--about { grid-template-columns: repeat(3, minmax(0, 1fr)) 330px; gap: 14px; }
    .ik8-grid--sell { grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; }

    /* Bloque principal con texto + tarjetas */
    .ik8-hero { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.6fr); min-height: 230px; border-radius: 12px; overflow: hidden; }
    .ik8-grid--sell .ik8-hero { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.2fr); }
    .ik8-hero-img { background: center / cover no-repeat; min-height: 100%; }
    .ik8-hero--blue { background: linear-gradient(110deg, #d7ecfb 0%, #e8f3fc 100%); }
    .ik8-hero--bronze { background: linear-gradient(110deg, #f8e6d0 0%, #fdf4e9 100%); }
    .ik8-hero-txt { display: flex; flex-direction: column; align-items: flex-start; padding: 22px 26px; }
    .ik8-hero h3 { margin: 0 0 14px; font: 700 25px/1.2 Inter, system-ui, sans-serif; color: #111; }
    .ik8-stats { display: flex; gap: 22px; margin-bottom: auto; padding-bottom: 18px; }
    .ik8-stat { display: flex; flex-direction: column; gap: 2px; max-width: 110px; }
    .ik8-stat b { font: 700 18px/1.1 Inter, system-ui, sans-serif; color: #111; }
    .ik8-stat span { font-size: 12px; line-height: 1.3; color: #555; }
    .ik8-hero-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ik8-hero-cards .ik8-card { border-radius: 0; color: #fff; }
    .ik8-hero-cards .ik8-card b { position: absolute; left: 14px; right: 46px; bottom: 34px; font-size: 15px; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
    .ik8-hero-cards .ik8-card > span:not(.ik8-card-pic) { position: absolute; left: 14px; right: 46px; bottom: 14px; font-size: 12px; color: rgba(255,255,255,.88); text-shadow: 0 1px 4px rgba(0,0,0,.35); }
    .ik8-hero-cards .ik8-card::after { content: '→'; position: absolute; right: 12px; bottom: 14px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #111;
        display: grid; place-items: center; font-size: 15px; transition: transform .2s; }
    .ik8-hero-cards .ik8-card:hover::after { transform: translateX(3px); }
    .ik8-hero-cards .ik8-card .ik8-card-pic { position: absolute; inset: 0; height: auto; border-radius: 0; }
    .ik8-hero-cards .ik8-card .ik8-card-pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)); }

    /* Tarjetas */
    .ik8-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 200px; border-radius: 12px; overflow: hidden; color: #111; text-decoration: none; }
    .ik8-card-pic { display: grid; place-items: center; height: 128px; border-radius: 10px; background: #eee center / cover no-repeat; overflow: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
    .ik8-card:hover .ik8-card-pic { transform: scale(1.03); }
    .ik8-card-pic .material-symbols-outlined { font-size: 54px; width: 54px; overflow: hidden; color: rgba(255,255,255,.92); font-variation-settings: 'wght' 300; position: relative; z-index: 1; }
    .ik8-card-pic--navy { background: linear-gradient(135deg, #1D2530, #3b4d66); }
    .ik8-card-pic--bronze { background: linear-gradient(135deg, #AB733C, #d9a774); }
    .ik8-card-pic--slate { background: linear-gradient(135deg, #4a5a70, #8aa0bb); }
    .ik8-grid--about .ik8-card { min-height: 0; }
    .ik8-grid--about .ik8-card b { font-size: 14.5px; margin-top: 6px; }
    .ik8-grid--about .ik8-card > span:not(.ik8-card-pic) { font-size: 12.5px; line-height: 1.45; color: #555; }
    .ik8-grid--about .ik8-card:hover b { text-decoration: underline; text-underline-offset: 2px; }

    /* Columna lateral */
    .ik8-aside { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 12px; background: #f4f4f4; }
    .ik8-aside h4, .ik8-app h4 { margin: 0 0 10px; font: 700 17px/1.25 Inter, system-ui, sans-serif; color: #111; }
    .ik8-aside a { padding: 5px 0; font-size: 13.5px; color: #222; text-decoration: none; }
    .ik8-aside a:hover { text-decoration: underline; text-underline-offset: 2px; }
    .ik8-app { padding: 4px 6px 4px 18px; }
    .ik8-app p { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: #555; }
    .ik8-app-btns { display: flex; flex-wrap: wrap; gap: 8px; }

    /* Dropshipping */
    .ik8-h { margin: 6px 0 6px; font: 700 26px/1.2 Inter, system-ui, sans-serif; color: #111; }
    .ik8-h em { font-style: normal; color: #AB733C; }
    .ik8-sub { margin: 0 0 16px; font-size: 13px; color: #666; }
    .ik8-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
    .ik8-kpis > div { padding: 16px 18px; border-radius: 10px; background: linear-gradient(135deg, #fbf4ec, #fdfaf6); }
    .ik8-kpis b { display: block; font: 800 24px/1.1 Inter, system-ui, sans-serif; color: #AB733C; }
    .ik8-kpis span { font-size: 12.5px; color: #333; }
    .ik8-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
    .ik8-note { font-size: 12px; color: #666; }
    .ik8-promo { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; min-height: 190px; padding: 22px 26px;
        border-radius: 12px; overflow: hidden; background: linear-gradient(120deg, #fdf3e6, #f6e3cc); color: #111; text-decoration: none; }
    .ik8-promo-k { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #AB733C; position: relative; z-index: 1; }
    .ik8-promo b { font: 700 22px/1.2 Inter, system-ui, sans-serif; position: relative; z-index: 1; }
    .ik8-promo .ik8-btn { position: relative; z-index: 1; }
    .ik8-promo-pic { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; background: center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }

    /* Botones */
    .ik8-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
        font: 600 13.5px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s; }
    .ik8-btn--sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
    .ik8-btn--navy { background: #0f2a4a; color: #fff; }
    .ik8-btn--brand { background: #AB733C; color: #fff; }
    .ik8-btn--dark { background: #111; color: #fff; }
    .ik8-btn--ghost { background: #fff; color: #111; border-color: #111; }
    .ik8-btn:hover { filter: brightness(1.1); }

    /* Lista de enlaces con flecha (Centro de ayuda) */
    .ik8-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
    .ik8-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-radius: 8px; background: #f6f6f6;
        color: #222; font-size: 13.5px; text-decoration: none; transition: background .15s; }
    .ik8-links a span { font-size: 16px; transition: transform .2s; }
    .ik8-links a:hover { background: #ececec; }
    .ik8-links a:hover span { transform: translateX(3px); }
    .ik8-links--col { grid-template-columns: 1fr; align-content: start; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
    #main-header > .container { padding-left: 24px; padding-right: 24px; }
    .ik8-in { padding-left: 24px; padding-right: 24px; }
    .ik8-grid--about { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ik8-grid--about .ik8-app { display: none; }
    .ik8-grid--promo { grid-template-columns: minmax(0, 1fr) 380px; }
    .ik8-hero { grid-template-columns: minmax(240px, .9fr) minmax(0, 1.3fr); }
}
@media (prefers-reduced-motion: reduce) {
    .ik8-panels, .ik8-panel.is-on .ik8-in { transition: none !important; animation: none !important; }
}
@media (min-width: 1024px) {
    /* Enlaces de la fila 2 a toda su altura: el subrayado cae justo en el borde inferior, pegado al panel */
    .ik6-row2-link, .ik6-row2-r a { display: inline-flex; align-items: center; height: 42px; }
    .ik6-row2-link::after, .ik6-row2-r a::after { bottom: 0 !important; }
}
/* Portada en móvil/tablet: sin la línea divisoria del header y el buscador del hero dentro de la pantalla */
@media (max-width: 1023.98px) {
    body.a5-home #main-header, body.a5-home #main-header .container > .mt-12 { border-top: 0 !important; border-bottom: 0 !important; box-shadow: none !important; }
    body.a5-home .a5-search { max-width: 100%; min-width: 0; box-sizing: border-box; }
    body.a5-home .a5-search input { flex: 1 1 auto; min-width: 0; width: 0; }
    body.a5-home .a5-hero-in > * { min-width: 0; }
}
@media (min-width: 1024px) {
    /* «Todas las categorías»: al hacer clic en una categoría solo queda su sección, que entra con un fundido corto */
    .ik7-sec[hidden] { display: none !important; }
    .ik7-sec.ik7-in { animation: ik8In .2s cubic-bezier(.2,.8,.2,1) both; }
    .ik7-item { cursor: pointer; }
}
