/*
 Theme Name:   Hearthside Picks Child
 Theme URI:    https://hearthsidepicks.com
 Description:  Blocksy child theme for Hearthside Picks — affiliate product reviews, roundups, comparisons, and buying guides.
 Author:       Hearthside Picks Team
 Author URI:   https://hearthsidepicks.com
 Template:     blocksy
 Version:      1.0.0
 License:      GPL-2.0-or-later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  blocksy-child

 Design System Tokens:
   Primary:    #1B4D3E
   Accent:     #E8A838
   Dark/Text:  #1A1A2E
   Surface:    #FAFAF8
   Border:     #E5E7EB
   Heading:    "DM Serif Display", Georgia, serif
   Body:       "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif
*/

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  --hsp-primary: #1B4D3E;
  --hsp-accent: #E8A838;
  --hsp-dark: #1A1A2E;
  --hsp-surface: #FAFAF8;
  --hsp-border: #E5E7EB;
  --hsp-font-heading: "DM Serif Display", Georgia, serif;
  --hsp-font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif;
  --hsp-radius-sm: 8px;
  --hsp-radius-md: 10px;
  --hsp-radius-lg: 14px;
  --hsp-radius-pill: 50px;
  --hsp-shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --hsp-shadow-md: 0 4px 18px rgba(26, 26, 46, 0.08);
  --hsp-shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.12);
}

/* ==========================================================================
   2. Sticky-header scroll offset — prevent header (~100px) + sticky "In
   This Review" TOC bar (~60px) from covering anchor targets. 180px clears
   both bars on desktop. !important overrides any residual inline style.
   ========================================================================== */
/* All anchor targets on product review pages get 160px offset on desktop.
   This clears the sticky header (~100px) + sticky in-review TOC (~55px).
   !important beats any residual inline scroll-margin-top values. */
#hsp-toc-overview,
#hsp-toc-spc,
.hsp-sr-spc,
.hsp-sr-spc__title,
#hsp-toc-verdict,
.hsp-sr-verdict,
#hsp-toc-related,
.hsp-sr-related,
#hsp-toc-review,
.hsp-sr-article,
#hsp-toc-faq,
.hsp-sr-faq,
#hsp-faq-title,
#hsp-rf-title,
.hsp-rf,
.hsp-rf__comments,
.hsp-sr-overview h2,
.hsp-sr-article h2,
.hsp-sr-article h3 {
  scroll-margin-top: 160px !important;
}
@media (max-width: 767px) {
  #hsp-toc-overview,
  #hsp-toc-spc,
  .hsp-sr-spc,
  .hsp-sr-spc__title,
  #hsp-toc-verdict,
  .hsp-sr-verdict,
  #hsp-toc-related,
  .hsp-sr-related,
  #hsp-toc-review,
  .hsp-sr-article,
  #hsp-toc-faq,
  .hsp-sr-faq,
  #hsp-faq-title,
  #hsp-rf-title,
  .hsp-rf,
  .hsp-rf__comments,
  .hsp-sr-overview h2,
  .hsp-sr-article h2,
  .hsp-sr-article h3 {
    scroll-margin-top: 90px !important;
  }
}

/* ==========================================================================
   2. Logo wordmark — force brand green, no blue link color (global safety)
   ========================================================================== */
.hsp-header__logo,
.hsp-header__logo:visited,
.hsp-header__logo:hover,
.hsp-header__logo:focus,
.hsp-header__logo:active,
.hsp-header__logo-text,
.ct-logo a,
.site-title a {
  color: #1B4D3E !important;
  text-decoration: none !important;
}
.hsp-header__logo-text strong {
  color: #E8A838 !important;
}

/* ==========================================================================
   2. Base Typography
   ========================================================================== */
body {
  font-family: var(--hsp-font-body);
  color: var(--hsp-dark);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hsp-font-heading);
  color: var(--hsp-dark);
  line-height: 1.25;
}

a {
  color: var(--hsp-primary);
  text-decoration: none;
}
a:hover {
  color: var(--hsp-accent);
}

/* ==========================================================================
   3. Utility Classes
   ========================================================================== */
.hsp-section {
  padding: 60px 0;
}
.hsp-section--alt {
  background: var(--hsp-surface);
}
@media (max-width: 767px) {
  .hsp-section {
    padding: 36px 0;
  }
}

/* ==========================================================================
   4. Shortcode: [hsp_verdict]
   ========================================================================== */
