/*
Theme Name: XtreamDeals
Theme URI: https://teal-hawk-830478.hostingersite.com/
Author: XtreamDeals
Description: A clean, professional coupon and software-deals theme. Works with the XtreamDeals Core Plugin.
Version: 2.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: xtreamdeals
*/

/* ---------- Design tokens ---------- */
:root {
  --brand: #16883a;
  --brand-dark: #0f6e2d;
  --brand-soft: #e8f6ec;
  --brand-softer: #f3faf5;
  --ink: #0f1b2d;
  --text: #2b3a4f;
  --muted: #66758a;
  --line: #e4eaf0;
  --bg: #ffffff;
  --bg-alt: #f6f9f7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 20px rgba(15, 27, 45, .05);
  --shadow-hover: 0 2px 4px rgba(15, 27, 45, .05), 0 14px 32px rgba(15, 27, 45, .09);
  --header-h: 72px;
  --container: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #5bbf7d; outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.xd-skip { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.xd-skip:focus { left: 8px; color: #fff; }
.xd-container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.xd-icon { flex: none; vertical-align: middle; }

/* ---------- Buttons, pills ---------- */
.xd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border: 2px solid var(--brand); border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.xd-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.xd-btn:active { transform: translateY(1px); }
.xd-btn-outline { background: #fff; color: var(--brand-dark); }
.xd-btn-outline:hover { background: var(--brand-soft); color: var(--brand-dark); }
.xd-btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.xd-btn-block { display: flex; width: 100%; border-radius: 12px; }
.xd-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.xd-pill-lg { padding: 6px 14px; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; background: #d9f1e0; }
.xd-pill.is-muted { background: #eef1f5; color: var(--muted); }

/* ---------- Header ---------- */
.xd-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); }
body.admin-bar .xd-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .xd-header { top: 46px; } }
.xd-header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.xd-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.xd-brand-img { max-height: 48px; width: auto; display: block; }
.xd-brand-mark { width: 38px; height: 38px; fill: var(--brand); flex: none; }
.xd-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.xd-brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; color: var(--ink); }
.xd-brand-name b { color: var(--brand); font-weight: 800; }
.xd-brand-tag { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.xd-nav { flex: 1; }
.xd-menu { list-style: none; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; }
.xd-menu > li { position: relative; }
.xd-menu a { display: block; padding: 10px 14px; color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; border-radius: 8px; }
.xd-menu a:hover, .xd-menu .current-menu-item > a, .xd-menu .current_page_item > a { color: var(--brand-dark); }
.xd-menu .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.xd-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 5; }
.xd-menu li:hover > .sub-menu, .xd-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.xd-menu .sub-menu a { padding: 9px 12px; font-size: 14px; }
.xd-menu .sub-menu a:hover { background: var(--brand-softer); }
.xd-header-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.xd-search { position: relative; display: flex; align-items: center; }
.xd-search input[type="search"] { width: 230px; height: 44px; padding: 0 46px 0 18px; border: 1px solid var(--line); border-radius: 999px; background: #f4f6f8; color: var(--ink); font-size: 14px; -webkit-appearance: none; appearance: none; }
.xd-search input[type="search"]::placeholder { color: #8a97a8; }
.xd-search input[type="search"]:focus { background: #fff; border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(22, 136, 58, .15); }
.xd-search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.xd-icon-btn { display: none; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.xd-icon-btn:hover { background: var(--brand-softer); }
.xd-mobile-search { padding: 10px 0 14px; border-top: 1px solid var(--line); }
.xd-mobile-search[hidden] { display: none; }
.xd-mobile-search .xd-search input[type="search"] { width: 100%; }

@media (max-width: 900px) {
  .xd-header-inner { gap: 10px; }
  .xd-header-tools .xd-search-desktop, .xd-header-cta { display: none; }
  .xd-icon-btn { display: grid; }
  .xd-nav { position: absolute; left: 0; right: 0; top: 100%; flex: none; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-hover); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .xd-header.menu-open .xd-nav { display: block; }
  .xd-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; }
  .xd-menu a { padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
  .xd-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; min-width: 0; display: none; }
  .xd-menu .sub-open > .sub-menu { display: block; }
  .xd-menu .menu-item-has-children > a::after { float: right; margin-top: 8px; }
  .xd-brand-name { font-size: 18px; }
  .xd-brand-tag { font-size: 11.5px; }
}

/* ---------- Hero ---------- */
.xd-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f3faf6 0%, #eef7f1 100%); }
.xd-hero::before { content: ""; position: absolute; right: -8%; top: -30%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(22, 136, 58, .13), transparent 68%); pointer-events: none; }
.xd-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: 380px; }
.xd-hero-copy { padding: 44px 0; position: relative; z-index: 2; }
.xd-hero-copy h1 { margin: 18px 0 16px; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; }
.xd-hero-copy h1 span { display: block; color: var(--brand); }
.xd-hero-copy p { max-width: 520px; margin: 0 0 26px; font-size: clamp(16px, 1.7vw, 18px); color: var(--text); }
.xd-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.xd-hero-media { position: relative; align-self: stretch; min-height: 280px; }
.xd-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28%); mask-image: linear-gradient(90deg, transparent 0, #000 28%); }
.xd-hero-media.is-empty::after { content: ""; position: absolute; inset: 20px 0 0 0; background:
  linear-gradient(180deg, transparent 55%, rgba(22, 136, 58, .08) 100%),
  repeating-linear-gradient(90deg, rgba(22, 136, 58, .14) 0 22px, transparent 22px 40px);
  -webkit-mask-image: linear-gradient(0deg, #000 0, transparent 85%); mask-image: linear-gradient(0deg, #000 0, transparent 85%); border-radius: 18px; opacity: .55; }
@media (max-width: 800px) {
  .xd-hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .xd-hero-copy { padding: 30px 0 14px; }
  .xd-hero-media { min-height: 220px; margin-inline: -20px; }
  .xd-hero-img { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 25%); mask-image: linear-gradient(180deg, transparent 0, #000 25%); object-position: center 20%; }
  .xd-hero-media.is-empty { min-height: 90px; }
}

/* ---------- Offers strip ---------- */
.xd-strip { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 18px 24px; margin-top: 16px; padding: 16px 26px; border: 1px solid #cfe9d8; border-radius: var(--radius); background: linear-gradient(90deg, #e3f4e8, #eef8f1); }
.xd-strip-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: #fff; }
.xd-strip-title { font-size: 17px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); padding-right: 24px; border-right: 1px solid #c3e2cd; }
.xd-strip-text { color: var(--text); font-weight: 500; }
@media (max-width: 800px) {
  .xd-strip { grid-template-columns: auto 1fr; padding: 16px; gap: 12px 14px; }
  .xd-strip-title { border: 0; padding: 0; text-transform: none; font-size: 17px; }
  .xd-strip-text { grid-column: 2; margin-top: -8px; font-size: 14px; }
  .xd-strip .xd-btn { grid-column: 1 / -1; width: 100%; }
}

/* ---------- Sections ---------- */
.xd-section { margin-top: 44px; }
.xd-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.xd-section-head h2 { margin: 0 0 4px; font-size: clamp(22px, 2.6vw, 28px); }
.xd-section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.xd-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; color: var(--brand-dark); }
.xd-more:hover { text-decoration: underline; }

.xd-cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.xd-cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.xd-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #b9ddc5; }
.xd-cat-icon { color: var(--brand); display: grid; place-items: center; }
.xd-cat-name { color: var(--ink); font-weight: 600; font-size: 15px; text-align: center; }
@media (max-width: 900px) { .xd-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .xd-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .xd-cat { padding: 16px 8px 14px; } .xd-cat:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- Cards ---------- */
.xd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .xd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .xd-grid { grid-template-columns: 1fr; gap: 12px; } }
.xd-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0; }
.xd-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #b9ddc5; }
.xd-card-head { display: flex; align-items: center; gap: 12px; }
.xd-card-head .xd-pill { align-self: flex-start; margin-left: auto; }
.xd-logo-tile { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.xd-logo-tile img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.xd-logo-initial { font-weight: 800; font-size: 22px; color: var(--brand); }
.xd-logo-lg { width: 84px; height: 84px; border-radius: 18px; }
.xd-card-id { min-width: 0; }
.xd-card-id h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.xd-card-id h3 a { color: var(--ink); text-decoration: none; }
.xd-card-id h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.xd-card-cat { display: block; color: var(--muted); font-size: 13.5px; }
.xd-card-text { margin: 0; color: var(--text); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xd-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.xd-chip { display: inline-flex; padding: 5px 11px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; font-weight: 700; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xd-card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-dark); font-weight: 600; font-size: 14px; }

/* ---------- Trust + newsletter ---------- */
.xd-trust-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 30px; }
.xd-trust-row:has(.xd-newsletter) { grid-template-columns: 1.5fr 1fr; }
.xd-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); }
.xd-trust-item { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.4; color: var(--text); }
.xd-trust-item + .xd-trust-item { border-left: 1px solid #c3e2cd; padding-left: 16px; }
.xd-trust-item strong { display: block; color: var(--ink); font-weight: 600; }
.xd-trust-icon { color: var(--brand); display: grid; place-items: center; flex: none; }
.xd-newsletter { padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); }
.xd-newsletter-title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.xd-newsletter input[type="email"], .xd-newsletter input[type="text"] { width: 100%; max-width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.xd-newsletter input[type="submit"], .xd-newsletter button { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; margin-top: 8px; }
@media (max-width: 900px) {
  .xd-trust-row:has(.xd-newsletter) { grid-template-columns: 1fr; }
  .xd-trust { grid-template-columns: 1fr; }
  .xd-trust-item + .xd-trust-item { border-left: 0; padding-left: 0; border-top: 1px solid #c3e2cd; padding-top: 12px; }
}

/* ---------- Blog cards ---------- */
.xd-post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.xd-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.xd-post-thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-alt); overflow: hidden; }
.xd-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xd-post-body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; }
.xd-post-body .xd-pill { align-self: flex-start; }
.xd-post-body h3 { margin: 0; font-size: 18px; }
.xd-post-body h3 a { color: var(--ink); text-decoration: none; }
.xd-post-body h3 a:hover { color: var(--brand-dark); }
.xd-post-body p { margin: 0; color: var(--muted); font-size: 14.5px; }
.xd-post-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--muted); font-size: 13px; }
.xd-post-hero-img { width: 100%; border-radius: var(--radius); margin-bottom: 24px; }

