/* ══════════════════════════════════════════════════════════
   CATEGORY PAGE — category.css
   Companion to mdw-global.css (do NOT duplicate global rules)
   Changes vs original:
     ✓  cat-stat-bar styles REMOVED entirely
     ✓  rcs-chip-count badge added (deal count on Browse chips)
     ✓  .no-results.visible display fix
     ✓  .dp-code-badge added
     ✓  .cat-hero-stat-sep helper added
     ✓  cashback-only rules removed
══════════════════════════════════════════════════════════ */

/* ── Category Hero ─────────────────────────────────────── */
.cat-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1E2D5E 55%, #2B1A4A 100%);
  padding: 2.5rem 1.5rem 5rem;
  position: relative; overflow: hidden;
}
.cat-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23FF5C28' fill-opacity='0.05'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cat-hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  position: relative; display: flex; align-items: center;
  gap: 1.5rem; flex-wrap: wrap;
}
.cat-hero-icon-wrap {
  width: 72px; height: 72px; border-radius: 20px; flex-shrink: 0;
  background: rgba(255,255,255,.10); border: 1.5px solid rgba(255,255,255,.20);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.cat-hero-icon-wrap svg { width: 36px; height: 36px; color: #fff; }
.cat-hero-text { flex: 1; min-width: 0; }
.cat-hero-label {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,92,40,.18); border: 1px solid rgba(255,92,40,.35);
  color: var(--accent); font-size: .72rem; font-weight: 700;
  padding: .25rem .7rem; border-radius: 40px;
  margin-bottom: .625rem; letter-spacing: .3px;
}
.cat-hero-label svg { width: 12px; height: 12px; }
.cat-hero-h1 {
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.4rem); color: #fff;
  letter-spacing: -.5px; line-height: 1.15; margin-bottom: .5rem;
}
.cat-hero-h1 em { color: var(--accent); font-style: normal; }
.cat-hero-desc {
  font-size: .9rem; color: rgba(255,255,255,.65);
  line-height: 1.6; max-width: 520px;
}
.cat-hero-stats {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  align-items: center; margin-top: 1rem;
}
.cat-hero-stat { text-align: left; }
.cat-hero-stat-n {
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: 1.35rem; color: #fff; line-height: 1;
}
.cat-hero-stat-l { font-size: .68rem; color: rgba(255,255,255,.5); margin-top: 2px; }
/* Vertical separator between hero stats */
.cat-hero-stat-sep {
  width: 1px; height: 32px;
  background: rgba(255,255,255,.15); flex-shrink: 0;
}

/* ── Main layout ───────────────────────────────────────── */
.cat-page-outer {
  max-width: var(--max-w); margin: -2.5rem auto 0;
  padding: 0 1.5rem 3rem; position: relative; z-index: 1;
}
.cat-page-grid {
  display: grid; grid-template-columns: 272px 1fr;
  gap: 1.5rem; align-items: start;
}

/* ── Sidebar ───────────────────────────────────────────── */
.cat-sidebar {
  position: sticky; top: 78px;
  display: flex; flex-direction: column; gap: 1rem;
}

