/* ── CouponSite – RetailMeNot-inspired Design ─────────────── */

:root {
  --rmn-red:       #e8173a;
  --rmn-red-dark:  #c01230;
  --rmn-red-light: #fff0f3;
  --rmn-green:     #1a8a44;
  --rmn-orange:    #f5820d;
  --rmn-gray:      #6b7280;
  --rmn-gray-light:#f3f4f6;
  --rmn-border:    #e5e7eb;
  --rmn-text:      #111827;
  --rmn-radius:    8px;
  --rmn-radius-lg: 12px;
  --rmn-shadow:    0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --rmn-shadow-lg: 0 4px 16px rgba(0,0,0,.10);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f9fafb;
  color: var(--rmn-text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--rmn-red); text-decoration: none; }
a:hover { color: var(--rmn-red-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Navbar ─────────────────────────────────────────────────── */
.site-nav {
  background: #fff;
  border-bottom: 2px solid var(--rmn-red);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.site-nav .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rmn-red) !important;
  letter-spacing: -.5px;
}
.site-nav .nav-link {
  color: var(--rmn-text) !important;
  font-weight: 600;
  font-size: .93rem;
  padding: .5rem .9rem !important;
  border-radius: 6px;
  transition: background .15s;
}
.site-nav .nav-link:hover { background: var(--rmn-gray-light); color: var(--rmn-red) !important; }
.site-nav .nav-link.active { color: var(--rmn-red) !important; }

/* Search bar */
.nav-search .form-control {
  border-radius: 24px 0 0 24px;
  border: 2px solid var(--rmn-border);
  border-right: none;
  font-size: .93rem;
  padding: .5rem 1rem;
  min-width: 220px;
  transition: border-color .2s;
}
.nav-search .form-control:focus {
  border-color: var(--rmn-red);
  box-shadow: none;
}
.nav-search .btn {
  border-radius: 0 24px 24px 0;
  background: var(--rmn-red);
  border: 2px solid var(--rmn-red);
  color: #fff;
  padding: .5rem 1rem;
}
.nav-search .btn:hover { background: var(--rmn-red-dark); border-color: var(--rmn-red-dark); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(130deg, #c7002a 0%, #e8173a 55%, #ff4d6d 100%);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 420px; height: 420px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  right: 80px; bottom: -80px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.hero-section h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.5px; line-height: 1.18; }
.hero-search .form-control {
  border-radius: 8px 0 0 8px;
  border: none;
  font-size: 1rem;
  padding: .85rem 1.25rem;
  min-width: 0;
}
.hero-search .form-control:focus { box-shadow: none; }
.hero-search .btn {
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: var(--rmn-red);
  font-weight: 700;
  border: none;
  padding: .85rem 1.5rem;
  font-size: 1rem;
  white-space: nowrap;
}
.hero-search .btn:hover { background: var(--rmn-gray-light); }
.hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .87rem;
  opacity: .9;
}

/* ── Section titles ─────────────────────────────────────────── */
.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--rmn-text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--rmn-border);
  margin-left: .75rem;
  display: block;
}

/* ── Store chips ─────────────────────────────────────────────── */
.store-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--rmn-border);
  border-radius: var(--rmn-radius-lg);
  padding: 1rem .75rem .75rem;
  text-decoration: none;
  color: var(--rmn-text);
  transition: border-color .2s, box-shadow .2s, transform .15s;
  min-height: 96px;
}
.store-chip:hover {
  border-color: var(--rmn-red);
  box-shadow: 0 4px 12px rgba(232,23,58,.12);
  transform: translateY(-2px);
  color: var(--rmn-text);
  text-decoration: none;
}
.store-chip .store-initial {
  width: 48px; height: 32px;
  background: var(--rmn-red);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  margin-bottom: .5rem;
}
.store-chip img { max-height: 32px; object-fit: contain; margin-bottom: .5rem; }
.store-chip .chip-name { font-size: .8rem; font-weight: 700; text-align: center; line-height: 1.2; }
.store-chip .chip-count { font-size: .73rem; color: var(--rmn-gray); margin-top: .15rem; }