/* ---------- Inner pages ---------- */
.xd-main { min-height: 50vh; }
.xd-page-hero { padding: 30px 0 28px; background: linear-gradient(180deg, #f3faf6, #eef7f1); border-bottom: 1px solid #e0efe5; }
.xd-page-hero h1 { margin: 6px 0 6px; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; font-weight: 800; }
.xd-page-hero p { margin: 0; color: var(--text); max-width: 720px; }
.xd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.xd-crumbs a { color: var(--muted); text-decoration: none; }
.xd-crumbs a:hover { color: var(--brand-dark); }
.xd-listing { padding: 28px 0 64px; }

.xd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.xd-field { display: flex; flex-direction: column; gap: 4px; }
.xd-field-grow { flex: 1 1 220px; }
.xd-field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.xd-filters input[type="search"], .xd-filters select, .xd-prose-card input[type="text"], .xd-prose-card input[type="email"], .xd-prose-card input[type="search"], .xd-prose-card select, .xd-prose-card textarea { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; max-width: 100%; }
.xd-prose-card textarea { height: auto; min-height: 140px; padding: 12px 14px; }
.xd-filters input:focus, .xd-filters select:focus, .xd-prose-card input:focus, .xd-prose-card textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 136, 58, .15); }
.xd-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 500; }
.xd-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.xd-reset { align-self: center; font-size: 14px; }
.xd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.xd-chip-link { display: inline-flex; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.xd-chip-link:hover { border-color: var(--brand); color: var(--brand-dark); }
.xd-chip-link.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.xd-empty { padding: 36px; border: 1px dashed #c9d6cf; border-radius: var(--radius); background: var(--bg-alt); color: var(--muted); text-align: center; }

.navigation.pagination { margin-top: 34px; }
.navigation.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.navigation.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; }
.navigation.pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand-dark); }
.navigation.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

