/*
Theme Name: Happi Finds
Theme URI: https://happifinds.com
Author: Happi Finds
Author URI: https://happifinds.com
Description: Warm editorial block theme for happifinds.com — Pinterest-native affiliate site. Mediavine-ready layout, Amazon-compliant product components, light theme only.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: happifinds
Tags: blog, block-patterns, full-site-editing, one-column, custom-colors, editor-style
*/

:root {
  --hf-bg: #FBF7F2;
  --hf-surface: #FFFFFF;
  --hf-text: #2C2A28;
  --hf-text-soft: #55504A;
  --hf-muted: #8A8175;
  --hf-primary: #E8785A;
  --hf-primary-dark: #D26041;
  --hf-accent: #F4B740;
  --hf-accent-tint: #FDF4E2;
  --hf-accent-border: #F2E1BD;
  --hf-success: #6B8E6E;
  --hf-border: #ECE4DA;
  --hf-border-soft: #F3EDE4;
  --hf-dark: #2C2A28;
  --hf-dark-hairline: #413D39;
  --hf-dark-text: #D6CFC5;
  --hf-dark-muted: #B3ABA0;
  --hf-dark-label: #A79E92;
  --hf-radius-card: 16px;
  --hf-radius-img: 14px;
  --hf-shadow-card: 0 2px 14px rgba(44, 42, 40, 0.05);
  --hf-shadow-hero: 0 4px 20px rgba(44, 42, 40, 0.07);
  --hf-swatch: repeating-linear-gradient(135deg, #F1EAE1 0 9px, #FAF5EF 9px 18px);
  --hf-sidebar: 336px;
  --hf-header-h: 56px;
}

@media (min-width: 782px) {
  :root { --hf-header-h: 64px; }
}

/* Base type scale. Everything sizes in rem, so this one knob enlarges all text
   and spacing proportionately. 100% = 16px root; 112.5% = 18px. Nudge to taste.
   Fixed-px things (ad slots, header height, radii) intentionally don't scale. */
html { font-size: 112.5%; }

* { text-wrap: pretty; }

body {
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.hf-mono {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hf-muted);
}

/* ---------------------------------------------------------- header */

.hf-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--hf-surface);
  border-bottom: 1px solid var(--hf-border);
}

.hf-header__inner {
  max-width: 1152px;
  margin: 0 auto;
  height: var(--hf-header-h);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 782px) {
  .hf-header__inner { padding: 0 1.25rem; gap: 1.5rem; }
}

.hf-logo { display: flex; align-items: center; flex: none; }
.hf-logo img { display: block; height: 26px; width: auto; }
.hf-header .hf-logo img { height: 32px; }
.hf-footer .hf-logo img { height: 38px; }

@media (min-width: 782px) {
  .hf-header .hf-logo img { height: 38px; }
}

.hf-nav { display: none; }

@media (min-width: 1160px) {
  /* Logo | menu | actions: equal side columns keep the menu centred on the page. */
  .hf-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .hf-header__actions { justify-self: end; }
  .hf-nav { display: block; }
  .hf-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
  }
  .hf-nav a {
    /* Held at the pre-scale header size (counteracts the 112.5% root bump). */
    font-size: 0.8056rem;
    font-weight: 500;
    color: var(--hf-text);
    white-space: nowrap;
  }
  .hf-nav .current-menu-item > a,
  .hf-nav .current-menu-parent > a,
  .hf-nav a:hover { color: var(--hf-primary); }
}

.hf-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: none;
}

.hf-header__about {
  display: none;
  font-size: 0.8056rem;
  font-weight: 500;
  color: var(--hf-muted);
}

@media (min-width: 1160px) { .hf-header__about { display: block; } }

.hf-iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hf-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hf-text);
  cursor: pointer;
  padding: 0;
}

.hf-iconbtn svg { width: 16px; height: 16px; }

.hf-burger {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
}

@media (min-width: 1160px) { .hf-burger { display: none; } }

.hf-burger span {
  display: block;
  height: 1.5px;
  width: 20px;
  background: var(--hf-text);
}

.hf-drawer {
  display: none;
  border-top: 1px solid var(--hf-border);
  background: var(--hf-surface);
  padding: 0.75rem 1rem 1.25rem;
}

.hf-drawer.is-open { display: block; }

@media (min-width: 1160px) { .hf-drawer, .hf-drawer.is-open { display: none; } }

.hf-drawer ul { list-style: none; margin: 0; padding: 0; }

.hf-drawer a {
  display: block;
  padding: 0.75rem 0;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--hf-text);
  border-bottom: 1px solid var(--hf-border-soft);
}

