/* CouponsCluster: /categories/ and /offer-category/<x>/ (inc/categories.php).
 * Layout rules that keep text from overlapping: every card is a flex column; the chips wrap inside the card; the "View all" link is the last
 * item in normal flow (never positioned over the chips); long names wrap instead of spilling. Nothing depends on hover. */
.cc-cats{--cc-title:#1a7b8f;--cc-card-bg:#fff;--cc-line:#e3e6ee;--cc-ink:#1b2133;--cc-sub:#5a6278;--cc-accent:#1f4fd8;--cc-chip:#eef2fc;max-width:1180px;margin:0 auto;padding:8px 16px 48px;color:var(--cc-ink);font-size:16px;line-height:1.55}
.cc-cats *{box-sizing:border-box}
.cc-cats .cc-page-title{font-size:clamp(28px,3.4vw,38px)!important;line-height:1.15!important;margin:8px 0 10px;color:var(--cc-title)!important;font-weight:600!important}
.cc-cats h2{font-size:22px;line-height:1.3;margin:0 0 12px;color:var(--cc-title)!important}
.cc-cats .cc-intro{color:var(--cc-sub);max-width:70ch;margin:0 0 18px}
.cc-cats a{text-decoration:none}

/* search box */
.cc-find{margin:0 0 20px}
.cc-find input{width:100%;max-width:420px;padding:11px 14px;border:1px solid var(--cc-line);border-radius:10px;font-size:16px;background:#fff;color:var(--cc-ink)}
.cc-find input:focus{outline:2px solid var(--cc-accent);outline-offset:1px}

/* index grid */
.cc-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px;align-items:stretch}
.cc-cat-card{display:flex;flex-direction:column;gap:12px;background:var(--cc-card-bg);border:1px solid var(--cc-line);border-radius:14px;padding:18px;min-width:0}
.cc-cat-card[hidden]{display:none}
.cc-cat-head{display:flex;align-items:center;gap:12px;min-width:0}
.cc-cat-id{min-width:0}
.cc-cat-title{font-size:19px!important;line-height:1.25;margin:0!important;overflow-wrap:anywhere}
.cc-cat-title a{color:var(--cc-ink)!important}
.cc-cat-title a:hover{color:var(--cc-accent)!important}
.cc-cat-count{margin:2px 0 0;font-size:14px;color:var(--cc-sub)}
.cc-cat-ico{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;background:var(--cc-chip);color:var(--cc-accent)}
.cc-cat-ico.cc-big{width:64px;height:64px;border-radius:16px}
.cc-ico{display:block}
.cc-chips{display:flex;flex-wrap:wrap;gap:8px}
.cc-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:5px 11px;border-radius:999px;background:var(--cc-chip);color:var(--cc-ink)!important;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.cc-chip b{font-weight:600;color:var(--cc-sub)}
.cc-chip:hover{background:#dde6fb}
.cc-chip-more{background:transparent;border:1px dashed var(--cc-line)}
.cc-cat-all{margin-top:auto;padding-top:4px;font-weight:600;font-size:15px;color:var(--cc-accent)!important}
.cc-cat-all:hover{text-decoration:underline}
.cc-none{color:var(--cc-sub);margin:12px 0}
.cc-more{margin-top:32px}

/* category page */
.cc-crumbs ol{display:flex;flex-wrap:wrap;gap:4px;list-style:none;margin:0 0 14px;padding:0;font-size:14px;color:var(--cc-sub)}
.cc-crumbs li+li::before{content:"\203A";margin-right:6px;color:var(--cc-sub)}
.cc-crumbs a{color:var(--cc-accent)}
.cc-cat-hero{display:flex;align-items:center;gap:16px;margin-bottom:10px}
.cc-cat-hero .cc-page-title{margin:0 0 4px}
.cc-meta{margin:0;color:var(--cc-sub);font-size:15px}
.cc-subcats{display:flex;align-items:flex-start;gap:12px;margin:0 0 22px;flex-wrap:wrap}
.cc-label{font-weight:600;font-size:14px;color:var(--cc-sub);padding-top:5px}
.cc-subcats .cc-chips{flex:1 1 280px}
.cc-offers{margin:0 0 28px}
.cc-empty{background:var(--cc-card-bg);border:1px solid var(--cc-line);border-radius:14px;padding:22px;margin:0 0 28px}
.cc-empty .cc-chips{margin:14px 0}
.cc-empty .wp-block-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.cc-ended,.cc-how{border:1px solid var(--cc-line);border-radius:12px;padding:12px 16px;margin:0 0 18px;background:#fff}
.cc-ended summary,.cc-how summary{cursor:pointer;font-weight:600}
.cc-ended ul{margin:10px 0 0;padding-left:18px}
.cc-ended li{margin:6px 0;overflow-wrap:anywhere}
.cc-end-store{color:var(--cc-sub);font-size:14px}
.cc-how ol{margin:10px 0 0;padding-left:20px}
.cc-stores,.cc-rel{margin:0 0 28px}

@media (max-width:600px){
  .cc-cats{padding:4px 16px 36px}
  .cc-cat-grid{grid-template-columns:1fr;gap:14px}
  .cc-cat-hero{align-items:flex-start}
  .cc-cat-ico.cc-big{width:52px;height:52px}
}
@media (prefers-reduced-motion:no-preference){.cc-chip,.cc-cat-card{transition:background .15s,box-shadow .15s}.cc-cat-card:hover{box-shadow:0 4px 16px rgba(20,30,60,.08)}}
