/*
Theme Name: Coupify Reviews
Theme URI: https://coupify.us/
Author: Coupify
Author URI: https://coupify.us/
Description: A modern brand reviews + Comfrt coupons theme for Coupify. Homepage = pure reviews. Comfrt coupons page is linked from the footer only, with auto-applied affiliate discounts (no codes shown to user).
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coupify
Tags: reviews, coupons, affiliate, modern, responsive
*/

/* ============================================================
   Reset + Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  background: #f7f8fc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #5b3df5; text-decoration: none; transition: color .2s ease; }
a:hover { color: #3a1ec9; }
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.25; margin: 0 0 .6em; color: #0f0f23; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #ececf5;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.site-logo a {
  font-family: 'Poppins', sans-serif;
  font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em;
  color: #0f0f23; display: inline-flex; align-items: center; gap: .5rem;
}
.site-logo .logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #5b3df5, #ff5b8a);
  border-radius: 9px; display: inline-block; position: relative;
}
.site-logo .logo-mark::after {
  content: '%'; color: #fff; font-size: 14px; font-weight: 800;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; }
.main-nav a { color: #1a1a2e; font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: #5b3df5; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: #5b3df5; }

.nav-toggle { display: none; background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; color: #0f0f23; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid #ececf5;
    transform: scaleY(0); transform-origin: top; transition: transform .25s ease;
  }
  .main-nav.open { transform: scaleY(1); }
  .main-nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .main-nav li { padding: .65rem 0; border-bottom: 1px solid #f1f1f7; }
  .main-nav li:last-child { border-bottom: 0; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(91,61,245,.18), transparent 60%),
    radial-gradient(800px 400px at -10% 20%, rgba(255,91,138,.15), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
  overflow: hidden;
}
.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.hero h1 span {
  background: linear-gradient(135deg, #5b3df5, #ff5b8a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 1.15rem; color: #4a4a6a; max-width: 640px; margin: 1rem auto 2rem; }
.hero-cta {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 1.6rem;
  background: linear-gradient(135deg, #5b3df5, #7a5cff);
  color: #fff; border-radius: 999px; font-weight: 600;
  box-shadow: 0 14px 30px -10px rgba(91,61,245,.55);
  transition: transform .15s ease, box-shadow .2s ease;
}
.hero-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(91,61,245,.65); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem;
  max-width: 680px; margin: 2.75rem auto 0;
}
.hero-stat {
  background: rgba(255,255,255,.7); border: 1px solid #ececf5;
  border-radius: 16px; padding: 1rem; text-align: center; backdrop-filter: blur(8px);
}
.hero-stat .num { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.5rem; color: #5b3df5; display: block; }
.hero-stat .lab { font-size: .85rem; color: #4a4a6a; }

@media (max-width: 560px) { .hero-stats { grid-template-columns: 1fr; } }

/* ============================================================
   Section
   ============================================================ */
