/* ==========================================================================
   KouponWorld – main stylesheet
   Palette: primary purple #5b21b6, accent orange #f97316
   ========================================================================== */

:root {
  --primary: #5b21b6;
  --primary-dark: #4c1d95;
  --primary-light: #7c3aed;
  --primary-soft: #ede9fe;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-soft: #ffedd5;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --text: #1e1b2e;
  --text-muted: #6b6880;
  --text-light: #9794a8;
  --bg: #ffffff;
  --bg-alt: #f7f5fd;
  --bg-soft: #faf9ff;
  --border: #e6e2f3;
  --border-strong: #d4cde9;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 27, 46, .05), 0 2px 8px rgba(30, 27, 46, .04);
  --shadow: 0 8px 24px rgba(91, 33, 182, .08);
  --shadow-lg: 0 20px 50px rgba(91, 33, 182, .16);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1200px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, button, select, textarea { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }

.visually-hidden, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 10px; left: 10px; width: auto; height: auto; margin: 0; padding: 10px 16px;
  clip: auto; background: var(--primary); color: #fff; border-radius: var(--radius-sm); z-index: 1000;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(249, 115, 22, .3); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--primary); }
.btn-ghost-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-deal { background: var(--success); color: #fff; }
.btn-deal:hover { background: #15803d; color: #fff; }
.btn.is-disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: var(--radius-pill); font-size: .74rem; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
}
.badge-verified { background: var(--success-soft); color: var(--success); }
.badge-hot { background: var(--accent-soft); color: var(--accent-dark); }
.badge-expired { background: var(--danger-soft); color: var(--danger); }
.badge-soft { background: var(--primary-soft); color: var(--primary); }

.search-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-block; padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); font-weight: 500; font-size: .9rem;
  transition: all .15s;
}
.pill:hover, .pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Announcement ---------- */
.announcement-bar { background: var(--accent); color: #fff; font-size: .88rem; font-weight: 600; text-align: center; padding: 8px 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--primary); white-space: nowrap; }
.logo span { color: var(--accent); }
.logo-light { color: #fff; }

.header-search { position: relative; flex: 1; display: flex; align-items: center; max-width: 520px; }
.header-search .search-icon { position: absolute; left: 14px; color: var(--text-light); pointer-events: none; }
.header-search input {
  width: 100%; padding: 11px 110px 11px 42px; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  background: var(--bg-alt); outline: none; transition: border-color .15s, background .15s;
}
.header-search input:focus { border-color: var(--primary); background: #fff; }
.header-search input::-webkit-search-cancel-button { display: none; }
.btn-search { position: absolute; right: 4px; padding: 8px 16px; border-radius: var(--radius-pill); }

.search-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; max-height: 420px; overflow-y: auto; z-index: 200;
}
.suggest-group { padding: 8px 10px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: .92rem; }
.suggest-item:hover, .suggest-item:focus, .suggest-item.is-active { background: var(--primary-soft); color: var(--primary); outline: none; }
.suggest-item .store-avatar { width: 28px; height: 28px; font-size: .8rem; }
.suggest-item small { margin-left: auto; color: var(--text-light); font-size: .78rem; }
.suggest-empty { padding: 14px 10px; color: var(--text-muted); font-size: .9rem; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .9rem; }
.nav-link:hover, .nav-link.active { background: var(--primary-soft); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.account-menu { position: relative; }
.account-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; z-index: 200;
}
.account-email { font-size: .85rem; color: var(--text-muted); margin-bottom: 12px; word-break: break-all; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: 32px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 4px; }
.section-head-center { flex-direction: column; align-items: center; text-align: center; }
.section-sub { color: var(--text-muted); margin: 0; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.section-link:hover svg { transform: translateX(3px); }
.section-link svg { transition: transform .15s; }
.section-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 12px; font-weight: 700; }
.trending-searches { padding: 26px 0 10px; }

.empty-state {
  text-align: center; padding: 44px 24px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  color: var(--text-muted); background: var(--bg-soft);
}
.empty-state svg { margin: 0 auto 14px; color: var(--primary-light); opacity: .7; }
.empty-state p { margin: 0; }
.empty-state h1 { color: var(--text); font-size: 1.6rem; }
.empty-state .btn { margin-top: 18px; }
.empty-state code { background: #fff; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }

.page-hero { background: linear-gradient(135deg, var(--primary-soft), #fff 60%, var(--accent-soft)); padding: 44px 0; border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .search-pills { margin-top: 20px; }
.store-hero-inner { display: flex; align-items: center; gap: 24px; }
.store-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(249,115,22,.35), transparent 60%),
              linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  padding: 72px 0 80px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 26px 26px;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: .82rem; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 14px; }
.hero-sub { font-size: 1.1rem; opacity: .9; max-width: 560px; margin-bottom: 26px; }
.hero-search { position: relative; display: flex; align-items: center; max-width: 580px; margin-bottom: 18px; }
.hero-search .search-icon { position: absolute; left: 18px; color: var(--text-light); }
.hero-search input {
  width: 100%; padding: 17px 140px 17px 50px; border: 0; border-radius: var(--radius-pill); font-size: 1rem;
  box-shadow: var(--shadow-lg); outline: none; color: var(--text);
}
.hero-search .btn { position: absolute; right: 6px; border-radius: var(--radius-pill); padding: 12px 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-cta .btn-primary { background: #fff; color: var(--primary); }
.hero-cta .btn-primary:hover { background: var(--primary-soft); }
.hero-cta .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.hero-cta .btn-outline:hover { background: rgba(255,255,255,.14); }
.hero-stats { display: flex; gap: 36px; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.hero-stats span { font-size: .85rem; opacity: .8; }

.hero-art { position: relative; height: 380px; }
.hero-card {
  position: absolute; background: #fff; color: var(--text); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px; animation: float 6s ease-in-out infinite;
}
.hero-card-1 { top: 20px; left: 10%; width: 260px; }
.hero-card-2 { top: 170px; right: 0; width: 230px; animation-delay: -2s; }
.hero-card-3 { bottom: 10px; left: 0; flex-direction: row; align-items: center; gap: 12px; padding: 14px 18px; font-weight: 600; font-size: .92rem; animation-delay: -4s; }
.hero-card-tag { font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--accent-dark); }
.hero-card-store { font-weight: 700; font-size: 1.05rem; }
.hero-card-code {
  align-self: flex-start; margin-top: 6px; padding: 7px 12px; border: 1.5px dashed var(--primary); border-radius: var(--radius-sm);
  background: var(--primary-soft); color: var(--primary); font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .08em;
}
.hero-card-check { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--success); color: #fff; flex-shrink: 0; }
/* ---------- Hero slider ---------- */
.hero-slider { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 10; background: var(--primary-dark); }
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; display: flex; align-items: flex-end; opacity: 0; transition: opacity .6s ease; pointer-events: none;
  background: linear-gradient(135deg, var(--slide-bg, #5b21b6), color-mix(in srgb, var(--slide-bg, #5b21b6) 55%, #f97316)); background-size: cover; background-position: center;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 6, 30, .82) 0%, rgba(10, 6, 30, .35) 55%, transparent 100%); }
.hero-slide-content { position: relative; padding: 28px; color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 90%; }
.hero-slide-sub { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fed7aa; }
.hero-slide-title { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.2; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.hero-slide .btn { margin-top: 4px; }
.hero-slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.85); color: var(--primary); font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s, background .2s;
}
.hero-slider:hover .hero-slider-btn, .hero-slider:focus-within .hero-slider-btn { opacity: 1; }
.hero-slider-btn:hover { background: #fff; }
.hero-slider-btn.prev { left: 12px; } .hero-slider-btn.next { right: 12px; }
.hero-slider-dots { position: absolute; right: 18px; top: 16px; z-index: 2; display: flex; gap: 6px; }
.hero-slider-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); transition: all .2s; }
.hero-slider-dots button.is-active { background: #fff; width: 22px; border-radius: 5px; }
.category-icon-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.category-icon-img { background: #fff; border: 1px solid var(--border); padding: 6px; }
.deal-media-fallback .store-logo, .deal-media-fallback .store-avatar { width: 84px; height: 84px; border-radius: 22px; background: #fff; color: var(--primary); font-size: 2.4rem; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.store-logo.logo-sm { width: 34px; height: 34px; padding: 3px; border-radius: 9px; }
.store-logo.logo-lg { width: 64px; height: 64px; border-radius: 18px; }
.store-logo.logo-xl { width: 92px; height: 92px; border-radius: 24px; }
.coupon-store .store-logo { width: 34px; height: 34px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Store cards ---------- */
.store-avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); flex-shrink: 0;
}
.avatar-sm { width: 34px; height: 34px; font-size: .95rem; border-radius: 9px; }
.avatar-md { width: 56px; height: 56px; font-size: 1.4rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 18px; }
.avatar-xl { width: 92px; height: 92px; font-size: 2.4rem; border-radius: 24px; }
.store-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: #fff; border: 1px solid var(--border); padding: 6px; }
.coupon-store .store-logo { width: 34px; height: 34px; padding: 3px; border-radius: 9px; }
.store-hero-inner .store-logo { width: 92px; height: 92px; }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.store-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: all .18s;
}
.store-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-light); color: var(--text); }
.store-card .store-avatar, .store-card .store-logo { margin-bottom: 6px; }
.store-name { font-weight: 700; }
.store-cat { font-size: .78rem; color: var(--text-light); }
.store-count { font-size: .82rem; color: var(--primary); font-weight: 600; }

.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.brand-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 10px; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: all .18s;
}
.brand-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); }
.brand-name { font-weight: 700; font-size: .95rem; }
.brand-count { font-size: .78rem; color: var(--text-muted); }

/* ---------- Category cards ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 12px; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-weight: 600; transition: all .18s;
}
.category-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); }
.category-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 16px;
  background: var(--primary-soft); color: var(--primary);
}
.category-card:hover .category-icon { background: var(--accent-soft); color: var(--accent-dark); }
.category-icon-lg { width: 72px; height: 72px; margin-bottom: 14px; }

/* ---------- Coupon cards ---------- */
.coupon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.coupon-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: all .18s;
}
.coupon-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.coupon-card.is-expired { opacity: .65; background: var(--bg-soft); }
.coupon-scissors {
  position: absolute; left: -1px; top: 50%; width: 10px; height: 20px; margin-top: -10px; background: var(--bg); border: 1px solid var(--border); border-left: 0;
  border-radius: 0 10px 10px 0;
}
.section-alt .coupon-scissors { background: var(--bg-alt); }
.coupon-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coupon-store { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: .9rem; }
.coupon-store:hover { color: var(--primary); }
.coupon-title { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.coupon-desc { margin: 0; font-size: .88rem; color: var(--text-muted); }
.coupon-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--text-light); margin-top: auto; }
.text-expired { color: var(--danger); font-weight: 600; }
.coupon-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.code-box {
  display: flex; align-items: stretch; flex: 1; min-width: 0; border: 1.5px dashed var(--primary); border-radius: var(--radius-sm); overflow: hidden; background: var(--primary-soft);
}
.code-box.is-disabled { border-color: var(--border-strong); background: var(--bg-alt); }
.code-value {
  flex: 1; display: flex; align-items: center; padding: 10px 14px; font-weight: 700; letter-spacing: .1em; color: var(--primary); font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.code-box.is-disabled .code-value { color: var(--text-light); text-decoration: line-through; }
.btn-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; white-space: nowrap; transition: background .15s;
}
.btn-copy:hover { background: var(--primary-dark); }
.btn-copy:disabled { background: var(--border-strong); cursor: not-allowed; }
.btn-copy.is-copied { background: var(--success); }
.coupon-actions .btn-deal { flex: 1; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 32px; }

