/* TuChollazo — sitio estático de chollos y regalos Amazon.es
   Paleta: rojo #B71C1C, acento #FFB300, crema #FFF8EC, texto #1B1B1F
*/

:root {
  --red: #B71C1C;
  --red-dark: #8E1414;
  --red-mid: #C62828;
  --red-soft: #FBE9E7;
  --gold: #FFB300;
  --gold-hi: #FFD814;
  --gold-press: #E69400;
  --ink: #1B1B1F;
  --ink-soft: #3E3E45;
  --muted: #6B6B74;
  --line: #E8E2D8;
  --cream: #FFF8EC;
  --bg: #FFFCF7;
  --white: #FFFFFF;
  --verdict: #EEF7EE;
  --gray-box: #F4F2EE;
  --shadow: 0 10px 30px rgba(27, 27, 31, 0.08);
  --shadow-hover: 0 18px 44px rgba(27, 27, 31, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--red);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

:focus-visible { outline: none; box-shadow: var(--focus); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; color: #fff; }

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0 0.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand:hover { color: inherit; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #D32F2F, var(--red-dark));
  box-shadow: 0 6px 14px rgba(183, 28, 28, 0.28);
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 26px; height: 26px; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--red);
}
.brand-tag {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { padding: 0 0 0.55rem; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
}
.site-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 560;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.site-nav a:hover { background: var(--red-soft); color: var(--red-dark); }
.site-nav a[aria-current="page"] {
  background: var(--red);
  color: #fff;
}
.site-nav a.nav-legal { color: var(--muted); font-weight: 500; }

/* ========== Hero / page title ========== */
.page-hero {
  background:
    radial-gradient(1200px 400px at 10% -20%, rgba(255, 179, 0, 0.18), transparent 50%),
    radial-gradient(900px 380px at 100% 0%, rgba(183, 28, 28, 0.16), transparent 55%),
    linear-gradient(180deg, var(--red-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 2.1rem 0 1.8rem;
}
.page-hero.home {
  padding: 2.8rem 0 2.4rem;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
  color: var(--ink);
  max-width: 18ch;
}
.page-hero.home h1 { max-width: 16ch; }
.page-lede {
  margin: 0;
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { color: inherit; transform: translateY(-1px); }
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 18px rgba(183, 28, 28, 0.25);
}
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--red);
  border-color: #f0cfc9;
}
.btn-ghost:hover { background: var(--red-soft); color: var(--red-dark); }

/* ========== Content ========== */
main { flex: 1 0 auto; }

.page-content {
  padding: 2rem 0 3.5rem;
}
.page-content h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 2.4rem 0 1rem;
  color: var(--ink);
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-size: 1.12rem;
  margin: 1.4rem 0 0.5rem;
}
.page-content p { margin: 0 0 1rem; }
.page-content ul, .page-content ol { margin: 0 0 1.2rem; padding-left: 1.25rem; }
.page-content li { margin: 0.25rem 0; }

.affiliate-note, .has-small-font-size, p.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: var(--gray-box);
  border-left: 3px solid var(--gold);
  padding: 0.85rem 1rem;
  border-radius: 0 12px 12px 0;
}

.callout, .wp-block-group.has-background {
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  margin: 1.4rem 0;
}
.callout-cream, .wp-block-group.has-background[style*="FFF8EC"] { background: var(--cream); }
.callout-gray, .wp-block-group.has-background[style*="F3F3F3"] { background: var(--gray-box); }
.callout-hero, .wp-block-group.has-background[style*="FBE9E7"] { background: var(--red-soft); }
.callout-verdict, .wp-block-group.has-background[style*="EEF7EE"] {
  background: var(--verdict);
  border: 1px solid #cde8cd;
}

/* Category tiles */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0.5rem 0 1.5rem;
}
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  min-height: 148px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
}
.cat-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: var(--tile-accent, var(--red));
}
.cat-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: inherit;
  border-color: #ddd4c6;
}
.cat-tile-emoji { font-size: 1.85rem; line-height: 1; }
.cat-tile h3 { margin: 0.15rem 0 0; font-size: 1.05rem; color: var(--ink); }
.cat-tile p { margin: 0; font-size: 0.88rem; color: var(--muted); }

