/*
Theme Name: HuellaLimpia
Theme URI: https://huellalimpia.com/
Author: HuellaLimpia
Description: Tema de bloques ligero para una web editorial de limpieza y mascotas.
Version: 0.5.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: huellalimpia
License: GPL-2.0-or-later
*/

:root {
  --hl-shadow: 0 18px 50px rgba(24, 52, 45, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { text-wrap: pretty; }

a { text-underline-offset: 0.18em; }

.wp-site-blocks { overflow: clip; }

.hl-hero {
  background:
    radial-gradient(circle at 82% 14%, rgba(244, 174, 107, 0.42), transparent 26rem),
    linear-gradient(135deg, #edf8f3 0%, #fffaf3 100%);
  border-bottom: 1px solid #dce9e3;
}

.hl-card {
  background: #fff;
  border: 1px solid #e3ebe7;
  border-radius: 20px;
  box-shadow: var(--hl-shadow);
  height: 100%;
  overflow: hidden;
}

.hl-card__body { padding: clamp(1rem, 3vw, 1.5rem); }

.hl-eyebrow {
  color: #1f6d59;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hl-disclosure {
  background: #f6f8f7;
  border-inline-start: 4px solid #2b7a64;
  color: #42524d;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
}

.hl-empty-state {
  background: linear-gradient(135deg, #edf8f3 0%, #fffaf3 100%);
  border: 1px solid #dce9e3;
  border-radius: 20px;
  margin-block: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.hl-product-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  margin-block: 1.5rem;
}

.hl-product-card {
  background: #fff;
  border: 1px solid #dfe8e4;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hl-product-card__image {
  aspect-ratio: 4 / 3;
  background: #eff5f2;
  object-fit: cover;
  width: 100%;
}

.hl-product-card__image-link { display: block; }

.hl-product-card__title a {
  color: #18342d;
  text-decoration: none;
}

.hl-product-card__title a:hover,
.hl-product-card__title a:focus-visible { text-decoration: underline; }

.hl-product-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.2rem;
}

.hl-product-card__badge {
  align-self: flex-start;
  background: #fff0df;
  border-radius: 999px;
  color: #7b4319;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
}

.hl-product-card__title { margin: 0; }

.hl-product-card__meta {
  color: #52645e;
  font-size: 0.9rem;
  margin: 0;
}

.hl-product-card__button {
  background: #1f6d59;
  border-radius: 10px;
  color: #fff;
  display: inline-block;
  font-weight: 700;
  margin-top: auto;
  padding: 0.75rem 1rem;
  text-align: center;
  text-decoration: none;
}

.hl-product-card__button:hover,
.hl-product-card__button:focus-visible { background: #174f42; color: #fff; }

.hl-catalog { margin-top: 2.25rem; }

.hl-catalog__grid {
  align-items: stretch;
  display: grid !important;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hl-catalog-card {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.hl-catalog-card:hover {
  box-shadow: 0 22px 58px rgba(24, 52, 45, 0.14);
  transform: translateY(-3px);
}

.hl-catalog-card__image {
  background: #f4f2ed;
  height: 185px;
  margin: 0 !important;
  overflow: hidden;
}

.hl-catalog-card__image a {
  display: block;
  height: 100%;
}

.hl-catalog-card__image img {
  aspect-ratio: auto !important;
  background: #f4f2ed;
  display: block;
  height: 100% !important;
  object-fit: contain !important;
  width: 100%;
}

.hl-product-detail__image {
  background: #f4f2ed;
  border: 1px solid #e4e9e6;
  border-radius: 18px;
  margin: 2rem auto !important;
  max-width: 560px;
  overflow: hidden;
  padding: 0;
}

.hl-product-detail__image img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: 440px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.hl-catalog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem;
}

.hl-catalog-card__body h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.65rem) !important;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.hl-catalog-card__body .wp-block-post-excerpt {
  font-size: 0.96rem;
  line-height: 1.55;
}

.hl-catalog-card__body h2 a {
  color: #18342d;
  text-decoration: none;
}

.hl-catalog-card__terms {
  color: #1f6d59;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

.hl-catalog-card__body .wp-block-post-excerpt { margin: 0; }

.hl-catalog-card__body .wp-block-post-excerpt__more-link {
  background: #1f6d59;
  border-radius: 10px;
  color: #fff;
  display: block;
  font-weight: 750;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  text-align: center;
  text-decoration: none;
}

.hl-product-facts {
  background: #f3f8f5;
  border: 1px solid #d6e5de;
  border-radius: 18px;
  margin-top: 2rem;
  padding: clamp(1.1rem, 4vw, 1.75rem);
}

.hl-product-facts__note { color: #52645e; font-size: 0.88rem; }

.hl-product-facts__button { display: inline-block; text-decoration: none; }

/* Article pages: keep utility images compact and make quick answers easy to scan. */
.hl-article-featured-image {
  background: #f4f2ed;
  border: 1px solid #e4e9e6;
  border-radius: 18px;
  margin: 1.75rem auto 2.25rem !important;
  max-width: 760px;
  overflow: hidden;
}

.hl-article-featured-image img {
  display: block;
  height: 320px !important;
  margin: 0 auto;
  object-fit: contain;
  width: 100%;
}

.hl-direct-answer {
  background: #edf8f3;
  border: 1px solid #cfe4db;
  border-radius: 16px;
  color: #18342d;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.15rem;
}

.hl-direct-answer p { margin: 0; }

.hl-faq {
  border-top: 1px solid #dfe8e4;
  margin-top: 2.75rem;
  padding-top: 1.25rem;
}

.hl-faq h2 { margin-bottom: 1rem; }

.hl-faq details {
  border-bottom: 1px solid #dfe8e4;
  padding: 0.9rem 0;
}

.hl-faq summary {
  color: #18342d;
  cursor: pointer;
  font-weight: 750;
}

.hl-faq details p { color: #42524d; margin: 0.75rem 0 0; }

.hl-related {
  background: #fffaf3;
  border: 1px solid #f0dfc9;
  border-radius: 16px;
  margin: 2.5rem 0 0;
  padding: 1.2rem 1.3rem;
}

.hl-related h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.hl-related ul { margin-bottom: 0; padding-left: 1.25rem; }
.hl-related li + li { margin-top: 0.45rem; }

.hl-editorial-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 2rem;
}

.hl-editorial-card {
  background: #fff;
  border: 1px solid #dfe8e4;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-height: 235px;
  padding: 1.35rem;
}

.hl-editorial-card .hl-eyebrow { margin: 0 0 0.75rem; }
.hl-editorial-card h3 { font-size: 1.3rem; line-height: 1.2; margin: 0; }
.hl-editorial-card h3 a { color: #18342d; text-decoration: none; }
.hl-editorial-card > p:not(.hl-eyebrow) { color: #52645e; font-size: 0.95rem; line-height: 1.55; }
.hl-editorial-card__link { color: #1f6d59; font-weight: 750; margin-top: auto; text-decoration: none; }
.hl-editorial-empty { color: #52645e; }

@media (max-width: 900px) {
  .hl-catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hl-editorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .hl-hide-mobile { display: none !important; }
  .hl-catalog__grid { grid-template-columns: 1fr; }
  .hl-editorial-grid { grid-template-columns: 1fr; }
  .hl-article-featured-image img { height: 240px !important; }
}
