/* ============================================================
   Stream Tech Córdoba — Rediseño de la Tienda (catalogo.html)
   Se carga DESPUÉS de styles_mobile.css y solo afecta al catálogo.
   ============================================================ */

:root {
  --cat-ink: #1d1d1f;
  --cat-muted: #6e6e73;
  --cat-line: rgba(0, 0, 0, 0.08);
  --cat-surface: #ffffff;
  --cat-soft: #f5f5f7;
  --cat-accent: #F5A623;
  --cat-accent-dark: #d98a0b;
  --cat-green: #059669;
  --cat-radius: 18px;
}

.catalog-page-section {
  --cat-ink: #1d1d1f;
  --cat-muted: #6e6e73;
  --cat-line: rgba(0, 0, 0, 0.08);
  --cat-surface: #ffffff;
  --cat-soft: #f5f5f7;
  --cat-accent: #F5A623;
  --cat-accent-dark: #d98a0b;
  --cat-green: #059669;
  --cat-radius: 18px;
  max-width: 1280px;
  padding: calc(var(--nav-height, 52px) + 20px) 20px 80px;
}

/* ───────── Encabezado ───────── */
.catalog-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(245, 166, 35, 0.28) 0%, rgba(245, 166, 35, 0) 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, #111113 0%, #1d1d1f 60%, #232326 100%);
  color: #f5f5f7;
  padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px);
  margin-bottom: 22px;
}
.catalog-hero-inner { position: relative; max-width: 760px; }

.catalog-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(245, 245, 247, 0.55);
  margin-bottom: 18px;
}
.catalog-breadcrumb a { color: rgba(245, 245, 247, 0.75); text-decoration: none; }
.catalog-breadcrumb a:hover { color: #fff; }
.catalog-breadcrumb span:last-child { color: rgba(245, 245, 247, 0.9); }

.catalog-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cat-accent);
  margin: 0 0 10px;
}
.catalog-title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: #fff;
}
.catalog-subtitle {
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem);
  line-height: 1.55;
  color: rgba(245, 245, 247, 0.72);
  margin: 0 0 24px;
  max-width: 620px;
}
.catalog-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}
.catalog-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.catalog-trust svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--cat-accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ───────── Chips de categorías ───────── */
.catalog-chips-wrap {
  position: sticky;
  top: var(--nav-height, 52px);
  z-index: 20;
  margin: 0 -20px 18px;
  padding: 10px 20px;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.catalog-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.catalog-chips::-webkit-scrollbar { display: none; }
.catalog-chip {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cat-ink);
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.catalog-chip:hover { border-color: rgba(0, 0, 0, 0.22); }
.catalog-chip.is-active {
  background: var(--cat-ink);
  color: #fff;
  border-color: var(--cat-ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ───────── Layout ───────── */
.catalog-page-section .catalog-container {
  max-width: none;
  padding: 0;
  gap: 28px;
}

/* ───────── Sidebar de filtros ───────── */
.catalog-page-section .catalog-sidebar {
  flex: 0 0 240px;
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: var(--cat-radius);
  padding: 22px;
}
@media (min-width: 900px) {
  .catalog-page-section .catalog-sidebar {
    top: calc(var(--nav-height, 52px) + 76px);
    max-height: calc(100vh - var(--nav-height, 52px) - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.catalog-page-section .sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--cat-ink);
}
.sidebar-close {
  display: none;
  background: var(--cat-soft);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--cat-ink);
}
.catalog-page-section .filter-group {
  border-top: 1px solid var(--cat-line);
  padding-top: 14px;
  margin-bottom: 14px;
}
.catalog-page-section .mobile-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.catalog-page-section .mobile-details summary::-webkit-details-marker { display: none; }
.catalog-page-section .mobile-details summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.8px solid var(--cat-muted);
  border-bottom: 1.8px solid var(--cat-muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s;
}
.catalog-page-section .mobile-details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.catalog-page-section .filter-group h4 {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-muted);
  margin: 0;
}
.catalog-page-section .filter-list { gap: 2px; padding-top: 10px; }
.catalog-page-section .filter-label {
  font-size: 0.92rem;
  color: var(--cat-ink);
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.catalog-page-section .filter-label:hover { background: var(--cat-soft); }
.catalog-page-section .filter-label input[type="checkbox"] {
  accent-color: var(--cat-ink);
  width: 17px;
  height: 17px;
}
.sidebar-actions {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--cat-line);
  padding-top: 16px;
}
.sidebar-btn {
  flex: 1;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sidebar-btn--ghost { background: transparent; color: var(--cat-ink); border: 1px solid var(--cat-line); }
.sidebar-btn--ghost:hover { background: var(--cat-soft); }
.sidebar-btn--primary { display: none; background: var(--cat-ink); color: #fff; border: 1px solid var(--cat-ink); }

/* ───────── Barra de herramientas ───────── */
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.catalog-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--cat-muted);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.catalog-search:focus-within {
  border-color: var(--cat-ink);
  box-shadow: 0 0 0 4px rgba(29, 29, 31, 0.06);
}
.catalog-page-section .catalog-search .search-input {
  border: 0;
  background: transparent;
  padding: 13px 0;
  font-size: 0.95rem;
  color: var(--cat-ink);
  width: 100%;
}
.catalog-page-section .catalog-search .search-input:focus { border: 0; }
.catalog-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: 14px;
  padding: 0 6px 0 14px;
  font-size: 0.85rem;
  color: var(--cat-muted);
  white-space: nowrap;
}
.catalog-page-section .catalog-sort .sort-select {
  border: 0;
  background: transparent;
  padding: 13px 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cat-ink);
  width: auto;
}
.filters-open-btn {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cat-ink);
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
}
.filters-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cat-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filters-badge[hidden] { display: none; }