.hf-searchform {
  display: none;
  border-top: 1px solid var(--hf-border);
  background: var(--hf-surface);
  padding: 0.875rem 1rem;
}

.hf-searchform.is-open { display: block; }

.hf-searchform form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.hf-searchform input[type="search"] {
  flex: 1;
  min-height: 44px;
  padding: 0 0.875rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--hf-border);
  border-radius: 999px;
  background: var(--hf-bg);
  color: var(--hf-text);
}

.hf-searchform button {
  min-height: 44px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--hf-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------------------------------------------------------- shell */

.hf-shell {
  max-width: 1152px;
  margin: 0 auto;
  padding: 1.75rem 1rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

@media (min-width: 1024px) {
  .hf-shell {
    padding: 2.75rem 2rem 0;
    grid-template-columns: minmax(0, 700px) var(--hf-sidebar);
    justify-content: center;
    align-items: start;
  }
}

.hf-shell--wide { max-width: 940px; grid-template-columns: minmax(0, 1fr); }

.hf-col > * { max-width: 700px; }
.hf-col > .alignwide, .hf-col > .alignfull { max-width: none; }

.hf-side { display: none; }

@media (min-width: 1024px) {
  .hf-side { display: block; position: sticky; top: calc(var(--hf-header-h) + 1.25rem); }
}

/* Ads off (hf_ads_enabled false): drop the sidebar column, center the body. */
.hf-no-ads .hf-side { display: none; }

@media (min-width: 1024px) {
  .hf-no-ads .hf-shell:not(.hf-shell--wide) { grid-template-columns: minmax(0, 700px); }
}

/* ---------------------------------------------------------- ad reservations */

.hf-ad {
  background: #E7E3DD;
  border: 1px dashed #C7C0B5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  line-height: 1.7;
  color: #7E776E;
}

.hf-ad--sidebar { width: 336px; height: 280px; }
.hf-ad--adhesion { width: 100%; height: 100px; margin: 2rem 0 1.25rem; }

@media (min-width: 1024px) { .hf-ad--adhesion { display: none; } }

body.hf-has-adhesion { padding-bottom: 0; }

/* ---------------------------------------------------------- post header */

.hf-chip {
  display: inline-flex;
  align-items: center;
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: 999px;
  padding: 0.375rem 0.8125rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6563rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hf-text);
}

.hf-chip:hover { color: var(--hf-primary); }

.hf-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--hf-muted);
  flex-wrap: wrap;
}

.hf-dek {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--hf-text-soft);
}

@media (min-width: 782px) { .hf-dek { font-size: 1.1875rem; } }

/* ---------------------------------------------------------- byline */

.hf-byline {
  display: flex;
  align-items: center;
  gap: 0.8125rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hf-border);
  font-size: 0.875rem;
  line-height: 1.55;
}

.hf-byline img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  border: 1px solid var(--hf-border);
  background: var(--hf-swatch);
}

.hf-byline__name { font-weight: 600; }
.hf-byline__meta { color: var(--hf-muted); }

.hf-bio {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-card);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 2.75rem 0 0;
}

@media (min-width: 600px) {
  .hf-bio { flex-direction: row; gap: 1.375rem; padding: 1.625rem; }
}

.hf-bio img {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--hf-radius-img);
  flex: none;
  border: 1px solid var(--hf-border);
  background: var(--hf-swatch);
}

@media (min-width: 600px) { .hf-bio img { width: 104px; height: 130px; } }

.hf-bio__body { display: flex; flex-direction: column; gap: 0.625rem; }

.hf-bio__name {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.2;
}

.hf-bio p { margin: 0; font-size: 0.9688rem; line-height: 1.65; }
.hf-bio__links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; }

/* Impersonal / brand-only variants (Decision 21): the sun motif stands in for the
   avatar, rendered at its natural size with no round crop, border, or swatch. */
.hf-byline--desk .hf-byline__sun {
  width: 30px;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
}
.hf-bio--desk .hf-bio__sun {
  width: 46px;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  align-self: flex-start;
}

/* ---------------------------------------------------------- disclosure */

