/* ============================================================
   CVL Affiliate Boxes — frontend styles
   Colors come from per-box CSS custom properties set inline:
   --cvl-p / --cvl-pd  primary + darker shade
   --cvl-s / --cvl-sd  secondary + darker shade
   --cvl-a / --cvl-al / --cvl-ad  accent + lighter/darker shades
   Fonts always inherit from the active theme.
   ============================================================ */

.cvl-box,
.cvl-box * ,
.cvl-box *::before,
.cvl-box *::after { box-sizing: border-box; }

.cvl-box {
  --cvl-cream: #FBF8F3;
  --cvl-line: #E4DED2;
  --cvl-ink: #21302F;
  --cvl-ink-soft: #5B6B69;
  font-family: inherit;
  max-width: 1040px;
  margin: 32px auto;
}

/* Shared check/cross icon */
.cvl-box .cvl-check {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cvl-box .cvl-check svg { width: 11px; height: 11px; }
.cvl-box .cvl-check--p { background: var(--cvl-p); }
.cvl-box .cvl-check--s { background: var(--cvl-s); }

/* Shared CTA buttons */
.cvl-box .cvl-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: #fff;
  margin-bottom: 10px;
  transition: transform .12s ease, box-shadow .12s ease,
              background-color .15s ease, color .15s ease;
}
.cvl-box .cvl-btn:last-child { margin-bottom: 0; }
.cvl-box .cvl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.cvl-box .cvl-btn--p { color: var(--cvl-pd); border-color: var(--cvl-p); }
.cvl-box .cvl-btn--p:hover { background: var(--cvl-p); border-color: var(--cvl-p); color: #fff; }
.cvl-box .cvl-btn--s { color: var(--cvl-sd); border-color: var(--cvl-s); }
.cvl-box .cvl-btn--s:hover { background: var(--cvl-s); border-color: var(--cvl-s); color: #fff; }

/* Screen-reader-only text */
.cvl-box .cvl-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   1. PRODUCT BOX (Editor's Choice)
   ============================================================ */
.cvl-box--product { max-width: 900px; }

.cvl-ec-card {
  position: relative;
  border-radius: 18px;
  padding: 3px;
  background-image: linear-gradient(135deg, var(--cvl-p) 0%, var(--cvl-s) 100%);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.cvl-ec-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}
.cvl-ec-left {
  position: relative;
  background: var(--cvl-cream);
  padding: 0 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--cvl-line);
}
.cvl-ec-ribbon {
  width: calc(100% + 48px);
  margin: 0 -24px 22px;
  background: var(--cvl-s);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .02em;
  text-align: center;
  padding: 13px 10px;
}
.cvl-ec-imgbox {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--cvl-line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 18px;
  color: var(--cvl-pd);
}
.cvl-ec-imgbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}
.cvl-ec-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.cvl-ec-score svg { flex-shrink: 0; }
.cvl-ec-score-text { text-align: center; line-height: 1.15; }
.cvl-ec-score-num {
  font-family: inherit;
  font-weight: 600;
  font-size: 21px;
  color: var(--cvl-pd);
  display: block;
}
.cvl-ec-score-label {
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cvl-ink-soft);
}
.cvl-ec-left .cvl-btn { max-width: 100%; }
.cvl-ec-right { padding: 30px 32px 28px; }
.cvl-ec-title {
  margin: 0 0 22px;
  padding: 0 0 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  color: var(--cvl-ink);
  text-decoration: underline;
  text-decoration-color: var(--cvl-s);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  border-bottom: 1px solid var(--cvl-line);
}
.cvl-ec-heading {
  font-family: inherit;
  font-weight: 600;
  font-size: 23px;
  color: var(--cvl-sd);
  margin: 0 0 16px;
}
.cvl-ec-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 11px;
}
.cvl-ec-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--cvl-ink);
  line-height: 1.4;
}
.cvl-ec-features li strong { color: var(--cvl-pd); font-weight: 600; }
.cvl-ec-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--cvl-ink-soft);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--cvl-line);
}
@media (max-width: 640px) {
  .cvl-ec-inner { grid-template-columns: 1fr; }
  .cvl-ec-left { border-right: none; border-bottom: 1px solid var(--cvl-line); padding-top: 0; }
  .cvl-ec-imgbox { max-width: 220px; }
  .cvl-ec-right { padding: 26px 22px; }
}

/* ============================================================
   2. TOP 3 BOX
   ============================================================ */
.cvl-t3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 820px) {
  .cvl-t3-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}