.xd-prose-card { padding: clamp(20px, 3.2vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); min-width: 0; }
.xd-center { text-align: center; max-width: 640px; margin: 20px auto; }
.xd-center-search { display: flex; justify-content: center; margin: 20px 0; }
.entry-content { line-height: 1.8; font-size: 16.5px; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 22px 0; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--bg-alt); }
.entry-content blockquote { margin: 22px 0; padding: 14px 20px; border-left: 4px solid var(--brand); background: var(--brand-softer); border-radius: 0 10px 10px 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

/* ---------- Single coupon ---------- */
.xd-single-head { display: flex; align-items: center; gap: 20px; margin-top: 16px; }
.xd-single-head h1 { margin: 0 0 10px; font-size: clamp(24px, 3.2vw, 34px); }
.xd-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.xd-tag { display: inline-flex; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 13px; font-weight: 500; }
.xd-single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding: 28px 0 64px; }
.xd-notice { margin-bottom: 18px; padding: 12px 16px; border-radius: 10px; background: #fff7e6; border: 1px solid #f3dca3; color: #7a5410; font-size: 14.5px; }
.xd-offer-box { display: grid; gap: 14px; margin-bottom: 26px; padding: 22px; border: 1px solid #cfe9d8; border-radius: var(--radius); background: linear-gradient(180deg, #f3faf6, #eaf6ee); }
.xd-offer-discount { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; color: var(--brand-dark); letter-spacing: -.02em; }
.xd-offer-note { margin: 0; color: var(--text); font-size: 14.5px; }
.xd-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 18px; border: 2px dashed #7fc796; border-radius: 12px; background: #fff; }
.xd-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(18px, 2.6vw, 22px); font-weight: 800; letter-spacing: .06em; color: var(--ink); overflow-wrap: anywhere; }
.xd-terms { margin-top: 30px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.xd-terms h2 { font-size: 18px; margin-top: 20px; color: var(--ink); }
.xd-side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.xd-side-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.xd-side-card h2 { font-size: 17px; margin-bottom: 12px; }
.xd-details { margin: 0; }
.xd-details > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.xd-details dt { color: var(--muted); }
.xd-details dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.xd-fine { margin: 14px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.xd-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.xd-side-list a { color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.xd-side-list a:hover { color: var(--brand-dark); text-decoration: underline; }
@media (max-width: 900px) {
  .xd-single-layout { grid-template-columns: 1fr; }
  .xd-side { position: static; }
  .xd-single-head { gap: 14px; }
  .xd-logo-lg { width: 64px; height: 64px; }
}

/* ---------- Footer ---------- */
.xd-footer { margin-top: 72px; border-top: 1px solid var(--line); background: #fff; }
.xd-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; padding: 40px 0 34px; }
.xd-footer-brand p { margin: 14px 0 0; max-width: 340px; color: var(--muted); font-size: 14.5px; }
.xd-footer-col h2 { margin: 0 0 12px; font-size: 15px; letter-spacing: 0; }
.xd-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.xd-footer-links a { color: var(--text); text-decoration: none; font-size: 14.5px; }
.xd-footer-links a:hover { color: var(--brand-dark); text-decoration: underline; }
.xd-footer-end { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
.xd-social { display: flex; gap: 10px; }
.xd-social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; transition: background .15s, transform .15s; }
.xd-social a:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); }
.xd-copy { margin: 0; font-size: 13px; color: var(--muted); }
.xd-legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 0; font-size: 13px; }
.xd-legal li + li::before { content: "|"; margin: 0 10px; color: #b3bdc9; }
.xd-legal a { color: var(--muted); text-decoration: none; }
.xd-legal a:hover { color: var(--brand-dark); text-decoration: underline; }
@media (max-width: 900px) {
  .xd-footer-grid { grid-template-columns: 1fr 1fr; }
  .xd-footer-brand { grid-column: 1 / -1; }
  .xd-footer-end { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .xd-legal { justify-content: flex-start; }
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .xd-container { width: calc(100% - 32px); }
  .xd-section { margin-top: 34px; }
  .xd-section-head { align-items: flex-start; }
  .xd-hero-actions .xd-btn { flex: 1 1 auto; }
  .xd-filters { padding: 14px; }
  .xd-filters .xd-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
