/*
Theme Name:   ChollosHybrid Child
Theme URI:    https://cholloshybrid.es
Description:  Child theme para ChollosHybrid.es — Ofertas para atletas hibridos
Author:       ChollosHybrid
Version:      1.0.0
Template:     astra
Tags:         astra, child-theme, fitness, deals
Text Domain:  cholloshybrid
*/

/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --ch-lime:        #CCFF00;
  --ch-lime-dark:   #AADD00;
  --ch-black:       #0A0A0A;
  --ch-dark:        #161616;
  --ch-bg:          #F2F2F0;
  --ch-card:        #FFFFFF;
  --ch-border:      #E0E0DC;
  --ch-text:        #1A1A1A;
  --ch-muted:       #767672;
  --ch-red:         #FF2D2D;
  --ch-orange:      #FF7A00;
  --ch-font-head:   'Barlow Condensed', sans-serif;
  --ch-font-body:   'Barlow', sans-serif;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
body {
  font-family: var(--ch-font-body);
  background-color: var(--ch-bg);
  color: var(--ch-text);
}

/* ── Header override ────────────────────────────────────────────────────────── */
.site-header,
#masthead,
.ast-primary-header-bar {
  background-color: var(--ch-black) !important;
  border-bottom: 3px solid var(--ch-lime) !important;
}

.ast-site-identity .site-title a,
.ast-site-identity .site-title a:hover {
  color: #ffffff !important;
}

/* Logo header */
.custom-logo-link img.custom-logo {
  max-height: 52px;
  width: auto;
}

/*
 * Fix: .ast-builder-grid-row-container se usaba en la lista de ocultación del footer
 * pero también aparece en el header desktop → logo invisible a >921px.
 * Solución: eliminado de la lista. El header desktop funciona correctamente.
 */

/* Nav primario */
.ast-primary-header-bar .main-navigation a,
.ast-primary-header-bar .ast-header-navigation a {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #aaaaaa !important;
  text-transform: uppercase;
  padding: 12px 18px;
}

.ast-primary-header-bar .main-navigation a:hover,
.ast-primary-header-bar .main-navigation .current-menu-item > a {
  color: var(--ch-black) !important;
  background-color: var(--ch-lime) !important;
}

/* ── Category nav bar + buscador ───────────────────────────────────────────── */
.ch-cat-nav {
  background: var(--ch-dark);
  border-bottom: 3px solid var(--ch-lime);
}