/* Filter card */
.sb-filter-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sb-filter-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  padding: .875rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.sb-filter-title {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: .85rem; color: #fff;
}
.sb-filter-reset {
  font-size: .72rem; color: rgba(255,255,255,.6);
  cursor: pointer; background: none; border: none;
  font-family: 'Plus Jakarta Sans', sans-serif; transition: color .15s;
}
.sb-filter-reset:hover { color: #fff; }

.sb-filter-section { border-bottom: 1px solid var(--border); }
.sb-filter-section:last-child { border-bottom: none; }
.sb-filter-section-head {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: .73rem; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text); padding: .75rem 1.1rem .4rem;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.sb-filter-section-head svg {
  width: 13px; height: 13px; color: var(--text3);
  transition: transform .2s; flex-shrink: 0;
}
.sb-filter-section.open .sb-filter-section-head svg { transform: rotate(180deg); }
.sb-filter-body { padding: .4rem 1.1rem .75rem; display: none; }
.sb-filter-section.open .sb-filter-body { display: block; }

.sb-check-row {
  display: flex; align-items: center; gap: .55rem;
  padding: .3rem 0; font-size: .8rem; color: var(--text2); cursor: pointer;
}
.sb-check-row input[type="radio"] {
  accent-color: var(--accent); width: 14px; height: 14px; flex-shrink: 0;
}
.sb-check-count {
  margin-left: auto; font-size: .67rem; color: var(--text3);
  background: var(--surface3); padding: .1rem .42rem; border-radius: 40px;
}

/* Brand list */
.sb-brand-list { display: flex; flex-direction: column; gap: .2rem; }
.sb-brand-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .35rem .5rem; border-radius: var(--radius-xs);
  cursor: pointer; font-size: .79rem; color: var(--text2);
  transition: all .15s; border: 1.5px solid transparent;
}
.sb-brand-item:hover { background: var(--surface2); border-color: var(--border); }
.sb-brand-item.active {
  background: #fff0eb; border-color: rgba(255,92,40,.25);
  color: var(--accent-h); font-weight: 600;
}
.sb-brand-logo {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.sb-brand-logo img { width: 22px; height: auto; object-fit: contain; }
.sb-brand-logo-fb {
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: .5rem; color: var(--text3);
}
.sb-brand-info { flex: 1; min-width: 0; }
.sb-brand-name { font-size: .78rem; font-weight: 600; }
.sb-brand-count { font-size: .67rem; color: var(--text3); }

/* Affiliate disclosure */
.sb-affiliate {
  font-size: .70rem; color: var(--text3); text-align: center;
  padding: .5rem 0;
}
.sb-affiliate a { color: var(--accent); text-decoration: underline; }

/* ── Store logo disc column ────────────────────────────── */
.coupon-disc-logo {
  width: 100px; flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: .875rem .5rem;
  border-right: 2px dashed var(--border); position: relative;
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
}
.coupon-card.featured .coupon-disc-logo { border-color: rgba(255,92,40,.22); }
/* Notch cut-outs */
.coupon-disc-logo::before,
.coupon-disc-logo::after {
  content: ''; position: absolute; right: -10px;
  width: 18px; height: 18px; background: var(--surface2);
  border-radius: 50%; border: 1.5px solid var(--border);
}
.coupon-disc-logo::before { top: -9px; }
.coupon-disc-logo::after  { bottom: -9px; }
/* Logo box */
.cdl-logo {
  width: 54px; height: 54px; border-radius: 13px; background: #fff;
  box-shadow: 0 2px 10px rgba(12,27,58,.12); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: .45rem; transition: transform .2s;
}
.coupon-card:hover .cdl-logo { transform: scale(1.05); }
.cdl-logo img { width: 38px; height: auto; object-fit: contain; }
.cdl-logo-fb {
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: .6rem; color: var(--text2); text-align: center; padding: 2px;
}
.cdl-store-name {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: .62rem; color: var(--text3); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 84px;
}
.cdl-badge {
  font-size: .56rem; font-weight: 700;
  padding: .12rem .4rem; border-radius: 4px;
  margin-top: .25rem; text-align: center; white-space: nowrap;
}
.cdl-badge-code { background: #fff0eb; color: #c03800; }
.cdl-badge-sale  { background: #e8faf0; color: #0a7a4a; }
/* cashback badge intentionally omitted */

/* Detail panel — dp-code-badge */
.dp-code-badge {
  display: inline-flex; align-items: center;
  background: #fff0eb; border: 1.5px dashed rgba(255,92,40,.40);
  border-radius: 6px; padding: .2rem .65rem;
  font-family: 'Outfit', sans-serif; font-weight: 900;
  font-size: .88rem; color: var(--accent); letter-spacing: 2px;
  margin-left: .4rem;
}

/* ── Main area top bar ─────────────────────────────────── */
.cat-main-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.cat-sort-group { display: flex; align-items: center; gap: .5rem; }
.cat-sort-label { font-size: .78rem; color: var(--text3); white-space: nowrap; }
.cat-sort-select {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); padding: .4rem .75rem;
  font-size: .8rem; color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  outline: none; cursor: pointer; transition: border-color .15s;
}
.cat-sort-select:focus { border-color: var(--accent); }
.cat-view-toggle {
  display: flex; border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); overflow: hidden;
}
.cat-view-btn {
  background: none; border: none; padding: .4rem .6rem;
  cursor: pointer; color: var(--text3);
  display: flex; align-items: center; transition: all .15s;
}
.cat-view-btn svg { width: 15px; height: 15px; }
.cat-view-btn.active { background: var(--accent); color: #fff; }
.cat-view-btn:not(.active):hover { background: var(--surface2); color: var(--text2); }

/* ── Grid view ─────────────────────────────────────────── */
#coupons-list.grid-view { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
#coupons-list.grid-view .coupon-inner { flex-wrap: wrap; }
#coupons-list.grid-view .coupon-disc-logo {
  width: 100%; border-right: none; border-bottom: 2px dashed var(--border);
  flex-direction: row; padding: .75rem 1rem; gap: .75rem; height: 70px;
}
#coupons-list.grid-view .coupon-disc-logo::before,
#coupons-list.grid-view .coupon-disc-logo::after { display: none; }
#coupons-list.grid-view .cdl-logo { width: 42px; height: 42px; margin-bottom: 0; }
#coupons-list.grid-view .cdl-badge { display: none; }
#coupons-list.grid-view .coupon-body { padding: .75rem .875rem .5rem; }
#coupons-list.grid-view .coupon-action {
  width: 100%; flex-direction: row; border-left: none;
  border-top: 1px solid var(--border); justify-content: center;
  padding: .6rem .75rem; gap: .5rem;
}
#coupons-list.grid-view .coupon-title { font-size: .83rem; }