.hf-disclosure {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  background: var(--hf-accent-tint);
  border: 1px solid var(--hf-accent-border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.625rem 0;
}

@media (min-width: 600px) { .hf-disclosure { font-size: 0.9375rem; padding: 1rem 1.125rem; } }

.hf-disclosure img { width: 26px; height: auto; flex: none; }
.hf-disclosure a { text-decoration: underline; text-decoration-color: #E8B96A; }

/* ---------------------------------------------------------- method trust line */

.hf-method {
  display: flex;
  gap: 0.6875rem;
  align-items: flex-start;
  border-top: 1px solid var(--hf-border);
  border-bottom: 1px solid var(--hf-border);
  padding: 0.875rem 0;
  margin: 1.625rem 0;
  font-size: 0.8438rem;
  line-height: 1.65;
  color: var(--hf-text-soft);
}

@media (min-width: 600px) { .hf-method { font-size: 0.9063rem; } }

.hf-method img { width: 20px; height: auto; flex: none; margin-top: 2px; }
.hf-method a { text-decoration: underline; }

/* ---------------------------------------------------------- TOC */

.hf-toc {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-card);
  padding: 1.125rem;
  margin: 1.625rem 0;
}

@media (min-width: 600px) { .hf-toc { padding: 1.375rem 1.625rem; } }

.hf-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: 28px;
}

.hf-toc__label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hf-muted);
}

.hf-toc__count { font-size: 0.75rem; color: var(--hf-muted); }
.hf-toc[data-collapsed="true"] .hf-toc__list { display: none; }

.hf-toc__list {
  list-style: none;
  margin: 0.875rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5625rem;
  counter-reset: hftoc;
}

@media (min-width: 782px) {
  .hf-toc__list { grid-template-columns: 1fr 1fr; gap: 0.625rem 2rem; }
}

.hf-toc__list li { display: flex; gap: 0.625rem; font-size: 0.9375rem; line-height: 1.45; counter-increment: hftoc; }

.hf-toc__list li::before {
  content: counter(hftoc, decimal-leading-zero);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.8125rem;
  color: #C4BAAC;
  flex: none;
}

.hf-toc__list a { border-bottom: 1px solid #F2D9CF; }
.hf-toc__list a.is-active { color: var(--hf-primary-dark); font-weight: 600; }

/* ---------------------------------------------------------- post body rhythm */

.hf-content > * { margin-block: 1.25rem; }
.hf-content > h2 { margin-block: 4rem 0.875rem; }
.hf-content > h3 { margin-block: 2.25rem 0.75rem; }
.hf-content > p { font-size: 1.0625rem; line-height: 1.7; }

@media (min-width: 782px) {
  .hf-content > p { font-size: 1.125rem; }
  .hf-content > h2 { margin-block: 4rem 1rem; }
}

.hf-content > figure, .hf-content > .wp-block-image { margin-block: 1.75rem; }
.hf-content img { border-radius: var(--hf-radius-img); box-shadow: var(--hf-shadow-card); }
.hf-content ul, .hf-content ol { padding-left: 1.25rem; }
.hf-content li { margin-block: 0.5rem; line-height: 1.65; }

.hf-content > blockquote {
  margin-block: 1.75rem;
  padding: 1.125rem 1.375rem;
  background: var(--hf-accent-tint);
  border-left: 4px solid var(--hf-accent);
  border-radius: 4px 14px 14px 4px;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.1875rem;
  line-height: 1.45;
}

/* ---------------------------------------------------------- featured / pinnable image */

.hf-featured { position: relative; margin: 1.625rem 0; }

.hf-featured img,
.hf-featured .wp-block-post-featured-image img {
  width: 100%;
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-hero);
  border: 1px solid var(--hf-border);
  display: block;
}

.hf-featured--pin img { aspect-ratio: 2 / 3; object-fit: cover; }

@media (min-width: 782px) {
  .hf-featured--pin img { aspect-ratio: 16 / 9; }
}

.hf-pin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.125rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--hf-border);
  box-shadow: 0 2px 10px rgba(44, 42, 40, 0.14);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hf-text);
}

.hf-pin svg { width: 17px; height: 17px; }
.hf-pin:hover { color: var(--hf-primary-dark); }

.hf-featured .hf-pin { position: absolute; right: 14px; bottom: 14px; }

.hf-pin--solid {
  background: var(--hf-dark);
  color: #fff;
  border-color: var(--hf-dark);
  min-height: 48px;
  padding: 0 1.375rem;
  font-size: 0.9375rem;
}

.hf-pin--solid:hover { color: #fff; background: #1f1d1c; }

/* ---------------------------------------------------------- hf_product */

.hf-product {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-card);
  overflow: hidden;
  margin: 1.375rem 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) { .hf-product { flex-direction: row; } }

.hf-product__media {
  position: relative;
  flex: none;
  background: var(--hf-swatch);
  border-bottom: 1px solid var(--hf-border);
}

.hf-product__media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }

@media (min-width: 600px) {
  .hf-product__media { width: 240px; border-bottom: 0; border-right: 1px solid var(--hf-border); }
  .hf-product__media img { aspect-ratio: 1 / 1; }
}

.hf-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.6563rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3125rem 0.625rem;
  border-radius: 999px;
  background: var(--hf-success);
  color: #fff;
}

