/* ==========================================================================
   T-Conecta · tc-base.css
   Fuente única de estilos compartidos entre el sitio (index, nosotros,
   políticas) y la tienda WordPress/WooCommerce en /catalogo.

   1. Tokens          → cambia un valor aquí y se actualiza en todo el sitio
   2. Primitivos      → botones, badges, títulos de sección
   3. Shell           → header, menú móvil, footer, botón de WhatsApp
   Todo va con prefijo .tc- para no chocar con Astra ni con WooCommerce.
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* Superficies (de más oscura a más clara) */
  --tc-bg:            #040404;
  --tc-surface-0:     #08080C;
  --tc-surface-1:     #12121A;
  --tc-surface-2:     #1C1B1B;
  --tc-surface-3:     #2A2A2A;

  /* Bordes */
  --tc-border:        #484551;
  --tc-border-soft:   rgba(255, 255, 255, 0.102);

  /* Texto */
  --tc-text:          #FEFEFE;
  --tc-text-2:        #E5E2E1;
  --tc-text-muted:    #C9C4D3;
  --tc-text-slate:    #94A3B8;
  --tc-text-dim:      #888896;
  --tc-icon-dim:      #858A8C;

  /* Marca */
  --tc-cyan:          #59D9DC;
  --tc-cyan-600:      #37BFC2;
  --tc-cyan-ink:      #003738;   /* texto sobre botón cyan */
  --tc-ink:           #131313;
  --tc-violet:        #463794;
  --tc-violet-200:    #C9BFFF;
  --tc-hot:           #F04D5A;

  /* Tipografía */
  --tc-font-display:  'Bebas Neue', sans-serif;
  --tc-font-body:     Geist, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --tc-max:           1440px;
  --tc-gutter:        clamp(16px, 4vw, 80px);
  --tc-section-y:     clamp(40px, 6vw, 80px);

  /* Radios */
  --tc-radius-btn:    0px;
  --tc-radius-xs:     2px;
  --tc-radius-sm:     4px;
  --tc-radius-md:     8px;

  /* Efectos */
  --tc-glass:         rgba(53, 53, 52, 0.2);
  --tc-glow-cyan:     0 0 40px 10px rgba(89, 217, 220, 0.2);
  --tc-ease:          cubic-bezier(.22, .9, .28, 1);

  /* Offset del header sticky (WordPress define la barra de admin) */
  --tc-header-top:    var(--wp-admin--admin-bar--height, 0px);
}

[hidden] { display: none !important; }

/* 2. PRIMITIVOS ------------------------------------------------------------ */
.tc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 47px; padding: 14px 24px; box-sizing: border-box;
  border: 0; border-radius: var(--tc-radius-btn);
  font-family: var(--tc-font-display); font-size: 16px; font-weight: 400;
  letter-spacing: 1px; text-transform: uppercase; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tc-btn--primary { background: var(--tc-cyan); color: var(--tc-ink); }
.tc-btn--primary:hover, .tc-btn--primary:focus-visible { background: var(--tc-cyan-600); color: var(--tc-ink); }
.tc-btn--glow { box-shadow: var(--tc-glow-cyan); color: var(--tc-cyan-ink); }
.tc-btn--outline { background: transparent; border: 2px solid var(--tc-hot); color: var(--tc-text-2); }
.tc-btn--outline:hover { background: var(--tc-hot); color: var(--tc-text); }

.tc-badge-hot {
  display: inline-flex; padding: 2px 6px; border-radius: 4px;
  background: var(--tc-hot); color: var(--tc-text);
  font-family: var(--tc-font-body); font-size: 10px; font-weight: 700; line-height: 1;
}

.tc-eyebrow { display: flex; gap: 8px; align-items: center; }
.tc-eyebrow::before { content: ""; width: 16px; height: 2px; background: var(--tc-cyan-600); }
.tc-eyebrow span, .tc-eyebrow {
  font-family: var(--tc-font-display); font-size: 14px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--tc-cyan-600); line-height: 1;
}
.tc-h2 {
  margin: 0; font-family: var(--tc-font-display); font-weight: 400;
  font-size: clamp(32px, 4vw, 48px); letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--tc-text); line-height: 1;
}

/* 3. SHELL ----------------------------------------------------------------- */

/* Visibilidad desktop / mobile */
.tc-desk { display: none !important; }
@media (min-width: 1024px) {
  .tc-desk { display: flex !important; }
  .tc-mob  { display: none !important; }
}

/* Header ------------------------------------------------------------------- */
.tc-header {
  position: sticky; top: var(--tc-header-top); z-index: 60;
  display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 24px;
  padding: 16px var(--tc-gutter); box-sizing: border-box; width: 100%;
  background: var(--tc-glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tc-border);
  font-family: var(--tc-font-body); color: var(--tc-text);
  transition: padding .3s ease;
  animation: tcDropIn .55s var(--tc-ease);
}
.tc-header.is-compact { padding-top: 10px; padding-bottom: 10px; }
.tc-header *, .tc-mobile-menu *, .tc-footer * { box-sizing: border-box; }
.tc-header a, .tc-mobile-menu a, .tc-footer a { text-decoration: none; box-shadow: none; }