.catalog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.catalog-page-section .catalog-count { font-size: 0.9rem; color: var(--cat-muted); }
.catalog-page-section .catalog-count strong { color: var(--cat-ink); font-weight: 700; }
.catalog-page-section .update-banner {
  margin: 0;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.78rem;
}

/* ───────── Grilla y tarjetas ───────── */
.catalog-page-section .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.pc {
  display: flex;
  flex-direction: column;
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: var(--cat-radius);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s, border-color 0.35s;
}
.pc:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09);
}
.pc-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f7f7f9 0%, #efeff2 100%);
  padding: 18px;
  overflow: hidden;
}
.pc-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.pc:hover .pc-media img { transform: scale(1.05); }

.pc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--cat-ink);
  color: #fff;
}
.pc-badge--consult { background: #fff4e0; color: #b26a00; border: 1px solid #ffd99a; }
.pc-badge--soldout { background: #f1f1f3; color: #8a8a8f; border: 1px solid #e2e2e6; }

.pc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 16px 18px;
}
.pc-brand {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-muted);
  margin-bottom: 6px;
}
.pc-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.pc-name a { color: var(--cat-ink); text-decoration: none; }
.pc-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc-price {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cat-ink);
  margin: 0 0 4px;
}
.pc-ship {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cat-green);
  margin: 0;
}
.pc-action { margin-top: auto; padding-top: 14px; }
.pc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pc-btn--primary { background: var(--cat-ink); color: #fff; }
.pc-btn--primary:hover { background: #000; color: #fff; }
.pc-btn--consult { background: #fff; color: var(--cat-accent-dark); border-color: var(--cat-accent); }
.pc-btn--consult:hover { background: var(--cat-accent); color: #fff; }
.pc-btn--disabled { background: var(--cat-soft); color: #a1a1a6; cursor: not-allowed; }
.pc-btn--wa { background: #25D366; color: #fff; width: auto; padding: 12px 22px; }

.pc.is-soldout .pc-media img { opacity: 0.45; filter: grayscale(1); }
.pc.is-soldout .pc-price { color: #a1a1a6; }

/* Estado vacío / cargando */
.catalog-page-section .product-grid-loading { grid-column: 1 / -1; }
.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  background: var(--cat-surface);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--cat-radius);
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.catalog-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--cat-ink); margin: 0; }
.catalog-empty-text { color: var(--cat-muted); margin: 0 0 10px; max-width: 420px; }

/* ───────── Paginación ───────── */
.catalog-page-section .pagination-wrapper {
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--cat-line);
  font-size: 0.88rem;
  color: var(--cat-muted);
}
.catalog-page-section .pagination-actions { gap: 6px; }
.catalog-page-section .pagination-actions button {
  min-width: 38px;
  width: auto;
  height: 38px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cat-ink);
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: 10px;
}
.catalog-page-section .pagination-actions button:hover:not(:disabled) { background: var(--cat-soft); }
.catalog-page-section .pagination-actions button.is-current {
  background: var(--cat-ink);
  color: #fff;
  border-color: var(--cat-ink);
}
.catalog-page-section .pagination-arrow { font-size: 1.2rem !important; }
.pagination-ellipsis { padding: 0 4px; color: var(--cat-muted); }
.catalog-page-section .pagination-page-size select {
  border: 1px solid var(--cat-line);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  background: var(--cat-surface);
  color: var(--cat-ink);
}

.filters-overlay { display: none; }

/* ───────── Tablet y celular ───────── */
@media (max-width: 899px) {
  .catalog-page-section { padding: calc(var(--nav-height, 52px) + 12px) 14px 64px; }
  .catalog-hero { border-radius: 20px; margin-bottom: 14px; padding: 22px 20px; }
  .catalog-breadcrumb { display: none; }
  .catalog-eyebrow { font-size: 0.68rem; margin-bottom: 8px; }
  .catalog-title { font-size: 1.85rem; margin-bottom: 8px; }
  .catalog-subtitle { font-size: 0.88rem; margin-bottom: 16px; }
  .catalog-trust {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 0 20px;
  }
  .catalog-trust::-webkit-scrollbar { display: none; }
  .catalog-trust li { font-size: 0.74rem; padding: 6px 11px; white-space: nowrap; flex-shrink: 0; }
  .catalog-chips-wrap { margin: 0 -14px 12px; padding: 10px 14px; }

  .filters-open-btn { display: inline-flex; }
  .catalog-sort span { display: none; }
  .catalog-sort { padding: 0 4px 0 8px; }
  .catalog-toolbar { flex-wrap: wrap; }
  .catalog-search { flex: 1 1 100%; }
  .filters-open-btn, .catalog-sort { flex: 1 1 0; justify-content: center; }
  .catalog-page-section .catalog-sort .sort-select { width: 100%; }

  /* Panel deslizable desde abajo */
  .catalog-page-section .catalog-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 3001;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 22px 22px 0 0;
    border: 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.2);
  }
  .catalog-page-section .catalog-sidebar.is-open { transform: translateY(0); }
  .sidebar-close { display: inline-flex; }
  .sidebar-actions {
    position: sticky;
    bottom: calc(-20px - env(safe-area-inset-bottom));
    background: var(--cat-surface);
    margin: 0 -20px calc(-20px - env(safe-area-inset-bottom));
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  }
  .sidebar-btn--primary { display: block; }
  .filters-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .filters-overlay.is-open { opacity: 1; pointer-events: auto; }
  body.filters-locked { overflow: hidden; }

  .catalog-page-section .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pc-media { padding: 10px; }
  .pc-body { padding: 12px 12px 14px; }
  .pc-brand { font-size: 0.64rem; margin-bottom: 4px; }
  .pc-name { font-size: 0.84rem; }
  .pc-price { font-size: 1.05rem; }
  .pc-ship { font-size: 0.72rem; gap: 4px; }
  .pc-btn { font-size: 0.82rem; padding: 10px 8px; border-radius: 10px; }
  .pc-badge { top: 8px; left: 8px; font-size: 0.6rem; padding: 4px 8px; }

  .catalog-page-section .pagination-wrapper { justify-content: center; text-align: center; }
  .catalog-page-section .pagination-info { width: 100%; }
}

