/* Elegido — estilos (tienda). Verde esmeralda de marca + ámbar; cabecera azul marino. */

:root {
  --color-primary: #0f6f5c;
  --color-primary-dark: #0a4f42;
  --color-accent: #e8a33d;
  --color-nav: #0f1e2e;
  --color-nav-2: #182c42;
  --color-bg: #f3f2ee;
  --color-surface: #ffffff;
  --color-text: #1f2a28;
  --color-text-muted: #5b6a67;
  --color-border: #e0ddd3;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(15, 30, 46, 0.07);
  --max-width: 1260px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; color: #142623; }
h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h2.section-title { font-size: 1.5rem; margin: 2.2rem 0 1.2rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }

/* Aviso de afiliación superior */
.affiliate-banner {
  background: #0a1622;
  color: #cfe0ea;
  text-align: center;
  font-size: 0.78rem;
  padding: 6px 16px;
}
.affiliate-banner .banner-link { color: #ffe3ad; margin-left: 6px; text-decoration: underline; cursor: pointer; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.topbar { background: var(--color-nav); }
.topbar-inner { display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: #ffffff; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { background: #ffffff; border-radius: 50%; }
.brand-name { letter-spacing: -0.01em; }
.search { flex: 1; display: flex; max-width: 760px; }
.search input {
  flex: 1; min-width: 0; border: 2px solid var(--color-accent); border-right: none;
  border-radius: 8px 0 0 8px; padding: 10px 14px; font-size: 0.95rem; background: #ffffff; color: var(--color-text);
}
.search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.45); }
.search button {
  border: 2px solid var(--color-accent); background: var(--color-accent); color: #23180a;
  border-radius: 0 8px 8px 0; padding: 0 16px; cursor: pointer; display: flex; align-items: center;
}
.search button:hover { background: #d6912b; }
.top-link { color: #ffffff; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.top-link:hover { color: #ffe3ad; text-decoration: none; }
.catbar { background: var(--color-nav-2); }
.catbar ul {
  display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.catbar ul::-webkit-scrollbar { display: none; }
.catbar a { display: block; color: #e6eef5; font-size: 0.86rem; font-weight: 500; padding: 9px 12px; white-space: nowrap; }
.catbar a:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: #ffffff; }

/* Breadcrumb */
.breadcrumb { font-size: 0.82rem; color: var(--color-text-muted); padding: 10px 0; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb [aria-current] { color: var(--color-text); font-weight: 600; }

/* Marcador visual de producto: degradado + icono, con la foto encima si existe */
.media {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #eef2f0;
}
.media-icon { font-size: 3rem; opacity: 0.9; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #ffffff; padding: 6%; }
.tone-0 { background: linear-gradient(135deg, #dcefe8, #f6e6c8); }
.tone-1 { background: linear-gradient(135deg, #dbe8f6, #e9e0f5); }
.tone-2 { background: linear-gradient(135deg, #f8e0d6, #fbefc9); }
.tone-3 { background: linear-gradient(135deg, #e3f1d6, #d5eef0); }
.tone-4 { background: linear-gradient(135deg, #f3dbe6, #e4e1f7); }
.tone-5 { background: linear-gradient(135deg, #fbe7c2, #f4d4d0); }
.tone-6 { background: linear-gradient(135deg, #d3eaf2, #dcf2dc); }
.tone-7 { background: linear-gradient(135deg, #e8dff2, #fadfe0); }

/* Portada: banner principal */
.hero-store {
  background: radial-gradient(1200px 400px at 85% -10%, rgba(232,163,61,0.35), transparent 60%),
              linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-dark) 55%, #0b3a4a 100%);
  color: #ffffff; padding: 40px 0 120px;
}
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero-text { max-width: 640px; }
.hero-store h1 { color: #ffffff; font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 0.3em; }
.hero-sub { color: #d9f2ec; font-size: 1.05rem; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero { background: var(--color-accent); color: #23180a; font-weight: 700; padding: 12px 22px; border-radius: 999px; }
.btn-hero:hover { background: #d6912b; text-decoration: none; }
.btn-ghost { border: 2px solid rgba(255,255,255,0.7); color: #ffffff; font-weight: 600; padding: 10px 20px; border-radius: 999px; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.hero-stats { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.hero-stats li {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); border-radius: var(--radius);
  padding: 14px 20px; text-align: center; min-width: 110px;
}
.hero-stats strong { display: block; font-size: 1.8rem; line-height: 1.1; color: #ffe3ad; }
.hero-stats span { font-size: 0.8rem; color: #d9f2ec; }

/* Escaparates de categoría (solapan el banner) */
.quad-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: -90px; position: relative; z-index: 2;
}
.quad { background: var(--color-surface); border-radius: var(--radius); padding: 16px 16px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.quad h2 { font-size: 1.05rem; margin-bottom: 10px; }
.quad-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.quad-item { display: flex; flex-direction: column; gap: 4px; color: var(--color-text); }
.quad-item:hover { text-decoration: none; }
.quad-item:hover span { color: var(--color-primary); }
.quad-item .media { border-radius: 8px; }
.quad-item .media-icon { font-size: 1.8rem; }
.quad-item span { font-size: 0.76rem; line-height: 1.25; }
.quad-more { margin-top: 12px; font-size: 0.86rem; font-weight: 600; }

/* Filas de productos */
.row-section { margin-top: 28px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.row-head h2 { font-size: 1.35rem; margin: 0; }
.row-more { font-size: 0.9rem; font-weight: 600; }
.row-wrap { position: relative; background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.row-scroll {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-arrow {
  position: absolute; top: 38%; z-index: 3; width: 40px; height: 64px; border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.96); font-size: 2rem; line-height: 1; cursor: pointer; color: var(--color-text);
  box-shadow: var(--shadow); border-radius: 8px;
}
.row-arrow:hover:not(:disabled) { background: #ffffff; color: var(--color-primary); }
.row-arrow:disabled { opacity: 0; pointer-events: none; }
.row-prev { left: 4px; }
.row-next { right: 4px; }

/* Tarjeta compacta */
.tile { flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 8px 0 48px; }
.tile-grid .tile { flex: initial; background: var(--color-surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.tile-media { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); }
.tile-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tile-brand { margin: 0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #b9770e; }
.tile-name { font-size: 0.9rem; font-weight: 500; line-height: 1.3; margin: 0; }
.tile-name a {
  color: var(--color-text); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-name a:hover { color: var(--color-primary); }
.tile-price { margin: 2px 0 6px; font-weight: 700; color: var(--color-text); font-size: 0.95rem; }
.tile .btn-amazon { margin-top: auto; text-align: center; }
.buscar-vacio { padding: 24px 0 48px; }

/* Botón Amazon */
.btn-amazon {
  background: var(--color-accent); color: #23180a; font-weight: 700; padding: 10px 16px;
  border-radius: 999px; font-size: 0.86rem; white-space: nowrap; display: inline-block;
}
.btn-amazon:hover { background: #d6912b; text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }

/* Info section (home) */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 3rem; }
.info-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 20px; }
.info-card h3 { font-size: 1rem; color: var(--color-primary-dark); }

/* Categoría */
.cat-head { padding: 22px 20px 6px; }
.cat-head p { max-width: 820px; }
.cat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding-bottom: 40px; }
.filters { background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; position: sticky; top: 118px; }
.filters summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.filter-group { border: none; margin: 0 0 14px; padding: 0; }
.filter-group legend, .filter-title { font-weight: 700; font-size: 0.9rem; margin: 0 0 6px; padding: 0; color: var(--color-text); }
.filter-check { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; padding: 3px 0; cursor: pointer; color: var(--color-text); }
.filter-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.86rem; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 16px; font-size: 0.9rem;
}
.sort-label { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); }
.sort-label select { padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 0.88rem; background: #fff; }

/* Grid de productos (tarjeta completa) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 16px 0 48px; }
.cat-layout .product-grid { margin-bottom: 0; }
.product-card {
  background: var(--color-surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow); scroll-margin-top: 130px; border: 1px solid transparent;
}
.product-card:target { border-color: var(--color-accent); }
.product-media { display: block; }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-brand { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #b9770e; font-weight: 700; margin: 0; }
h3.product-name { font-size: 1rem; margin-bottom: 0.1em; }
.product-name a { color: var(--color-text); }
.product-name a:hover { color: var(--color-primary-dark); }
.product-summary { font-weight: 500; color: var(--color-text); margin-bottom: 2px; font-size: 0.9rem; }
.product-more { font-size: 0.84rem; margin-bottom: 8px; }
.product-more summary { cursor: pointer; color: var(--color-primary-dark); font-weight: 600; }
.product-desc { font-size: 0.86rem; margin: 8px 0; }
.product-features { margin: 0; padding-left: 18px; font-size: 0.84rem; color: var(--color-text-muted); display: grid; gap: 2px; }
.product-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.product-price { font-weight: 700; color: var(--color-text); margin: 0; font-size: 0.95rem; }
.price-tooltip { cursor: help; color: var(--color-text-muted); margin-left: 4px; font-weight: 400; }

/* Páginas legales */
.legal-page { padding: 32px 20px 64px; max-width: 780px; }
.legal-page h2 { margin-top: 1.6em; font-size: 1.15rem; color: var(--color-primary-dark); }
.legal-page ul { color: var(--color-text-muted); }

/* Pie de página */
.site-footer {
  background: #12241f;
  color: #cfe6df;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding: 40px 20px 24px;
}
.footer-col h4 { color: #ffffff; font-size: 0.9rem; margin-bottom: 10px; }
.footer-col p { color: #a9c7bd; font-size: 0.85rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-col a { color: #cfe6df; font-size: 0.85rem; }
.footer-col a:hover { color: #ffffff; }
.footer-disclosure {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 20px 28px;
  font-size: 0.76rem;
  color: #93b3a8;
}
.footer-disclosure p { color: #93b3a8; }

/* Modal aviso afiliación */
.affiliate-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 27, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.affiliate-modal[hidden] { display: none; }
.affiliate-modal-content {
  background: #ffffff;
  border-radius: var(--radius);
  max-width: 480px;
  padding: 26px 24px;
  position: relative;
}
.affiliate-modal-content h3 { margin-top: 0; }
.js-close-affiliate-info {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-text-muted);
}

/* Guías de compra */
.guia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0 48px;
}
.guia-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.guia-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 111, 92, 0.15);
  text-decoration: none;
}
.guia-card-cat {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-accent);
  font-weight: 700;
}
.guia-card-titulo { color: var(--color-text); font-weight: 600; font-size: 1rem; }

.guia-callout {
  display: block;
  background: #eef6f2;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--color-primary-dark);
  font-size: 0.92rem;
  margin: 18px 0;
}
.guia-callout:hover { background: #e2f0ea; text-decoration: none; }
.guia-callout strong { color: var(--color-primary-dark); }

.guia-articulo { padding: 32px 20px 8px; max-width: 760px; }
.guia-categoria-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 4px;
}
.guia-contenido h2 { font-size: 1.2rem; margin-top: 1.6em; color: var(--color-primary-dark); }
.guia-contenido p { color: var(--color-text); }
.guia-lista { padding-left: 20px; color: var(--color-text); display: grid; gap: 4px; margin: 0 0 1em; }

.faq-section { max-width: 760px; margin: 8px auto 56px; }
.faq-item {
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
}
.faq-item h3 { font-size: 0.98rem; margin-bottom: 6px; color: var(--color-text); }
.faq-item p { margin: 0; font-size: 0.9rem; }

/* Banner de consentimiento de cookies */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #12241f;
  color: #eafff8;
  z-index: 60;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
}
.cookie-banner-inner p { color: #cfe6df; font-size: 0.84rem; margin: 0; max-width: 640px; }
.cookie-banner-inner a { color: #ffe3ad; }
.cookie-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-banner-actions button {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-cookie-accept { background: var(--color-accent); color: #23180a; }
.btn-cookie-reject { background: transparent; color: #eafff8; border: 1px solid rgba(255,255,255,0.4) !important; }

@media (max-width: 1000px) {
  .quad-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-store { padding-bottom: 110px; }
}
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
}
@media (max-width: 700px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .top-link { margin-left: auto; }
  .hero-store { padding: 28px 0 100px; }
  .hero-stats li { min-width: 0; padding: 10px 14px; }
  .quad-grid { gap: 12px; margin-top: -76px; }
  .quad { padding: 12px; }
  .tile { flex-basis: 160px; }
  .row-arrow { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-body { padding: 10px; }
  .product-footer { flex-direction: column; align-items: stretch; }
  .product-footer .btn-amazon { text-align: center; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 420px) {
  .quad h2 { font-size: 0.9rem; }
  .quad-item span { display: none; }
}