.cat-tile.cat-moda { --tile-accent: linear-gradient(90deg, #8E1414, #E57373); }
.cat-tile.cat-belleza { --tile-accent: linear-gradient(90deg, #AD1457, #F8BBD0); }
.cat-tile.cat-hogar { --tile-accent: linear-gradient(90deg, #1B4332, #D4A373); }
.cat-tile.cat-regalos { --tile-accent: linear-gradient(90deg, #B71C1C, #FFB300); }
.cat-tile.cat-info { --tile-accent: linear-gradient(90deg, #1B4F72, #5DADE2); }
.cat-tile.cat-elec { --tile-accent: linear-gradient(90deg, #3D2B8C, #F4A261); }
.cat-tile.cat-jug { --tile-accent: linear-gradient(90deg, #0E7C66, #F4A261); }
.cat-tile.cat-dep { --tile-accent: linear-gradient(90deg, #166534, #86EFAC); }

/* ========== Product cards ========== */
.product-section { margin: 1.25rem 0 2.25rem; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .product-grid:not(.rich) { grid-template-columns: repeat(3, 1fr); }
  .product-grid.rich { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1240px) {
  .product-grid:not(.rich) { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: #e0d5c4;
}
.product-card:focus-within {
  box-shadow: var(--shadow-hover), var(--focus);
}

/* Tall image slot — ready for a real SiteStripe photo later */
.product-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  isolation: isolate;
  background: #3a1a1a;
}
.product-visual.cat-moda { background: linear-gradient(160deg, #4A0E16 0%, #B71C1C 48%, #E8A0A0 100%); }
.product-visual.cat-belleza { background: linear-gradient(160deg, #4A1942 0%, #AD1457 50%, #F8BBD0 100%); }
.product-visual.cat-hogar { background: linear-gradient(160deg, #1B4332 0%, #2D6A4F 48%, #E6C8A0 100%); }
.product-visual.cat-info { background: linear-gradient(160deg, #0D1B2A 0%, #1B4F72 50%, #7FB3D5 100%); }
.product-visual.cat-elec { background: linear-gradient(160deg, #1A1033 0%, #3D2B8C 46%, #F4A261 100%); }
.product-visual.cat-jug { background: linear-gradient(160deg, #0B3D3A 0%, #0E7C66 46%, #F4D35E 100%); }
.product-visual.cat-dep { background: linear-gradient(160deg, #14532D 0%, #166534 50%, #86EFAC 100%); }
.product-visual.cat-regalos { background: linear-gradient(160deg, #7F1D1D 0%, #B71C1C 42%, #FFB300 100%); }

.product-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  pointer-events: none;
}
.product-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    radial-gradient(circle at 18% 22%, #fff 1.4px, transparent 2px),
    radial-gradient(circle at 82% 28%, #fff 1.1px, transparent 2px),
    radial-gradient(circle at 50% 78%, #fff 1.6px, transparent 2.2px),
    radial-gradient(circle at 12% 70%, #fff 1px, transparent 1.8px);
  background-size: 42px 42px, 58px 58px, 36px 36px, 50px 50px;
}
.product-placeholder::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% -20%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.2), transparent 70%);
}
.product-emoji {
  font-size: clamp(4.2rem, 8vw, 5.6rem);
  line-height: 1;
  z-index: 1;
  user-select: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
  transform: translateY(-4%);
}
.product-card:hover .product-emoji { transform: translateY(-4%) scale(1.06); }
.product-card:hover .product-visual { filter: saturate(1.06); }

/* Official photo slot: hidden until a src is set (SiteStripe later) */
.product-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 1rem;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  display: none;
}
.product-photo[src]:not([src=""]) {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.badge-destacado { background: var(--gold-hi); color: var(--ink); }
.badge-premium { background: #1B1B1F; color: #FFD814; }
.badge-top { background: var(--red); color: #fff; }
.badge-hot { background: #9A3412; color: #FFEDD5; }
.badge-rated { background: #14532D; color: #DCFCE7; }

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem 1.15rem;
  flex: 1 1 auto;
}
.product-name {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.product-benefit {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0.2rem 0 0.35rem;
  font-size: 0.8rem;
}
@media (min-width: 420px) {
  .rich .product-points { grid-template-columns: 1fr 1fr; }
}
.product-points h4 {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.product-points ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--ink-soft);
}
.product-points .pros h4 { color: #166534; }
.product-points .cons h4 { color: #9A3412; }

.btn-amazon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: auto;
  width: 100%;
  background: linear-gradient(#FFD814, #FFB300);
  color: #1B1B1F !important;
  font-weight: 750;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: 1px solid #E6A800;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  box-shadow: 0 2px 0 #CC8A00, 0 8px 16px rgba(255, 179, 0, 0.28);
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
}
.btn-amazon:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  color: #1B1B1F !important;
  box-shadow: 0 3px 0 #CC8A00, 0 12px 20px rgba(255, 179, 0, 0.35);
}
.btn-amazon:active { transform: translateY(1px); box-shadow: 0 1px 0 #CC8A00; }
.btn-amazon .cart-icon { width: 1.05em; height: 1.05em; }

/* Featured product (reviews) */
.product-card.featured {
  max-width: 920px;
}
@media (min-width: 800px) {
  .product-card.featured {
    display: grid;
    grid-template-columns: 340px 1fr;
    max-width: 100%;
  }
  .product-card.featured .product-visual {
    aspect-ratio: auto;
    min-height: 100%;
    border-radius: 0;
  }
  .product-card.featured .product-body {
    padding: 1.5rem 1.5rem 1.4rem;
    justify-content: center;
  }
  .product-card.featured .product-name { font-size: 1.45rem; }
  .product-card.featured .product-benefit { -webkit-line-clamp: 3; font-size: 1.05rem; }
}

/* Tables (spec sheets, leftover comparativas) */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.92rem;
  margin: 0 0 1.25rem;
}
th, td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { background: var(--cream); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
figure { margin: 0 0 1.25rem; }
figcaption { font-size: 0.85rem; color: var(--muted); }

/* FAQ */
details, .wp-block-details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.15rem 1rem;
  margin: 0.5rem 0;
}
details + details { margin-top: 0.5rem; }
summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.75rem 0;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  float: right;
  color: var(--red);
  font-weight: 700;
}
details[open] summary::after { content: "–"; }
details p { margin-top: 0; }

/* Footer */
.site-footer {
  background: #1B1B1F;
  color: #E8E4DC;
  padding: 2.4rem 0 1.5rem;
  margin-top: auto;
}
.site-footer a { color: #FFD814; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #FFE566; }
.footer-disclosure {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 209, 20, 0.25);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.5rem;
  font-weight: 600;
  color: #FFF3C4;
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-brand { font-family: var(--serif); font-size: 1.35rem; color: #fff; margin: 0 0 0.35rem; }
.footer-grid p { margin: 0 0 0.5rem; font-size: 0.92rem; color: #C9C4BA; }
.footer-grid h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A9A59C;
  margin: 0 0 0.55rem;
  font-family: var(--font);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0.3rem 0; }
.footer-copy {
  margin: 1.75rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  color: #8F8B83;
}

/* 404 */
.page-404 { text-align: center; padding: 3rem 0 4rem; }
.page-404 h1 { font-family: var(--serif); font-size: 2.4rem; margin-bottom: 0.6rem; }
.page-404 .big { font-size: 4rem; display: block; margin-bottom: 0.4rem; }

/* Legal */
.legal h2 { margin-top: 2rem; }

/* Explore row */
.explore-list { display: grid; gap: 0.4rem; }
.explore-list a { font-weight: 600; }

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    padding: 0 0 1rem;
  }
  body.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 0.7rem 0.85rem; font-size: 1rem; }
  .brand-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
