/* ═══════════════════════════════════════════════════════════
   Air Purifier Review Card – Widget Styles
   Plugin: aprc-product-card
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --aprc-accent:       #3a8bff;
  --aprc-accent-hover: #1a6de0;
  --aprc-badge-yel:    #f5a623;
  --aprc-badge-red:    #e8362a;
  --aprc-score-bg:     #eef4ff;
  --aprc-border:       #e4e8ef;
  --aprc-star-on:      #f5a623;
  --aprc-check:        #2d7dd2;
  --aprc-amazon:       #ff9900;
}

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');

/* ══════════════════════════════════════════
   PRODUCTS SECTION wrapper
══════════════════════════════════════════ */
.aprc-products-section {
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════
   PRODUCT CARD
══════════════════════════════════════════ */
.aprc-card {
  background: #fff;
  border: 1.5px solid var(--aprc-border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 56px 148px 1fr 168px;
  grid-template-rows: auto;
  overflow: hidden;
  position: relative;
  transition: box-shadow .25s ease, transform .2s ease;
  margin-bottom: 18px;
  font-family: 'Barlow', sans-serif;
}

.aprc-card:last-child {
  margin-bottom: 0;
}

.aprc-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, .10);
}

/* ── Rank ── */
.aprc-rank {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 4px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #333;
  line-height: 1;
}

/* ── Badge ── */
.aprc-badge {
  position: absolute;
  top: 18px;
  left: 52px;
  z-index: 2;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 14px 4px 10px;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  white-space: nowrap;
}

/* ── Discount ribbon ── */
.aprc-discount {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  background: var(--aprc-badge-red);
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-bottom-left-radius: 10px;
  white-space: nowrap;
}

/* ── Image column ── */
.aprc-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 10px 20px;
}

.aprc-img img {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.aprc-img-placeholder {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #e8edf5 0%, #d0d9ea 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Content column ── */
.aprc-content {
  padding: 20px 12px 20px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-width: 0; /* allow text-wrap in grid */
}

.aprc-name {
  font-family: 'Barlow', sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  line-height: 1.35 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
}

/* ── Feature list ── */
.aprc-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.aprc-features li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #444;
}

.aprc-features li::before {
  content: '✓';
  color: var(--aprc-check);
  font-weight: 700;
  font-size: 13px;
  margin-top: 1px;
  flex-shrink: 0;
  line-height: 1.5;
}

/* ── Action column ── */
.aprc-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 18px 18px 10px;
  gap: 9px;
  min-width: 0;
}

/* ── Score box ── */
.aprc-score-box {
  background: var(--aprc-score-bg);
  border-radius: 10px;
  padding: 13px 16px 12px;
  text-align: center;
  width: 100%;
}

.aprc-score-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1;
}

/* ── Stars ── */
.aprc-stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 6px;
}

.aprc-star {
  font-size: 14px;
  line-height: 1;
}

.aprc-star-filled {
  color: var(--aprc-star-on);
}

.aprc-star-half {
  color: var(--aprc-star-on);
  opacity: .55;
}

.aprc-star-empty {
  color: #dde3ee;
}

/* ── Sales note ── */
.aprc-sales-note {
  font-size: 11px;
  color: #888;
  text-align: center;
  line-height: 1.4;
}

/* ── CTA Button ── */
.aprc-btn {
  display: block;
  width: 100%;
  background: var(--aprc-accent);
  color: #fff !important;
  font-family: 'Barlow', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  padding: 11px 14px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: background .2s ease;
  line-height: 1.2;
}

.aprc-btn:hover,
.aprc-btn:focus {
  background: var(--aprc-accent-hover);
  color: #fff !important;
  text-decoration: none !important;
}

/* ── Amazon badge ── */
.aprc-amazon-badge {
  font-size: 11.5px;
  color: #999;
  text-align: center;
  line-height: 1.4;
}

.aprc-amazon-text {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--aprc-amazon);
  letter-spacing: .2px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════
   RESPONSIVE – Tablet (≤ 900px)
