/* =============================================================
   ShoppingPH — Single Review Post
   assets/css/single.css
   ============================================================= */


/* ── PAGE STRUCTURE ──────────────────────────────────────────── */
.sph-single {
  max-width: 100%;
}

.sph-single__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 1024px) {
  .sph-single__layout {
    grid-template-columns: 1fr 300px;
  }
}

.sph-single__main {
  min-width: 0;
}

.sph-single__sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--catbar-height) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}


/* ── HERO ────────────────────────────────────────────────────── */
.sph-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--sph-gray-100);
  margin-bottom: var(--space-6);
}

.sph-hero__image-wrap {
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

@media (max-width: 767px) {
  .sph-hero__image-wrap {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
  }
}

.sph-hero__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Gradient scrim at the bottom so score badge is readable */
.sph-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0,0,0,0.70) 0%,
    rgba(0,0,0,0.20) 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* Score badge overlaid on hero */
.sph-hero__score {
  position: absolute;
  bottom: var(--space-5);
  left: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sph-hero__score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--sph-red);
  box-shadow: 0 4px 20px rgba(238,77,45,0.5), 0 0 0 3px rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.sph-hero__score-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: var(--weight-extrabold);
  color: var(--sph-white);
  line-height: 1;
}

.sph-hero__score-denom {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.sph-hero__score-label {
  flex: 1;
}

.sph-hero__score-verdict {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--sph-white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-1);
}

.sph-hero__score-stars {
  display: flex;
  gap: 2px;
  color: var(--sph-gold);
}

.sph-hero__score-stars svg {
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

@media (max-width: 479px) {
  .sph-hero__score-badge { width: 56px; height: 56px; }
  .sph-hero__score-num   { font-size: 1.35rem; }
  .sph-hero__score-verdict { font-size: var(--text-base); }
}


/* ── POST HEADER ─────────────────────────────────────────────── */
.sph-post-header {
  margin-bottom: var(--space-6);
}

.sph-post-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  color: var(--sph-gray-900);
  margin-bottom: var(--space-4);
}

.sph-post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--sph-gray-200);
}

.sph-post-header__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.sph-post-header__meta-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.6;
}

.sph-post-header__meta a {
  color: var(--sph-red);
  font-weight: var(--weight-medium);
}

/* Share buttons in meta */
.sph-post-header__share {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.sph-share-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-pill);
  transition: all var(--duration-fast);
  text-decoration: none;
}

.sph-share-btn--fb {
  background: #E8F0FF;
  color: #1877F2;
}
.sph-share-btn--fb:hover { background: #1877F2; color: white; }

.sph-share-btn--copy {
  background: var(--sph-gray-100);
  color: var(--sph-gray-600);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}
.sph-share-btn--copy:hover { background: var(--sph-gray-200); }

.sph-share-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}


/* ── ABOVE-FOLD CTA (desktop only, between header and verdict) ─ */
.sph-above-fold-cta {
  display: none;
}

@media (min-width: 1024px) {
  .sph-above-fold-cta {
    display: block;
    margin-bottom: var(--space-6);
  }
}

.sph-above-fold-cta__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.sph-above-fold-cta__price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--sph-red);
}

.sph-above-fold-cta__price-orig {
  font-size: var(--text-base);
  color: var(--sph-gray-400);
  text-decoration: line-through;
}

.sph-above-fold-cta__note {
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  margin-top: -var(--space-2);
  margin-bottom: var(--space-4);
}

.sph-above-fold-cta__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sph-above-fold-cta__buttons .btn-affiliate {
  max-width: none;
}


/* ── VERDICT BOX ─────────────────────────────────────────────── */
/* (Base styles in components.css — extended here for single posts) */

.verdict-box {
  margin-bottom: var(--space-8);
}

/* Verdict rating bar */
.verdict-box__rating-bar {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.verdict-bar {
  display: grid;
  grid-template-columns: 120px 1fr 32px;
  align-items: center;
  gap: var(--space-3);
}

@media (max-width: 479px) {
  .verdict-bar {
    grid-template-columns: 90px 1fr 28px;
    gap: var(--space-2);
  }
}

.verdict-bar__label {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verdict-bar__track {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.verdict-bar__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--sph-red) 0%, var(--sph-gold) 100%);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%; /* animated via JS */
}

.verdict-bar__score {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: rgba(255,255,255,0.9);
  text-align: right;
}


/* ── SPECS TABLE ─────────────────────────────────────────────── */
/* (Base in components.css — single-specific sizing here) */

.sph-specs-section {
  margin: var(--space-8) 0;
}

.sph-specs-section__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sph-specs-section__title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.2em;
  background: var(--sph-red);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Specs table highlight for key rows */
.specs-table tbody tr.is-highlight td {
  background: var(--sph-red-mist) !important;
  font-weight: var(--weight-semibold);
}

.specs-table tbody tr.is-highlight td:first-child {
  color: var(--sph-red-dark);
}


/* ── REVIEW BODY ─────────────────────────────────────────────── */
.sph-review-body {
  margin: var(--space-8) 0;
}

/* Section break heading style inside review body */
.sph-review-body .entry-content h2 {
  font-size: var(--text-xl);
  color: var(--sph-gray-900);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--sph-gray-200);
  position: relative;
}

.sph-review-body .entry-content h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--sph-red);
}