.tc-header .tc-header__burger {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0 0 0 -12px; padding: 0;
  background: none; border: 0; border-radius: 0; color: var(--tc-text); cursor: pointer; flex-shrink: 0;
}
.tc-header .tc-header__burger:hover, .tc-header .tc-header__burger:focus { background: none; color: var(--tc-cyan); }

.tc-header__logo { display: block; flex-shrink: 0; }
.tc-header__logo img, .tc-logo { display: block; width: 143px; max-width: none; height: auto; }

.tc-nav {
  flex-direction: row; gap: 24px; align-items: center; justify-content: center; flex: 1;
  margin: 0; padding: 0; font-size: 14px; line-height: 1.5;
}
.tc-header .tc-nav .tc-nav__link { color: var(--tc-text-dim); font-weight: 400; transition: color .2s ease; white-space: nowrap; }
.tc-header .tc-nav .tc-nav__link:hover, .tc-header .tc-nav .tc-nav__link:focus-visible { color: var(--tc-cyan-600); }
.tc-header .tc-nav .tc-nav__link.is-active { color: var(--tc-cyan-600); font-weight: 600; }
.tc-header .tc-nav .tc-nav__link--hot { display: flex; gap: 6px; align-items: center; color: var(--tc-hot); font-weight: 600; }
.tc-header .tc-nav .tc-nav__link--hot:hover { color: var(--tc-cyan-600); }

.tc-header__actions { display: flex; flex-direction: row; gap: 12px; align-items: center; flex-shrink: 0; }
.tc-header .tc-hot-pill {
  display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 6px; align-items: center;
  background: var(--tc-hot); color: var(--tc-text);
  font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.tc-header .tc-hot-pill:hover { color: var(--tc-text); filter: brightness(1.08); }

.tc-header__icons { flex-direction: row; gap: 20px; align-items: center; flex-shrink: 0; }
.tc-header .tc-icon-link, .tc-footer .tc-icon-link {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; color: var(--tc-text);
}
.tc-icon-link img { width: 100%; height: 100%; object-fit: contain; display: block; max-width: none; }
.tc-icon-link:hover { opacity: .8; }

.tc-cart-link { width: 44px; height: 44px; margin-right: -12px; }  /* área táctil en móvil */
.tc-cart-link img { width: 20px; height: 20px; }
@media (min-width: 1024px) { .tc-cart-link { width: 20px; height: 20px; margin-right: 0; } }

.tc-cart-count {
  position: absolute; top: 4px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tc-cyan); color: var(--tc-ink);
  font-family: var(--tc-font-body); font-size: 10px; font-weight: 700; line-height: 1;
}
.tc-cart-count[data-count="0"], .tc-cart-count:empty { display: none; }
@media (min-width: 1024px) { .tc-cart-count { top: -8px; right: -10px; } }

@keyframes tcDropIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Menú móvil --------------------------------------------------------------- */
.tc-mobile-menu {
  position: fixed; inset: 0; z-index: 99990;
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
  background: var(--tc-bg); font-family: var(--tc-font-body); color: var(--tc-text);
}
.tc-mobile-menu__top { display: flex; flex-direction: column; gap: 20px; }
.tc-mobile-menu__brand { display: flex; padding: 24px 16px 12px; align-items: center; }
.tc-mobile-menu__nav { display: flex; flex-direction: column; padding: 8px 16px; }
.tc-mobile-menu .tc-mobile-menu__nav a {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px; padding: 16px 8px;
  border-bottom: 1px solid var(--tc-border-soft);
  color: var(--tc-text); font-size: 18px; font-weight: 500; line-height: 1.3;
}
.tc-mobile-menu .tc-mobile-menu__nav a svg { stroke: var(--tc-icon-dim); flex-shrink: 0; }
.tc-mobile-menu .tc-mobile-menu__nav a.is-active { color: var(--tc-cyan-600); font-weight: 600; }
.tc-mobile-menu .tc-mobile-menu__nav a.is-active svg { stroke: var(--tc-cyan-600); }
.tc-mobile-menu .tc-mobile-menu__nav a:hover { color: var(--tc-cyan); }
.tc-mobile-menu__label { display: flex; gap: 12px; align-items: center; }
.tc-mobile-menu__nav .tc-badge-hot { padding: 2px 8px; line-height: 1.3; }

.tc-mobile-menu__bottom {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; gap: 20px; padding: 24px; justify-content: space-between; align-items: flex-end;
  background: var(--tc-surface-1); border-top: 1px solid var(--tc-border-soft);
}
.tc-mobile-menu__support { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tc-mobile-menu .tc-mobile-menu__support span { font-size: 11px; letter-spacing: 1px; color: var(--tc-icon-dim); text-transform: uppercase; }
.tc-mobile-menu .tc-mobile-menu__support a { font-size: 14px; font-weight: 600; color: var(--tc-cyan); overflow-wrap: anywhere; }
.tc-mobile-menu .tc-mobile-menu__close {
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--tc-bg); border: 1px solid var(--tc-border-soft);
  color: var(--tc-text); cursor: pointer;
}
.tc-mobile-menu .tc-mobile-menu__close:hover { background: var(--tc-bg); color: var(--tc-cyan); }
html.tc-menu-open, html.tc-menu-open body { overflow: hidden; }

