.coupon-page {
    min-height: 100vh;
    padding: 7rem 0 6rem;
    color: var(--text-primary, #f7fbff);
    background: radial-gradient(circle at 75% 8%, rgba(77, 91, 255, .18), transparent 35%), var(--page-bg, #06111f);
}

.coupon-page .container { width: min(1440px, calc(100% - 2rem)); margin-inline: auto; }
.coupon-eyebrow, .coupon-explorer header > span, .coupon-cta > div > span { color: #58b9ff; font-size: .75rem; font-weight: 800; letter-spacing: .18em; }
.coupon-explorer { padding: 2rem 0; }
.coupon-explorer > header, .coupon-stage > header { margin-bottom: 1.5rem; text-align: center; }
.coupon-explorer h2 { margin: .5rem 0; font-size: clamp(1.75rem, 4vw, 3rem); }
.coupon-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; min-height: 72px; }
.coupon-chip { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.2rem; border: 1px solid rgba(121, 173, 226, .35); border-radius: 999px; background: rgba(10, 29, 48, .72); color: inherit; transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; }
.coupon-chip:not(:disabled) { cursor: pointer; }
.coupon-chip:not(:disabled):hover, .coupon-chip:focus-visible, .coupon-chip.is-selected { transform: translateY(-3px) scale(1.025); border-color: #58b9ff; box-shadow: 0 12px 34px rgba(46, 143, 255, .18); }
.coupon-chip.is-selected { background: linear-gradient(135deg, #126ee8, #635bff); color: #fff; }
.coupon-chip:disabled { opacity: .55; }
.coupon-chip small { color: #8ea6bb; font-size: .65rem; }
.coupon-stage { margin-top: 3rem; padding: 2rem; border: 1px solid rgba(121, 173, 226, .22); border-radius: 30px; background: rgba(7, 22, 38, .78); animation: couponReveal .3s ease both; }
.coupon-search { display: block; max-width: 380px; margin: 0 auto 1.2rem; }
.coupon-search input, .coupon-filters input, .coupon-filters select { width: 100%; min-height: 48px; padding: .75rem 1rem; border: 1px solid rgba(121, 173, 226, .3); border-radius: 14px; background: rgba(4, 15, 28, .85); color: inherit; }
.coupon-filters { display: grid; grid-template-columns: 2fr 1fr auto; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.coupon-filters label { display: grid; gap: .4rem; color: #9db1c8; font-size: .8rem; }
.coupon-filters button, .coupon-card > button, .coupon-dialog-actions button, .coupon-dialog-actions a, .coupon-cta > a { min-height: 48px; padding: .75rem 1.2rem; border: 0; border-radius: 14px; background: linear-gradient(135deg, #2295ff, #1466d2); color: #fff; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.coupon-filters button:hover, .coupon-card > button:hover, .coupon-dialog-actions button:hover, .coupon-dialog-actions a:hover, .coupon-cta > a:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(29, 126, 228, .3); }
.coupon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.coupon-card { position: relative; display: flex; flex-direction: column; gap: 1rem; min-height: 326px; padding: 1.35rem; overflow: hidden; border: 1px solid rgba(121, 173, 226, .22); border-radius: 24px; background: linear-gradient(145deg, rgba(18, 39, 62, .97), rgba(7, 20, 35, .99)); box-shadow: 0 20px 48px rgba(1, 9, 20, .16); transition: transform .22s, border-color .22s, box-shadow .22s; }
.coupon-card::after { position: absolute; inset: auto -4rem -5rem auto; width: 10rem; height: 10rem; border-radius: 50%; background: radial-gradient(circle, rgba(42, 155, 255, .17), transparent 68%); content: ""; pointer-events: none; }
.coupon-card:hover { transform: translateY(-7px); border-color: #58b9ff; box-shadow: 0 24px 54px rgba(10, 75, 145, .25); }
.coupon-card.is-featured::before { position: absolute; top: 1rem; right: 1rem; color: #bc7cff; content: "✦"; }
.coupon-card-top { display: flex; justify-content: space-between; gap: .75rem; color: #8aa7c4; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.coupon-card-top strong { max-width: 55%; padding: .28rem .55rem; border-radius: 999px; background: rgba(88, 185, 255, .12); color: #9dd7ff; text-align: right; }
.coupon-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.38; }
.coupon-discount { font-size: 2rem; font-weight: 850; line-height: 1.05; color: #6ee7b7; }
.coupon-card dl, .coupon-dialog dl { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: auto 0 0; }
.coupon-card dl div, .coupon-dialog dl div { display: grid; gap: .2rem; }
.coupon-card dt, .coupon-dialog dt { color: #718ba4; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.coupon-card dd, .coupon-dialog dd { margin: 0; }
.coupon-card > button { position: relative; z-index: 1; width: 100%; }
.coupon-loading, .coupon-scroll-sentinel { display: flex; justify-content: center; align-items: center; gap: .7rem; padding: 1rem; color: #8ba7c2; }
.coupon-loading[hidden], .coupon-scroll-sentinel[hidden] { display: none; }
.coupon-loading i, .coupon-scroll-sentinel i { width: 20px; height: 20px; border: 2px solid #31516f; border-top-color: #58b9ff; border-radius: 50%; animation: spin .8s linear infinite; }
.coupon-empty { grid-column: 1 / -1; display: grid; gap: .5rem; padding: 3rem; text-align: center; color: #9db1c8; }
.coupon-inline-loading { color: #9db1c8; }

.coupon-cta { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; margin-top: 4rem !important; padding: 3.3rem !important; overflow: hidden; border: 1px solid rgba(105, 178, 255, .24); border-radius: 34px; background: linear-gradient(135deg, #102f55 0%, #282a69 52%, #482b78 100%); box-shadow: 0 30px 90px rgba(8, 24, 58, .3); }
.coupon-cta::before, .coupon-cta::after { position: absolute; border-radius: 50%; content: ""; pointer-events: none; filter: blur(4px); }
.coupon-cta::before { top: -7rem; right: 16%; width: 18rem; height: 18rem; background: radial-gradient(circle, rgba(77, 185, 255, .25), transparent 68%); }
.coupon-cta::after { bottom: -8rem; left: 15%; width: 19rem; height: 19rem; background: radial-gradient(circle, rgba(166, 89, 255, .2), transparent 68%); }
.coupon-cta > * { position: relative; z-index: 1; }
.coupon-cta h2 { max-width: 850px; margin: .7rem 0; font-size: clamp(1.8rem, 3.4vw, 3.25rem); line-height: 1.08; }
.coupon-cta p { color: #b5c9dd; }
.coupon-cta > a { min-width: 170px; text-align: center; }

.coupon-dialog { width: min(720px, calc(100% - 2rem)); max-height: 90vh; padding: 2.2rem; overflow-y: auto; border: 1px solid rgba(121, 173, 226, .3); border-radius: 28px; background: #0a1a2b; color: #eef7ff; box-shadow: 0 30px 100px rgba(0, 0, 0, .55); }
.coupon-dialog::backdrop { background: rgba(0, 7, 15, .78); backdrop-filter: blur(8px); }
.coupon-dialog-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #142c43; color: #fff; font-size: 1.5rem; cursor: pointer; }
.coupon-dialog-brand { color: #58b9ff; font-size: .75rem; letter-spacing: .12em; }
.coupon-dialog h2 { padding-right: 2rem; font-size: 2rem; }
.coupon-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .55rem .8rem; margin: 1.5rem 0; padding: 1.1rem; border: 1px dashed #58b9ff; border-radius: 18px; }
.coupon-code small { grid-column: 1 / -1; color: #83a6c5; }
.coupon-code strong { min-width: 0; overflow-wrap: anywhere; font-size: 1.5rem; letter-spacing: .08em; line-height: 1.35; }
.coupon-code button { min-width: 96px; min-height: 48px; padding: .5rem 1rem; border: 0; border-radius: 10px; background: #1b6ed1; color: #fff; cursor: pointer; }
.coupon-code-auto { justify-self: end; padding: .55rem .75rem; border-radius: 999px; background: rgba(88, 185, 255, .12); color: #9dd7ff; font-size: .78rem; font-weight: 750; text-align: center; }
.coupon-dialog-discount { color: #6ee7b7; font-size: 2.4rem; font-weight: 850; }
.coupon-dialog-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.coupon-dialog-actions .coupon-dialog-dismiss { border: 1px solid rgba(121, 173, 226, .35); background: transparent; color: inherit; }
.coupon-dialog-actions [data-save].is-saving { background: linear-gradient(135deg, #d88b18, #ef9f16); }
.coupon-dialog-actions [data-save].is-saved { background: linear-gradient(135deg, #16a56f, #22c58b); }
.coupon-dialog-actions [data-save]:disabled { cursor: wait; opacity: 1; }
.coupon-toast { position: fixed; z-index: 1100; right: 1.5rem; bottom: 6rem; padding: 1rem 1.2rem; border-radius: 14px; background: #0f9f74; color: #fff; box-shadow: 0 15px 40px rgba(0, 0, 0, .3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

html[data-theme="light"] .coupon-page { --page-bg: #eef5fc; --text-primary: #0b2037; --text-secondary: #536c84; background: radial-gradient(circle at 75% 8%, rgba(113, 108, 255, .14), transparent 35%), #eef5fc; }
html[data-theme="light"] .coupon-stage { background: rgba(255, 255, 255, .88); box-shadow: 0 18px 55px rgba(43, 75, 113, .08); }
html[data-theme="light"] .coupon-chip { background: #fff; color: #102942; box-shadow: 0 9px 25px rgba(34, 68, 105, .07); }
html[data-theme="light"] .coupon-chip.is-selected { color: #fff; background: linear-gradient(135deg, #167fe9, #6857ee); }
html[data-theme="light"] .coupon-card { border-color: #d9e7f4; background: linear-gradient(155deg, #fff 0%, #f8fbff 58%, #eef7ff 100%); color: #102942; box-shadow: 0 14px 38px rgba(34, 68, 105, .1); }
html[data-theme="light"] .coupon-card:hover { border-color: #4aaeff; box-shadow: 0 22px 48px rgba(35, 112, 185, .18); }
html[data-theme="light"] .coupon-card-top strong { background: #e7f4ff; color: #1274c8; }
html[data-theme="light"] .coupon-search input, html[data-theme="light"] .coupon-filters input, html[data-theme="light"] .coupon-filters select { background: #fff; color: #102942; }
html[data-theme="light"] .coupon-cta { border-color: rgba(80, 144, 221, .32); background: linear-gradient(128deg, #d9efff 0%, #e7ebff 47%, #eee4ff 100%); box-shadow: 0 30px 75px rgba(49, 82, 128, .18); }
html[data-theme="light"] .coupon-cta::before { background: radial-gradient(circle, rgba(40, 155, 255, .26), transparent 68%); }
html[data-theme="light"] .coupon-cta::after { background: radial-gradient(circle, rgba(132, 80, 255, .18), transparent 68%); }
html[data-theme="light"] .coupon-cta h2 { color: #09223e; }
html[data-theme="light"] .coupon-cta p { color: #4b6681; }
html[data-theme="light"] .coupon-dialog { background: #f8fbff; color: #102942; }
html[data-theme="light"] .coupon-dialog-close { background: #e8f1fa; color: #15334f; }
html[data-theme="light"] .coupon-code-auto { background: #e7f4ff; color: #126fbe; }

.coupon-back-link { display: inline-flex; padding: .8rem 1.1rem; border: 1px solid rgba(92, 169, 242, .4); border-radius: 14px; color: inherit; text-decoration: none; }
.coupon-account-status { margin-bottom: 1.2rem; padding: 1rem; border: 1px solid rgba(52, 211, 153, .45); border-radius: 14px; background: rgba(16, 185, 129, .12); }
.saved-coupon-card.is-expired { filter: grayscale(.85); opacity: .7; }
.coupon-code-inline { padding: .75rem; border: 1px dashed rgba(92, 169, 242, .5); border-radius: 12px; font-weight: 800; letter-spacing: .1em; }
.saved-coupon-actions { display: flex; gap: .6rem; margin-top: auto; }
.saved-coupon-actions button { flex: 1; padding: .7rem; border: 0; border-radius: 10px; background: #176ed8; color: #fff; cursor: pointer; }
.saved-coupon-actions .danger { background: #8e3545; }

@keyframes couponReveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1180px) { .coupon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
    .coupon-page { padding-top: 5rem; }
    .coupon-filters, .coupon-cta { grid-template-columns: 1fr; }
    .coupon-grid { grid-template-columns: 1fr; }
    .coupon-stage { padding: 1.25rem; }
    .coupon-cta { align-items: start; }
    .coupon-cta > a { text-align: center; }
    .coupon-dialog { padding: 1.4rem; }
    .coupon-code { grid-template-columns: 1fr; }
    .coupon-code button, .coupon-code-auto { width: 100%; justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
    .coupon-chip, .coupon-card, .coupon-filters button, .coupon-card > button, .coupon-dialog-actions button, .coupon-dialog-actions a, .coupon-cta > a { transition: none; }
    .coupon-stage { animation: none; }
    .coupon-loading i, .coupon-scroll-sentinel i { animation: none; }
}