/* ── Coupon section header ─────────────────────────────── */
.coupon-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .625rem;
}
.coupon-section-title {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: .82rem; color: var(--text);
  display: flex; align-items: center; gap: .4rem;
}
.coupon-section-title span {
  background: var(--accent); color: #fff;
  font-size: .65rem; padding: .15rem .5rem; border-radius: 40px;
}
.coupon-section-updated { font-size: .7rem; color: var(--text3); }

/* ── No results ────────────────────────────────────────── */
.no-results {
  display: none; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 3rem 1.5rem;
  color: var(--text3);
}
/* When server renders empty state in PHP, or JS adds .visible */
.no-results.visible { display: flex; }
.no-results svg { width: 48px; height: 48px; margin-bottom: 1rem; stroke: var(--border2); }
.no-results h3 { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text2); margin-bottom: .4rem; }
.no-results p { font-size: .83rem; }

/* ── Related categories strip ──────────────────────────── */
.related-cats-strip {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 1rem 1.25rem; margin-bottom: .875rem;
}
.rcs-label {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: .78rem; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: .625rem;
}
.rcs-list { display: flex; gap: .4rem; flex-wrap: wrap; }
.rcs-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 50px; padding: .3rem .75rem;
  font-size: .76rem; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all .15s;
}
.rcs-chip:hover,
.rcs-chip.active {
  border-color: var(--accent); color: var(--accent); background: #fff0eb;
}
/* Deal count badge inside Browse Category chip */
.rcs-chip-count {
  display: inline-flex; align-items: center;
  background: var(--accent-light); color: var(--accent);
  font-size: .60rem; font-weight: 800;
  padding: .08rem .4rem; border-radius: 20px;
  border: 1px solid rgba(255,92,40,.20);
}