/* ── Coupon Card (RMN-style list row) ──────────────────────── */
.coupon-row {
  background: #fff;
  border: 1.5px solid var(--rmn-border);
  border-radius: var(--rmn-radius-lg);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.coupon-row:hover {
  border-color: #d1d5db;
  box-shadow: var(--rmn-shadow-lg);
}
.coupon-row.featured-row {
  border-left: 4px solid var(--rmn-orange);
}

/* Left thumb / verified badge area */
.coupon-row__thumb {
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.coupon-row__thumb img { width: 44px; height: 30px; object-fit: contain; }
.verified-pill {
  font-size: .63rem;
  font-weight: 700;
  background: #ecfdf5;
  color: var(--rmn-green);
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: .1rem .45rem;
  white-space: nowrap;
}

/* Body */
.coupon-row__body { flex: 1; min-width: 0; }
.coupon-row__type {
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rmn-gray);
  margin-bottom: .2rem;
}
.coupon-row__type.type-code { color: var(--rmn-red); }
.coupon-row__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rmn-text);
  margin-bottom: .25rem;
  line-height: 1.35;
}
.coupon-row__title a { color: inherit; text-decoration: none; }
.coupon-row__title a:hover { color: var(--rmn-red); text-decoration: none; }
.coupon-row__meta {
  font-size: .8rem;
  color: var(--rmn-gray);
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.coupon-row__meta .exp-soon { color: #d97706; font-weight: 600; }

/* Right CTA */
.coupon-row__cta { flex: 0 0 140px; text-align: center; }

/* ── Reveal-code button ────────────────────────────────────── */
.reveal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--rmn-red);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .88rem;
  padding: .55rem 1rem;
  cursor: pointer;
  width: 100%;
  max-width: 140px;
  min-height: 42px;
  transition: background .15s;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
.reveal-btn:hover { background: var(--rmn-red-dark); color: #fff !important; }
.reveal-btn__mask {
  letter-spacing: .12em;
  font-size: .78rem;
  opacity: .7;
}
/* After reveal: show actual code */
.code-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  width: 100%;
}
.code-badge {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--rmn-red-light);
  border: 2px dashed var(--rmn-red);
  border-radius: 6px;
  padding: .35rem .75rem;
  font-family: 'Courier New', monospace;
  font-weight: 800;
  font-size: .95rem;
  color: var(--rmn-red);
  letter-spacing: .1em;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  user-select: all;
  word-break: break-all;
}
.copy-text {
  font-size: .72rem;
  color: var(--rmn-gray);
}

/* Get Deal btn (no code) */
.get-deal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rmn-green);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 700;
  font-size: .88rem;
  padding: .55rem 1rem;
  width: 100%;
  max-width: 140px;
  min-height: 42px;
  transition: background .15s;
  text-decoration: none !important;
}
.get-deal-btn:hover { background: #146c37; color: #fff !important; }

/* ── Category chips ──────────────────────────────────────────── */
.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: #fff;
  border: 1.5px solid var(--rmn-border);
  border-radius: var(--rmn-radius-lg);
  padding: 1.1rem .5rem .9rem;
  text-decoration: none;
  color: var(--rmn-text);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.cat-chip:hover {
  border-color: var(--rmn-red);
  box-shadow: 0 4px 12px rgba(232,23,58,.10);
  transform: translateY(-2px);
  color: var(--rmn-text);
  text-decoration: none;
}
.cat-chip i { font-size: 1.6rem; color: var(--rmn-red); }
.cat-chip .cat-name { font-size: .8rem; font-weight: 700; text-align: center; }
.cat-chip .cat-count { font-size: .72rem; color: var(--rmn-gray); }

/* ── Newsletter section ──────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(130deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 350px; height: 350px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.newsletter-section h2 { font-size: 1.9rem; font-weight: 800; }
.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 480px;
}
.newsletter-form .form-control {
  border-radius: 8px 0 0 8px;
  border: none;
  padding: .8rem 1.2rem;
  font-size: .95rem;
  flex: 1;
}
.newsletter-form .form-control:focus { box-shadow: none; }
.newsletter-form .btn {
  border-radius: 0 8px 8px 0;
  background: var(--rmn-orange);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: .8rem 1.5rem;
  font-size: .95rem;
  white-space: nowrap;
}
.newsletter-form .btn:hover { background: #e07500; }
.newsletter-trust { font-size: .8rem; opacity: .7; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 3rem 0 1.5rem;
}
.site-footer .footer-brand { font-size: 1.3rem; font-weight: 800; color: #fff; }
.site-footer h6 { color: #e5e7eb; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer a { color: #9ca3af; text-decoration: none; font-size: .88rem; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .footer-divider { border-color: #1f2937; margin: 1.75rem 0 1rem; }
.site-footer .footer-bottom { font-size: .82rem; color: #6b7280; }
.footer-cat-tag {
  display: inline-block;
  background: #1f2937;
  color: #9ca3af;
  border-radius: 4px;
  padding: .2rem .55rem;
  font-size: .78rem;
  margin: .2rem .15rem .2rem 0;
  text-decoration: none;
}
.footer-cat-tag:hover { background: var(--rmn-red); color: #fff; }

/* ── Coupon detail page ──────────────────────────────────────── */
.coupon-detail-card {
  background: #fff;
  border-radius: var(--rmn-radius-lg);
  border: 1.5px solid var(--rmn-border);
  overflow: hidden;
}
.coupon-detail-header {
  background: var(--rmn-gray-light);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rmn-border);
}
.coupon-code-reveal {
  background: var(--rmn-red-light);
  border: 2px dashed var(--rmn-red);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}