.section { padding: 4rem 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 2.25rem; flex-wrap: wrap;
}
.section-head .eyebrow {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: #5b3df5; font-weight: 600; margin-bottom: .4rem;
}
.section-head h2 { margin: 0; }
.section-head p { margin: .35rem 0 0; color: #4a4a6a; max-width: 540px; }

/* ============================================================
   Brand cards (homepage reviews)
   ============================================================ */
.brand-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem;
}
.brand-card {
  background: #fff; border: 1px solid #ececf5; border-radius: 20px; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex; flex-direction: column;
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -20px rgba(15,15,35,.18);
  border-color: #d8d3ff;
}
.brand-card-media-link { display: block; }
.brand-card-media {
  position: relative; aspect-ratio: 16 / 11;
  background-size: cover; background-position: center; background-color: #eee;
  transition: transform .4s ease;
}
.brand-card:hover .brand-card-media { transform: scale(1.04); }
.brand-card-media .badge {
  position: absolute; top: .85rem; left: .85rem;
  background: rgba(255,255,255,.95); color: #0f0f23;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: .35rem .65rem; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.brand-card-body { padding: 1.25rem 1.25rem 1.5rem; }
.brand-card-body h3 { margin-bottom: .4rem; font-size: 1.2rem; }
.brand-card-body .cat {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  color: #5b3df5; font-weight: 600; margin-bottom: .4rem;
}
.brand-card-body p { color: #54546e; font-size: .94rem; margin: 0 0 1rem; }
.brand-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; font-size: .85rem; color: #54546e;
}
.stars { color: #f5a623; letter-spacing: 1px; }
.brand-card .read-more { display: inline-block; margin-top: 1rem; font-weight: 600; color: #5b3df5; }
.brand-card .read-more::after { content: ' →'; transition: margin-left .2s ease; }
.brand-card:hover .read-more::after { margin-left: 4px; }

/* ============================================================
   Category strip
   ============================================================ */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem;
}
.cat-card {
  aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  background-size: cover; background-position: center;
  position: relative; display: flex; align-items: flex-end;
  padding: 1rem; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cat-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,15,35,.7) 100%);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 20px 30px -20px rgba(15,15,35,.4); }
.cat-card-label {
  position: relative; z-index: 1;
  color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 1rem; letter-spacing: .02em;
}

/* ============================================================
   Why-Us strip
   ============================================================ */
