/*
Theme Name: WiredSave Affiliate Child
Author: WiredSave
Description: Child theme of Savings Pro for wiredsave.click. Frontend display only: restyles the public site as a trust-first multi-store affiliate publication for Outdoor / Camping Gear (USA), with a Best Outdoor Gear hub, roundup and guide templates, verdict boxes and responsive comparison tables. It changes NO admin, database, coupon, store or affiliate-link logic. Savings Pro stays installed as the parent and remains the source of all coupon/store functions. Deactivating this child theme instantly restores the original Savings Pro look.
Version: 1.6.1
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: savings-pro-main
Text Domain: wiredsave-affiliate-child
Tags: affiliate, outdoor, camping, reviews, responsive, custom-menu, featured-images
*/

/* ============================================================
   WiredSave Affiliate Child — frontend display only.
   Parent (Savings Pro) supplies all header, footer, navigation,
   coupon/store and admin functionality. These styles only
   restyle what visitors see. No coupon, store or admin
   behaviour is changed here.
   ============================================================ */

:root {
  --ws-ink: #17211a;
  --ws-body: #2e3a32;
  --ws-muted: #5d6b61;
  --ws-accent: #1d6b3c;
  --ws-accent-dark: #14522d;
  --ws-gold: #b7791f;
  --ws-bg: #ffffff;
  --ws-soft: #f2f6f2;
  --ws-soft-2: #e8efe8;
  --ws-line: #dde5dd;
  --ws-danger: #8c2f2f;
  --ws-radius: 10px;
  --ws-max: 1080px;
  --ws-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--ws-font);
  color: var(--ws-body);
  line-height: 1.65;
  background: var(--ws-bg);
}

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

a { color: var(--ws-accent); }
a:hover, a:focus { color: var(--ws-accent-dark); }

/* ---------- Layout helpers ---------- */
.ws-wrap { max-width: var(--ws-max); margin: 0 auto; padding: 0 18px; }
.ws-section { margin: 2.25rem 0; }
.ws-lead { font-size: 1.125rem; color: var(--ws-body); }

/* ---------- Trust bar ---------- */
.ws-trustbar {
  background: var(--ws-soft);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.ws-trustbar p { margin: 0.25rem 0; }
.ws-trustbar strong { color: var(--ws-ink); }
.ws-trustbar ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }

/* ---------- Breadcrumbs ---------- */
.ws-breadcrumbs {
  font-size: 0.875rem;
  color: var(--ws-muted);
  margin: 1rem 0 0;
}
.ws-breadcrumbs a { color: var(--ws-muted); text-decoration: underline; }
.ws-breadcrumbs .ws-crumb-sep { margin: 0 0.4em; }

