/* ── SF Tienda — Public CSS ────────────────────────────── */
:root {
  --sf-bg:       #060608;
  --sf-surface:  #0e0e12;
  --sf-card:     #141418;
  --sf-border:   #2a2a32;
  --sf-accent:   #0A84FF;
  --sf-cyan:     #00D4FF;
  --sf-green:    #22c55e;
  --sf-text:     #E8E8EC;
  --sf-muted:    #888;
  --sf-radius:   12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--sf-bg);
  color: var(--sf-text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--sf-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.tn-header {
  background: #08080c;
  border-bottom: 1px solid var(--sf-border);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tn-brand { display: flex; align-items: center; gap: 10px; color: var(--sf-text); text-decoration: none; }
.tn-brand img { height: 32px; }
.tn-brand-name { font-size: 15px; font-weight: 700; }
.tn-brand-sub { font-size: 10px; color: var(--sf-accent); text-transform: uppercase; letter-spacing: 1px; }
.tn-header-nav { display: flex; gap: 8px; }

.tn-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}
.tn-btn:hover { opacity: .88; text-decoration: none; }
.tn-btn--accent { background: var(--sf-accent); color: #fff; }
.tn-btn--ghost { background: transparent; color: var(--sf-text); border: 1px solid var(--sf-border); }
.tn-btn--block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.tn-btn:disabled { opacity: .4; cursor: not-allowed; }

.tn-hero {
  padding: 48px 20px 36px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.tn-hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.tn-hero h1 span { color: var(--sf-accent); }
.tn-hero-sub { color: var(--sf-muted); font-size: 15px; }

.tn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px 20px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}
.tn-search, .tn-select {
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  border-radius: 8px;
  color: var(--sf-text);
  padding: 8px 12px;
  font-size: 13px;
}
.tn-search { flex: 1; min-width: 180px; }
.tn-select option { background: #1a1a20; }
.tn-count { font-size: 12px; color: var(--sf-muted); margin-left: auto; }

.tn-main { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }

.tn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.tn-card {
  background: var(--sf-card);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.tn-card:hover { border-color: var(--sf-accent); transform: translateY(-2px); text-decoration: none; }
.tn-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--sf-surface); }
.tn-card-body { padding: 12px 14px 14px; }
.tn-card-ref { font-size: 10px; color: var(--sf-muted); text-transform: uppercase; letter-spacing: .5px; }
.tn-card-title { font-size: 14px; font-weight: 600; margin: 4px 0 8px; line-height: 1.3; }
.tn-card-price { font-size: 18px; font-weight: 800; color: var(--sf-accent); }
.tn-card-stock { font-size: 11px; color: var(--sf-muted); margin-top: 4px; }

.tn-empty { text-align: center; padding: 60px 20px; color: var(--sf-muted); grid-column: 1 / -1; }

/* Detail */
.tn-detail-wrap { max-width: 1000px; margin: 0 auto; padding: 20px; }
.tn-detail-back { display: inline-block; margin-bottom: 20px; font-size: 13px; color: var(--sf-muted); }

.tn-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 768px) { .tn-detail-grid { grid-template-columns: 1fr; } }

.tn-gallery-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--sf-radius); background: var(--sf-surface); border: 1px solid var(--sf-border); }
.tn-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tn-gallery-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.tn-gallery-thumbs img.active { border-color: var(--sf-accent); }

.tn-detail-ref { font-size: 12px; color: var(--sf-muted); text-transform: uppercase; letter-spacing: .5px; }
.tn-detail-title { font-size: clamp(22px, 4vw, 28px); font-weight: 800; margin: 6px 0 12px; }
.tn-detail-price { font-size: 32px; font-weight: 800; color: var(--sf-accent); margin-bottom: 16px; }
.tn-detail-desc { color: var(--sf-muted); font-size: 14px; margin-bottom: 20px; line-height: 1.7; }

.tn-specs { margin-bottom: 24px; }
.tn-specs h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--sf-muted); margin-bottom: 8px; }
.tn-spec-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--sf-border); font-size: 13px; }
.tn-spec-row span:first-child { color: var(--sf-muted); }

.tn-checkout-box {
  background: var(--sf-card);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  padding: 20px;
}
.tn-checkout-box h4 { font-size: 14px; margin-bottom: 14px; }

.tn-field { margin-bottom: 12px; }
.tn-field label { display: block; font-size: 12px; color: var(--sf-muted); margin-bottom: 4px; }
.tn-field input, .tn-field select {
  width: 100%;
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  border-radius: 8px;
  color: var(--sf-text);
  padding: 9px 12px;
  font-size: 14px;
}
.tn-field select option { background: #1a1a20; }

.tn-envio-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tn-envio-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--sf-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s;
}
.tn-envio-opt:has(input:checked) { border-color: var(--sf-accent); background: rgba(10,132,255,.06); }
.tn-envio-opt input { margin-top: 3px; accent-color: var(--sf-accent); }
.tn-envio-opt strong { display: block; font-size: 13px; }
.tn-envio-opt span { font-size: 12px; color: var(--sf-muted); }

.tn-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--sf-border);
  margin: 14px 0;
  font-size: 15px;
}
.tn-total strong { font-size: 20px; color: var(--sf-accent); }

.tn-shipping-note { font-size: 11px; color: var(--sf-muted); margin-top: 8px; text-align: center; }

.tn-loading { text-align: center; padding: 80px 20px; color: var(--sf-muted); }