.why-strip {
  background: linear-gradient(135deg, #0f0f23 0%, #1f1545 100%);
  color: #fff; border-radius: 24px; padding: 3rem 2rem; margin: 3rem 0;
}
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.why-item h4 { color: #fff; font-size: 1.05rem; margin: .65rem 0 .35rem; }
.why-item p  { color: #b9b8d2; font-size: .92rem; margin: 0; }
.why-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #5b3df5, #ff5b8a);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}

/* ============================================================
   Editorial block (homepage)
   ============================================================ */
.editorial {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem;
  background: #fff; border: 1px solid #ececf5; border-radius: 24px; padding: 2.5rem;
}
@media (max-width: 820px) { .editorial { grid-template-columns: 1fr; } }
.editorial-text p { color: #54546e; }
.editorial-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-self: center;
}
.ed-stat {
  background: linear-gradient(135deg, #faf9ff, #fff5f7);
  border: 1px solid #ececf5; border-radius: 16px; padding: 1.25rem; text-align: center;
}
.ed-num {
  display: block; font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: 1.75rem; color: #5b3df5; line-height: 1;
}
.ed-lab { font-size: .8rem; color: #54546e; margin-top: .5rem; display: block; }

/* ============================================================
   COUPONS PAGE
   ============================================================ */
.coupons-hero {
  background: linear-gradient(135deg, #5b3df5 0%, #ff5b8a 100%);
  color: #fff; padding: 3.5rem 0 4rem; position: relative; overflow: hidden;
}
.coupons-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 20% 0%, rgba(255,255,255,.15), transparent 60%),
    radial-gradient(400px 200px at 80% 100%, rgba(0,0,0,.12), transparent 60%);
  pointer-events: none;
}
.coupons-hero .container { position: relative; z-index: 1; }
.brand-hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand-hero-logo {
  width: 110px; height: 110px; border-radius: 24px;
  background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  color: #ff5b8a; font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: 1.5rem; flex-shrink: 0;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.3);
}
.brand-hero-text h1 { color: #fff; margin-bottom: .35rem; }
.brand-hero-text .verified-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.brand-hero-text .rating { display: flex; align-items: center; gap: .5rem; margin-top: .65rem; font-size: .95rem; }
.brand-hero-text .rating .stars { color: #ffd84d; }
.brand-hero-text .meta-row {
  margin-top: 1rem; display: flex; gap: 1.25rem; flex-wrap: wrap;
  font-size: .9rem; opacity: .95;
}

/* Coupons section */
.coupons-section { padding: 3rem 0 4rem; }
.coupons-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.coupons-tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.tab {
  padding: .55rem 1rem; background: #fff; border: 1px solid #ececf5;
  border-radius: 999px; font-weight: 600; font-size: .9rem; color: #4a4a6a;
  cursor: pointer; transition: all .15s ease;
}
.tab:hover { border-color: #d8d3ff; color: #5b3df5; }
.tab.active { background: #5b3df5; color: #fff; border-color: #5b3df5; }
.last-updated { font-size: .85rem; color: #54546e; }

/* Coupon card (NEW: now has product image on the left) */
.coupon-list { display: grid; gap: 1.25rem; }
.coupon-card {
  background: #fff; border: 1px solid #ececf5; border-radius: 18px;
  padding: 0;
  display: grid;
  grid-template-columns: 200px 130px 1fr auto;
  align-items: stretch;
  gap: 0;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  overflow: hidden;
}
.coupon-card:hover {
  box-shadow: 0 18px 36px -20px rgba(15,15,35,.18);
  border-color: #d8d3ff;
}

.coupon-media {
  background-size: cover; background-position: center;
  position: relative; min-height: 170px;
}
.coupon-media-badge {
  position: absolute; top: .75rem; left: .75rem;
  background: rgba(255,255,255,.95); color: #d6336c;
  font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  padding: .3rem .55rem; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.coupon-discount {
  background: linear-gradient(135deg, #fff5f7, #fde6ec);
  color: #d6336c;
  border-right: 2px dashed #f0c4d2;
  font-family: 'Poppins', sans-serif; font-weight: 800;
  text-align: center;
  padding: 1rem .5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.coupon-discount .amt { font-size: 1.65rem; line-height: 1; }
.coupon-discount .unit { font-size: .72rem; font-weight: 600; opacity: .85; letter-spacing: .08em; text-transform: uppercase; margin-top: .3rem; }

.coupon-body { padding: 1.25rem; align-self: center; }
.coupon-body h3 { margin: 0 0 .4rem; font-size: 1.05rem; line-height: 1.35; }
.coupon-body p  { margin: 0; color: #54546e; font-size: .92rem; line-height: 1.55; }
.coupon-body .tags { display: flex; gap: .4rem; margin-top: .65rem; flex-wrap: wrap; }
.coupon-body .tag {
  font-size: .68rem; background: #f1eeff; color: #5b3df5;
  font-weight: 700; padding: .25rem .6rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em;
}
.coupon-body .tag.verified { background: #e6f9ee; color: #15803d; }
.coupon-body .tag.auto     { background: #fff5e6; color: #b45309; }

.coupon-action { padding: 1.25rem; display: flex; align-items: center; }
.coupon-btn {
  display: inline-block;
  background: linear-gradient(135deg, #5b3df5, #7a5cff);
  color: #fff; font-weight: 700;
  padding: .85rem 1.5rem; border-radius: 12px; border: 0; cursor: pointer;
  letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(91,61,245,.6);
  transition: transform .15s ease, box-shadow .2s ease;
  text-decoration: none;
}
.coupon-btn:hover {
  color: #fff; transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(91,61,245,.7);
}
.coupon-btn.deal {
  background: linear-gradient(135deg, #ff5b8a, #ff8e53);
  box-shadow: 0 10px 24px -10px rgba(255,91,138,.6);
}
.coupon-btn.deal:hover { box-shadow: 0 14px 28px -10px rgba(255,91,138,.7); }

@media (max-width: 940px) {
  .coupon-card { grid-template-columns: 160px 110px 1fr; }
  .coupon-action { grid-column: 1 / -1; padding-top: 0; }
  .coupon-btn { width: 100%; text-align: center; }
}
@media (max-width: 640px) {
  .coupon-card { grid-template-columns: 1fr; }
  .coupon-media { min-height: 180px; }
  .coupon-discount {
    border-right: 0;
    border-bottom: 2px dashed #f0c4d2;
    padding: .85rem;
    flex-direction: row; gap: .5rem;
  }
  .coupon-discount .amt  { font-size: 1.4rem; }
  .coupon-discount .unit { font-size: .7rem; margin-top: 0; }
  .coupon-body { padding: 1rem 1.25rem .25rem; }
  .coupon-action { padding: 1rem 1.25rem 1.25rem; }
}

/* Info / About / How / FAQ blocks */
.info-block {
  background: #fff; border: 1px solid #ececf5; border-radius: 20px;
  padding: 2rem; margin-top: 2rem;
}
.info-block h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.info-block h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: .5rem; color: #5b3df5; }
.info-block ol, .info-block ul { padding-left: 1.25rem; color: #4a4a6a; }
.info-block ol li, .info-block ul li { margin-bottom: .5rem; }

.faq-item { border-bottom: 1px solid #ececf5; padding: 1rem 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  width: 100%; background: transparent; border: 0; text-align: left;
  font-family: inherit; font-weight: 600; font-size: 1rem; color: #0f0f23;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; padding: 0;
}
.faq-q::after {
  content: '+'; font-size: 1.3rem; color: #5b3df5; transition: transform .2s ease;
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { display: none; margin-top: .75rem; color: #54546e; font-size: .95rem; }
.faq-item.open .faq-a { display: block; }

/* Modal — "discount already applied" */
.coupon-modal-bg {
  position: fixed; inset: 0;
  background: rgba(15,15,35,.65);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
}
.coupon-modal-bg.open { display: flex; }
.coupon-modal {
  background: #fff; border-radius: 20px;
  max-width: 460px; width: 100%;
  padding: 2rem; text-align: center; position: relative;
  animation: pop .25s ease;
}
@keyframes pop {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.coupon-modal .close-modal {
  position: absolute; top: .65rem; right: .85rem;
  background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; color: #54546e;
}
.coupon-modal .modal-discount {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  color: #d6336c; font-size: 1.5rem; margin-bottom: .5rem;
}
.coupon-modal .modal-title { color: #0f0f23; font-size: 1.1rem; margin-bottom: 1.25rem; }

.code-box.code-applied {
  border: 2px solid #15803d;
  background: linear-gradient(135deg, #f0fdf4, #ecfccb);
  border-radius: 14px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.code-box .applied-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #15803d; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; margin-bottom: .2rem;
}
.code-box .applied-text {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: 1.1rem; color: #15803d; letter-spacing: .01em;
}
.code-box small { font-size: .8rem; color: #4d7c4a; font-weight: 500; }

.coupon-modal .modal-btn {
  display: block;
  background: linear-gradient(135deg, #5b3df5, #ff5b8a);
  color: #fff; font-weight: 700; padding: .95rem 1.4rem;
  border-radius: 12px; text-align: center; text-decoration: none;
  margin-top: 1rem;
  box-shadow: 0 12px 28px -10px rgba(91,61,245,.5);
}
.coupon-modal .modal-btn:hover { color: #fff; }
.coupon-modal .modal-note { font-size: .78rem; color: #54546e; margin-top: 1rem; margin-bottom: 0; line-height: 1.5; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #0f0f23;
  color: #b9b8d2;
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2.5rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 {
  color: #fff; font-size: .95rem; text-transform: uppercase;
  letter-spacing: .1em; margin: 0 0 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: .55rem; }
.site-footer a { color: #b9b8d2; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand-tag {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  color: #fff; font-size: 1.3rem; margin-bottom: .5rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.footer-brand-tag .logo-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #5b3df5, #ff5b8a);
  border-radius: 8px; position: relative; display: inline-block;
}
.footer-brand-tag .logo-mark::after {
  content: '%'; color: #fff; font-size: 12px; font-weight: 800;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.footer-bottom {
  border-top: 1px solid #2a2a4a; padding-top: 1.5rem;
  text-align: center; font-size: .85rem;
}

/* utilities */
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