.hf-badge--budget { background: var(--hf-accent); color: #4A3A12; }
.hf-badge--neutral { background: var(--hf-surface); color: var(--hf-text); border: 1px solid var(--hf-border); }

.hf-product__body {
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.6875rem;
  flex: 1;
}

@media (min-width: 600px) { .hf-product__body { padding: 1.375rem 1.5rem; gap: 0.75rem; } }

.hf-product__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.hf-product__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

@media (min-width: 600px) { .hf-product__title { font-size: 1.375rem; } }

.hf-product__title a { color: inherit; }
.hf-product__title a:hover { color: var(--hf-primary-dark); }

.hf-score {
  flex: none;
  text-align: center;
  border: 1px solid var(--hf-border);
  border-radius: 12px;
  padding: 0.375rem 0.5rem 0.3125rem;
  min-width: 58px;
}

.hf-score__num {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
}

@media (min-width: 600px) { .hf-score__num { font-size: 1.3125rem; } }

.hf-score__num span { font-size: 0.75rem; color: var(--hf-muted); }

.hf-score__label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hf-muted);
  margin-top: 3px;
}

.hf-product__why { font-size: 0.9688rem; line-height: 1.6; margin: 0; }

@media (min-width: 600px) { .hf-product__why { font-size: 1rem; } }

.hf-pros { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; }

.hf-pros li {
  display: flex;
  gap: 0.5625rem;
  font-size: 0.9063rem;
  line-height: 1.5;
  margin: 0;
}

.hf-pros li::before { content: "✓"; color: var(--hf-success); font-weight: 700; flex: none; }

.hf-product__foot { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }

@media (min-width: 600px) {
  .hf-product__foot { flex-direction: row; align-items: center; gap: 1rem; }
}

.hf-ratings { font-size: 0.8125rem; color: var(--hf-muted); line-height: 1.5; text-align: center; }

@media (min-width: 600px) { .hf-ratings { text-align: left; } }

/* CTA button */

.hf-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.375rem;
  border-radius: 999px;
  background: var(--hf-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.15s ease;
}

.hf-btn:hover, .hf-btn:focus { background: var(--hf-primary-dark); color: #fff; }

.hf-product__foot .hf-btn { width: 100%; }

@media (min-width: 600px) { .hf-product__foot .hf-btn { width: auto; min-height: 46px; } }

.hf-btn--lg { min-height: 52px; padding: 0 2.125rem; font-size: 1.0625rem; }
.hf-btn--sm { min-height: 38px; padding: 0 1rem; font-size: 0.8125rem; }

.hf-btn--ghost {
  background: var(--hf-surface);
  border: 1.5px solid var(--hf-primary);
  color: var(--hf-primary);
}

.hf-btn--ghost:hover { background: var(--hf-primary); color: #fff; }

.hf-cta { margin: 2rem 0; display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; }
.hf-cta .hf-btn { flex: 1 1 auto; }

@media (min-width: 600px) { .hf-cta .hf-btn { flex: 0 0 auto; } }

/* hero variant */

.hf-product--hero { border-color: #E4D9C9; border-radius: 18px; box-shadow: var(--hf-shadow-hero); margin: 1.5rem 0; }

.hf-product--hero .hf-product__media { background: var(--hf-swatch); }
.hf-product--hero .hf-product__media img { aspect-ratio: 1 / 1; }

@media (min-width: 600px) {
  .hf-product--hero .hf-product__media { width: 300px; }
  .hf-product--hero .hf-product__media img { aspect-ratio: 1 / 1; height: 100%; }
}

.hf-product--hero .hf-product__body { gap: 0.875rem; padding: 1.25rem; }

@media (min-width: 600px) { .hf-product--hero .hf-product__body { padding: 1.625rem 1.75rem; } }

.hf-product--hero .hf-product__title { font-size: 1.375rem; }

@media (min-width: 600px) { .hf-product--hero .hf-product__title { font-size: 1.6875rem; letter-spacing: -0.015em; } }

.hf-glance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hf-glance img { width: 20px; height: auto; }

.hf-glance__num {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.6875rem;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 600px) { .hf-glance__num { font-size: 1.875rem; } }

.hf-glance__label { font-size: 0.8125rem; color: var(--hf-muted); }

@media (min-width: 600px) { .hf-glance__label { font-size: 0.875rem; } }

.hf-verdict-line {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  border-left: 3px solid var(--hf-accent);
  padding-left: 0.8125rem;
}

@media (min-width: 600px) { .hf-verdict-line { font-size: 1.0625rem; padding-left: 0.875rem; } }

.hf-product--hero .hf-product__foot { flex-direction: column; align-items: stretch; margin-top: auto; padding-top: 0.5rem; }
.hf-product--hero .hf-product__foot .hf-btn { width: 100%; min-height: 52px; }
.hf-product--hero .hf-ratings { text-align: center; font-size: 0.7813rem; }

/* ---------------------------------------------------------- hf_proscons */

.hf-proscons {
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-card);
  overflow: hidden;
  margin: 1.375rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 600px) { .hf-proscons { grid-template-columns: 1fr 1fr; } }

.hf-proscons__col { padding: 1.125rem; display: flex; flex-direction: column; gap: 0.6875rem; }
.hf-proscons__col:first-child { border-bottom: 1px solid var(--hf-border); }

@media (min-width: 600px) {
  .hf-proscons__col { padding: 1.375rem 1.5rem; gap: 0.75rem; }
  .hf-proscons__col:first-child { border-bottom: 0; border-right: 1px solid var(--hf-border); }
}

.hf-proscons__label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.5938rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hf-success);
}