/* Callout box inside review body */
.sph-callout {
  border-left: 4px solid var(--sph-red);
  background: var(--sph-red-mist);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
  color: var(--sph-gray-700);
  line-height: var(--leading-relaxed);
}

.sph-callout strong {
  color: var(--sph-red-dark);
  display: block;
  margin-bottom: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--text-base);
}

/* Image caption */
.wp-caption,
.wp-block-image figcaption {
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  text-align: center;
  margin-top: var(--space-2);
  font-style: italic;
}

/* Pull quote */
.sph-pull-quote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--sph-red);
  border-left: 5px solid var(--sph-red);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: var(--sph-red-mist);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  line-height: var(--leading-snug);
}


/* ── BOTTOM CTA BLOCK ────────────────────────────────────────── */
/* (Base in components.css, extended here) */

.sph-bottom-cta {
  margin: var(--space-10) 0;
}

.sph-bottom-cta__heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--sph-gray-900);
  text-align: center;
  margin-bottom: var(--space-2);
}

.sph-bottom-cta__sub {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--sph-gray-500);
  margin-bottom: var(--space-6);
}


/* ── STICKY MOBILE BUY BAR ───────────────────────────────────── */
.sph-sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--sph-white);
  border-top: 1px solid var(--sph-gray-200);
  padding: var(--space-3) var(--space-4);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: var(--space-3);

  /* Hidden until user scrolls past hero */
  transform: translateY(100%);
  transition: transform 300ms var(--ease-out);
}

.sph-sticky-buy-bar.is-visible {
  transform: translateY(0);
}

/* Only show on mobile */
@media (min-width: 1024px) {
  .sph-sticky-buy-bar {
    display: none;
  }
}

.sph-sticky-buy-bar__info {
  flex: 1;
  min-width: 0;
}

.sph-sticky-buy-bar__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--sph-gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sph-sticky-buy-bar__price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  color: var(--sph-red);
  line-height: 1.1;
}

.sph-sticky-buy-bar__btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--sph-red);
  color: var(--sph-white);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background var(--duration-fast);
  text-decoration: none;
}

.sph-sticky-buy-bar__btn:hover {
  background: var(--sph-red-dark);
}

/* Safe area for iPhone notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sph-sticky-buy-bar {
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  }
}


/* ── TABLE OF CONTENTS ───────────────────────────────────────── */
.sph-toc {
  background: var(--surface-card);
  border: 1px solid var(--sph-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-6) 0 var(--space-8);
}

.sph-toc__title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--sph-gray-900);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sph-toc__list {
  list-style: none;
  counter-reset: toc-counter;
  margin: 0;
  padding: 0;
}

.sph-toc__list li {
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border-bottom: 1px dashed var(--sph-gray-200);
}

.sph-toc__list li:last-child {
  border-bottom: none;
}

.sph-toc__list li::before {
  content: counter(toc-counter) '.';
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--sph-red);
  flex-shrink: 0;
  width: 18px;
}

.sph-toc__list a {
  font-size: var(--text-sm);
  color: var(--sph-gray-700);
  text-decoration: none;
  transition: color var(--duration-fast);
  line-height: var(--leading-snug);
}

.sph-toc__list a:hover {
  color: var(--sph-red);
}


/* ── RELATED POSTS ───────────────────────────────────────────── */
.sph-related {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 2px solid var(--sph-gray-200);
}

.sph-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .sph-related__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .sph-related__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ── SIDEBAR — SINGLE PAGE ───────────────────────────────────── */

/* Sidebar price card */
.sph-sidebar-price-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--sph-red-light);
}

.sph-sidebar-price-card__head {
  background: linear-gradient(135deg, var(--sph-red) 0%, var(--sph-orange) 100%);
  padding: var(--space-4) var(--space-5);
  text-align: center;
}

.sph-sidebar-price-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-1);
}

.sph-sidebar-price-card__price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--sph-white);
  line-height: 1;
}

.sph-sidebar-price-card__orig {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: line-through;
  margin-top: var(--space-1);
}

.sph-sidebar-price-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sph-sidebar-price-card__score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  background: var(--sph-gray-50);
  border-radius: var(--radius-md);
}

.sph-sidebar-price-card__score-label {
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  font-weight: var(--weight-medium);
}

.sph-sidebar-price-card__score-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--sph-red);
}

.sph-sidebar-price-card__note {
  font-size: var(--text-xs);
  color: var(--sph-gray-400);
  text-align: center;
  line-height: var(--leading-relaxed);
}

/* Store links list in sidebar */
.sph-sidebar-stores {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sph-sidebar-store-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--sph-gray-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-fast);
}

.sph-sidebar-store-link:hover {
  border-color: var(--sph-red);
  background: var(--sph-red-mist);
  transform: translateX(2px);
}

.sph-sidebar-store-link__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sph-sidebar-store-link__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sph-sidebar-store-link__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--sph-gray-800);
}

.sph-sidebar-store-link__price {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--sph-red);
}

.sph-sidebar-store-link__arrow {
  color: var(--sph-gray-400);
  font-size: var(--text-sm);
  transition: transform var(--duration-fast);
}

.sph-sidebar-store-link:hover .sph-sidebar-store-link__arrow {
  transform: translateX(3px);
  color: var(--sph-red);
}