/* ── Coupon detail panel ────────────────────────────────── */
.coupon-detail-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  border-top: 0 solid var(--border); background: var(--surface2);
}
.coupon-detail-panel.open {
  max-height: 400px;
  border-top-width: 1px;
  padding: 1rem 1.25rem;
}
.dp-row {
  display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.dp-item { font-size: .8rem; color: var(--text2); }
.dp-item strong { color: var(--text); font-weight: 700; }
.dp-terms {
  font-size: .77rem; color: var(--text3);
  line-height: 1.6; margin-bottom: .75rem;
}
.dp-close {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 600; color: var(--text3);
  background: none; border: 1px solid var(--border);
  border-radius: 50px; padding: .3rem .75rem; cursor: pointer;
  transition: all .15s;
}
.dp-close:hover { color: var(--accent); border-color: var(--accent); background: #fff0eb; }
.dp-close svg { width: 12px; height: 12px; }

/* ── Active filters helpers ─────────────────────────────── */
.af-clear-all {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  cursor: pointer; white-space: nowrap; background: none; border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.af-clear-all:hover { text-decoration: underline; }

/* ── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .35rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.pg-btn {
  min-width: 38px; height: 38px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text2); font-size: .83rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.pg-btn svg { width: 14px; height: 14px; }
.pg-dots { color: var(--text3); font-size: .9rem; padding: 0 .25rem; align-self: flex-end; }

/* ── SEO section ────────────────────────────────────────── */
.cat-seo-section {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem; margin-top: 1.5rem; box-shadow: var(--shadow-card);
}
.cat-seo-h2 {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 1.1rem; color: var(--text); margin-bottom: .875rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--border);
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.breadcrumb {
  max-width: var(--max-w); margin: 0 auto;
  padding: .5rem 1.5rem; display: flex; align-items: center;
  gap: .3rem; font-size: .78rem; color: var(--text3); flex-wrap: wrap;
}
.breadcrumb a { color: var(--text3); transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { color: var(--border2); font-size: .85rem; margin: 0 .1rem; }
.breadcrumb [aria-current="page"] { color: var(--text2); font-weight: 600; }

/* ── feat-tag (Hot / Free Ship badge on card) ───────────── */
.feat-tag {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .3px;
  padding: .18rem .55rem; border-radius: 5px;
}

/* ── coupon-store-chip (inside coupon body) ─────────────── */
.coupon-store-chip {
  display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem;
}
.csc-logo {
  width: 22px; height: 22px; border-radius: 5px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.csc-name { font-size: .72rem; font-weight: 700; color: var(--text3); }

/* ── coupon-type-badge ──────────────────────────────────── */
.coupon-type-badge {
  display: inline-flex; font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  background: var(--surface3); color: var(--text3);
  padding: .15rem .5rem; border-radius: 4px; margin-bottom: .3rem;
}
.coupon-type-badge.code-type { background: #eef4ff; color: #2563eb; }
/* cashback badge intentionally omitted */

/* ── coupon meta row ────────────────────────────────────── */
.coupon-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.mp { font-size: .71rem; color: var(--text3); display: flex; align-items: center; gap: .2rem; }
.mp-ok   { color: var(--green); }
.mp-time { color: var(--amber); }
.mp-users{ color: var(--text3); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .cat-page-grid { grid-template-columns: 230px 1fr; gap: 1rem; }
  .cat-hero { padding: 2rem 1.5rem 4.5rem; }
}
@media (max-width: 900px) {
  .cat-page-grid { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; order: 2; }
  .cat-main   { order: 1; }
  .cat-hero-inner { flex-direction: column; align-items: flex-start; }
  #coupons-list.grid-view { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cat-page-outer { padding: 0 1rem 2rem; }
  .cat-hero { padding: 1.5rem 1rem 3.5rem; }
  .cat-hero-h1 { font-size: 1.4rem; }
  .cat-page-grid { margin-top: -1.5rem; }
  .coupon-disc-logo { width: 80px; }
  .cdl-logo { width: 44px; height: 44px; }
  .cdl-store-name { font-size: .58rem; max-width: 66px; }
  .coupon-action {
    width: 100%; flex-direction: row; border-left: none;
    border-top: 1px solid var(--border); justify-content: center;
    padding: .6rem .75rem; gap: .5rem;
  }
  .cat-main-topbar { flex-direction: column; align-items: flex-start; }
  .coupon-title-link {
    text-decoration: underline;
    text-decoration-color: rgba(12,27,58,.15);
    text-underline-offset: 2px;
  }
  .coupon-title-link:hover { text-decoration-color: var(--accent); }
}
@media (max-width: 400px) {
  .coupon-disc-logo { width: 68px; }
  .cdl-logo { width: 38px; height: 38px; }
}