.ch-cat-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.ch-cat-nav ul {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.ch-cat-nav ul::-webkit-scrollbar { display: none; }

.ch-cat-nav ul li a {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #aaaaaa;
  padding: 10px 14px;
  display: block;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s;
}

.ch-cat-nav ul li a:hover,
.ch-cat-nav ul li.current-cat a,
.ch-cat-nav ul li.current-menu-item a {
  background-color: var(--ch-lime);
  color: var(--ch-black);
}

/* Buscador en barra de categorías */
.ch-header-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.ch-header-search input[type="search"] {
  width: 160px;
  padding: 7px 10px;
  background: #222;
  border: 1px solid #333;
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: #ccc;
  font-family: var(--ch-font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, width 0.2s;
}

.ch-header-search input[type="search"]:focus {
  border-color: var(--ch-lime);
  width: 200px;
}

.ch-header-search input[type="search"]::placeholder { color: #555; }

.ch-header-search button {
  background: var(--ch-lime);
  border: none;
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ch-black);
  display: flex;
  align-items: center;
  transition: background 0.15s;
  line-height: 1;
}

.ch-header-search button:hover { background: var(--ch-lime-dark); }

@media (max-width: 768px) {
  .ch-header-search { display: none; }
  .ch-cat-nav-inner { padding: 0 16px; }
}

/* ── Layout principal ───────────────────────────────────────────────────────── */
.ast-container,
.site-content .ast-container {
  max-width: 1200px !important;
}

.site-content {
  background-color: var(--ch-bg);
  padding-top: 28px;
}

/* ── Toolbar de ordenación ──────────────────────────────────────────────────── */
.ch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.ch-toolbar .ch-count {
  font-size: 13px;
  color: var(--ch-muted);
}

.ch-toolbar .ch-count strong {
  font-weight: 700;
  color: var(--ch-text);
}

.ch-sort-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ch-sort-btns span {
  font-size: 12px;
  color: var(--ch-muted);
}

.ch-sort-btn {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 6px;
  background: #fff;
  color: var(--ch-muted);
  border: 1px solid var(--ch-border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.ch-sort-btn:hover,
.ch-sort-btn.active {
  background: var(--ch-lime);
  color: var(--ch-black);
  border-color: var(--ch-lime);
}

/* ── Deal card (chollo-card) ─────────────────────────────────────────────────── */
.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.chollo-card {
  background: var(--ch-card);
  border-radius: 10px;
  border: 1px solid var(--ch-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: relative;
}

.chollo-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Badge de descuento */
.chollo-card .ch-discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  color: #fff;
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 15px;
  padding: 3px 8px;
  border-radius: 5px;
}

.ch-discount-badge.high   { background: var(--ch-red); }
.ch-discount-badge.medium { background: var(--ch-orange); }
.ch-discount-badge.low    { background: #3A7CA5; }

/* Tag (hot/nuevo) */
.chollo-card .ch-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.ch-tag.hot   { background: var(--ch-lime); color: var(--ch-black); }
.ch-tag.new   { background: var(--ch-dark); color: #ffffff; }

/* Imagen */
.chollo-card .ch-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.chollo-card .ch-thumb-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efefed;
  font-size: 13px;
  color: var(--ch-muted);
}

/* Cuerpo */
.chollo-card .ch-body {
  padding: 14px 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chollo-card .ch-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ch-store-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--ch-font-head);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  color: #fff;
}

.ch-store-amazon    { background: #FF9900; }
.ch-store-pccomp    { background: #0058A3; }
.ch-store-myprotein { background: #FF6600; }
.ch-store-decathlon { background: #0082C3; }
.ch-store-hyrox     { background: #E30614; }
.ch-store-default   { background: #555555; }

.ch-since {
  font-size: 11px;
  color: var(--ch-muted);
}

.chollo-card .ch-title {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  color: var(--ch-text);
  text-wrap: pretty;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chollo-card .ch-title a {
  color: inherit;
  text-decoration: none;
}

.chollo-card .ch-title a:hover {
  color: #000;
}

.chollo-card .ch-excerpt {
  font-size: 13px;
  color: var(--ch-muted);
  line-height: 1.5;
  text-wrap: pretty;
  margin: 0;
}

/* Precio */
.chollo-card .ch-price-row {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--ch-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ch-price-current {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 24px;
  color: var(--ch-text);
}

.ch-price-original {
  font-size: 13px;
  color: var(--ch-muted);
  text-decoration: line-through;
}

.ch-btn-offer {
  background: var(--ch-lime);
  color: var(--ch-black);
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: background 0.15s;
  display: inline-block;
}

.ch-btn-offer:hover {
  background: var(--ch-lime-dark);
  color: var(--ch-black);
}

/* Votos */
.chollo-card .ch-vote-bar {
  background: #F8F8F6;
  border-top: 1px solid var(--ch-border);
  display: flex;
  align-items: center;
  padding: 6px 16px;
  gap: 12px;
}

.ch-vote-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ch-vote-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eee;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.ch-vote-btn:hover,
.ch-vote-btn.voted-up   { background: var(--ch-lime); }
.ch-vote-btn.voted-down { background: #ffcccc; }

.ch-vote-count {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 16px;
  min-width: 32px;
  text-align: center;
}

.ch-comment-count {
  font-size: 12px;
  color: var(--ch-muted);
  margin-left: auto;
  text-decoration: none;
}

/* ── Oferta destacada ──────────────────────────────────────────────────────── */
.chollo-featured {
  background: var(--ch-card);
  border-radius: 12px;
  border: 2px solid var(--ch-lime);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 24px;
  position: relative;
}

.chollo-featured .ch-feat-img {
  position: relative;
}

.chollo-featured .ch-feat-img img,
.chollo-featured .ch-feat-img .ch-thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}

.ch-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--ch-lime);
  color: var(--ch-black);
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

.chollo-featured .ch-feat-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chollo-featured .ch-feat-title {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  color: var(--ch-text);
  text-wrap: pretty;
  margin: 0;
}

.chollo-featured .ch-feat-title a {
  color: inherit;
  text-decoration: none;
}

.chollo-featured .ch-feat-desc {
  font-size: 14px;
  color: var(--ch-muted);
  line-height: 1.6;
  margin: 0;
}

.chollo-featured .ch-feat-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  flex-wrap: wrap;
}

.chollo-featured .ch-feat-price-current {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 40px;
  color: var(--ch-text);
  line-height: 1;
}

.chollo-featured .ch-feat-price-orig {
  font-size: 13px;
  color: var(--ch-muted);
  text-decoration: line-through;
}

.chollo-featured .ch-btn-offer {
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .chollo-featured {
    grid-template-columns: 1fr;
  }
  .chollo-featured .ch-feat-img .ch-thumb-placeholder,
  .chollo-featured .ch-feat-img img {
    min-height: 200px;
  }
}

/* ── Single chollo ─────────────────────────────────────────────────────────── */
.single-chollo .entry-header { display: none; }

.ch-single-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 0 48px;
}

.ch-single-top {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--ch-border);
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

@media (max-width: 900px) {
  .ch-single-top {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 768px) {
  .ch-single-top {
    grid-template-columns: 1fr;
  }
}

.ch-single-img img,
.ch-single-img .ch-thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.ch-single-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ch-single-title {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
}

.ch-single-price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ch-single-price {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 44px;
  color: var(--ch-text);
  line-height: 1;
}

.ch-single-orig {
  font-size: 16px;
  color: var(--ch-muted);
  text-decoration: line-through;
}

.ch-single-discount {
  background: var(--ch-red);
  color: #fff;
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 20px;
  padding: 4px 10px;
  border-radius: 6px;
}

.ch-btn-offer-big {
  background: var(--ch-lime);
  color: var(--ch-black);
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 20px;
  padding: 16px 32px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  display: block;
  transition: background 0.15s;
  letter-spacing: 0.5px;
}

.ch-btn-offer-big:hover {
  background: var(--ch-lime-dark);
  color: var(--ch-black);
}

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

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.ch-sidebar-widget {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--ch-border);
  overflow: hidden;
  margin-bottom: 20px;
}

.ch-sidebar-widget .widget-title,
.ch-sidebar-widget .widgettitle {
  background: var(--ch-dark);
  color: var(--ch-lime) !important;
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 12px 16px;
  margin: 0;
  text-transform: uppercase;
}

.ch-sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ch-sidebar-widget ul li {
  padding: 11px 16px;
  border-top: 1px solid var(--ch-border);
  font-size: 14px;
}

.ch-sidebar-widget ul li:first-child {
  border-top: none;
}

.ch-sidebar-widget ul li a {
  color: var(--ch-text);
  text-decoration: none;
}

.ch-sidebar-widget ul li a:hover {
  color: var(--ch-black);
}

/* Newsletter widget */
.ch-newsletter-widget {
  background: var(--ch-dark);
  border-radius: 10px;
  padding: 20px 16px;
  margin-bottom: 20px;
}

.ch-newsletter-widget h4 {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--ch-lime);
  line-height: 1.2;
  margin: 0 0 8px;
}

.ch-newsletter-widget p {
  font-size: 13px;
  color: #aaa;
  line-height: 1.5;
  margin: 0 0 12px;
}

.ch-newsletter-widget input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #222;
  color: #fff;
  font-size: 14px;
  margin-bottom: 8px;
  font-family: var(--ch-font-body);
}

.ch-newsletter-widget button,
.ch-newsletter-widget input[type="submit"] {
  width: 100%;
  background: var(--ch-lime);
  color: var(--ch-black);
  border: none;
  border-radius: 6px;
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 15px;
  padding: 10px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s;
}

.ch-newsletter-widget button:hover,
.ch-newsletter-widget input[type="submit"]:hover {
  background: var(--ch-lime-dark);
}

/* ── Ocultar footer de Astra (usamos footer propio) ────────────────────────── */
/* NOTA: NO incluir .ast-builder-grid-row-container — también se usa en el header desktop */
#colophon,
.site-footer,
footer#colophon,
footer.site-footer,
.site-below-footer-wrap,
.ast-footer-copyright,
.ast-builder-footer-grid-columns {
  display: none !important;
}

/* ── Footer 3 columnas ──────────────────────────────────────────────────────── */
.ch-footer {
  background: var(--ch-black);
  border-top: 3px solid var(--ch-lime);
}

.ch-footer-body {
  width: 100%;
  padding: 48px 24px 36px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/*
 * Fix Bug 2: El grid de 3 columnas se colapsaba a 1.
 * Usando selector hijo directo para máxima especificidad,
 * más !important para ganar a cualquier herencia de Astra.
 */
.ch-footer-body > .ch-footer-cols {
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr !important;
  gap: 40px;
  width: 100%;
  box-sizing: border-box;
}

.ch-footer-col {
  display: block !important;
  min-width: 0;
}

/*
 * Fix Bug 2 logo SVG: el SVG usa width="100%" height="100%"
 * y colapsa a 0×0 sin dimensiones explícitas en el img.
 * Forzamos height concreto.
 */
.ch-footer-logo {
  max-height: 52px;
  height: 50px !important;
  width: auto !important;
  display: block;
}

/* Col 1: Marca */
.ch-footer-logo-link { display: inline-block; }
.ch-footer-logo { max-height: 52px; width: auto; }

.ch-footer-tagline {
  font-size: 13px;
  color: #888;
  margin: 14px 0 0;
  line-height: 1.6;
  max-width: 280px;
}

/* Col 2 & 3: Links */
.ch-footer-heading {
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 13px;
  color: var(--ch-lime);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.ch-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ch-footer-links a {
  font-size: 14px;
  color: #999 !important;
  text-decoration: none;
  transition: color 0.15s;
}

.ch-footer-links a:hover { color: var(--ch-lime) !important; }

/* Barra de divulgación */
.ch-footer-disclosure {
  background: #111;
  border-top: 1px solid #1a1a1a;
  padding: 12px 24px;
}

.ch-footer-disclosure p {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin: 0;
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
}

.ch-footer-disclosure strong { color: #666; }

/* Barra legal inferior */
.ch-footer-legal {
  border-top: 1px solid #1a1a1a;
  padding: 16px 24px;
}

.ch-footer-legal-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.ch-footer-legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.ch-footer-legal-links li a {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #777 !important;
  text-decoration: none;
  transition: color 0.15s;
}

.ch-footer-legal-links li a:hover { color: var(--ch-lime) !important; }

.ch-footer-copy {
  font-size: 11px;
  color: #777;
  margin: 0;
}

/* ── Buscador overlay ───────────────────────────────────────────────────────── */
.ch-search-toggle {
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  margin-left: 8px;
  line-height: 1;
}

.ch-search-toggle:hover,
.ch-search-toggle[aria-expanded="true"] { color: var(--ch-lime); }

.ch-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ch-search-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.ch-search-inner {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.ch-search-close {
  position: absolute;
  top: -56px;
  right: 24px;
  background: transparent;
  border: none;
  color: #555;
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.15s;
  line-height: 1;
}

.ch-search-close:hover { color: var(--ch-lime); }

.ch-search-form {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 2px solid var(--ch-lime);
  border-radius: 10px;
  overflow: hidden;
}

.ch-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 18px 20px;
  font-family: var(--ch-font-body);
  font-size: 18px;
  color: #fff;
  outline: none;
}

.ch-search-input::placeholder { color: #444; }

.ch-search-submit {
  background: var(--ch-lime);
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--ch-black);
  transition: background 0.15s;
  flex-shrink: 0;
}

.ch-search-submit:hover { background: var(--ch-lime-dark); }

/* ── Footer responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ch-footer-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ch-footer-tagline { max-width: 100%; }
  .ch-footer-legal-inner { justify-content: center; text-align: center; }
}

/* ── Paginación ─────────────────────────────────────────────────────────────── */
.ch-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 32px 0;
}

.ch-pagination a,
.ch-pagination span {
  font-family: var(--ch-font-head);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  color: var(--ch-text);
  border: 1px solid var(--ch-border);
  text-decoration: none;
  transition: all 0.15s;
}

.ch-pagination a:hover,
.ch-pagination .current {
  background: var(--ch-lime);
  color: var(--ch-black);
  border-color: var(--ch-lime);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ch-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 600px) {
  .ch-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .chollo-card .ch-title { font-size: 14px; }
  .ch-price-current { font-size: 20px; }
  .chollo-card .ch-excerpt { display: none; }
}

@media (max-width: 420px) {
  .ch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .chollo-card .ch-price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ch-btn-offer {
    width: 100%;
    text-align: center;
  }
}

/* ── Grid 4 columnas (chollos relacionados en single) ───────────────────────── */
.ch-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .ch-grid--4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .ch-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ── Accesibilidad: focus styles ────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ch-lime);
  outline-offset: 2px;
  border-radius: 4px;
}

.ch-vote-btn:focus-visible,
.ch-sort-btn:focus-visible,
.ch-btn-offer:focus-visible,
.ch-btn-offer-big:focus-visible,
.ch-copy-code:focus-visible {
  outline: 3px solid var(--ch-lime);
  outline-offset: 3px;
}

/* ── Vote button: loading state ─────────────────────────────────────────────── */
.ch-vote-btn.is-loading {
  opacity: 0.45;
  cursor: wait;
}

/* ── Sticky CTA móvil (clase CSS, estilos migrados desde JS) ────────────────── */
.ch-sticky-cta {
  position: fixed;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  z-index: 9999;
  background: var(--ch-lime);
  color: var(--ch-black);
  font-family: var(--ch-font-head);
  font-weight: 800;
  font-size: 18px;
  text-align: center;
  padding: 16px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: block;
  transition: background 0.15s;
}

.ch-sticky-cta:hover {
  background: var(--ch-lime-dark);
  color: var(--ch-black);
}

/* ── Store badges adicionales ───────────────────────────────────────────────── */
.ch-store-elcorteingles { background: #004A96; }
.ch-store-corteingles   { background: #004A96; }
.ch-store-nike          { background: #111111; }
.ch-store-adidas        { background: #000000; }
.ch-store-garmin        { background: #007CC3; }
.ch-store-optimum       { background: #E8001D; }
.ch-store-aliexpress    { background: #E43222; }
.ch-store-zara          { background: #222222; }

/* ── Placeholder SVG ────────────────────────────────────────────────────────── */
.ch-thumb-placeholder svg {
  opacity: 0.4;
}


/* ============================================================
   RESPONSIVE MOBILE FIXES v1.8.0
   ============================================================ */

/* 1. CRITICO: Prevenir overflow horizontal global */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* 2. CRITICO: Colapsar layout ch-layout (content + sidebar) en movil
   .ch-layout es display:grid y hace que .ch-main desborde 469px
   dentro de un contenedor de 247px — causa del bodyScrollWidth=533 */
@media (max-width: 768px) {
  .ch-layout {
    display: block !important;
    width: 100% !important;
  }

  .ch-main,
  #secondary,
  .ch-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .ast-container,
  .site-content .ast-container,
  .ch-archive-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }
}

/* 3. Forzar hero a 1 columna en movil con !important */
@media (max-width: 768px) {
  .chollo-featured {
    grid-template-columns: 1fr !important;
  }

  .chollo-featured .ch-feat-body {
    padding: 20px 16px;
  }

  .chollo-featured .ch-feat-title {
    font-size: 22px;
  }

  .chollo-featured .ch-feat-price-current {
    font-size: 28px;
  }
}

/* 4. Touch targets: botones de voto (34px a 40px) */
@media (max-width: 768px) {
  .ch-vote-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px;
  }

  .ch-sort-btn {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
  }
}

/* 5. Tipografia minima en movil */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.55;
  }

  h1,
  .entry-title,
  .page-title {
    font-size: 22px !important;
    line-height: 1.2;
  }
}

/* 6. Indicador scroll en barra de categorias */
@media (max-width: 768px) {
  .ch-cat-nav-inner {
    position: relative;
  }

  .ch-cat-nav-inner::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--ch-dark) 90%);
    pointer-events: none;
    z-index: 1;
  }
}

/* ============================================================
   SEARCH RESULTS PAGE — v1.8.0
   ============================================================ */

.ch-search-header {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--ch-border);
  margin-bottom: 24px;
}

.ch-search-title {
  font-size: 22px !important;
  font-weight: 700;
  color: var(--ch-text);
  margin: 0 0 6px;
  line-height: 1.2;
}

.ch-search-title em {
  color: var(--ch-primary, #e44d26);
  font-style: normal;
}

.ch-search-count {
  font-size: 14px;
  color: var(--ch-text-muted, #888);
  margin: 0;
}

@media (max-width: 768px) {
  .ch-search-header {
    padding: 16px 0 12px;
    margin-bottom: 16px;
  }

  .ch-search-title {
    font-size: 18px !important;
  }
}