/* ---------- Disclosure box (above first affiliate link area) ---------- */
.ws-disclosure {
  display: none;
  background: #fff8e6;
  border: 1px solid #ead9a0;
  border-left: 4px solid var(--ws-gold);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.ws-disclosure p { margin: 0; }

/* ---------- Hide parent coupon navigation on the frontend ---------- */
/* The header menu (Home, All Stores, Categories, Coupons, Deals, Blog) is
   hidden from visitors so the frontend looks like a GearLab-style
   publication. The menu itself stays saved in wp-admin and can be
   restored by removing this rule. */
.site-header .main-navigation,
.site-header #site-navigation,
.site-header .primary-menu,
.site-header nav.main-navigation {
  display: none !important;
}

/* ---------- Verdict box ---------- */
.ws-verdict {
  background: var(--ws-soft);
  border: 1px solid var(--ws-line);
  border-left: 5px solid var(--ws-accent);
  border-radius: var(--ws-radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}
.ws-verdict h2, .ws-verdict h3 { margin-top: 0; color: var(--ws-ink); }
.ws-verdict p:last-child { margin-bottom: 0; }
.ws-verdict .ws-verdict-label {
  display: inline-block;
  background: var(--ws-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

/* ---------- Award badges ---------- */
.ws-award {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.ws-award-editors { background: var(--ws-accent); color: #fff; }
.ws-award-best-buy { background: var(--ws-gold); color: #fff; }
.ws-award-top-pick { background: #33526b; color: #fff; }

/* ---------- Best-of cards ---------- */
.ws-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.ws-card {
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  padding: 1.15rem 1.25rem;
  background: #fff;
}
.ws-card h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.ws-card h3 a { color: var(--ws-ink); text-decoration: none; }
.ws-card h3 a:hover { color: var(--ws-accent); text-decoration: underline; }
.ws-card p { margin: 0 0 0.75rem; }
.ws-card .ws-card-link { font-weight: 700; }
.ws-card .ws-card-note { font-size: 0.875rem; color: var(--ws-muted); }

/* ---------- Top Sections ---------- */
.ws-sections-list { columns: 1; margin: 0; padding-left: 1.25rem; }
.ws-sections-list li { margin-bottom: 0.4rem; }

/* ---------- Pros / cons ---------- */
.ws-pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}
.ws-pros, .ws-cons {
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  padding: 1rem 1.2rem;
}
.ws-pros h3, .ws-cons h3 { margin-top: 0; font-size: 1rem; }
.ws-pros { border-top: 4px solid var(--ws-accent); }
.ws-cons { border-top: 4px solid var(--ws-danger); }
.ws-pros ul, .ws-cons ul { margin: 0; padding-left: 1.2rem; }

/* ---------- Comparison tables: responsive via horizontal scroll ---------- */
.ws-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
}
.ws-table-wrap table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
}
.ws-table-wrap caption {
  text-align: left;
  font-weight: 700;
  color: var(--ws-ink);
  padding: 0.75rem 1rem;
  background: var(--ws-soft);
}
.ws-table-wrap th, .ws-table-wrap td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--ws-line);
  vertical-align: top;
}
.ws-table-wrap thead th {
  background: var(--ws-soft);
  color: var(--ws-ink);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
.ws-table-wrap tbody tr:last-child th,
.ws-table-wrap tbody tr:last-child td { border-bottom: 0; }
.ws-table-wrap .ws-score { font-weight: 700; color: var(--ws-ink); }
.ws-table-wrap .ws-tbd { color: var(--ws-muted); font-style: italic; }

/* ---------- Score block ---------- */
.ws-score-block {
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--ws-soft);
}
.ws-score-block .ws-score-number { font-size: 2rem; font-weight: 800; color: var(--ws-ink); line-height: 1.1; }
.ws-score-block dl { margin: 0.75rem 0 0; display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; }
.ws-score-block dt { font-weight: 600; }
.ws-score-block dd { margin: 0; text-align: right; }

/* ---------- CTA button ---------- */
.ws-cta {
  display: inline-block;
  background: var(--ws-accent);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
}
.ws-cta:hover, .ws-cta:focus { background: var(--ws-accent-dark); color: #fff; }

/* ---------- Roundup / guide content ---------- */
.ws-roundup .ws-entry h2,
.ws-guide .ws-entry h2 { margin-top: 2rem; color: var(--ws-ink); }
.ws-roundup .ws-entry h3,
.ws-guide .ws-entry h3 { color: var(--ws-ink); }
.ws-meta { font-size: 0.875rem; color: var(--ws-muted); margin: 0.5rem 0 0; }
.ws-related { margin-top: 2.5rem; border-top: 1px solid var(--ws-line); padding-top: 1.25rem; }
.ws-related h2 { font-size: 1.25rem; color: var(--ws-ink); }
.ws-related ul { padding-left: 1.25rem; }

/* ---------- Learning Center ---------- */
.ws-learning { background: var(--ws-soft); border-radius: var(--ws-radius); padding: 1.25rem 1.4rem; }
.ws-learning h2 { margin-top: 0; }

/* ---------- Footer note ---------- */
.ws-footer-note { font-size: 0.875rem; color: var(--ws-muted); }

/* ---------- Featured images on single posts and archive cards ---------- */
.ws-featured { margin: 1.25rem 0; }
.ws-featured-img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
}
.ws-card-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #fff;
  display: block;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

/* ---------- GearLab-style green header, nav, slider, Top Sections ---------- */
.ws-gear-header {
  background: #2e7d32;
  color: #fff;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  border-radius: 6px 6px 0 0;
}
.ws-gear-logo {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.1;
}
.ws-gear-logo:hover { color: #e8f5e9; }
.ws-gear-tagline {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dcedc8;
}
.ws-gear-nav {
  background: #1b5e20;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.75rem;
  border-radius: 0 0 6px 6px;
}
.ws-gear-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
}
.ws-gear-nav a:hover { background: #2e7d32; color: #fff; }
.ws-gear-search { margin-left: auto; }
.ws-gear-search input {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  width: 180px;
  max-width: 100%;
}
/* Slider: 4 slides, one visible, fades every 5 seconds. */
.ws-slider { position: relative; margin: 1.5rem 0 0; overflow: hidden; border-radius: 10px; background: var(--ws-soft); }
.ws-slide { display: none; margin: 0; }
.ws-slide.is-active { display: block; }
.ws-slide a { display: block; text-decoration: none; }
.ws-slide img { width: 100%; height: 320px; object-fit: contain; background: #fff; display: block; }
.ws-slide figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0.7rem 1rem;
  font-weight: 600;
}
.ws-slider-dots { position: absolute; right: 0.75rem; top: 0.75rem; display: flex; gap: 0.4rem; }
.ws-slider-dots button {
  width: 2rem; height: 2rem;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #1b5e20; font-weight: 700; cursor: pointer;
}
.ws-slider-dots button.is-active { background: #1b5e20; color: #fff; }
/* Top Sections with images: 6 across on desktop. */
.ws-top-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.ws-top-grid a { display: block; text-align: center; color: var(--ws-ink); text-decoration: none; }
.ws-top-grid a:hover span { color: var(--ws-accent); text-decoration: underline; }
.ws-top-grid img { width: 100%; height: 150px; object-fit: contain; background: #fff; border: 1px solid var(--ws-line); border-radius: 8px; }
.ws-top-grid span { display: block; margin-top: 0.5rem; font-weight: 600; }
/* Hiking article cards: 3 across. */
.ws-hike-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.ws-hike-cards a { display: block; color: var(--ws-ink); text-decoration: none; }
.ws-hike-cards a:hover span { color: var(--ws-accent); text-decoration: underline; }
.ws-hike-cards img { width: 100%; height: 200px; object-fit: contain; background: #fff; border: 1px solid var(--ws-line); border-radius: 8px; }
.ws-hike-cards span { display: block; margin-top: 0.5rem; font-weight: 700; font-size: 1.05rem; }
/* Browse by Category: image cards, one per category. */
.ws-browse-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.ws-browse-card { border: 1px solid var(--ws-line); border-radius: var(--ws-radius); overflow: hidden; background: #fff; }
.ws-browse-card > a { display: block; text-decoration: none; color: var(--ws-ink); }
.ws-browse-card > a:hover h3 { color: var(--ws-accent); text-decoration: underline; }
.ws-browse-card img { width: 100%; height: 150px; object-fit: contain; background: #fff; display: block; border-bottom: 1px solid var(--ws-line); }
.ws-browse-card h3 { margin: 0.75rem 1rem 0.25rem; font-size: 1.05rem; }
.ws-browse-card ul { list-style: none; margin: 0 0 0.9rem; padding: 0 1rem; }
.ws-browse-card ul li { margin-top: 0.3rem; font-size: 0.95rem; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .ws-cards { grid-template-columns: repeat(2, 1fr); }
  .ws-pros-cons { grid-template-columns: 1fr 1fr; }
  .ws-sections-list { columns: 2; }
  .ws-top-grid { grid-template-columns: repeat(3, 1fr); }
  .ws-hike-cards { grid-template-columns: repeat(3, 1fr); }
  .ws-browse-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .ws-cards { grid-template-columns: repeat(3, 1fr); }
  .ws-wrap { padding: 0 24px; }
  .ws-top-grid { grid-template-columns: repeat(6, 1fr); }
  .ws-browse-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------- Hide parent header branding + hub page title ---------- */
/* The white strip above the green header is the parent theme's
   .primary-header div inside #masthead. The logo is an image
   (click.png) inside .logo_area with no class on the link itself,
   so the whole strip must be hidden, not the logo alone.
   Hiding it also removes MY ACCOUNT / SIGN OUT from the strip —
   the green WiredSave header is now the site header on every page.
   The "Best Outdoor Gear" H1 is also hidden on the homepage hub —
   the green header bar is the heading there. */
#masthead .primary-header { display: none !important; }
.site-header .site-branding,
.site-header .site-logo,
.site-header .custom-logo-link,
.site-header .site-title,
.site-header .logo,
.site-header .site-identity,
.site-header .logo_area,
.site-header .header_right {
  display: none !important;
}
body.home .entry-title { display: none !important; }
