* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f7f8fb;
    color: #1f2430;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
header.site-header {
    background: #1b2440;
    color: #fff;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.header-row { display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.logo { font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0; }
.logo span { color: #6e8bff; }
.nav-row {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
nav.main-nav { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
nav.main-nav a { color: #cdd3e6; font-size: 14px; font-weight: 600; }
nav.main-nav a:hover { color: #fff; }

/* ---------- Search box ---------- */
.search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 30px;
    padding: 4px 6px 4px 16px;
    flex: 1;
    max-width: 380px;
    min-width: 180px;
    transition: background 0.15s, border-color 0.15s;
}
.search-form:focus-within { background: rgba(255,255,255,0.14); border-color: #6e8bff; }
.search-form input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13.5px;
    flex: 1;
    min-width: 0;
}
.search-form input::placeholder { color: #a3aac2; }
.search-form button {
    background: #6e8bff;
    border: none;
    color: #1b2440;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.search-form button:hover { background: #8ba3ff; }

/* Hero variant of the search bar (bigger, on the dark hero background) */
.search-form-hero {
    max-width: 480px;
    margin: 22px auto 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 6px 6px 20px;
}
.search-form-hero input { font-size: 15px; }
.search-form-hero button { width: 38px; height: 38px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #1b2440, #2c3968);
    color: #fff;
    padding: 54px 0 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: 560px;
    height: 320px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(110,139,255,0.35), rgba(110,139,255,0) 70%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 32px; margin-bottom: 10px; letter-spacing: -0.01em; }
.hero p { color: #b7bfd9; font-size: 15px; }
.hero-search { padding: 44px 0 36px; }

/* ---------- Category pills ---------- */
.category-pills-wrap {
    position: relative;
    padding: 18px 0;
}
.category-pills-wrap::before,
.category-pills-wrap::after {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 28px;
    pointer-events: none;
    z-index: 1;
}
.category-pills-wrap::before { left: 0; background: linear-gradient(to right, #f7f8fb, rgba(247,248,251,0)); }
.category-pills-wrap::after { right: 0; background: linear-gradient(to left, #f7f8fb, rgba(247,248,251,0)); }
.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-pills::-webkit-scrollbar { display: none; height: 0; }
.category-pills a {
    background: #fff;
    border: 1px solid #e6e9ef;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    color: #2c3968;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.category-pills a:hover { background: #eef1f8; transform: translateY(-1px); }
.category-pills a.active { background: #2c3968; color: #fff; border-color: #2c3968; }

@media (min-width: 900px) {
    .category-pills { flex-wrap: wrap; overflow-x: visible; }
    .category-pills-wrap::before, .category-pills-wrap::after { display: none; }
}

/* ---------- Popular stores strip ---------- */
.store-strip-wrap { position: relative; padding: 20px 0 20px; }
.store-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.store-strip::-webkit-scrollbar { display: none; height: 0; }
.store-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 30px;
    padding: 6px 14px 6px 6px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #2c3968;
    flex-shrink: 0;
    transition: border-color 0.15s, transform 0.1s;
}
.store-chip:hover { border-color: #6e8bff; transform: translateY(-1px); }
.store-chip-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef1f8;
    color: #2c3968;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 800;
    flex-shrink: 0;
}
.store-chip-count {
    background: #f2f4f9;
    color: #778;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

/* ---------- Trust strip ---------- */
.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 8px;
}
.trust-item {
    flex: 1;
    min-width: 130px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    font-size: 12.5px;
    color: #667;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.trust-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(27,36,64,0.08); border-color: #dde3f5; }
.trust-icon { display: block; font-size: 22px; margin-bottom: 6px; }
.trust-item strong { display: block; font-size: 19px; color: #2c3968; margin-bottom: 2px; }

/* ---------- Section ---------- */
.section { padding: 30px 0; }
.section h2 {
    font-size: 20px;
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 4px solid #6e8bff;
}

/* ---------- Coupon grid ---------- */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.coupon-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #eef0f4;
    transition: transform 0.15s, box-shadow 0.15s;
}
.coupon-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27,36,64,0.1); }
.card-link-wrap { display: block; }
.coupon-card .merchant-name { font-size: 12.5px; font-weight: 700; color: #6e8bff; text-transform: uppercase; letter-spacing: 0.03em; }
.coupon-card .title { font-size: 15.5px; font-weight: 700; color: #1b2440; margin-top: 2px; }
.coupon-card .desc { font-size: 13px; color: #667; flex: 1; }
.discount-badge {
    display: inline-block;
    background: #eef1f8;
    color: #2c3968;
    font-weight: 800;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    align-self: flex-start;
}
.coupon-card .cta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.get-code-btn {
    background: #2c3968;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
}
.get-code-btn:hover { background: #1e274a; }
.expiry-note { font-size: 11.5px; color: #999; }

/* ---------- Coupon detail page ---------- */
.breadcrumbs { font-size: 12.5px; color: #99a; margin-bottom: 16px; }
.breadcrumbs a { color: #667; font-weight: 600; }
.breadcrumbs a:hover { color: #2c3968; }
.coupon-detail-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 28px;
    max-width: 640px;
}
.coupon-detail-card h1 { font-size: 22px; margin: 6px 0 14px; color: #1b2440; }
.discount-badge-lg { font-size: 16px; padding: 8px 16px; margin-bottom: 14px; }
.coupon-detail-desc { color: #556; font-size: 14.5px; margin-bottom: 18px; line-height: 1.6; }
.coupon-detail-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.get-code-btn-lg { padding: 13px 26px; font-size: 15px; flex: none; }
.code-reveal {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #eef1f8;
    color: #2c3968;
    border: 1px dashed #b9c2e0;
    padding: 10px 18px;
    border-radius: 8px;
}
.coupon-detail-card .expiry-note { margin-top: 14px; font-size: 13px; }

/* ---------- Store page ---------- */
.store-header {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #eef0f4;
    text-align: center;
}
.store-header h1 { font-size: 26px; margin-bottom: 6px; }
.store-header p { color: #778; font-size: 14px; }

/* ---------- Expired list ---------- */
.expired-list { display: flex; flex-direction: column; gap: 8px; }
.expired-item {
    background: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #eef0f4;
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: #999;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: #1b2440;
    color: #b7bfd9;
    padding: 40px 0 0;
    margin-top: 50px;
    font-size: 13px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { color: #fff; font-size: 13.5px; margin-bottom: 4px; }
.footer-col a { color: #b7bfd9; }
.footer-col a:hover { color: #fff; }
.footer-tagline { color: #8b93b0; margin-top: 8px; max-width: 280px; }
.footer-bottom { text-align: center; padding: 18px 0; color: #8b93b0; }

.empty-state { text-align: center; padding: 40px 20px; color: #999; }

/* ---------- "Get Code" modal ---------- */
.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18,22,40,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 30px 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.15s;
}
.modal-backdrop.open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f2f4f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    color: #556;
    cursor: pointer;
}
.modal-close:hover { background: #e6e9f2; }
.modal-box h3 { font-size: 19px; color: #1b2440; margin: 6px 0 12px; padding-right: 20px; }
.modal-desc { color: #667; font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
.modal-code-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.modal-code-wrap .code-reveal { flex: 1; text-align: center; font-size: 17px; }
.btn-copy {
    background: #2c3968;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-copy:hover { background: #232e57; }
.modal-deal-note {
    background: #eaf8ef;
    color: #1a7f3c;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.modal-shop-btn { display: block; width: 100%; text-align: center; }
.modal-box .expiry-note { display: block; text-align: center; margin-top: 12px; }

@media (max-width: 700px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 24px; }
    nav.main-nav { display: none; }
    .search-form { max-width: none; width: 100%; order: 3; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Blog ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-link { font-size: 14px; font-weight: 600; color: #4a62d1; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 16px; }
.blog-card { background: #fff; border: 1px solid #e6e9f2; border-radius: 14px; box-shadow: 0 2px 10px rgba(30,40,90,.05); transition: transform .15s, box-shadow .15s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(30,40,90,.10); }
.blog-card-link { display: block; padding: 22px; color: inherit; text-decoration: none; height: 100%; }
.blog-date { font-size: 12px; color: #8a93ad; margin-bottom: 8px; }
.blog-card h3 { font-size: 18px; line-height: 1.35; margin: 0 0 8px; color: #1d2547; }
.blog-card p { font-size: 14px; color: #5b6482; line-height: 1.55; margin: 0 0 12px; }
.blog-more { font-size: 13px; font-weight: 700; color: #4a62d1; }
.blog-pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 28px; font-size: 14px; }
.blog-pager a { font-weight: 700; color: #4a62d1; }
.post { max-width: 760px; margin: 0 auto; }
.post h1 { font-size: 32px; line-height: 1.25; margin: 8px 0 10px; color: #1d2547; }
.post-meta { font-size: 13px; color: #8a93ad; margin-bottom: 18px; }
.post-lead { font-size: 18px; line-height: 1.6; color: #3d4668; margin-bottom: 20px; }
.post-body { font-size: 16.5px; line-height: 1.75; color: #2b3354; }
.post-body h2 { font-size: 23px; margin: 30px 0 10px; color: #1d2547; }
.post-body p { margin: 0 0 16px; }
.post-body ul { margin: 0 0 16px 22px; }
.post-deals, .post-related { max-width: 1100px; margin: 40px auto 0; }
.post-more { margin-top: 14px; font-weight: 700; }
@media (max-width: 600px) { .post h1 { font-size: 25px; } }

.blog-thumb { display: block; width: calc(100% + 44px); height: auto; margin: -22px -22px 14px; max-width: none; border-radius: 14px 14px 0 0; aspect-ratio: 1200 / 630; object-fit: cover; background: #e8ebf5; }
.post-feature { display: block; width: 100%; height: auto; border-radius: 14px; margin: 0 0 20px; background: #e8ebf5; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.post-tags a { background: #eef1fb; color: #3b4fa8; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.post-deal-list { list-style: none; margin: 0 0 16px; padding: 0; }
.post-deal-list li { padding: 10px 0; border-bottom: 1px solid #eef0f6; }
.post-deal-list a { font-weight: 700; color: #3b4fa8; }
.post-cta a { display: inline-block; background: #2c3968; color: #fff; padding: 11px 20px; border-radius: 10px; font-weight: 700; }
.post-cta a:hover { background: #232e57; }
