/* ================================================================
   ⚡ CABECERA GLOBAL ÉLITE THUNDERSHOP (todas las páginas)
   Prefijo tsh- para no chocar con los estilos ts- existentes.
   ================================================================ */

:root {
    --tsh-navy: #0F172A;
    --tsh-navy-2: #1E293B;
    --tsh-gold: #FACC15;
    --tsh-gold-2: #FFD700;
    --tsh-blue: #007CBA;
    --tsh-bg: #EEF2F6;
    --tsh-card: #FFFFFF;
    --tsh-text: #0F172A;
    --tsh-muted: #64748B;
    --tsh-line: #E2E8F0;
    --tsh-green: #00A650;
    --tsh-radius: 12px;
    --tsh-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 4px 14px rgba(15, 23, 42, .06);
    --tsh-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Ocultar las cabeceras anteriores (tema The9 Store, Thunder Mobile Menu y copias pegadas en Elementor) --- */
body.tsh-header-global #masthead.site-header,
body.tsh-header-global #navbar.navbar-fill,
body.tsh-header-global .ts-custom-header { display: none !important; }
html body.tsh-header-global { padding-top: 0 !important; }
@media (min-width: 768px) {
    /* En PC la navegación ya está en la cabecera: fuera la barra de íconos del menú móvil */
    body.tsh-header-global .ts-secondary-nav { display: none !important; }
}

/* --- Utilidades compartidas --- */
.tsh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.tsh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tsh-ico { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* ================================================================
   CABECERA
   ================================================================ */
.tsh-header { position: sticky; top: 0; z-index: 9990; box-shadow: 0 2px 10px rgba(15, 23, 42, .25); font-family: var(--tsh-font); font-size: 16px; line-height: 1.4; }
body.admin-bar .tsh-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tsh-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .tsh-header { top: 0; } }

.tsh-header *, .tsh-header *::before, .tsh-header *::after { box-sizing: border-box; }
.tsh-header a { text-decoration: none; }
.tsh-header ul { margin: 0; padding: 0; }
.tsh-header button { font: inherit; cursor: pointer; }
.tsh-header :focus-visible { outline: 3px solid var(--tsh-gold); outline-offset: 2px; }

.tsh-header-top { background: var(--tsh-navy); }
.tsh-header-row { display: flex; align-items: center; gap: 20px; min-height: 64px; }

.tsh-logo { display: flex; align-items: center; gap: 8px; flex: none; }
.tsh-logo img { width: 40px; height: 40px; object-fit: contain; margin: 0; }
.tsh-logo-text { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: #fff; }
.tsh-logo-text b { color: var(--tsh-gold); }

.tsh-search { flex: 1; display: flex; max-width: 640px; margin: 0; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.tsh-search input[type="search"] { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; outline: 0; padding: 11px 14px; font-size: 15px; color: var(--tsh-text); background: transparent; box-shadow: none !important; margin: 0; height: auto; }
.tsh-search button { border: 0; border-radius: 0; border-left: 1px solid var(--tsh-line); background: #fff; color: var(--tsh-muted); padding: 0 14px; display: flex; align-items: center; margin: 0; }
.tsh-search button:hover { color: var(--tsh-navy); background: var(--tsh-gold); }

.tsh-header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; flex: none; }
.tsh-hlink { display: flex; align-items: center; gap: 6px; color: #E2E8F0 !important; font-size: 14px; white-space: nowrap; }
.tsh-hlink:hover { color: var(--tsh-gold) !important; }
.tsh-cart { position: relative; }
.tsh-cart .tsh-ico { width: 26px; height: 26px; }
.tsh-cart-count { position: absolute; top: -7px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tsh-gold); color: var(--tsh-navy); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

.tsh-header-nav { background: var(--tsh-navy-2); border-top: 1px solid rgba(255, 255, 255, .06); }
.tsh-nav-row { display: flex; align-items: center; gap: 22px; min-height: 40px; font-size: 14px; }
.tsh-nav-row > a { color: #CBD5E1 !important; white-space: nowrap; }
.tsh-nav-row > a:hover { color: #fff !important; }
.tsh-nav-cta { margin-left: auto; display: flex; align-items: center; gap: 4px; color: var(--tsh-gold) !important; font-weight: 700; }
.tsh-nav-cta .tsh-ico { width: 16px; height: 16px; }

.tsh-cats-menu { position: relative; }
.tsh-cats-btn { display: flex; align-items: center; gap: 6px; background: none !important; border: 0; color: #fff !important; padding: 8px 0; font-weight: 600; font-size: 14px; box-shadow: none; }
.tsh-cats-btn .tsh-ico { width: 18px; height: 18px; color: var(--tsh-gold); }
.tsh-cats-list { position: absolute; top: 100%; left: 0; z-index: 10; min-width: 260px; max-height: 70vh; overflow: auto; margin: 0; padding: 8px 0 !important; list-style: none; background: #fff; border-radius: 0 0 10px 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .2); }
.tsh-cats-list[hidden] { display: none; }
.tsh-cats-list li { list-style: none; margin: 0; }
.tsh-cats-list a { display: block; padding: 9px 18px; font-size: 14px; color: var(--tsh-text) !important; }
.tsh-cats-list a:hover { background: var(--tsh-navy); color: #fff !important; }
.tsh-cats-all { border-top: 1px solid var(--tsh-line); margin-top: 6px !important; }
.tsh-cats-all a { color: var(--tsh-blue) !important; font-weight: 700; }

/* ================================================================
   PIE DE PÁGINA GLOBAL
   ================================================================ */
/* Ocultar los pies anteriores: el del tema The9 Store y los pegados en páginas Elementor */
body.tsh-header-global #colophon.site-footer,
body.tsh-header-global .ts-footer { display: none !important; }

.tsh-footer { background: var(--tsh-navy); color: #CBD5E1; padding-top: 40px; font-family: var(--tsh-font); font-size: 16px; line-height: 1.4; }
.tsh-footer *, .tsh-footer *::before, .tsh-footer *::after { box-sizing: border-box; }
.tsh-footer h3, .tsh-footer p { margin: 0; }
.tsh-footer a { text-decoration: none; }
.tsh-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding-bottom: 30px; }
.tsh-footer h3 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.tsh-footer-grid a { display: block; font-size: 14px; color: #CBD5E1 !important; padding: 4px 0; }
.tsh-footer-grid a:hover { color: var(--tsh-gold) !important; }
.tsh-footer-brand p { font-size: 14px; margin: 8px 0 16px; }
.tsh-social { display: flex; gap: 10px; }
.tsh-social a { display: flex !important; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0 !important; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff !important; }
.tsh-social a:hover { background: var(--tsh-gold); color: var(--tsh-navy) !important; }
.tsh-social .tsh-ico { width: 18px; height: 18px; }
.tsh-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 16px 0; font-size: 13px; }
.tsh-footer-bottom .tsh-wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tsh-footer-bottom strong { color: #fff; }
.tsh-footer-bottom span { color: var(--tsh-gold); font-weight: 700; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .tsh-nav-row > a:nth-of-type(5) { display: none; }
}

@media (max-width: 767px) {
    .tsh-header-row { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
    .tsh-search { order: 3; flex-basis: 100%; max-width: none; }
    .tsh-hide-sm { display: none !important; }
    .tsh-logo-text { font-size: 19px; }
    .tsh-nav-row { overflow-x: auto; scrollbar-width: none; gap: 18px; }
    .tsh-nav-row::-webkit-scrollbar { display: none; }
    .tsh-nav-cta { margin-left: 0; }
    .tsh-cats-menu { position: static; }
    .tsh-cats-list { left: 16px; right: 16px; min-width: 0; }

    .tsh-footer-grid { grid-template-columns: 1fr 1fr; }
    .tsh-footer-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .tsh-header *, .tsh-header *::before, .tsh-header *::after { transition: none !important; animation: none !important; }
}