.hf-proscons__col--cons .hf-proscons__label { color: var(--hf-muted); }
.hf-proscons ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6875rem; }
.hf-proscons li { display: flex; gap: 0.625rem; font-size: 0.9375rem; line-height: 1.55; margin: 0; }
.hf-proscons__col--pros li::before { content: "✓"; color: var(--hf-success); font-weight: 700; flex: none; }

.hf-proscons__col--cons li { color: var(--hf-text-soft); }
.hf-proscons__col--cons li::before { content: "✕"; color: #B4A899; font-weight: 700; flex: none; }

/* ---------------------------------------------------------- hf_comparison + hf_specs */

.hf-table-wrap {
  position: relative;
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-card);
  overflow: hidden;
  margin: 1.375rem 0;
}

.hf-table-wrap::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 40px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96));
}

@media (min-width: 782px) { .hf-table-wrap::after { display: none; } }

.hf-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.hf-table { width: 100%; min-width: 520px; border-collapse: collapse; }
.hf-table th, .hf-table td { text-align: left; vertical-align: middle; }

.hf-table thead th {
  background: #F7F1E9;
  border-bottom: 1px solid var(--hf-border);
  padding: 0.6875rem 0.875rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.5938rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hf-muted);
}

@media (min-width: 782px) { .hf-table thead th { padding: 0.8125rem 1.125rem; font-size: 0.625rem; } }

.hf-table tbody tr { border-bottom: 1px solid var(--hf-border-soft); }
.hf-table tbody tr:last-child { border-bottom: 0; }
.hf-table tbody tr.is-highlight { background: #FDFBF8; }

.hf-table td { padding: 0.8125rem 0.875rem; font-size: 0.875rem; line-height: 1.4; }

@media (min-width: 782px) { .hf-table td { padding: 0.9375rem 1.125rem; font-size: 0.9688rem; } }

.hf-table td:first-child { font-weight: 600; }

/* Comparison table fits the column on desktop — no horizontal scroll there.
   Mobile keeps the min-width + scroll. (.hf-table-scroll wraps only the
   comparison table, never the specs table.) */
@media (min-width: 782px) {
  .hf-table-scroll { overflow-x: visible; }
  .hf-table-scroll .hf-table { min-width: 0; }
}
.hf-table__score { text-align: center; font-family: var(--wp--preset--font-family--display); font-size: 1.0625rem; font-weight: 600; }

@media (min-width: 782px) { .hf-table__score { font-size: 1.1875rem; } }

.hf-table__for { color: var(--hf-text-soft); font-weight: 400 !important; }
.hf-table__cta { width: 1%; white-space: nowrap; }
.hf-table__cta .hf-btn { width: 100%; }
.hf-table__self { font-weight: 500; color: var(--hf-success); }

.hf-specs { margin: 1.375rem 0; max-width: 460px; }
.hf-specs .hf-table { min-width: 0; }

.hf-specs__head {
  padding: 0.8125rem 1.125rem;
  background: #F7F1E9;
  border-bottom: 1px solid var(--hf-border);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hf-muted);
}

.hf-specs td { font-size: 0.9063rem; padding: 0.75rem 1.125rem; }

@media (min-width: 782px) { .hf-specs td { font-size: 0.9375rem; } }

.hf-specs td:first-child { font-weight: 400; color: var(--hf-muted); }
.hf-specs td:last-child { font-weight: 500; text-align: right; }
.hf-specs .hf-table-wrap::after { display: none; }

/* ---------------------------------------------------------- hf_verdict */

