/* Páginas de producto y categoría para buscadores (seo.php) */

:root {
  --red: #e31b23;
  --red-dark: #a90f16;
  --ink: #111315;
  --ink-2: #282d32;
  --muted: rgba(17, 19, 21, .62);
  --line: rgba(17, 19, 21, .12);
  --bg: #f7f7f5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; }

.seo-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* Barra superior */
.seo-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(145deg, var(--ink), var(--ink-2));
  border-bottom: 3px solid var(--red);
}

.seo-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.seo-brand img {
  display: block;
  width: auto;
  height: 42px;
}

.seo-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.seo-nav a:not(.seo-btn) {
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.seo-nav a:not(.seo-btn):hover { color: #fff; }

.seo-btn,
.seo-btn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.seo-btn {
  color: #fff;
  background: var(--red);
}

.seo-btn:hover { background: var(--red-dark); }

.seo-btn-lg {
  min-height: 50px;
  padding: 0 22px;
  font-size: 15px;
}

.seo-btn-line {
  min-height: 50px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.seo-btn-line:hover { border-color: var(--red); }

/* Migas de pan */
.seo-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 22px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.seo-crumbs a { text-decoration: none; }
.seo-crumbs a:hover { color: var(--red); }
.seo-crumbs i { font-size: 10px; }
.seo-crumbs span { color: var(--ink); font-weight: 600; }

/* Ficha de producto */
.seo-product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(17, 19, 21, .06);
}

.seo-product-main {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.seo-product-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.seo-product-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.seo-product-gallery img {
  width: 96px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.seo-kicker {
  display: inline-block;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.seo-product h1,
.seo-cat-head h1 {
  margin: 6px 0 16px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -.01em;
}

.seo-specs {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.seo-specs div {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--line);
}

.seo-specs div:last-child { border-bottom: 0; }

.seo-specs dt {
  padding: 11px 14px;
  color: var(--muted);
  background: rgba(17, 19, 21, .03);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.seo-specs dd {
  margin: 0;
  padding: 11px 14px;
  font-weight: 600;
}

.seo-specs .seo-code {
  color: var(--red-dark);
  font-weight: 800;
  letter-spacing: .04em;
}

.seo-desc {
  margin: 0 0 14px;
  color: var(--muted);
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.seo-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.seo-tags span { color: var(--muted); }

.seo-tags a {
  padding: 4px 10px;
  background: rgba(227, 27, 35, .08);
  border-radius: 999px;
  color: var(--red-dark);
  font-weight: 600;
  text-decoration: none;
}

/* Cabecera de categoría */
.seo-cat-head {
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  border-bottom: 4px solid var(--red);
  border-radius: 18px;
}

.seo-cat-head p {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .78);
}

/* Secciones y tarjetas */
.seo-section { margin: 36px 0; }

.seo-section h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.seo-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.seo-card:hover {
  border-color: rgba(227, 27, 35, .45);
  box-shadow: 0 14px 30px rgba(17, 19, 21, .1);
  transform: translateY(-2px);
}

.seo-card-img {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.seo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.seo-card-name {
  padding: 12px 14px 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.seo-card-code {
  padding: 0 14px 14px;
  color: var(--red-dark);
  font-size: 12.5px;
  font-weight: 700;
}

.seo-noimg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(17, 19, 21, .2);
  font-size: 40px;
}

.seo-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-cats a {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.seo-cats a:hover { border-color: var(--red); color: var(--red-dark); }

.seo-cats small {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 500;
}

/* Pie */
.seo-foot {
  margin-top: 48px;
  padding: 24px 0;
  color: rgba(255, 255, 255, .72);
  background: var(--ink);
  font-size: 13.5px;
}

.seo-foot .seo-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.seo-foot strong { color: #fff; }

@media (max-width: 760px) {
  .seo-product {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px;
  }

  .seo-nav a:not(.seo-btn) { display: none; }

  .seo-cat-head { padding: 20px; }

  .seo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .seo-specs div { grid-template-columns: 90px 1fr; }
}
