/* GANK Menú · front.css · v1.0.0 (2026-10-02)
   1) Escritorio ≥ 992 px: barra blanca, panel con riel + tarjetas + promo (mismo diseño que el menú G).
      El panel ya viene en el HTML (hidden); el JS solo lo abre/cierra. Sin JS: lista de enlaces.
   2) Móvil ≤ 991 px: panel «Categorías» (gank-cat) y barra inferior (gank-tabbar). Mismas clases que la
      versión anterior (gank-app-mobile.css) para que el CSS del tema siga aplicando durante la transición. */

/* ============================== 1) ESCRITORIO ============================== */
@media (min-width: 992px) {
  #header .tvcms-header-menu-offer-wrapper { position: relative; background: #fff; border-top: 1px solid #ececee; border-bottom: 1px solid #ececee; }
  html.gkm-open #header .tvcms-header-menu-offer-wrapper { z-index: 1002; }
  #header .tvcmsmain-menu-wrapper, #header .tvcms-header-menu.container { position: static; }

  .gkm { font-family: Montserrat, sans-serif; color: #1a1a1a; }
  .gkm__bar { display: flex; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; position: static; }
  .gkm__top { position: static; margin: 0; }
  .gkm__link { display: flex; align-items: center; gap: 6px; min-height: 58px; padding: 0 14px; font-size: 14.5px; font-weight: 600; line-height: 1.2;
    color: #1a1a1a; text-decoration: none; white-space: nowrap; }
  .gkm__link:hover, .gkm__link:focus { color: #1a1a1a; text-decoration: none; }
  .gkm__link:focus-visible { outline: 2px solid #1a1a1a; outline-offset: -4px; border-radius: 6px; }
  .gkm__top--panel > .gkm__link::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
    transform: translateY(-2px) rotate(45deg); opacity: .75; }
  .gkm__top.is-open > .gkm__link { font-weight: 700; box-shadow: inset 0 -3px 0 #ffc400; }
  .gkm__top--hl > .gkm__link > span { background: #ffc400; color: #1a1a1a; border-radius: 6px; padding: 4px 10px; font-weight: 600; }

  /* Panel: colgado del borde inferior de la barra, centrado, hasta 1240 px. */
  .gkm__panel { position: absolute; top: 100%; left: 50%; transform: translate(-50%, -4px); z-index: 2; display: flex; box-sizing: border-box;
    width: min(1240px, calc(100vw - 32px)); min-height: 300px; max-height: calc(100vh - 170px); overflow: hidden;
    background: #fff; border-radius: 0 0 18px 18px; box-shadow: 0 24px 48px rgba(0, 0, 0, .18); text-align: left;
    opacity: 0; transition: opacity .14s ease, transform .14s ease; }
  .gkm__panel[hidden] { display: none; }
  .gkm__panel.is-in { opacity: 1; transform: translate(-50%, 0); }
  .gkm-scrim { position: fixed; left: 0; right: 0; bottom: 0; top: var(--gkm-top, 160px); z-index: 1; background: rgba(20, 20, 20, .38); pointer-events: none;
    opacity: 0; transition: opacity .14s ease; }
  .gkm-scrim[hidden] { display: none; }
  .gkm-scrim.is-in { opacity: 1; }

  .gkm__rail { flex: 0 0 272px; box-sizing: border-box; padding: 14px 12px; background: #fafafa; border-right: 1px solid #efeff1;
    display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
  .gkm__tab { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 10px;
    font-size: 14.5px; font-weight: 500; line-height: 1.2; color: #3a3a3f; text-decoration: none; }
  .gkm__tab:hover { background: #f1f1f2; color: #1a1a1a; text-decoration: none; }
  .gkm__tab.is-on { background: #fff1bf; color: #1a1a1a; font-weight: 700; }
  .gkm__tab:focus-visible { outline: 2px solid #1a1a1a; outline-offset: -2px; }
  .gkm__ico { flex: none; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #ececee; color: #1a1a1a; box-sizing: border-box; }
  .gkm__tab.is-on .gkm__ico { background: #ffc400; border-color: #ffc400; }
  .gkm__lbl { flex: 1; min-width: 0; }
  .gkm__chev { flex: none; display: flex; color: #8a8a90; }
  .gkm__tab.is-on .gkm__chev { color: #1a1a1a; }

  .gkm__panes { flex: 1 1 auto; min-width: 0; display: flex; }
  .gkm__pane { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 24px 28px 28px; overflow-y: auto; outline: none; }
  .gkm__pane[hidden] { display: none; }
  .gkm__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
  .gkm__title { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; color: #1a1a1a; }
  .gkm__all { flex: none; font-size: 14px; font-weight: 600; color: #6b5200; text-decoration: none; }
  .gkm__all:hover { color: #1a1a1a; text-decoration: underline; }
  .gkm__grid { display: grid; grid-template-columns: repeat(var(--gkm-cols, 4), minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
  .gkm__grid > li { display: flex; min-width: 0; margin: 0; }
  .gkm__card { flex: 1; min-width: 0; min-height: 132px; box-sizing: border-box; padding: 12px 10px; border: 1px solid #ececee; border-radius: 12px;
    background: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; text-decoration: none; color: #1a1a1a;
    transition: border-color .12s ease, background-color .12s ease; }
  .gkm__card:hover { background: #fffaf0; border-color: #ffc400; color: #1a1a1a; text-decoration: none; }
  .gkm__card:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
  .gkm__thumb { flex: none; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; color: #9aa0a6; }
  .gkm__thumb img { display: block; width: 72px; height: 72px; object-fit: contain; border-radius: 6px; }
  .gkm__thumb img.is-broken { display: none; }
  .gkm__thumb svg { width: 28px; height: 28px; }
  .gkm__name { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }

  .gkm__promo { flex: 0 0 260px; box-sizing: border-box; padding: 18px 18px 18px 0; display: flex; }
  .gkm__promo-card { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 22px 20px; border-radius: 14px;
    background: #141414 center / cover no-repeat; color: #fff; text-decoration: none; min-height: 220px; position: relative; overflow: hidden; }
  .gkm__promo-card--img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .78)); }
  .gkm__promo-card > * { position: relative; }
  .gkm__promo-card:hover { color: #fff; text-decoration: none; background-color: #000; }
  .gkm__kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffc400; }
  .gkm__promo-text { font-size: 18px; font-weight: 700; line-height: 1.3; }
  .gkm__cta { align-self: flex-start; margin-top: 6px; padding: 10px 16px; border-radius: 8px; background: #ffc400; color: #1a1a1a; font-size: 13px; font-weight: 700; }

  /* Lista corta (Nosotros): sin riel ni tarjetas, alineada a su opción. */
  .gkm__top--panel:has(> .gkm__panel--compact) { position: relative; }
  .gkm__panel--compact { left: 0; transform: translate(0, -4px); width: 260px; min-height: 0; border-radius: 0 0 14px 14px; }
  .gkm__panel--compact.is-in { transform: translate(0, 0); }
  .gkm__panel--compact .gkm__rail { flex: 1; background: #fff; border-right: 0; padding: 10px; }

  /* Mientras el módulo esté activo, el panel móvil nunca se ve en escritorio. */
  .gank-tabbar, .gank-cat { display: none !important; }
}
@media (min-width: 992px) and (max-width: 1279.98px) {
  .gkm__promo { display: none; }
  .gkm__rail { flex-basis: 236px; }
  .gkm__pane { padding: 20px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .gkm__panel, .gkm-scrim, .gkm__card { transition: none; }
}

/* Dispositivo de escritorio con ventana angosta: el tema mueve la barra a su menú lateral; ahí se ve como lista. */
@media (max-width: 991px) {
  .tvmobile-slidebar .gkm__bar { list-style: none; margin: 0; padding: 8px 0; }
  .tvmobile-slidebar .gkm__link { display: block; padding: 12px 16px; font-weight: 600; color: #1a1a1a; }
  .tvmobile-slidebar .gkm__panel { display: none !important; }
  .tvmobile-slidebar .gkm-scrim { display: none !important; }
}

/* ============================== 2) MÓVIL ============================== */
@media (max-width: 991px) {
  :root { --gank-tabbar-h: 56px; }

  .gank-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; display: flex; align-items: stretch;
    height: calc(var(--gank-tabbar-h) + env(safe-area-inset-bottom, 0px)); padding: 0 0 env(safe-area-inset-bottom, 0px); margin: 0; box-sizing: border-box;
    background: #fff; border-top: 1px solid #ececec; box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); font-family: inherit; }
  .gank-tabbar__item { flex: 1 1 25%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 2px 4px; margin: 0; border: 0; background: none; cursor: pointer; color: #3a3a3a; text-decoration: none !important;
    font: inherit; font-size: 11px; font-weight: 600; line-height: 1.1; -webkit-tap-highlight-color: transparent; }
  .gank-tabbar__item:hover, .gank-tabbar__item:focus { color: #111; }
  .gank-tabbar__item[aria-current="page"] { color: #111; }
  .gank-tabbar__item[aria-current="page"] .gank-tabbar__icon { color: #F5A800; }
  .gank-tabbar__item:focus-visible { outline: 2px solid #111; outline-offset: -4px; border-radius: 8px; }
  .gank-tabbar__icon { position: relative; display: block; width: 24px; height: 24px; }
  .gank-tabbar__icon svg { display: block; width: 24px; height: 24px; }
  .gank-tabbar__label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gank-tabbar__badge { position: absolute; top: -6px; left: 14px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    border-radius: 9px; background: #111; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
  .gank-tabbar__badge[hidden] { display: none; }
  body.gank-has-tabbar { padding-bottom: calc(var(--gank-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important; }
  body.classicCartOpen .gank-tabbar { visibility: hidden; }
  body.gank-cat-open .gank-tabbar__cats, body.mobile-menu-open .gank-tabbar__cats { color: #111; }
  body.gank-cat-open .gank-tabbar__cats .gank-tabbar__icon, body.mobile-menu-open .gank-tabbar__cats .gank-tabbar__icon { color: #F5A800; }

  .gank-cat { position: fixed; left: 0; right: 0; top: 0; z-index: 1003; bottom: calc(var(--gank-tabbar-h) + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; background: #fff; color: #1a1a1a; font-family: inherit; padding-top: env(safe-area-inset-top, 0px); box-sizing: border-box;
    opacity: 0; transform: translateY(12px); transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1); }
  .gank-cat[hidden] { display: none; }
  .gank-cat.is-in { opacity: 1; transform: none; }
  .gank-cat a { text-decoration: none !important; color: #1a1a1a; }
  .gank-cat ul { list-style: none; margin: 0; padding: 0; }
  .gank-cat button { font-family: inherit; }
  .gank-cat a:focus-visible, .gank-cat button:focus-visible { outline: 3px solid #1a1a1a; outline-offset: -3px; border-radius: 12px; }
  .gank-cat__head { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px 8px 16px; box-sizing: border-box; border-bottom: 1px solid #ececec; flex-shrink: 0; }
  .gank-cat__title { flex: 1; margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; text-transform: none; color: #1a1a1a; }
  .gank-cat__close { width: 44px; height: 44px; border: 0; border-radius: 22px; background: #f3f3f3; color: #1a1a1a; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
  .gank-cat__body { flex: 1; min-height: 0; display: flex; }
  .gank-cat__rail { width: 104px; flex-shrink: 0; background: #f3f3f3; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
  .gank-cat__railitem { min-height: 84px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 6px; font-size: 12px; font-weight: 600; line-height: 1.2; color: #1a1a1a; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
  .gank-cat__railitem.is-on { background: #fff; font-weight: 800; }
  .gank-cat__railicon { width: 36px; height: 36px; border-radius: 10px; background: #e3e3e3; display: flex; align-items: center; justify-content: center; }
  .gank-cat__railicon svg { display: block; width: 20px; height: 20px; }
  .gank-cat__railitem.is-on .gank-cat__railicon { background: #F5A800; }
  .gank-cat__railgo { font-size: 11px; font-weight: 700; color: #4a4a4a; }
  .gank-cat__pane { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 24px; box-sizing: border-box; }
  .gank-cat__sect { display: flex; flex-direction: column; gap: 18px; }
  .gank-cat__sect[hidden] { display: none; }
  .gank-cat__panehead { display: flex; align-items: center; gap: 8px; }
  .gank-cat__panetitle { flex: 1; margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; text-transform: none; color: #1a1a1a; }
  .gank-cat__all { min-height: 44px; padding: 0 12px; border: 1px solid #1a1a1a; border-radius: 10px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; white-space: nowrap; box-sizing: border-box; }
  .gank-cat__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
  .gank-cat__grid > li { display: flex; min-width: 0; }
  .gank-cat__tile { flex: 1; min-width: 0; min-height: 96px; padding: 10px 6px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; box-sizing: border-box;
    font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; color: #1a1a1a; overflow-wrap: break-word; }
  .gank-cat__tile:active { background: #fafafa; border-color: #cfd3d8; }
  .gank-cat__thumb { flex: none; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: #9aa0a6; }
  .gank-cat__thumb img { display: block; width: 48px; height: 48px; object-fit: contain; }
  .gank-cat__thumb img.is-broken { display: none; }
  .gank-cat__thumb svg { display: block; width: 26px; height: 26px; }
  .gank-cat__group { display: flex; flex-direction: column; gap: 6px; }
  .gank-cat__grouptitle { min-height: 44px; margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: #1a1a1a; text-transform: none; }
  .gank-cat__grouptitle span { flex: 1; }
  .gank-cat__grouptitle svg { color: #5c5c5c; }

  html:has(body.gank-cat-open), body.gank-cat-open { overflow: hidden !important; }
  body.gank-cat-open .wa-float, body.gank-cat-open .tvbottom-to-top { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

  /* Header móvil limpio (las clases las pone front.js al encontrar la barra): sin botón de tres líneas ni iconos. */
  html.gank-no-hdr-menu #tvcms-mobile-view-header .tvcmsmobile-header-menu { width: 0 !important; min-width: 0 !important; flex: 0 0 0 !important; padding: 0 !important; margin: 0 !important; }
  html.gank-no-hdr-menu #tvcms-mobile-view-header .tvmobile-sliderbar-btn { display: none !important; }
  html.gank-no-hdr-menu #tvcms-mobile-view-header .tvcmsmobile-header-logo-right-wrapper { padding-left: 0 !important; }

  /* El menú lateral del tema ya no se usa en móvil (el megamenú no imprime nada ahí). */
  html.gkm-mobile .tvmobile-slidebar #tvmobile-megamenu:empty { display: none; }
}
body#checkout .gank-tabbar, body#checkout .gank-cat { display: none !important; }
@media (max-width: 991px) and (prefers-reduced-motion: reduce) { .gank-cat { transition: none !important; } }