.hf-verdict {
  background: var(--hf-accent-tint);
  border: 1px solid var(--hf-accent-border);
  border-radius: var(--hf-radius-card);
  padding: 1.25rem;
  margin: 1.375rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 600px) { .hf-verdict { padding: 1.625rem 1.75rem; gap: 1.125rem; } }

.hf-verdict__head { display: flex; align-items: center; gap: 0.625rem; }
.hf-verdict__head img { width: 26px; height: auto; }

.hf-verdict__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.3125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

@media (min-width: 600px) { .hf-verdict__title { font-size: 1.5rem; } }

.hf-verdict__rows { display: flex; flex-direction: column; gap: 0.875rem; }
.hf-verdict__row { display: flex; flex-direction: column; gap: 0.5rem; }

@media (min-width: 600px) { .hf-verdict__row { flex-direction: row; gap: 0.875rem; } }

.hf-verdict__label {
  flex: none;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.5938rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hf-muted);
}

@media (min-width: 600px) { .hf-verdict__label { width: 92px; padding-top: 4px; font-size: 0.625rem; } }

.hf-verdict__text { font-size: 0.9688rem; line-height: 1.6; margin: 0; }
.hf-verdict__sep { height: 1px; background: var(--hf-accent-border); }

/* ---------------------------------------------------------- hf_buyersay */

.hf-buyersay {
  background: var(--hf-accent-tint);
  border-left: 4px solid var(--hf-accent);
  border-radius: 4px 14px 14px 4px;
  padding: 1.125rem 1.25rem;
  margin: 1.375rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6875rem;
}

@media (min-width: 600px) { .hf-buyersay { padding: 1.375rem 1.625rem; } }