@media (min-width: 1200px) {
  .catalog-page-section .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .catalog-page-section .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog-page-section .catalog-sidebar { flex-basis: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-page-section .pc,
  .pc-media img,
  .catalog-page-section .catalog-sidebar { transition: none; }
}

/* ───────── Bloques SEO (páginas generadas) ───────── */
.seo-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--cat-muted);
  margin-bottom: 24px;
}
.seo-breadcrumb a { color: var(--cat-muted); text-decoration: none; }
.seo-breadcrumb a:hover { color: var(--cat-ink); text-decoration: underline; }
.seo-breadcrumb [aria-current] { color: var(--cat-ink); font-weight: 500; }

.seo-related { background: var(--cat-soft); padding: 64px 20px; }
.seo-related-inner { max-width: 1200px; margin: 0 auto; }
.seo-related-title {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--cat-ink);
}
.seo-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.seo-related-more { margin: 24px 0 0; text-align: center; }
.seo-related-more a { color: var(--cat-ink); font-weight: 600; text-decoration: none; }
.seo-related-more a:hover { text-decoration: underline; }

.catalog-seo {
  margin-top: 56px;
  padding: 32px clamp(20px, 4vw, 40px);
  background: var(--cat-surface);
  border: 1px solid var(--cat-line);
  border-radius: 24px;
}
.catalog-seo-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 12px; color: var(--cat-ink); }
.catalog-seo-text { color: var(--cat-muted); line-height: 1.65; margin: 0 0 14px; max-width: 900px; }
.catalog-seo-links { font-size: 0.92rem; margin: 0 0 18px; color: var(--cat-muted); }
.catalog-seo-links a { color: var(--cat-ink); font-weight: 600; }
.catalog-seo-subtitle { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cat-muted); margin: 20px 0 10px; }
.catalog-seo-index {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3 260px;
  column-gap: 32px;
}
.catalog-seo-index li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--cat-line);
  font-size: 0.86rem;
}
.catalog-seo-index a { color: var(--cat-ink); text-decoration: none; }
.catalog-seo-index a:hover { text-decoration: underline; }
.catalog-seo-index span { color: var(--cat-muted); white-space: nowrap; }

@media (max-width: 899px) {
  .seo-related { padding: 40px 14px; }
  .seo-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-seo { margin-top: 36px; padding: 22px 18px; border-radius: 18px; }
}