.hsp-verdict {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--hsp-surface);
  border: 1px solid var(--hsp-border);
  border-radius: var(--hsp-radius-md);
  padding: 18px 22px;
  margin: 20px 0;
}
.hsp-verdict__rating {
  background: var(--hsp-primary);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  width: 52px;
  height: 52px;
  border-radius: var(--hsp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hsp-verdict__body {
  flex: 1;
  min-width: 0;
}
.hsp-verdict__product {
  font-family: var(--hsp-font-heading);
  font-size: 18px;
  margin: 0 0 4px;
  color: var(--hsp-dark);
}
.hsp-verdict__summary {
  font-size: 14px;
  color: var(--hsp-dark);
  opacity: 0.8;
  margin: 0;
}

/* ==========================================================================
   5. Shortcode: [hsp_proscons]
   ========================================================================== */
.hsp-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--hsp-border);
  border-radius: var(--hsp-radius-md);
  overflow: hidden;
  margin: 20px 0;
}
.hsp-proscons__col {
  padding: 20px;
}
.hsp-proscons__col--pros {
  background: rgba(27, 77, 62, 0.04);
  border-right: 1px solid var(--hsp-border);
}
.hsp-proscons__col--cons {
  background: rgba(232, 168, 56, 0.04);
}
.hsp-proscons__heading {
  font-family: var(--hsp-font-heading);
  font-size: 16px;
  margin: 0 0 12px;
}
.hsp-proscons__heading--pros {
  color: var(--hsp-primary);
}
.hsp-proscons__heading--cons {
  color: var(--hsp-accent);
}
.hsp-proscons__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hsp-proscons__list li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
}
.hsp-proscons__list li::before {
  position: absolute;
  left: 0;
  top: 6px;
  font-size: 14px;
}
.hsp-proscons__col--pros .hsp-proscons__list li::before {
  content: "\2713";
  color: var(--hsp-primary);
}
.hsp-proscons__col--cons .hsp-proscons__list li::before {
  content: "\2717";
  color: var(--hsp-accent);
}
@media (max-width: 600px) {
  .hsp-proscons {
    grid-template-columns: 1fr;
  }
  .hsp-proscons__col--pros {
    border-right: 0;
    border-bottom: 1px solid var(--hsp-border);
  }
}

/* ==========================================================================
   6. Affiliate Disclosure
   ========================================================================== */
.hsp-disclosure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: #9CA3AF;
  margin: 0;
  padding: 4px 0;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.hsp-disclosure__icon {
  color: #9CA3AF;
  flex-shrink: 0;
}
.hsp-disclosure__text {
  margin: 0;
  line-height: 1.6;
}
.hsp-disclosure__text strong {
  color: #6B7280;
  font-weight: 600;
}
.hsp-disclosure a,
.hsp-disclosure__text a {
  color: #6B7280;
  text-decoration: underline;
  transition: color .15s ease;
}
.hsp-disclosure a:hover,
.hsp-disclosure__text a:hover {
  color: #1B4D3E;
}
@media (max-width: 600px) {
  .hsp-disclosure {
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
  }
}

/* ==========================================================================
   7. Email Capture
   ========================================================================== */
.hsp-email-capture {
  background: var(--hsp-surface);
  border: 1px solid var(--hsp-border);
  border-radius: var(--hsp-radius-lg);
  padding: 36px 32px;
  text-align: center;
  margin: 40px 0;
}
.hsp-email-capture h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--hsp-dark);
}
.hsp-email-capture p {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--hsp-dark);
  opacity: 0.8;
}
.hsp-email-capture__form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.hsp-email-capture__input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--hsp-border);
  border-radius: var(--hsp-radius-lg);
  font-size: 16px;
  font-family: var(--hsp-font-body);
  color: var(--hsp-dark);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}
.hsp-email-capture__input:focus {
  border-color: var(--hsp-primary);
}
.hsp-email-capture__input::placeholder {
  color: var(--hsp-dark);
  opacity: 0.45;
}
.hsp-email-capture__submit {
  background: var(--hsp-accent);
  color: var(--hsp-dark);
  border: 0;
  border-radius: var(--hsp-radius-lg);
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--hsp-font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.hsp-email-capture__submit:hover {
  background: var(--hsp-primary);
  color: var(--hsp-surface);
}
.hsp-email-capture__success {
  display: none;
  color: var(--hsp-primary);
  font-weight: 600;
  margin-top: 12px;
}
.hsp-email-capture__error {
  display: none;
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
}
@media (max-width: 600px) {
  .hsp-email-capture {
    padding: 28px 20px;
  }
  .hsp-email-capture__form {
    flex-direction: column;
  }
  .hsp-email-capture__submit {
    width: 100%;
  }
}