.hf-buyersay__quote {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.1875rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

@media (min-width: 600px) { .hf-buyersay__quote { font-size: 1.3125rem; } }

.hf-buyersay__note { font-size: 0.8438rem; line-height: 1.6; color: #6B6259; margin: 0; }

@media (min-width: 600px) { .hf-buyersay__note { font-size: 0.875rem; } }

/* ---------------------------------------------------------- cards / archives */

.hf-cardgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem 1.5rem;
  margin: 1.25rem 0 0;
}

@media (min-width: 600px) { .hf-cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hf-cardgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.hf-card { display: flex; flex-direction: column; gap: 0.625rem; }

.hf-card__media {
  border-radius: var(--hf-radius-img);
  overflow: hidden;
  border: 1px solid var(--hf-border);
  box-shadow: var(--hf-shadow-card);
  background: var(--hf-swatch);
  aspect-ratio: 1 / 1;
}

.hf-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hf-card__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

@media (min-width: 600px) { .hf-card__title { font-size: 1.1875rem; } }

.hf-card__title a { color: inherit; }
.hf-card__title a:hover { color: var(--hf-primary-dark); }
.hf-card__dek { font-size: 0.9375rem; line-height: 1.6; color: var(--hf-text-soft); margin: 0; }
.hf-card__meta { font-size: 0.8125rem; color: var(--hf-muted); }

.hf-list { display: flex; flex-direction: column; gap: 1.125rem; }
.hf-list__sep { height: 1px; background: #E9E1D6; }
.hf-list__item { display: flex; gap: 0.875rem; align-items: flex-start; }

.hf-list__media {
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hf-border);
  box-shadow: var(--hf-shadow-card);
  background: var(--hf-swatch);
}

@media (min-width: 782px) { .hf-list__media { width: 132px; height: 132px; } }

.hf-list__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hf-list__body { display: flex; flex-direction: column; gap: 0.375rem; }

/* Hot-linked product images (Amazon/Creators API). We cannot crop them server
   side, so show the WHOLE product, never cropped (cover) or distorted (fill):
   object-fit:contain inside the fixed tile keeps the grid uniform, and a white
   tile hides the letterboxing because Amazon product shots sit on white. */
.hf-product__media img.hf-extimg,
.hf-card__media img.hf-extimg,
.hf-list__media img.hf-extimg,
.hf-featured img.hf-extimg {
  object-fit: contain;
  background: #fff;
  padding: 8px;
}
.hf-product--hero .hf-product__media img.hf-extimg { padding: 16px; }
.hf-list__media img.hf-extimg { padding: 6px; }
/* Match the tile background to the image so the inset never shows a seam. */
.hf-product__media:has(img.hf-extimg),
.hf-card__media:has(img.hf-extimg),
.hf-list__media:has(img.hf-extimg),
.hf-featured:has(img.hf-extimg) { background: #fff; }

/* archive header */

.hf-archive-head { display: flex; flex-direction: column; gap: 1.125rem; }
.hf-archive-head__title { display: flex; align-items: center; gap: 0.875rem; }
.hf-archive-head__title img { width: 30px; height: auto; }
.hf-archive-head h1 { margin: 0; }
.hf-lede { font-size: 1.0625rem; line-height: 1.7; }

@media (min-width: 782px) { .hf-lede { font-size: 1.125rem; } }

.hf-lede p { margin-block: 1.125rem; }

.hf-crumbs { font-size: 0.8438rem; color: var(--hf-muted); }
.hf-rule { height: 1px; background: #E4DBCF; margin: 1.75rem 0; border: 0; }

/* pagination */

.hf-pagination { margin: 2.75rem 0 3.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.625rem; }

.hf-pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  padding: 0 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--hf-border);
  background: var(--hf-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--hf-text);
}

.hf-pagination .page-numbers.current { background: var(--hf-dark); border-color: var(--hf-dark); color: #fff; font-weight: 600; }
.hf-pagination .page-numbers:hover { border-color: var(--hf-primary); color: var(--hf-primary); }
.hf-pagination .page-numbers.current:hover { color: #fff; }

/* section heads */

.hf-sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 2.25rem; }

.hf-sectionhead h2, .hf-sectionhead h3 {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.3125rem;
  font-weight: 600;
  margin: 0;
}

@media (min-width: 782px) { .hf-sectionhead h2, .hf-sectionhead h3 { font-size: 1.625rem; } }

.hf-sectionhead a { font-size: 0.875rem; font-weight: 500; }

/* related */

.hf-related { margin: 3rem 0 0; }

/* intro line (homepage) */

.hf-intro {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #E4DBCF;
}

@media (min-width: 782px) { .hf-intro { gap: 1rem; padding-bottom: 1.75rem; } }

.hf-intro img { width: 28px; height: auto; flex: none; margin-top: 3px; }

@media (min-width: 782px) { .hf-intro img { width: 34px; } }

.hf-intro__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.4375rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 0;
}

@media (min-width: 782px) { .hf-intro__title { font-size: 1.875rem; line-height: 1.3; } }

.hf-intro__text { font-size: 0.9375rem; line-height: 1.6; color: var(--hf-text-soft); margin: 0.5rem 0 0; }

@media (min-width: 782px) { .hf-intro__text { font-size: 1.0625rem; line-height: 1.65; } }

/* home hero band */

.hf-hero {
  background: linear-gradient(155deg, var(--hf-accent-tint) 0%, var(--hf-bg) 72%);
  border: 1px solid var(--hf-accent-border);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  margin: 0.5rem 0 0.5rem;
}

@media (min-width: 782px) { .hf-hero { padding: 2rem 2.5rem; } }

.hf-hero__inner { display: flex; gap: 1rem; align-items: flex-start; }
.hf-hero img { width: 34px; height: auto; flex: none; margin-top: 4px; }
@media (min-width: 782px) { .hf-hero img { width: 44px; } }

.hf-hero__body { display: flex; flex-direction: column; }

.hf-hero__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.24;
  margin: 0;
  color: var(--hf-text);
}

@media (min-width: 782px) { .hf-hero__title { font-size: 2.1rem; line-height: 1.22; } }

.hf-hero__text { font-size: 1rem; line-height: 1.6; color: var(--hf-text-soft); margin: 0.6rem 0 0; max-width: 62ch; }

@media (min-width: 782px) { .hf-hero__text { font-size: 1.125rem; } }

.hf-trust { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0.625rem; }

.hf-trust li {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hf-primary-dark);
  background: var(--hf-surface);
  border: 1px solid var(--hf-accent-border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hf-trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hf-accent); flex: none; }

/* home editor's-pick lead */

.hf-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--hf-surface);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-hero);
  overflow: hidden;
}

@media (min-width: 782px) { .hf-lead { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: stretch; } }