.coupon-code-reveal .code-text {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 900;
  color: var(--rmn-red);
  letter-spacing: .15em;
  display: block;
}
.btn-copy-big {
  background: var(--rmn-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: .65rem 1.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s;
}
.btn-copy-big:hover { background: var(--rmn-red-dark); color: #fff; }
.btn-get-deal-big {
  background: var(--rmn-red);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  padding: .9rem 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  transition: background .15s;
}
.btn-get-deal-big:hover { background: var(--rmn-red-dark); color: #fff !important; }

/* Sidebar widget */
.sidebar-widget {
  background: #fff;
  border: 1.5px solid var(--rmn-border);
  border-radius: var(--rmn-radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.sidebar-widget__title {
  background: var(--rmn-gray-light);
  padding: .75rem 1rem;
  font-weight: 700;
  font-size: .9rem;
  border-bottom: 1px solid var(--rmn-border);
  color: var(--rmn-text);
}
.sidebar-coupon-link {
  display: block;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--rmn-border);
  color: var(--rmn-text);
  font-size: .87rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  transition: background .12s;
}
.sidebar-coupon-link:hover { background: var(--rmn-gray-light); color: var(--rmn-red); text-decoration: none; }
.sidebar-coupon-link:last-child { border-bottom: none; }

/* ── Expiring soon strip ─────────────────────────────────────── */
.expiring-card {
  background: #fff;
  border: 1.5px solid #fecaca;
  border-left: 4px solid var(--rmn-red);
  border-radius: var(--rmn-radius);
  padding: .85rem 1rem;
  text-decoration: none;
  color: var(--rmn-text);
  display: block;
  transition: box-shadow .15s;
}
.expiring-card:hover { box-shadow: var(--rmn-shadow-lg); color: var(--rmn-text); text-decoration: none; }
.expiring-card .exp-label { font-size: .72rem; font-weight: 700; color: var(--rmn-red); text-transform: uppercase; }
.expiring-card .exp-title { font-size: .88rem; font-weight: 700; line-height: 1.3; margin: .25rem 0; }
.expiring-card .exp-store { font-size: .78rem; color: var(--rmn-gray); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb { font-size: .83rem; background: none; padding: .5rem 0; margin-bottom: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--rmn-gray); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination .page-link { border-radius: 6px !important; margin: 0 2px; font-size: .88rem; color: var(--rmn-red); }
.pagination .page-link:hover { background: var(--rmn-red-light); border-color: var(--rmn-red); }
.pagination .page-item.active .page-link { background: var(--rmn-red); border-color: var(--rmn-red); }

/* ── Badges & pills ─────────────────────────────────────────── */
.badge-verified { background: #ecfdf5; color: var(--rmn-green); border: 1px solid #bbf7d0; font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 20px; }
.badge-featured { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 20px; }
.badge-discount { background: var(--rmn-red); color: #fff; font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 6px; }
.badge-exclusive { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 20px; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-red { color: var(--rmn-red) !important; }
img.lazy { opacity: 0; transition: opacity .3s; }
img.lazy.loaded { opacity: 1; }
.border-dashed { border-style: dashed !important; }
.form-control:focus, .form-select:focus { border-color: var(--rmn-red); box-shadow: 0 0 0 3px rgba(232,23,58,.12); }

/* ── Store page header ───────────────────────────────────────── */
.store-header-card {
  background: #fff;
  border: 1.5px solid var(--rmn-border);
  border-radius: var(--rmn-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.store-header-logo {
  width: 96px; height: 64px;
  object-fit: contain;
  border: 1.5px solid var(--rmn-border);
  border-radius: 10px;
  padding: .5rem;
  background: #fff;
  flex-shrink: 0;
}
.store-initial-big {
  width: 80px; height: 64px;
  background: var(--rmn-red);
  color: #fff;
  font-weight: 900;
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ── Flash alerts ────────────────────────────────────────────── */
.alert-dismissible { border-radius: 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-section h1 { font-size: 1.65rem; }
  .coupon-row { flex-wrap: wrap; }
  .coupon-row__cta { flex: 0 0 100%; }
  .reveal-btn, .get-deal-btn { max-width: 100%; }
  .store-header-card { flex-wrap: wrap; }
}

/* ── Multi-column coupon layout ─────────────────────────────── */
.col-md-6 .coupon-row,
.col-lg-4 .coupon-row {
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  min-height: 160px;
}
.col-md-6 .coupon-row__thumb,
.col-lg-4 .coupon-row__thumb {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: .5rem;
  width: 100%;
}
.col-md-6 .coupon-row__body,
.col-lg-4 .coupon-row__body {
  flex: 1;
  width: 100%;
}
.col-md-6 .coupon-row__cta,
.col-lg-4 .coupon-row__cta {
  flex: 0 0 auto;
  width: 100%;
  text-align: left;
  padding-top: .5rem;
  border-top: 1px solid var(--rmn-border);
  margin-top: auto;
}
.col-md-6 .reveal-btn,
.col-md-6 .get-deal-btn,
.col-lg-4 .reveal-btn,
.col-lg-4 .get-deal-btn {
  max-width: 100%;
  width: 100%;
}

/* ── Blog ────────────────────────────────────────────────────── */
.blog-card {
  background: #fff;
  border: 1.5px solid var(--rmn-border);
  border-radius: var(--rmn-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
}
.blog-card:hover { box-shadow: var(--rmn-shadow-lg); transform: translateY(-3px); }
.blog-card__img {
  width: 100%; height: 180px;
  object-fit: cover; display: block;
}
.blog-card__img-placeholder {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: #9ca3af;
}
.blog-card__body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.blog-card__cat {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--rmn-red);
  text-decoration: none; margin-bottom: .4rem; display: inline-block;
}
.blog-card__cat:hover { text-decoration: underline; }
.blog-card__title { font-size: .97rem; font-weight: 700; line-height: 1.4; margin-bottom: .5rem; }
.blog-card__title a { color: var(--rmn-text); text-decoration: none; }
.blog-card__title a:hover { color: var(--rmn-red); }
.blog-card__excerpt { font-size: .83rem; color: var(--rmn-gray); flex: 1; margin-bottom: .75rem; }
.blog-card__meta { font-size: .76rem; color: var(--rmn-gray); display: flex; gap: .75rem; flex-wrap: wrap; margin-top: auto; }

/* Blog post detail */
.blog-post__hero {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--rmn-radius-lg); margin-bottom: 1.5rem;
}
.blog-post__header { margin-bottom: 2rem; }
.blog-post__title { font-size: 1.75rem; font-weight: 800; line-height: 1.25; margin: .5rem 0 .75rem; }
.blog-post__meta { font-size: .82rem; color: var(--rmn-gray); display: flex; gap: 1rem; flex-wrap: wrap; }
.blog-post__content {
  font-size: 1rem; line-height: 1.8; color: #1f2937;
}
.blog-post__content h2 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 .75rem; }
.blog-post__content h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.blog-post__content p  { margin-bottom: 1.1rem; }
.blog-post__content img { max-width: 100%; border-radius: var(--rmn-radius); margin: 1rem 0; }
.blog-post__content ul, .blog-post__content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.blog-post__content li { margin-bottom: .35rem; }
.blog-post__content blockquote {
  border-left: 4px solid var(--rmn-red); padding: .75rem 1.25rem;
  background: var(--rmn-red-light); border-radius: 0 8px 8px 0;
  margin: 1.25rem 0; font-style: italic; color: #374151;
}
.blog-post__content a { color: var(--rmn-red); text-decoration: underline; }
.blog-post__content pre {
  background: #1f2937; color: #e5e7eb; padding: 1rem 1.25rem;
  border-radius: 8px; overflow-x: auto; font-size: .87rem; margin: 1rem 0;
}
.blog-post__content code { background: #f3f4f6; padding: .15rem .4rem; border-radius: 4px; font-size: .87em; }
.blog-post__content pre code { background: none; padding: 0; }
