:root {
    --bg: #36415f;
    --bg2: #27324b;
    --bg3: #1a2232;
    --line: #4d5a7d;
    --muted: #8d9bbd;
    --soft: #ccd3e0;
    --accent: #b12cf0;
    --accent-soft: #f2bdff;
    --ink: #1a2232;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: #fff;
    font-family: "Momo Trust Sans", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar + header ---------- */
.topbar { background: var(--bg2); font-size: 14px; color: var(--muted); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 46px; }
.topbar a { margin-right: 22px; }
.topbar a:last-child { margin-right: 0; }
.topbar a:hover { color: #fff; }

.header { border-bottom: 2px solid var(--bg3); position: relative; }
.header .wrap { display: flex; align-items: center; gap: 14px; height: 84px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 24px; letter-spacing: .3px; }
.logo img { height: 46px; width: auto; }
.logo-mark {
    width: 46px; height: 46px; border-radius: 50%; background: var(--accent);
    border: 3px solid var(--bg3); display: grid; place-items: center; font-size: 22px;
}
.nav { display: flex; gap: 8px; margin-left: auto; }
.menu-btn { display: none; margin-left: auto; }
.hsearch { display: flex; }
.hsearch input {
    width: 190px; background: var(--bg2); border: 3px solid var(--bg3); border-radius: 999px;
    padding: 9px 18px; color: #fff; font: inherit; font-size: 15px; outline: none;
}
.hsearch input:focus { border-color: var(--accent); }

.pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
    background: var(--bg2); border: 3px solid var(--bg3); font-weight: 700; font-size: 15px;
    color: #fff; cursor: pointer; font-family: inherit; transition: background .15s;
}
.pill:hover, .pill.active { background: var(--accent); }
.pill.big { padding: 15px 28px; font-size: 17px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 0 36px; }
.eyebrow { letter-spacing: .2em; font-weight: 700; color: var(--muted); font-size: 14px; text-transform: uppercase; }
.hero h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.15; margin: 14px auto 16px; max-width: 840px; }
.hero h1 em, .page-title em { color: #9aa7c7; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 28px; font-size: 18px; }
.searchbar { display: flex; gap: 10px; max-width: 660px; margin: 0 auto; }
.searchbar input {
    flex: 1; min-width: 0; background: var(--bg2); border: 3px solid var(--bg3); border-radius: 999px;
    padding: 16px 24px; color: #fff; font: inherit; font-size: 17px; outline: none;
}
.searchbar input:focus { border-color: var(--accent); }
.searchbar .pill { background: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.stats { margin-top: 22px; color: var(--muted); font-size: 15px; }
.stats b { color: #fff; }

/* ---------- sections ---------- */
.section { padding: 30px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 12px; }
.section-head h2, .page-title { font-size: 28px; margin: 0; }
.page-title { font-size: clamp(26px, 4vw, 40px); line-height: 1.2; }
.more { font-size: 15px; color: var(--accent-soft); font-weight: 700; }
.more:hover { text-decoration: underline; }
.lead { color: var(--muted); max-width: 760px; margin: 8px 0 0; }
.crumbs { color: var(--muted); font-size: 14px; margin: 26px 0 0; }
.crumbs a:hover { color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 18px; }

/* ---------- coupon cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 40px 22px; padding-top: 30px; }
.card {
    position: relative; border-radius: 28px; color: var(--ink); padding: 38px 22px 20px;
    display: flex; flex-direction: column; border: 3px solid var(--bg3); background: #fff;
}
.card.expired { opacity: .6; }
.tone-0 { background: #fff5f9; }
.tone-1 { background: #f6f3ff; }
.tone-2 { background: #fffae9; }
.tone-3 { background: #fff6f4; }
.tone-4 { background: #f3f8ff; }
.card .badges { position: absolute; top: -28px; left: 14px; display: flex; }
.card .badges > * + * { margin-left: -10px; }
.badge-circle {
    width: var(--s, 56px); height: var(--s, 56px); border-radius: 50%; background: #fff;
    border: 4px solid var(--bg3); display: grid; place-items: center; overflow: hidden;
    font-weight: 800; color: var(--ink); flex: none;
}
.badge-circle img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.type-badge { background: var(--accent); color: #fff; }
.tags { min-height: 24px; }
.tag {
    display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
    background: rgba(26, 34, 50, .08); margin-right: 6px;
}
.tag.ok { background: #d9f7e6; color: #126c3b; }
.tag.ex { background: #ffe7a8; color: #7a5200; }
.discount { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 12px 0 6px; }
.card h3 { font-size: 17px; margin: 0 0 4px; line-height: 1.3; }
.card h3 a:hover { text-decoration: underline; }
.store-name { font-size: 14px; color: #5b6786; font-weight: 700; }
.desc { font-size: 14px; color: #44506b; margin: 8px 0; flex: 1; }
.meta { font-size: 12.5px; color: #6b7794; margin: 6px 0 14px; }
.meta .soon { color: #c0392b; font-weight: 700; }

.reveal {
    width: 100%; background: var(--accent); color: #fff; border: 3px solid var(--bg3); border-radius: 999px;
    padding: 13px; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; transition: filter .15s;
}
.reveal:hover { filter: brightness(1.12); }
.code-box {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 3px dashed var(--accent); border-radius: 999px; padding: 6px 6px 6px 20px;
    background: #fff; font-weight: 800; letter-spacing: .08em; font-size: 16px;
}
.copy {
    background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px;
    cursor: pointer; font: inherit; font-weight: 700;
}

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; padding-top: 18px; }
.tile {
    background: var(--bg2); border: 3px solid var(--bg3); border-radius: 24px; padding: 22px 12px;
    text-align: center; transition: border-color .15s, transform .15s; display: block;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile .badge-circle { margin: 0 auto 12px; }
.tile .name { font-weight: 800; }
.tile .count { color: var(--muted); font-size: 13px; }
.tile .ico { font-size: 34px; color: var(--accent-soft); display: block; margin-bottom: 8px; }

.cat-group { margin-top: 26px; }
.cat-group h3 { margin: 0 0 4px; font-size: 20px; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.filters select {
    background: var(--bg2); color: #fff; border: 3px solid var(--bg3); border-radius: 999px;
    padding: 10px 18px; font: inherit; font-weight: 700; outline: none;
}

/* ---------- store page ---------- */
.store-head { display: flex; gap: 24px; align-items: center; padding: 28px 0 6px; flex-wrap: wrap; }
.store-head .badge-circle { --s: 104px; }
.store-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- blog ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; padding-top: 22px; }
.post-card { background: var(--bg2); border: 3px solid var(--bg3); border-radius: 24px; overflow: hidden; display: block; transition: border-color .15s; }
.post-card:hover { border-color: var(--accent); }
.post-card .cover { aspect-ratio: 16 / 9; background: var(--bg3); object-fit: cover; width: 100%; display: block; }
.post-card .body { padding: 18px 20px 22px; }
.post-card h3 { margin: 6px 0; font-size: 19px; line-height: 1.3; }
.post-card p { margin: 0; color: var(--muted); font-size: 14px; }
.date { color: var(--muted); font-size: 13px; }
.prose { max-width: 780px; margin: 28px auto 0; font-size: 17px; color: var(--soft); line-height: 1.75; }
.prose h2, .prose h3 { color: #fff; margin-top: 1.8em; }
.prose a { color: var(--accent-soft); text-decoration: underline; }
.prose img { border-radius: 18px; }
.cover-lg { width: 100%; max-width: 780px; display: block; margin: 24px auto 0; border-radius: 24px; border: 3px solid var(--bg3); }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin: 38px 0 6px; flex-wrap: wrap; }
.pg {
    min-width: 44px; height: 44px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px;
    background: var(--bg2); border: 3px solid var(--bg3); font-weight: 700;
}
a.pg:hover, .pg.active { background: var(--accent); }
.pg.disabled { opacity: .4; }

/* ---------- footer ---------- */
.footer { background: var(--bg3); margin-top: 64px; padding: 44px 0 30px; color: var(--muted); font-size: 14px; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; margin: 0 0 10px; font-size: 16px; }
.footer a { display: block; margin: 6px 0; }
.footer a:hover { color: #fff; }
.footer .legal { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
    .hsearch { display: none; }
    .menu-btn { display: inline-flex; }
    .nav {
        display: none; position: absolute; top: 84px; left: 0; right: 0; z-index: 20;
        flex-direction: column; background: var(--bg2); padding: 16px 20px; margin: 0;
        border-bottom: 3px solid var(--bg3);
    }
    .nav.open { display: flex; }
    .footer .cols { grid-template-columns: 1fr; }
    .hero { padding-top: 44px; }
    .searchbar .pill { padding: 12px 18px; }
}

/* whole card opens the store page; Get Code/Deal button stays on top */
.card { position: relative; }
.card .card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card:has(.card-link) { cursor: pointer; }
.card .reveal, .card .code-box { position: relative; z-index: 2; }
.card .badges { z-index: 2; }