.hf-lead__media { display: flex; align-items: center; justify-content: center; background: #fff; padding: 1.25rem; border-bottom: 1px solid var(--hf-border); }

@media (min-width: 782px) { .hf-lead__media { border-bottom: 0; border-right: 1px solid var(--hf-border); padding: 1.5rem; } }

/* Cap and centre the product so it never stretches to the text column's height;
   works the same for tall, square, or wide product shots (always a tidy tile). */
.hf-lead__media img { width: auto; height: auto; max-width: 100%; max-height: 240px; object-fit: contain; display: block; background: #fff; }

@media (min-width: 782px) { .hf-lead__media img { max-height: 300px; } }

.hf-lead__body { padding: 1.25rem 1.375rem 1.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }

@media (min-width: 782px) { .hf-lead__body { padding: 2rem 2.25rem; justify-content: center; } }

.hf-lead__eyebrow { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.hf-lead__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.24;
  margin: 0;
}

@media (min-width: 782px) { .hf-lead__title { font-size: 1.625rem; } }

.hf-lead__title a { color: var(--hf-text); }
.hf-lead__title a:hover { color: var(--hf-primary); }

.hf-lead__dek { font-size: 1rem; line-height: 1.6; color: var(--hf-text-soft); margin: 0; }
.hf-lead__meta { color: var(--hf-muted); margin: 0; }
.hf-lead__body .hf-btn { margin-top: 0.35rem; }

/* home top cluster: featured lead + the next few beside it */

.hf-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 1rem; }

@media (min-width: 1024px) { .hf-top { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 2rem; align-items: start; } }

.hf-top__list { align-self: start; }
.hf-top__label { color: var(--hf-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.6875rem; margin: 0 0 0.75rem; }

/* section-head sun accent */
.hf-sectionhead__sun { vertical-align: -3px; margin-right: 0.45rem; }

/* category blocks — per-category rows of recent posts */

.hf-catrows { margin-top: 1.75rem; }

/* Each category is a distinct block: generous space above, and a hairline
   rule between consecutive categories so sections read as separate. */
.hf-catrow { padding-top: 3.25rem; }
.hf-catrow:first-child { padding-top: 0.75rem; }
.hf-catrow + .hf-catrow { border-top: 1px solid var(--hf-border); }

.hf-catrow__head { display: flex; align-items: baseline; gap: 0.75rem; }

.hf-catrow__name {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--hf-text);
}

@media (min-width: 782px) { .hf-catrow__name { font-size: 1.625rem; } }

.hf-catrow__name a { color: inherit; }
.hf-catrow__name a:hover { color: var(--hf-primary); }
.hf-catrow__sun { vertical-align: -3px; margin-right: 0.5rem; }

.hf-catrow .hf-cardgrid { margin-top: 1.5rem; }

.hf-catrow__viewall {
  margin: 1.5rem 0 0;
  text-align: right;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hf-catrow__viewall a { color: var(--hf-primary-dark); font-weight: 600; }
.hf-catrow__viewall a:hover { color: var(--hf-primary); }

/* ---------------------------------------------------------- footer */

.hf-footer { background: var(--hf-dark); color: #E9E3DA; margin-top: 3rem; }

.hf-footer__inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 782px) {
  .hf-footer__inner { padding: 2.75rem 2rem 2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
}

.hf-footer__brand { display: flex; flex-direction: column; gap: 0.875rem; align-items: flex-start; }
.hf-footer__brand img { height: 24px; width: auto; display: block; }

@media (min-width: 782px) { .hf-footer__brand img { height: 28px; } }

.hf-footer__blurb { font-size: 0.875rem; line-height: 1.7; color: var(--hf-dark-muted); margin: 0; max-width: 260px; }
.hf-social { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; gap: 0.625rem; }
.hf-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--hf-dark-text);
  transition: color 0.15s, border-color 0.15s;
}
.hf-social a:hover { color: var(--hf-accent); border-color: var(--hf-accent); }
.hf-social svg { width: 17px; height: 17px; display: block; }

.hf-footer__col { display: flex; flex-direction: column; gap: 0.625rem; }

.hf-footer__label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hf-dark-label);
}

.hf-footer__label--spacer { visibility: hidden; }

@media (max-width: 781px) { .hf-footer__label--spacer { display: none; } }

.hf-footer__col ul { list-style: none; margin: 0; padding: 0; }
.hf-footer__col li { line-height: 2; }
.hf-footer__col a { font-size: 0.875rem; color: var(--hf-dark-text); }
.hf-footer__col a:hover { color: #fff; }

.hf-footer__legal {
  max-width: 1152px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.75rem;
  border-top: 1px solid var(--hf-dark-hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--hf-dark-muted);
}

@media (min-width: 782px) { .hf-footer__legal { padding: 1.25rem 2rem 2rem; } }

/* ---------------------------------------------------------- utilities */

.hf-stack { display: flex; flex-direction: column; }
.hf-stack--sm { gap: 0.625rem; }
.hf-stack--md { gap: 1.125rem; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.hf-skip {
  position: absolute;
  left: -9999px;
  z-index: 100;
  background: #fff;
  padding: 0.75rem 1rem;
}

.hf-skip:focus { left: 1rem; top: 0.5rem; }

:where(a, button):focus-visible { outline: 2px solid var(--hf-primary-dark); outline-offset: 2px; }

.hf-content > *:first-child { margin-top: 0; }

@media print {
  .hf-header, .hf-side, .hf-ad, .hf-pin, .hf-toc { display: none !important; }
}
