/* ============================================================
   GEEK ZONE STORE · TIENDA · v1.0
   Filtros laterales + grid denso + imágenes sin recorte
   ============================================================ */

:root{
  --tn-bg:#FBFAF7;
  --tn-surface:#FFFFFF;
  --tn-surface-2:#F4F1EA;
  --tn-surface-3:#EDE9FE;
  --tn-line:rgba(20,16,28,.08);
  --tn-line-2:rgba(20,16,28,.14);
  --tn-ink:#14101C;
  --tn-ink-2:#4A4359;
  --tn-muted:#8A83A0;
  --tn-purple:#6d28d9;
  --tn-purple-2:#8B5CF6;
  --tn-purple-dp:#4C1D95;
  --tn-purple-sf:#EDE9FE;
  --tn-green:#059669;
  --tn-yellow:#FBBF24;
  --tn-red:#DC2626;
  --tn-ease:cubic-bezier(.2,.8,.2,1);
}

.tn-page{
  max-width:1440px;
  margin:0 auto;
  padding:0 clamp(16px,4vw,56px) 60px;
}

/* ─── BREADCRUMB ─── */
.tn-crumb{
  display:flex;
  align-items:center;
  gap:8px;
  padding:22px 0 18px;
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.7rem;
  letter-spacing:1.2px;
  color:var(--tn-muted);
  flex-wrap:wrap;
}
.tn-crumb a{color:var(--tn-purple);text-decoration:none;font-weight:600;transition:.2s}
.tn-crumb a:hover{color:var(--tn-purple-dp)}
.tn-crumb span.sep{opacity:.4}
.tn-crumb strong{color:var(--tn-ink);font-weight:700}

