
/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #F7F2EA;
  --surface: #FFFCF7;
  --ink: #2E2A24;
  --muted: #7A7266;
  --terra: #C17D4A;
  --terra-deep: #9C5F32;
  --terra-soft: #E8C3A3;
  --sage: #7C9082;
  --border: #E8DDCB;
  --serif: "Fraunces", serif;
  --sans: "Work Sans", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 20px;
  --radius-sm: 12px;
}

/* =============================================================
   2. Reset
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--bg); overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.12; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--surface); color: var(--ink); z-index: 9999; border-radius: 8px; font-weight: 500; }
.skip-link:focus { top: 1rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* =============================================================
   3. Buttons
   ============================================================= */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; transition: transform .25s var(--ease-out), background .25s; }
.btn-buy { background: var(--terra-deep); color: var(--surface); }
.btn-buy:hover { background: var(--terra); transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--terra-deep); color: var(--terra-deep); }
.btn-outline:hover { background: var(--terra-soft); }

/* =============================================================
   4. Header / nav
   ============================================================= */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247,242,234,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.brand-mark-svg { width: 34px; height: 34px; flex-shrink: 0; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav > a { font-weight: 500; }
.nav-drop { position: relative; }
.nav-drop-label { font-weight: 500; cursor: default; }
.nav-drop-menu { position: absolute; top: 100%; left: 0; display: none; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; min-width: 320px; box-shadow: 0 18px 40px -20px rgba(46,42,36,0.25); list-style: none; }
.nav-drop:hover .nav-drop-menu, .nav-drop.is-hover .nav-drop-menu { display: grid; }
.nav-drop-menu li a { display: block; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.nav-drop-menu li a:hover { background: var(--terra-soft); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 719px) {
  .nav-toggle { display: flex; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border); display: none; gap: 14px; }
  .main-nav.is-open { display: flex; }
  .nav-drop-menu { position: static; display: grid !important; border: 0; box-shadow: none; padding: 6px 0; min-width: 0; grid-template-columns: 1fr; }
}

/* =============================================================
   5. Hero
   ============================================================= */
.hero { position: relative; padding: 64px 24px 90px; overflow: clip; isolation: isolate; background: linear-gradient(180deg, var(--terra-soft) 0%, var(--bg) 78%); }
.hero-blob { position: absolute; top: -12%; right: -14%; width: 640px; color: var(--terra); opacity: .28; z-index: -1; }
.hero-blob path { fill: currentColor; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.3fr 0.9fr; } }
.hero-copy h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); margin-bottom: 16px; font-weight: 700; max-width: 15ch; }
.hero-copy p { max-width: 480px; margin: 0 0 26px; color: var(--muted); font-size: 1.05rem; }
.hero-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 30px; text-align: center; box-shadow: 0 26px 50px -28px rgba(156,95,50,0.35); transform: rotate(-2deg); }
.hero-stat-icon { display: inline-flex; width: 34px; height: 34px; color: var(--terra-deep); margin-bottom: 10px; }
.hero-stat-card strong { display: block; font-family: var(--serif); font-size: 2.6rem; color: var(--terra-deep); }
.hero-stat-card span { color: var(--muted); font-size: .9rem; }
@media (max-width: 539px) { .hero-blob { width: 420px; top: -8%; right: -30%; } }

/* =============================================================
   6. Cards / grids
   ============================================================= */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 20px; }
.cat-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 24px; text-align: left; transition: transform .3s var(--ease-out), border-color .3s, box-shadow .3s; }
.cat-card:hover { transform: translateY(-3px); border-color: var(--terra); box-shadow: 0 20px 36px -24px rgba(156,95,50,0.3); }
.cat-card strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.cat-card-blurb { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.cat-icon { width: 30px; height: 30px; color: var(--terra-deep); background: var(--terra-soft); border-radius: 10px; padding: 6px; box-sizing: content-box; }
.cat-icon .paw-icon { width: 100%; height: 100%; }
.section-tint { background: var(--surface); }

/* --- trust points (home, "Cómo elegimos") --- */
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 22px; }
@media (min-width: 720px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-point-icon { display: inline-flex; width: 30px; height: 30px; color: var(--terra-deep); background: var(--terra-soft); border-radius: 10px; padding: 7px; box-sizing: content-box; margin-bottom: 10px; }
.trust-point h3 { font-size: 1.02rem; margin-bottom: 6px; }
.trust-point p { color: var(--muted); font-size: .9rem; }

/* --- category page header --- */
.cat-hero { background: linear-gradient(135deg, var(--terra-soft), var(--bg) 70%); padding: 40px 0 44px; }
.cat-hero-inner { display: flex; align-items: center; gap: 22px; }
.cat-hero-icon { flex-shrink: 0; width: 54px; height: 54px; color: var(--terra-deep); background: var(--surface); border-radius: 16px; padding: 12px; box-sizing: content-box; box-shadow: 0 16px 30px -18px rgba(156,95,50,0.35); }
.cat-hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 4px 0 6px; }
.cat-hero p { color: var(--muted); max-width: 60ch; }
.cat-hero .crumb { margin-bottom: 4px; }
@media (max-width: 539px) { .cat-hero-inner { flex-direction: column; align-items: flex-start; gap: 12px; } }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .3s var(--ease-out), box-shadow .3s, rotate .3s var(--ease-out); }
.card:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 24px 44px -22px rgba(156,95,50,0.38); }
.card::after { content: ""; position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='35' cy='36' r='7' fill='%23fffcf7'/%3E%3Ccircle cx='52' cy='30' r='7.5' fill='%23fffcf7'/%3E%3Ccircle cx='68' cy='36' r='7' fill='%23fffcf7'/%3E%3Cellipse cx='52' cy='58' rx='16' ry='13' fill='%23fffcf7'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; opacity: .85; pointer-events: none; z-index: 2; }
.card-img-link { display: block; aspect-ratio: 4/3; background: var(--terra-soft); }
.card-img-link img { width: 100%; height: 100%; object-fit: cover; }
.ph-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--terra-deep); opacity: .5; }
.ph-img .paw-icon { width: 48%; height: 48%; }
.ph-img.big { aspect-ratio: 1; background: var(--terra-soft); border-radius: var(--radius); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-weight: 600; line-height: 1.3; }
.card-score { font-size: .85rem; color: var(--terra-deep); font-weight: 600; }
.price { font-weight: 700; font-size: 1.1rem; }
.price-was { text-decoration: line-through; color: var(--muted); font-weight: 400; font-size: .9rem; }
.price-badge { background: var(--terra); color: var(--surface); font-size: .75rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; }