/* ---------- Deal cards ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.deal-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .18s; }
.deal-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.deal-card.is-expired { opacity: .65; }
.deal-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-alt); }
.deal-media img { width: 100%; height: 100%; object-fit: cover; }
.deal-media-fallback {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 3rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
}
.deal-badge { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .04em; z-index: 1; }
.deal-body { display: flex; flex-direction: column; gap: 6px; padding: 18px; flex: 1; }
.deal-store { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.deal-title { margin: 0; font-size: 1.02rem; }
.deal-desc { margin: 0; font-size: .86rem; color: var(--text-muted); }
.deal-pricing { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.price-old { color: var(--text-light); text-decoration: line-through; font-size: .9rem; }
.price-now { color: var(--success); font-weight: 800; font-size: 1.25rem; }
.deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: .8rem; color: var(--text-light); }

/* ---------- Promo banner ---------- */
.promo-banner {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 30px; padding: 48px;
  border-radius: 24px; color: #fff; background: linear-gradient(120deg, var(--primary-dark), var(--primary) 50%, var(--accent-dark));
}
.promo-eyebrow { display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(255,255,255,.18); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.promo-banner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.promo-banner p { opacity: .9; max-width: 520px; }
.promo-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.promo-banner-art { position: relative; height: 200px; }
.promo-coin {
  position: absolute; right: 60px; top: 30px; width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 900; color: var(--accent-dark); background: linear-gradient(145deg, #fde68a, var(--accent)); box-shadow: 0 20px 40px rgba(0,0,0,.25);
  animation: float 5s ease-in-out infinite;
}
.promo-ring { position: absolute; right: 10px; top: -20px; width: 240px; height: 240px; border-radius: 50%; border: 18px solid rgba(255,255,255,.1); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.blog-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: all .18s; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.blog-media-fallback { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); color: var(--primary); }
.blog-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.blog-body h2, .blog-body h3 { font-size: 1.1rem; margin: 0; }
.blog-body p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.blog-meta { font-size: .8rem; color: var(--text-light); }
.breadcrumb { font-size: .85rem; color: var(--text-light); margin-bottom: 20px; }
.post-title { margin-bottom: 8px; }
.post-image { width: 100%; border-radius: var(--radius); margin: 24px 0; }
.post-content { font-size: 1.05rem; line-height: 1.8; margin-top: 24px; }
.post-back { margin-top: 36px; }

/* ---------- Newsletter ---------- */
.newsletter-box {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 30px; padding: 44px; border-radius: 24px;
  background: var(--accent-soft); border: 1px solid #fed7aa;
}
.newsletter-text h2 { margin-bottom: 6px; }
.newsletter-text p { margin: 0; color: var(--text-muted); }
.newsletter-form { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input { flex: 1; min-width: 220px; padding: 14px 18px; border: 1.5px solid #fed7aa; border-radius: var(--radius-sm); background: #fff; outline: none; }
.newsletter-form input:focus { border-color: var(--accent); }
.form-msg { width: 100%; margin: 4px 0 0; font-size: .88rem; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-sm); }
.form-msg.is-success { background: var(--success-soft); color: var(--success); }
.form-msg.is-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 20px; }
.faq-item summary { cursor: pointer; padding: 18px 30px 18px 0; font-weight: 700; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-answer { padding: 0 0 18px; color: var(--text-muted); }
.faq-answer p { margin: 0; }

/* ---------- Static pages ---------- */
.page-content { font-size: 1.02rem; line-height: 1.75; }
.page-content h2 { font-size: 1.35rem; margin-top: 36px; }
.page-content h3 { margin-top: 24px; }
.page-content ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.page-content li { margin-bottom: 6px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-item .category-icon { width: 46px; height: 46px; flex-shrink: 0; }
.contact-info-item strong { display: block; }
.contact-info-item span { color: var(--text-muted); font-size: .92rem; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.form-card label, .auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; margin-bottom: 16px; }
.form-card input, .form-card textarea, .auth-form input {
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-weight: 400; outline: none; transition: border-color .15s; width: 100%;
}
.form-card input:focus, .form-card textarea:focus, .auth-form input:focus { border-color: var(--primary); }
.form-card textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.search-group-title { margin: 28px 0 16px; font-size: 1.2rem; }

/* ---------- Footer ---------- */
.site-footer { background: #17142a; color: #c9c5dc; padding: 60px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 36px; }
.footer-col h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #c9c5dc; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-about p { font-size: .92rem; margin: 14px 0 20px; max-width: 320px; }
.social-links { display: flex; gap: 10px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; transition: background .15s; }
.social-links a:hover { background: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; font-size: .82rem; color: #8f8aa8; }
.footer-bottom p { margin: 0 0 6px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(23, 20, 42, .6); backdrop-filter: blur(4px); }
.modal { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto; animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-alt); font-size: 1.4rem; line-height: 1; color: var(--text-muted); }
.modal-close:hover { background: var(--primary-soft); color: var(--primary); }
.modal-tabs { display: flex; gap: 6px; background: var(--bg-alt); padding: 5px; border-radius: var(--radius-sm); margin-bottom: 24px; }
.modal-tab { flex: 1; padding: 10px; border: 0; border-radius: 7px; background: transparent; font-weight: 700; color: var(--text-muted); }
.modal-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.modal-title { font-size: 1.4rem; margin-bottom: 4px; }
.modal-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 20px; }
.auth-form .form-msg { margin-top: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 600; padding: 12px 20px; border-radius: var(--radius-pill);
  background: var(--text); color: #fff; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-success { background: var(--success); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-slider { max-width: 640px; aspect-ratio: 16 / 9; order: -1; margin-bottom: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .promo-banner { grid-template-columns: 1fr; }
  .promo-banner-art { display: none; }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding: 10px 0; }
  .nav-toggle { display: flex; order: 0; }
  .logo { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .main-nav { order: 4; display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; margin: 0; padding: 6px 0 8px; border-top: 1px solid var(--border); }
  .main-nav.is-open { display: flex; }
  .nav-link { padding: 12px 10px; }
  .newsletter-box { grid-template-columns: 1fr; padding: 30px; }
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 56px; }
  .hero-slider { aspect-ratio: 4 / 3; border-radius: 16px; }
  .hero-slider-btn { opacity: 1; width: 34px; height: 34px; }
  .hero-slide-content { padding: 18px; }
  .hero-search input { padding-right: 18px; }
  .hero-search .btn { position: static; margin-top: 10px; width: 100%; }
  .hero-search { flex-direction: column; align-items: stretch; }
  .hero-search .search-icon { top: 18px; }
  .hero-stats { gap: 20px; }
  .hero-stats strong { font-size: 1.3rem; }
  .header-actions .btn { padding: 9px 12px; font-size: .85rem; }
  .btn-search span, .btn-search { padding: 8px 12px; font-size: .85rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .store-hero-inner { flex-direction: column; text-align: center; }
  .store-hero-meta { justify-content: center; }
  .modal { padding: 26px 20px; }
  .promo-banner { padding: 30px 22px; }
  .coupon-grid, .deal-grid, .blog-grid { grid-template-columns: 1fr; }
}