/* ─── HEADER ─── */
.tn-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:24px;
  flex-wrap:wrap;
  padding-bottom:28px;
  border-bottom:1px solid var(--tn-line);
  margin-bottom:26px;
}
.tn-head__lead{max-width:640px}
.tn-head__kicker{
  display:inline-flex;align-items:center;gap:10px;
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.62rem;letter-spacing:2.8px;text-transform:uppercase;
  font-weight:700;color:var(--tn-purple);margin-bottom:10px;
}
.tn-head__kicker::before{content:'';width:22px;height:1px;background:currentColor;display:block}
.tn-head__title{
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:800;
  font-size:clamp(1.6rem,3vw,2.4rem);
  line-height:1.05;
  letter-spacing:-.04em;
  color:var(--tn-ink);
  margin-bottom:8px;
}
.tn-head__title em{
  font-style:normal;font-weight:300;
  background:linear-gradient(135deg,var(--tn-purple),#c026d3);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.tn-head__desc{font-size:.9rem;line-height:1.6;color:var(--tn-muted)}
.tn-head__desc b{color:var(--tn-ink);font-weight:700}

/* ─── LAYOUT: SIDEBAR + GRID ─── */
.tn-layout{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:32px;
  align-items:start;
}

/* ─── SIDEBAR FILTROS ─── */
.tn-sidebar{
  position:sticky;
  top:90px;
  background:var(--tn-surface);
  border:1px solid var(--tn-line);
  border-radius:16px;
  padding:22px 20px;
  max-height:calc(100vh - 110px);
  overflow-y:auto;
}
.tn-sidebar::-webkit-scrollbar{width:5px}
.tn-sidebar::-webkit-scrollbar-thumb{background:rgba(109,40,217,.2);border-radius:100px}
.tn-sidebar::-webkit-scrollbar-track{background:transparent}

.tn-sidebar__head{
  display:flex;justify-content:space-between;align-items:center;
  gap:12px;margin-bottom:20px;
  padding-bottom:16px;
  border-bottom:1px solid var(--tn-line);
}
.tn-sidebar__title{
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:800;font-size:.94rem;letter-spacing:-.02em;color:var(--tn-ink);
  display:flex;align-items:center;gap:8px;
}
.tn-sidebar__title svg{width:15px;height:15px;color:var(--tn-purple)}
.tn-sidebar__clear{
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.58rem;font-weight:700;
  color:var(--tn-red);
  background:transparent;border:0;cursor:pointer;
  letter-spacing:1.4px;text-transform:uppercase;
  padding:4px 8px;border-radius:6px;
  transition:.2s;
}
.tn-sidebar__clear:hover{background:rgba(220,38,38,.08)}

.tn-group{
  padding-bottom:20px;
  margin-bottom:20px;
  border-bottom:1px solid var(--tn-line);
}
.tn-group:last-child{border-bottom:0;padding-bottom:0;margin-bottom:0}
.tn-group__title{
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.58rem;letter-spacing:2px;text-transform:uppercase;
  font-weight:700;color:var(--tn-muted);margin-bottom:12px;
  display:flex;justify-content:space-between;align-items:center;
  cursor:pointer;user-select:none;
}
.tn-group__title:hover{color:var(--tn-ink)}

/* Búsqueda */
.tn-search{
  display:flex;align-items:center;gap:10px;
  padding:11px 14px;
  background:var(--tn-surface-2);
  border:1.5px solid transparent;
  border-radius:11px;
  transition:.25s;
}
.tn-search:focus-within{
  border-color:var(--tn-purple);
  background:var(--tn-surface);
  box-shadow:0 0 0 4px rgba(109,40,217,.08);
}
.tn-search svg{width:15px;height:15px;color:var(--tn-muted);flex-shrink:0}
.tn-search input{
  flex:1;background:transparent;border:0;outline:none;
  font-size:.82rem;font-family:inherit;color:var(--tn-ink);
  min-width:0;
}
.tn-search input::placeholder{color:var(--tn-muted)}
.tn-search__clear{
  background:transparent;border:0;cursor:pointer;
  color:var(--tn-muted);padding:2px;display:none;
  border-radius:50%;transition:.2s;
}
.tn-search__clear:hover{color:var(--tn-ink)}
.tn-search__clear.is-on{display:block}
.tn-search__clear svg{width:13px;height:13px}

/* Opciones (checkbox / radio estilo tarjeta) */
.tn-opt{
  display:flex;align-items:center;gap:10px;
  padding:9px 11px;border-radius:9px;
  cursor:pointer;user-select:none;
  transition:.2s;
  font-size:.82rem;color:var(--tn-ink-2);
}
.tn-opt:hover{background:var(--tn-surface-2);color:var(--tn-ink)}
.tn-opt input{
  appearance:none;-webkit-appearance:none;
  width:16px;height:16px;border-radius:5px;
  border:1.5px solid var(--tn-line-2);
  position:relative;cursor:pointer;flex-shrink:0;
  transition:.2s;
}
.tn-opt input[type="radio"]{border-radius:50%}
.tn-opt input:checked{
  background:var(--tn-purple);border-color:var(--tn-purple);
}
.tn-opt input:checked::after{
  content:'';position:absolute;inset:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat;
}
.tn-opt input[type="radio"]:checked::after{
  content:'';position:absolute;top:50%;left:50%;
  transform:translate(-50%,-50%);
  width:6px;height:6px;border-radius:50%;background:#fff;
  background-image:none;
}
.tn-opt__label{flex:1;line-height:1.3}
.tn-opt__count{
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.6rem;color:var(--tn-muted);font-weight:600;
}
.tn-opt.is-on .tn-opt__label{color:var(--tn-purple);font-weight:700}

/* Rango de precio */
.tn-price{
  display:flex;gap:8px;align-items:center;margin-top:6px;
}
.tn-price input{
  flex:1;padding:9px 11px;
  border-radius:9px;
  background:var(--tn-surface-2);
  border:1.5px solid transparent;
  font-size:.8rem;font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  color:var(--tn-ink);outline:none;transition:.2s;min-width:0;
}
.tn-price input:focus{
  border-color:var(--tn-purple);
  background:var(--tn-surface);
  box-shadow:0 0 0 3px rgba(109,40,217,.08);
}
.tn-price span{color:var(--tn-muted);font-size:.8rem}

/* ─── TOOLBAR SUPERIOR ─── */
.tn-toolbar{
  display:flex;justify-content:space-between;align-items:center;
  gap:14px;flex-wrap:wrap;
  padding:14px 18px;
  background:var(--tn-surface);
  border:1px solid var(--tn-line);
  border-radius:14px;
  margin-bottom:18px;
}
.tn-toolbar__info{
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.72rem;color:var(--tn-muted);
  letter-spacing:.5px;
}
.tn-toolbar__info b{color:var(--tn-ink);font-weight:700}
.tn-toolbar__right{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.tn-sort{
  display:flex;align-items:center;gap:8px;
  padding:9px 13px;
  background:var(--tn-surface-2);
  border:1.5px solid transparent;
  border-radius:10px;
  font-size:.78rem;
  color:var(--tn-ink-2);
  transition:.2s;
}
.tn-sort:focus-within{
  border-color:var(--tn-purple);
  background:var(--tn-surface);
}
.tn-sort svg{width:14px;height:14px;color:var(--tn-muted);flex-shrink:0}
.tn-sort select{
  background:transparent;border:0;outline:none;
  font-family:inherit;font-size:.78rem;color:var(--tn-ink);
  cursor:pointer;font-weight:600;
}

.tn-view{
  display:flex;gap:4px;
  padding:4px;background:var(--tn-surface-2);
  border-radius:10px;
}
.tn-view button{
  padding:7px 11px;border-radius:7px;
  background:transparent;border:0;cursor:pointer;
  color:var(--tn-muted);
  transition:.2s;
  display:grid;place-items:center;
}
.tn-view button svg{width:14px;height:14px}
.tn-view button.is-on{
  background:var(--tn-surface);
  color:var(--tn-purple);
  box-shadow:0 2px 6px -2px rgba(20,16,28,.1);
}
.tn-view button:hover:not(.is-on){color:var(--tn-ink)}

.tn-filter-toggle{
  display:none;
  padding:10px 16px;
  background:var(--tn-ink);
  color:#fff;border:0;border-radius:10px;
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:700;font-size:.76rem;
  cursor:pointer;
  align-items:center;gap:8px;
}
.tn-filter-toggle svg{width:14px;height:14px}

/* ─── GRID PRODUCTOS ─── */
.tn-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}
.tn-grid.is-list{grid-template-columns:1fr;gap:12px}

.tn-prod{
  background:var(--tn-surface);
  border:1px solid var(--tn-line);
  border-radius:16px;
  overflow:hidden;
  transition:.35s var(--tn-ease);
  cursor:pointer;
  display:flex;flex-direction:column;
  position:relative;
}
.tn-prod:hover{
  transform:translateY(-4px);
  border-color:rgba(109,40,217,.3);
  box-shadow:0 22px 44px -22px rgba(20,16,28,.25);
}

/* Imagen sin recorte */
.tn-prod__img{
  aspect-ratio:1;
  background:#FFFFFF;
  position:relative;
  overflow:hidden;
  padding:16px;
  display:grid;place-items:center;
  border-bottom:1px solid var(--tn-line);
}
.tn-prod__img img{
  max-width:100%;max-height:100%;
  width:auto;height:auto;
  object-fit:contain;
  transition:transform .5s var(--tn-ease);
}
.tn-prod:hover .tn-prod__img img{transform:scale(1.05)}

.tn-prod__tags{
  position:absolute;top:10px;left:10px;
  display:flex;gap:5px;z-index:2;flex-wrap:wrap;
  pointer-events:none;
}
.tn-prod__tag{
  padding:4px 10px;border-radius:100px;
  background:var(--tn-ink);color:#fff;
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.5rem;letter-spacing:1.4px;
  text-transform:uppercase;font-weight:800;
}
.tn-prod__tag--new{background:var(--tn-purple)}
.tn-prod__tag--hot{background:linear-gradient(135deg,#FF6B35,#FF2E63)}

.tn-prod__wish{
  position:absolute;top:10px;right:10px;z-index:3;
  width:34px;height:34px;border-radius:50%;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(8px);
  display:grid;place-items:center;
  border:1px solid rgba(20,16,28,.08);
  color:var(--tn-ink);cursor:pointer;
  transition:.25s;
}
.tn-prod__wish:hover{background:var(--tn-ink);color:#fff}
.tn-prod__wish svg{width:14px;height:14px}

.tn-prod__body{
  padding:14px 15px 16px;
  display:flex;flex-direction:column;
  flex:1;gap:6px;
}
.tn-prod__brand{
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.55rem;letter-spacing:1.8px;
  text-transform:uppercase;
  color:var(--tn-purple);font-weight:700;
}
.tn-prod__name{
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:600;font-size:.82rem;
  line-height:1.32;letter-spacing:-.015em;
  color:var(--tn-ink);
  display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;
  min-height:2.15em;
}
.tn-prod__desc{
  font-size:.72rem;line-height:1.5;
  color:var(--tn-muted);
  display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;
}
.tn-prod__foot{
  display:flex;justify-content:space-between;
  align-items:flex-end;gap:10px;
  padding-top:12px;
  border-top:1px solid var(--tn-line);
  margin-top:auto;
}
.tn-prod__prices{
  display:flex;flex-direction:column;gap:2px;min-width:0;
}
.tn-prod__now{
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:800;font-size:1rem;
  letter-spacing:-.03em;
  color:var(--tn-ink);line-height:1;
  white-space:nowrap;
}
.tn-prod__old{
  font-family:var(--gz-font-mono,'JetBrains Mono',monospace);
  font-size:.58rem;color:var(--tn-muted);
  text-decoration:line-through;
  white-space:nowrap;
}
.tn-prod__add{
  width:34px;height:34px;border-radius:10px;
  background:var(--tn-ink);color:#fff;
  display:grid;place-items:center;flex-shrink:0;
  border:0;cursor:pointer;transition:.25s;
}
.tn-prod__add:hover{
  background:var(--tn-purple);
  transform:translateY(-2px);
  box-shadow:0 10px 22px -8px rgba(109,40,217,.5);
}
.tn-prod__add svg{width:14px;height:14px}

/* Vista lista */
.tn-grid.is-list .tn-prod{
  display:grid;
  grid-template-columns:180px 1fr;
  align-items:stretch;
}
.tn-grid.is-list .tn-prod__img{
  aspect-ratio:1;border-bottom:0;
  border-right:1px solid var(--tn-line);
  padding:20px;
}
.tn-grid.is-list .tn-prod__body{padding:20px 24px}
.tn-grid.is-list .tn-prod__name{font-size:.95rem;-webkit-line-clamp:1;min-height:auto}
.tn-grid.is-list .tn-prod__desc{-webkit-line-clamp:3;margin-bottom:8px}

/* ─── EMPTY STATE ─── */
.tn-empty{
  grid-column:1/-1;
  text-align:center;
  padding:80px 24px;
  background:var(--tn-surface);
  border:1px solid var(--tn-line);
  border-radius:20px;
}
.tn-empty__icon{
  width:72px;height:72px;border-radius:20px;
  background:var(--tn-purple-sf);
  color:var(--tn-purple);
  display:grid;place-items:center;
  margin:0 auto 20px;
}
.tn-empty__icon svg{width:32px;height:32px}
.tn-empty__title{
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:700;font-size:1.1rem;
  color:var(--tn-ink);margin-bottom:8px;
}
.tn-empty__desc{
  font-size:.86rem;color:var(--tn-muted);
  max-width:380px;margin:0 auto 22px;line-height:1.55;
}

/* ─── LOAD MORE ─── */
.tn-more{
  display:flex;justify-content:center;
  margin-top:32px;
}
.tn-more button{
  padding:14px 30px;border-radius:100px;
  background:var(--tn-surface);
  border:1.5px solid var(--tn-line-2);
  font-family:var(--gz-font-display,'Sora',sans-serif);
  font-weight:700;font-size:.8rem;
  color:var(--tn-ink);cursor:pointer;
  transition:.3s var(--tn-ease);
  display:inline-flex;align-items:center;gap:10px;
}
.tn-more button:hover{
  border-color:var(--tn-ink);
  transform:translateY(-2px);
  box-shadow:0 12px 28px -10px rgba(20,16,28,.15);
}
.tn-more button svg{width:14px;height:14px;transition:transform .3s}
.tn-more button:hover svg{transform:translateX(3px)}

/* ─── OVERLAY MÓVIL ─── */
.tn-overlay{
  display:none;
  position:fixed;inset:0;
  background:rgba(20,16,28,.5);
  backdrop-filter:blur(4px);
  z-index:900;
  opacity:0;pointer-events:none;
  transition:.3s;
}
.tn-overlay.is-on{opacity:1;pointer-events:auto}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width:1200px){
  .tn-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:1000px){
  .tn-layout{grid-template-columns:1fr;gap:0}
  .tn-sidebar{
    position:fixed;
    top:0;bottom:0;left:-320px;
    width:300px;max-width:88vw;
    max-height:100vh;
    border-radius:0 20px 20px 0;
    z-index:1000;
    transition:left .3s var(--tn-ease);
    overflow-y:auto;
    padding-top:80px;
  }
  .tn-sidebar.is-open{left:0}
  .tn-overlay{display:block}
  .tn-filter-toggle{display:inline-flex}
  .tn-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:760px){
  .tn-grid{grid-template-columns:repeat(2,1fr);gap:12px}
  .tn-prod__img{padding:10px}
  .tn-grid.is-list .tn-prod{grid-template-columns:120px 1fr}
  .tn-grid.is-list .tn-prod__img{padding:12px}
  .tn-grid.is-list .tn-prod__body{padding:14px 16px}
  .tn-toolbar{padding:12px}
}
@media (max-width:520px){
  .tn-head{padding-bottom:20px;margin-bottom:20px}
  .tn-head__title{font-size:1.5rem}
  .tn-crumb{padding:16px 0 14px;font-size:.65rem}
}
/* ═══════════════════════════════════════════════════════════
   Rating (estrellas) · tarjetas de producto
   ═══════════════════════════════════════════════════════════ */
.tn-prod__rating{
  display:flex;
  align-items:center;
  gap:2px;
  margin-bottom:5px;
  min-height:14px;
}
.tn-prod__rating svg{
  width:12px;
  height:12px;
  flex-shrink:0;
}
.tn-prod__rating-count{
  font-family:var(--tn-mono,'JetBrains Mono',monospace);
  font-size:.58rem;
  color:var(--tn-muted);
  font-weight:700;
  margin-left:5px;
  letter-spacing:.3px;
}