══════════════════════════════════════════ */
@media screen and (max-width: 900px) {
  .aprc-card {
    grid-template-columns: 44px 120px 1fr 148px;
  }
  .aprc-img img {
    max-width: 90px;
    max-height: 90px;
  }
  .aprc-img-placeholder {
    width: 76px;
    height: 76px;
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE – Mobile (≤ 640px)
══════════════════════════════════════════ */
@media screen and (max-width: 640px) {
  .aprc-card {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto auto;
  }

  /* Hide image on mobile */
  .aprc-img {
    display: none;
  }

  /* Content spans full width after rank */
  .aprc-content {
    grid-column: 2 / -1;
    padding: 14px 14px 6px 4px;
  }

  /* Action row spans full width */
  .aprc-action {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 6px 14px 16px;
    gap: 8px;
  }

  .aprc-score-box {
    width: auto;
    flex: 0 0 auto;
    min-width: 80px;
  }

  .aprc-btn {
    flex: 1;
    min-width: 120px;
  }

  .aprc-amazon-badge,
  .aprc-sales-note {
    width: 100%;
    text-align: center;
  }

  .aprc-badge {
    font-size: 10px;
    top: 12px;
    left: 36px;
  }

  .aprc-rank {
    font-size: 20px;
    padding-top: 16px;
  }
}


/* ══════════════════════════════════════════
   ARTICLE TEXT WIDGET (.aprc-article)
══════════════════════════════════════════ */
.aprc-article {
  font-family: 'Barlow', sans-serif;
}

/* Section-level heading */
.aprc-article-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #1a1a2e;
  display: inline-block;
  padding-bottom: 9px;
  margin-bottom: 20px;
  border-bottom: 3px solid transparent; /* overridden when .has-accent */
}

.aprc-article-heading.has-accent {
  border-bottom-color: #3a8bff;
  border-bottom-style: solid;
}

/* Individual content block */
.aprc-article-block {
  margin-bottom: 8px;
}

/* Subheadings inside blocks */
.aprc-block-heading {
  font-family: 'Barlow', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 22px 0 8px;
  line-height: 1.3;
}

/* Body text */
.aprc-block-text {
  color: #444;
  font-size: 15px;
  line-height: 1.7;
}

.aprc-block-text p {
  margin: 0 0 12px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.aprc-block-text p:last-child {
  margin-bottom: 0;
}

.aprc-block-text a {
  color: #3a8bff;
  text-decoration: underline;
}

.aprc-block-text strong,
.aprc-block-text b {
  font-weight: 700;
}

.aprc-block-text ul,
.aprc-block-text ol {
  margin: 8px 0 12px 20px;
}

.aprc-block-text li {
  margin-bottom: 4px;
}


/* ══════════════════════════════════════════
   HOW TO CHOOSE WIDGET (.aprc-how-to-choose)
══════════════════════════════════════════ */
.aprc-how-to-choose {
  font-family: 'Barlow', sans-serif;
}

/* Main heading */
.aprc-htc-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #1a1a2e;
  display: inline-block;
  padding-bottom: 9px;
  margin-bottom: 12px;
  border-bottom: 3px solid transparent;
}

.aprc-htc-heading.has-accent {
  border-bottom-color: #3a8bff;
  border-bottom-style: solid;
}

/* Intro paragraph */
.aprc-htc-intro {
  font-size: 15px;
  color: #555;
  line-height: 1.65;
  margin-bottom: 20px;
}

/* Grid container */
.aprc-htc-grid {
  display: grid;
  gap: 16px;
}

/* Column variants */
.aprc-htc-grid.aprc-cols-1 { grid-template-columns: 1fr; }
.aprc-htc-grid.aprc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aprc-htc-grid.aprc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aprc-htc-grid.aprc-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Step card */
.aprc-step-card {
  background: #fff;
  border: 1.5px solid #e4e8ef;
  border-radius: 10px;
  padding: 20px;
  transition: box-shadow .2s ease, transform .2s ease;
}

.aprc-step-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

/* Optional emoji icon */
.aprc-step-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
}

/* Step number */
.aprc-step-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #3a8bff;
  line-height: 1;
  margin-bottom: 8px;
}

/* Step title */
.aprc-step-title {
  font-family: 'Barlow', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 7px;
  line-height: 1.3;
}

/* Step description */
.aprc-step-text {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* ── Responsive – Tablet ── */
@media screen and (max-width: 900px) {
  .aprc-htc-grid.aprc-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .aprc-htc-grid.aprc-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive – Mobile ── */
@media screen and (max-width: 520px) {
  .aprc-htc-grid.aprc-cols-2,
  .aprc-htc-grid.aprc-cols-3,
  .aprc-htc-grid.aprc-cols-4 { grid-template-columns: 1fr; }

  .aprc-article-heading,
  .aprc-htc-heading { font-size: 22px; }
}