/* Footer ------------------------------------------------------------------- */
.tc-footer {
  background: var(--tc-surface-2); border-top: 1px solid var(--tc-border-soft);
  font-family: var(--tc-font-body); color: var(--tc-text-muted);
}
.tc-footer__inner {
  max-width: var(--tc-max); margin: 0 auto; padding: 40px var(--tc-gutter);
  display: flex; flex-direction: column; gap: 32px;
}
.tc-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.tc-footer__brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.tc-footer__brand p { margin: 0; font-size: 13px; line-height: 20px; color: var(--tc-text-muted); max-width: 38ch; }
.tc-footer__social { display: flex; gap: 16px; align-items: center; }
.tc-footer__social .tc-header .tc-icon-link, .tc-footer .tc-icon-link { width: 24px; height: 24px; }
.tc-footer__col { display: flex; flex-direction: column; gap: 12px; }
.tc-footer .tc-footer__title {
  margin: 0; padding: 0; font-family: var(--tc-font-body);
  font-size: 14px; font-weight: 700; letter-spacing: 1px; line-height: 1.4;
  text-transform: uppercase; color: var(--tc-text);
}
.tc-footer__links { display: flex; flex-direction: column; gap: 8px; }
.tc-footer .tc-footer__links a { font-size: 13px; line-height: 1.5; color: var(--tc-text-muted); }
.tc-footer .tc-footer__links a:hover { color: var(--tc-cyan); }
.tc-footer .tc-footer__links a.is-active { color: var(--tc-cyan-600); font-weight: 600; }
.tc-footer__pay { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-footer__pay span {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 3px;
  border: 1px solid var(--tc-border); background: var(--tc-surface-3);
  font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--tc-text-muted); line-height: 1.4;
}
.tc-footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px; padding-top: 20px;
  justify-content: space-between; align-items: center; border-top: 1px solid var(--tc-border-soft);
}
.tc-footer__bottom small { font-size: 11px; color: rgba(201, 196, 211, .6); }
.tc-footer__dots { display: flex; gap: 8px; align-items: center; }
.tc-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.tc-footer__bottom small.tc-footer__powered { font-size: 12px; color: rgba(201, 196, 211, .75); }
.tc-footer__powered a { color: var(--tc-cyan); font-weight: 600; text-decoration: none; }
.tc-footer__powered a:hover, .tc-footer__powered a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.tc-footer__dots i { display: block; width: 5px; height: 5px; }

/* Botón flotante de WhatsApp ----------------------------------------------- */
a.tc-wa {
  position: fixed; right: clamp(16px, 2.5vw, 32px); bottom: clamp(16px, 2.5vw, 32px); z-index: 80;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; min-width: 56px; padding: 0 16px; box-sizing: border-box;
  border-radius: 100px; background: rgba(18, 18, 26, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(89, 217, 220, .45); color: var(--tc-cyan);
  box-shadow: 0 0 24px 0 rgba(89, 217, 220, .25), 0 10px 30px rgba(0, 0, 0, .5);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.tc-wa:hover {
  transform: translateY(-2px); border-color: var(--tc-cyan); color: var(--tc-cyan);
  box-shadow: 0 0 32px 0 rgba(89, 217, 220, .45), 0 12px 34px rgba(0, 0, 0, .55);
}
.tc-wa__label { font-family: var(--tc-font-display); font-size: 18px; letter-spacing: 2px; line-height: 1; color: var(--tc-text-2); }
@media (max-width: 768px) { .tc-wa { padding: 0; width: 56px; } .tc-wa__label { display: none; } }

/* Foco visible accesible en todo el shell */
.tc-header a:focus-visible, .tc-header button:focus-visible,
.tc-mobile-menu a:focus-visible, .tc-mobile-menu button:focus-visible,
.tc-footer a:focus-visible, .tc-wa:focus-visible, .tc-btn:focus-visible {
  outline: 2px solid var(--tc-cyan); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .tc-header { animation: none; transition: none; }
  .tc-wa, .tc-btn { transition: none; }
}

/* Carrito: estado vacío / con productos ------------------------------------ */
.tc-cart-link .tc-cart-ico--full { display: none; }
.tc-cart-link.is-filled .tc-cart-ico--empty { display: none; }
.tc-cart-link.is-filled .tc-cart-ico--full { display: block; }
.tc-cart-link.is-filled { filter: drop-shadow(0 0 6px rgba(89, 217, 220, .55)); }
.tc-cart-link.is-filled .tc-cart-count { animation: tcPop .35s var(--tc-ease); }
@keyframes tcPop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tc-cart-link.is-filled .tc-cart-count { animation: none; } }