/* =============================================================
   7. Sample badge
   ============================================================= */
.sample-badge { background: var(--terra-soft); color: var(--terra-deep); font-size: .78rem; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.ficha .sample-badge { border-radius: var(--radius-sm); margin-bottom: 20px; }

/* =============================================================
   8. Ficha
   ============================================================= */
.crumb { color: var(--muted); font-size: .85rem; margin-bottom: 20px; }
.crumb a:hover { color: var(--terra-deep); }
.ficha-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; }
@media (min-width: 720px) { .ficha-grid { grid-template-columns: 1fr 1fr; } }
.ficha-grid.two-col { align-items: start; }
.ficha-gallery .gallery-main { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); background: var(--terra-soft); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); }
.ficha-main h1 { font-size: 1.6rem; margin-bottom: 8px; }
.ficha-main .price { margin: 10px 0 4px; font-size: 1.4rem; }
.ficha-main .btn { margin-top: 14px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.spec-table th { font-weight: 500; color: var(--muted); width: 55%; }
.specs-more { margin-top: 14px; }
.specs-more summary { cursor: pointer; color: var(--terra-deep); font-weight: 600; font-size: .9rem; }
.care-bars { display: flex; flex-direction: column; gap: 13px; max-width: 380px; }
.care-bar { display: grid; grid-template-columns: 130px 1fr 42px; align-items: center; gap: 10px; }
.care-bar-label { font-size: .82rem; color: var(--muted); text-transform: capitalize; }
.care-bar-track { height: 9px; background: var(--terra-soft); border-radius: 999px; overflow: hidden; }
.care-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--terra), var(--terra-deep)); border-radius: 999px; }
.care-bar-val { font-size: .78rem; color: var(--terra-deep); font-weight: 700; text-align: right; }
@media (max-width: 420px) { .care-bar { grid-template-columns: 100px 1fr 36px; } .care-bar-label { font-size: .74rem; } }
.ficha-editorial { margin: 36px 0; }
.ficha-editorial p { margin-bottom: 14px; }
.pros-cons { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 22px 0; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons h3 { font-size: 1rem; margin-bottom: 10px; }
.pros-cons ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pros li::before { content: "✓ "; color: var(--sage); font-weight: 700; }
.cons li::before { content: "✕ "; color: var(--terra); font-weight: 700; }
.ideal-para { background: var(--terra-soft); border-left: 4px solid var(--terra-deep); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.ficha-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.ficha-relacionados { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

/* =============================================================
   9. Comparador
   ============================================================= */
.comparador-picker { margin: 24px 0; }
.cmp-search { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; margin-bottom: 14px; background: var(--surface); }
.cmp-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cmp-filter-btn { padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; background: var(--surface); }
.cmp-filter-btn.is-active { background: var(--terra-deep); color: var(--surface); border-color: var(--terra-deep); }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px; }
.cmp-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: .88rem; }
.cmp-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--terra-soft); flex-shrink: 0; }
.cmp-item.is-hidden { display: none; }
.cmp-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
#cmp-result table { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: .9rem; }
#cmp-result th, #cmp-result td { border: 1px solid var(--border); padding: 10px; text-align: left; }
#cmp-result th { background: var(--surface); }
#cmp-result .cmp-best { background: var(--terra-soft); font-weight: 700; }

/* =============================================================
   10. Legal / trust
   ============================================================= */
.legal h2 { margin: 28px 0 12px; font-size: 1.25rem; }
.legal p { margin-bottom: 12px; }

/* =============================================================
   11. Footer
   ============================================================= */
.site-footer { background: var(--terra-deep); color: var(--surface); padding: 48px 0 24px; margin-top: 60px; }
.site-footer .brand { color: var(--surface); }
.site-footer h3 { font-size: 1rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer .muted { color: rgba(255,252,247,0.7); }
.affiliate-disclosure { max-width: 70ch; }

/* =============================================================
   12. Cookie banner
   ============================================================= */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 24px 50px -20px rgba(46,42,36,0.4); z-index: 999; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: .85rem; margin-bottom: 12px; }
.cookie-banner-actions { display: flex; gap: 10px; justify-content: flex-end; }