.cvl-t3-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #E7E9EE;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,30,40,.04);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
  color: #1C2430;
}
.cvl-t3-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -12px rgba(20,30,40,.16);
}
.cvl-t3-badge {
  background: linear-gradient(180deg, var(--cvl-p) 0%, var(--cvl-pd) 100%);
  color: #fff;
  text-align: center;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.cvl-t3-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.cvl-t3-media {
  padding: 26px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  color: #2B323C;
}
.cvl-t3-media img,
.cvl-t3-media svg {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(20,30,40,.12));
}
.cvl-t3-name {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  margin: 2px 20px 18px;
}
.cvl-t3-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #E7E9EE;
  border-bottom: 1px solid #E7E9EE;
}
.cvl-t3-stars { display: flex; gap: 2px; }
.cvl-t3-stars svg { width: 18px; height: 18px; }
.cvl-t3-score { font-size: 14px; color: #5B6472; font-weight: 600; }
.cvl-t3-features {
  list-style: none;
  margin: 0;
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}
.cvl-t3-features li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  align-items: flex-start;
}
.cvl-t3-features .cvl-check { width: 17px; height: 17px; }
.cvl-t3-label { color: #1C2430; font-weight: 600; }
.cvl-t3-val { color: #5B6472; font-weight: 400; }
.cvl-t3-ctas {
  margin-top: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cvl-t3-ctas .cvl-btn {
  padding: 11px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 0;
}

/* ============================================================
   3. PROS & CONS BOX
   ============================================================ */
.cvl-pc-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .cvl-pc-wrap { grid-template-columns: 1fr; gap: 22px; }
}
.cvl-pc-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  border-left: 4px solid var(--cvl-acc);
  border-bottom: 4px solid var(--cvl-acc);
  padding: 24px 26px 24px 22px;
  box-shadow: 0 1px 2px rgba(23,27,31,.04), 0 8px 20px -14px rgba(23,27,31,.18);
}
.cvl-pc-card--pro { --cvl-acc: var(--cvl-p); }
.cvl-pc-card--con { --cvl-acc: var(--cvl-s); }
.cvl-pc-head {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  margin-bottom: 26px;
}
.cvl-pc-line { flex: 1 1 auto; height: 2px; background: var(--cvl-acc); }
.cvl-pc-badge {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cvl-acc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.4);
  z-index: 2;
}
.cvl-pc-card ul { list-style: none; margin: 0; padding: 0; }
.cvl-pc-card li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: #4B5259;
}
.cvl-pc-card li:last-child { margin-bottom: 0; }
.cvl-pc-card .cvl-check--pc {
  width: 22px;
  height: 22px;
  background: var(--cvl-acc);
}

/* ============================================================
   4. VERSUS BOX
   ============================================================ */
.cvl-box--versus { max-width: 900px; margin-top: 84px; }

.cvl-vs-card {
  position: relative;
  display: flex;
  gap: 44px;
}
.cvl-vs-col {
  flex: 1 1 50%;
  padding: 44px 24px 30px;
  text-align: center;
  min-width: 0;
  background: #fff;
  border: 1px solid #ECECEC;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(20,20,40,.07);
}
.cvl-vs-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  border-radius: 4px;
  background: var(--cvl-a);
  box-shadow: 0 0 12px rgba(0, 0, 0, .25);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cvl-a) 45%, transparent);
}
.cvl-vs-badge-outer {
  position: absolute;
  top: -52px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  z-index: 3;
}
.cvl-vs-badge {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--cvl-al) 0%, var(--cvl-a) 55%, var(--cvl-ad) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 38px;
  font-style: italic;
  letter-spacing: 1px;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.35),
    inset 0 -6px 10px rgba(0,0,0,.18),
    0 6px 14px rgba(0,0,0,.3);
  text-shadow: 0 2px 3px rgba(0,0,0,.25);
}
.cvl-vs-ribbon {
  display: inline-block;
  position: relative;
  padding: 13px 38px 15px;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 1px;
  margin-bottom: 26px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
}
.cvl-vs-col--winner .cvl-vs-ribbon { background: var(--cvl-p); }
.cvl-vs-col--loser  .cvl-vs-ribbon { background: var(--cvl-s); }
.cvl-vs-img {
  width: 160px;
  height: 160px;
  margin: 4px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2B2B38;
}
.cvl-vs-img img,
.cvl-vs-img svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.cvl-vs-name {
  color: #2E86DE;
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 8px;
}
.cvl-vs-underline {
  width: 42px;
  height: 2px;
  margin: 0 auto 22px;
}
.cvl-vs-col--winner .cvl-vs-underline { background: var(--cvl-p); }
.cvl-vs-col--loser  .cvl-vs-underline { background: var(--cvl-s); }
.cvl-vs-features {
  list-style: none;
  padding: 0;
  margin: 0 auto 26px;
  max-width: 290px;
  text-align: left;
}
.cvl-vs-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  font-size: 14.5px;
  line-height: 1.4;
}
.cvl-vs-features b { color: #1A1A1A; }
.cvl-vs-features .cvl-check { width: 18px; height: 18px; margin-top: 2px; }
.cvl-vs-col .cvl-btn {
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
  padding: 12px 0;
  font-weight: 700;
  font-size: 14px;
}
.cvl-vs-col .cvl-btn:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .cvl-vs-card { flex-direction: column; gap: 56px; }
  .cvl-vs-divider {
    top: 50%;
    bottom: auto;
    left: 24px;
    right: 24px;
    transform: translateY(-50%);
    width: auto;
    height: 6px;
    border-radius: 4px;
  }
  .cvl-vs-badge-outer {
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
  }
  .cvl-vs-badge { font-size: 28px; }
  .cvl-vs-col { padding: 40px 20px 26px; }
}
