/* ─── promokodika design for moikursi (scoped) ─────────────────────── */

/* ─── tokens ───────────────────────────────────────────────────────── */
:root {
  --cp-bg: #F0EEF6;
  --cp-surface: #FFFFFF;
  --cp-fg: #242424;
  --cp-muted: #A3A3A3;
  --cp-muted-2: #6C6B6D;
  --cp-border: #E4E3EA;
  --cp-accent: #FDDD33;
  --cp-accent-hover: #F8C533;
  --cp-accent-on: #242424;
  --cp-success: #66C869;
  --cp-warn: #EC6C33;
  --cp-purple: #7B4DF3;
  --cp-star: #F5B333;
  --cp-font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --cp-font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --cp-font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --cp-text-xs: 12px;
  --cp-text-sm: 14px;
  --cp-text-base: 15px;
  --cp-text-md: 16px;
  --cp-text-lg: 18px;
  --cp-text-xl: 21px;
  --cp-text-2xl: 32px;
  --cp-text-3xl: 48px;
  --cp-space-1: 4px;
  --cp-space-2: 8px;
  --cp-space-3: 12px;
  --cp-space-4: 16px;
  --cp-space-5: 20px;
  --cp-space-6: 24px;
  --cp-space-8: 32px;
  --cp-space-10: 40px;
  --cp-space-12: 48px;
  --cp-space-14: 56px;
  --cp-space-16: 64px;
  --cp-radius-xl: 40px;
  --cp-radius-lg: 30px;
  --cp-radius-md: 20px;
  --cp-radius-sm: 15px;
  --cp-radius-pill: 100px;
  --cp-container: 1240px;
  --cp-gutter: 20px;
}

/* ─── base (scoped) ────────────────────────────────────────────────── */
.coupon-scope {
  background: var(--cp-bg);
  color: var(--cp-fg);
  font-family: var(--cp-font-body);
  font-size: var(--cp-text-base);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.coupon-scope img,
.coupon-scope svg { display: block; max-width: 100%; }
.coupon-scope a { color: inherit; text-decoration: none; transition: all 0.3s ease; }
.coupon-scope button { font: inherit; cursor: pointer; transition: all 0.3s ease; }
.coupon-scope p { text-wrap: pretty; margin: 0; }
.coupon-scope h1, .coupon-scope h2, .coupon-scope h3, .coupon-scope h4 { text-wrap: balance; margin: 0; font-family: var(--cp-font-display); }
.coupon-scope ul, .coupon-scope ol { margin: 0; padding: 0; list-style: none; }

.coupon-scope .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.coupon-scope .text-muted { color: var(--cp-muted); }
.coupon-scope .num { font-family: var(--cp-font-mono); font-variant-numeric: tabular-nums; }
.coupon-scope .no-wrap { white-space: nowrap; }

.coupon-scope .container {
  max-width: var(--cp-container);
  margin-inline: auto;
  padding-inline: var(--cp-gutter);
  box-sizing: border-box;
}
.coupon-scope .main-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--cp-space-6);
  align-items: start;
}
.coupon-scope .main-grid > * { min-width: 0; }
.coupon-scope .stack { display: flex; flex-direction: column; }
.coupon-scope .stack > * + * { margin-top: var(--cp-space-2); }

.coupon-scope .h1, .coupon-scope h1 { font-size: var(--cp-text-3xl); font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
.coupon-scope .h2, .coupon-scope h2 { font-size: var(--cp-text-2xl); font-weight: 900; line-height: 1.15; letter-spacing: -0.005em; font-family: 'Montserrat Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.coupon-scope .h3, .coupon-scope h3 { font-size: var(--cp-text-xl); font-weight: 700; line-height: 1.25; }

/* ─── breadcrumbs ──────────────────────────────────────────────────── */
.coupon-scope .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--cp-space-2);
  padding-block: var(--cp-space-5) var(--cp-space-4);
  font-size: var(--cp-text-sm);
  color: var(--cp-muted);
}
.coupon-scope .breadcrumbs a { color: var(--cp-muted-2); }
.coupon-scope .breadcrumbs a:hover { text-decoration: underline; }
.coupon-scope .breadcrumbs .sep { color: var(--cp-muted); margin: 0 2px; font-weight: 500; }
.coupon-scope .breadcrumbs [aria-current="page"] { color: var(--cp-fg); font-weight: 500; }

/* ─── buttons ──────────────────────────────────────────────────────── */
.coupon-scope .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--cp-space-2);
  padding: 16px;
  border-radius: var(--cp-radius-sm);
  border: 1px solid transparent;
  font-family: var(--cp-font-body);
  font-size: var(--cp-text-md);
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}
.coupon-scope .btn-primary {
  background: var(--cp-accent);
  color: var(--cp-accent-on);
  border-color: var(--cp-accent);
}
.coupon-scope .btn-primary:hover { background: var(--cp-accent-hover); border-color: var(--cp-accent-hover); }
.coupon-scope .btn-secondary {
  background: var(--cp-border);
  color: var(--cp-fg);
  border-color: var(--cp-border);
}
.coupon-scope .btn-secondary:hover { background: var(--cp-fg); color: var(--cp-surface); border-color: var(--cp-fg); }
.coupon-scope .btn-big { width: 100%; font-weight: 600; }

/* ─── pills ────────────────────────────────────────────────────────── */
.coupon-scope .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--cp-radius-pill);
  font-size: var(--cp-text-sm);
  font-weight: 500;
  background: var(--cp-bg);
  color: var(--cp-fg);
}
.coupon-scope .pill.is-active { background: var(--cp-fg); color: var(--cp-surface); }
.coupon-scope .pill.is-success { background: var(--cp-success); color: var(--cp-surface); }
.coupon-scope .pill.is-warn { background: var(--cp-warn); color: var(--cp-surface); }
.coupon-scope .pill.is-purple { background: var(--cp-purple); color: var(--cp-surface); }
.coupon-scope .coupon-meta .pill {
  font-size: var(--cp-text-xs);
  font-weight: 600;
  padding: 4px 12px;
  gap: 0;
}

/* ─── cards ────────────────────────────────────────────────────────── */
.coupon-scope .card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-xl);
  padding: var(--cp-space-6) var(--cp-space-5);
}

/* ─── hero ─────────────────────────────────────────────────────────── */
.coupon-scope .store-hero {
  display: flex;
  gap: var(--cp-space-6);
  align-items: flex-start;
  margin-bottom: var(--cp-space-6);
}
.coupon-scope .store-logo img {
  width: 120px;
  height: 120px;
  padding: 10px;
  border-radius: var(--cp-radius-md);
  object-fit: contain;
  background: var(--cp-surface);
  box-sizing: border-box;
  display: block;
}
.coupon-scope .hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cp-space-2);
  margin-bottom: var(--cp-space-3);
}
.coupon-scope .hero-title-main { font-size: var(--cp-text-3xl); font-weight: 900; line-height: 1.1; }
.coupon-scope .hero-title-date { font-size: var(--cp-text-2xl); font-weight: 900; color: var(--cp-muted); margin-left: var(--cp-space-2); font-family: inherit; }
.coupon-scope .hero-desc {
  margin-top: var(--cp-space-3);
  color: var(--cp-muted-2);
  font-size: var(--cp-text-md);
  line-height: 1.6;
  max-width: 70ch;
}
.coupon-scope .hero-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: #8f949e;
}
.coupon-scope .store-hero .hero-summary span { font-size: 13px !important; line-height: 1.45 !important; font-weight: 400; color: #8f949e; }

/* ─── sidebar ──────────────────────────────────────────────────────── */
.coupon-scope .sidebar-card { margin-bottom: var(--cp-space-5); }
.coupon-scope .sidebar-card h3 { font-size: var(--cp-text-lg); font-weight: 700; margin-bottom: var(--cp-space-3); }
.coupon-scope .rating-score { font-size: var(--cp-text-2xl); font-weight: 900; margin-top: var(--cp-space-2); }
.coupon-scope .rating-score strong { color: var(--cp-fg); }
.coupon-scope .rating-stars { color: var(--cp-star); font-size: var(--cp-text-lg); letter-spacing: 2px; margin-top: var(--cp-space-1); }
.coupon-scope .author-row {
  display: flex;
  align-items: center;
  gap: var(--cp-space-3);
  justify-content: space-between;
}
.coupon-scope .author-row img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.coupon-scope .author-link { font-weight: 600; }
.coupon-scope .author-link:hover { color: var(--cp-accent-on); text-decoration: underline; }
.coupon-scope .popular-link, .coupon-scope .category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--cp-space-3) 0;
  border-bottom: 1px solid var(--cp-border);
  font-size: var(--cp-text-md);
  font-weight: 500;
}
.coupon-scope .popular-link:last-child, .coupon-scope .category-link:last-child { border-bottom: none; }
.coupon-scope .popular-link::after { content: '›'; color: var(--cp-muted); font-size: var(--cp-text-sm); }
.coupon-scope .popular-link:hover, .coupon-scope .category-link:hover { color: var(--cp-accent-on); }

/* ─── coupon filters ───────────────────────────────────────────────── */
.coupon-scope .coupon-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cp-space-2);
  margin-bottom: var(--cp-space-5);
}
.coupon-scope .coupon-tabs button {
  padding: 13px 16px;
  border-radius: var(--cp-radius-sm);
  border: none;
  background: transparent;
  color: var(--cp-fg);
  font-family: var(--cp-font-body);
  font-size: var(--cp-text-md);
  font-weight: 500;
  cursor: pointer;
}
.coupon-scope .coupon-tabs button:hover { background: var(--cp-border); }
.coupon-scope .coupon-tabs button.is-active { background: var(--cp-fg) !important; color: var(--cp-surface) !important; }
.coupon-scope .coupon-tabs button .meta { color: var(--cp-muted); font-size: var(--cp-text-sm); margin-left: 4px; }
.coupon-scope .coupon-tabs button.is-active .meta { color: var(--cp-muted); }

/* ─── coupon cards ─────────────────────────────────────────────────── */
.coupon-scope .coupon-list { display: flex; flex-direction: column; }
.coupon-scope .coupon-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: var(--cp-space-5);
  align-items: center;
  margin-bottom: 24px;
  box-sizing: border-box;
  max-width: 100%;
}
.coupon-scope .coupon-value {
  font-size: 20px !important;
  font-weight: 800;
  color: var(--cp-fg);
  text-align: center;
}
.coupon-scope .coupon-value.is-number { font-size: 20px !important; font-weight: 900; }
.coupon-scope .coupon-card .coupon-value .num { font-size: 18px; }
.coupon-scope .store-offer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Обычные карточки купонов */
.coupon-scope .coupon-list:not(.similar-coupons-list) .store-offer-logo img {
  max-width: 90px;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Блок «Акции и промокоды похожих школ» */
.coupon-scope .similar-coupons-list .store-offer-logo img {
  max-width: 90px;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.coupon-scope .coupon-body { display: flex; flex-direction: column; gap: var(--cp-space-2); min-width: 0; }
.coupon-scope .coupon-meta { display: flex; flex-wrap: wrap; gap: var(--cp-space-2); align-items: center; }
.coupon-scope .coupon-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--cp-radius-pill);
  background: var(--cp-bg);
  color: var(--cp-fg);
  font-size: var(--cp-text-xs);
  font-weight: 600;
  flex-shrink: 0;
}
.coupon-scope .coupon-title { font-size: 19px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; }
.coupon-scope .coupon-desc { font-size: var(--cp-text-sm); color: var(--cp-muted); line-height: 1.4; }
.coupon-scope .coupon-action { min-width: 220px; }
.coupon-scope .coupon-action .btn { width: 100%; font-size: 17px; }

.coupon-scope .is-expired-section { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius-xl); padding: var(--cp-space-6) var(--cp-space-5); }
.coupon-scope .coupon-card.is-expired { opacity: 0.6; }
.coupon-scope .coupon-card.is-expired .coupon-title,
.coupon-scope .coupon-card.is-expired .coupon-desc { color: var(--cp-muted); }
.coupon-scope .coupon-card.is-expired .coupon-type-icon { background: #F5F5F5; color: #757575; }

.coupon-scope .related-extra { display: none; }
.coupon-scope .related-extra.is-visible { display: grid; }
.coupon-scope .related-more-btn { width: 100%; margin-top: var(--cp-space-4); font-weight: 600; }

/* ─── brand grid ───────────────────────────────────────────────────── */
.coupon-scope .brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--cp-space-4);
  max-width: 100%;
}
.coupon-scope .brand-tile {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-xl);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: all 0.3s ease;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}
.coupon-scope .brand-tile:hover { border-color: var(--cp-fg); }
.coupon-scope .brand-grid .brand-tile img { max-width: 100%; max-height: 80px; width: auto; height: auto; object-fit: contain; display: block; flex-shrink: 0; }
.coupon-scope .brand-tile-name { font-size: var(--cp-text-xs); font-weight: 600; color: var(--cp-fg); text-align: center; }

/* ─── content card (SEO) ───────────────────────────────────────────── */
.coupon-scope .content-card { padding: var(--cp-space-8) var(--cp-space-6); }
.coupon-scope .content-card,
.coupon-scope .content-card p,
.coupon-scope .content-card ol,
.coupon-scope .content-card ul,
.coupon-scope .content-card li,
.coupon-scope .content-card table,
.coupon-scope .content-card th,
.coupon-scope .content-card td,
.coupon-scope .content-card strong,
.coupon-scope .content-card b { font-family: 'Montserrat Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.coupon-scope .content-card p,
.coupon-scope .content-card ol,
.coupon-scope .content-card ul,
.coupon-scope .content-card li,
.coupon-scope .content-card table,
.coupon-scope .content-card th,
.coupon-scope .content-card td,
.coupon-scope .content-card strong,
.coupon-scope .content-card b { font-size: 15px; }
.coupon-scope .content-card h3,
.coupon-scope .content-card strong,
.coupon-scope .content-card b { font-family: 'Montserrat Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.coupon-scope .content-card h2, .coupon-scope .content-card h3 { margin-bottom: var(--cp-space-3); }
.coupon-scope .content-card p, .coupon-scope .content-card ol, .coupon-scope .content-card ul, .coupon-scope .content-card table { margin-bottom: var(--cp-space-4); color: var(--cp-muted-2); line-height: 1.7; }
.coupon-scope .content-card ol { list-style: decimal inside; padding-left: var(--cp-space-4); }
.coupon-scope .content-card ul { list-style: disc inside; padding-left: var(--cp-space-4); }
.coupon-scope .content-card ol li, .coupon-scope .content-card ul li { display: list-item; margin-bottom: var(--cp-space-2); }
.coupon-scope .content-card table { width: 100%; border-collapse: collapse; }
.coupon-scope .content-card th, .coupon-scope .content-card td { padding: var(--cp-space-3) var(--cp-space-4); text-align: left; border-bottom: 1px solid var(--cp-border); overflow-wrap: break-word; }
.coupon-scope .content-card th { font-weight: 600; color: var(--cp-fg); }
.coupon-scope .content-card .brand-grid { margin-top: var(--cp-space-6); }
.coupon-scope .seo-figure { margin: var(--cp-space-5) 0; }
.coupon-scope .seo-image-wrapper {
  background: var(--cp-bg);
  border-radius: var(--cp-radius-xl);
  padding: var(--cp-space-5);
  display: grid;
  place-items: center;
}
.coupon-scope .seo-image-wrapper img { border-radius: var(--cp-radius-md); max-width: 100%; height: auto; display: block; }
.coupon-scope .seo-caption { text-align: center; font-size: var(--cp-text-sm); color: var(--cp-muted); margin-top: var(--cp-space-2); }

.coupon-scope .table-responsive { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── FAQ ──────────────────────────────────────────────────────────── */
.coupon-scope .faq-section { margin-bottom: var(--cp-space-8); }
.coupon-scope .faq-item {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-xl);
  padding: var(--cp-space-5) var(--cp-space-6);
  margin-bottom: var(--cp-space-4);
}
.coupon-scope .faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  padding: 0;
  color: var(--cp-fg);
  font-family: 'Montserrat Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
}
.coupon-scope .faq-question span { color: var(--cp-muted); font-weight: 400; }
.coupon-scope .faq-answer {
  margin-top: var(--cp-space-3);
  color: var(--cp-muted-2);
  line-height: 1.7;
  display: none;
  font-size: 16px;
  font-family: 'Montserrat Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.coupon-scope .faq-item.is-open .faq-answer { display: block; }

/* ─── modal ────────────────────────────────────────────────────────── */
.coupon-scope .coupon-modal {
  position: fixed;
  inset: 0;
  background: rgba(36, 36, 36, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--cp-space-4);
}
.coupon-scope .coupon-modal.is-open { display: flex; }
.coupon-scope .modal-card {
  background: var(--cp-surface);
  border-radius: var(--cp-radius-xl);
  padding: var(--cp-space-8) var(--cp-space-6);
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0px 10px 60px rgba(0,0,0,0.25);
}
.coupon-scope .modal-card h2 { margin-bottom: var(--cp-space-4); }
.coupon-scope .modal-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--cp-space-4);
  margin: var(--cp-space-6) 0;
  flex-wrap: wrap;
}
.coupon-scope .modal-code strong {
  font-size: var(--cp-text-2xl);
  font-weight: 900;
  letter-spacing: 0.05em;
  background: var(--cp-bg);
  padding: var(--cp-space-3) var(--cp-space-5);
  border-radius: var(--cp-radius-sm);
  border: 1px dashed var(--cp-border);
  color: var(--cp-fg);
}
.coupon-scope .modal-actions { display: flex; gap: var(--cp-space-3); justify-content: center; flex-wrap: wrap; }
.coupon-scope .modal-code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cp-space-3);
  margin: var(--cp-space-5) 0;
  padding: var(--cp-space-3) var(--cp-space-4);
  background: var(--cp-bg);
  border: 1px dashed var(--cp-border);
  border-radius: var(--cp-radius-md);
  font-family: var(--cp-font-mono);
}
.coupon-scope .modal-code-block strong {
  font-size: var(--cp-text-xl);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--cp-fg);
}
.coupon-scope .modal-actions .btn { flex: 1 1 auto; }

/* ─── responsive ───────────────────────────────────────────────────── */
/* ─── stores page: alpha nav ───────────────────────────────────────── */
.coupon-scope .alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cp-space-2);
  margin-bottom: var(--cp-space-8);
}
.coupon-scope .alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--cp-radius-pill);
  background: var(--cp-surface);
  color: var(--cp-fg);
  font-size: var(--cp-text-sm);
  font-weight: 500;
  border: 1px solid var(--cp-border);
  transition: all 0.3s ease;
  text-decoration: none;
}
.coupon-scope .alpha-link:hover {
  background: var(--cp-fg);
  color: var(--cp-surface);
  border-color: var(--cp-fg);
}
.coupon-scope .alpha-link.is-active {
  background: var(--cp-fg) !important;
  color: var(--cp-surface) !important;
  border-color: var(--cp-fg) !important;
}

/* ─── stores page: groups & cards ──────────────────────────────────── */
.coupon-scope .store-group { margin-bottom: var(--cp-space-10); }
.coupon-scope .store-letter-heading {
  font-size: var(--cp-text-2xl);
  font-weight: 900;
  margin-bottom: var(--cp-space-5);
  display: flex;
  align-items: center;
  gap: var(--cp-space-3);
}
.coupon-scope .store-letter-heading span {
  font-size: var(--cp-text-sm);
  font-weight: 500;
  color: var(--cp-muted);
}
.coupon-scope .store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--cp-space-4);
}
.coupon-scope .store-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-xl);
  padding: var(--cp-space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cp-space-3);
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
}
.coupon-scope .store-card:hover {
  border-color: var(--cp-fg);
  transform: translateY(-2px);
}
.coupon-scope .store-card-logo {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: var(--cp-radius-md);
  overflow: hidden;
}
.coupon-scope .store-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.coupon-scope .store-card-name {
  font-size: var(--cp-text-sm);
  font-weight: 600;
  color: var(--cp-fg);
  line-height: 1.3;
}

@media (max-width: 992px) {
  .coupon-scope .main-grid { grid-template-columns: 1fr; }
  .coupon-scope .sidebar-commerce { order: 2; display: flex; flex-direction: column; gap: var(--cp-space-4); max-width: 100%; margin-bottom: var(--cp-space-6); }
  .coupon-scope .sidebar-card { max-width: 100%; min-width: 0; overflow-wrap: break-word; }
  .coupon-scope .sidebar-card { margin-bottom: 0; }
}
@media (max-width: 768px) {
  .coupon-scope .store-hero { flex-direction: column; text-align: center; padding: var(--cp-space-4); }
  .coupon-scope .store-logo { display: none; }
  .coupon-scope .hero-badges { justify-content: center; flex-wrap: nowrap; }
  .coupon-scope .hero-badges .pill { white-space: nowrap; font-size: 12px; padding: 4px 10px; }
  .coupon-scope .hero-title-main { font-size: 24px; }
  .coupon-scope .hero-title-date { font-size: 16px; display: block; margin-left: 0; margin-top: 4px; }
  .coupon-scope .hero-desc { font-size: 14px; }
  .coupon-scope .hero-summary { justify-content: center; font-size: 13px; line-height: 1.45; gap: 8px; margin-top: 8px; }
  .coupon-scope .coupon-tabs { flex-wrap: nowrap; overflow-x: auto; gap: var(--cp-space-2); padding-bottom: var(--cp-space-1); -webkit-overflow-scrolling: touch; }
  .coupon-scope .coupon-tabs button { padding: 10px 12px; font-size: var(--cp-text-sm); white-space: nowrap; }
  .coupon-scope .coupon-card { grid-template-columns: auto 1fr; gap: var(--cp-space-5); padding: var(--cp-space-4); max-width: 100%; }
  .coupon-scope .coupon-body { grid-column: 1 / -1; }
  .coupon-scope .coupon-value { grid-column: 1; grid-row: 2; align-self: center; text-align: left; }
  .coupon-scope .store-offer-logo { grid-column: 1; grid-row: 2; align-self: center; justify-content: flex-start; }
  .coupon-scope .coupon-action { grid-column: 2; width: 100%; min-width: auto; }
  .coupon-scope .coupon-action .btn { width: 100%; }
  .coupon-scope .coupon-card--logo {
    grid-template-columns: 75px 1fr;
    grid-template-areas:
      "logo body"
      "action action";
  }
  .coupon-scope .coupon-card--logo .store-offer-logo {
    grid-area: logo;
    align-self: center;
    justify-content: flex-start;
  }
  .coupon-scope .coupon-card--logo .coupon-body {
    grid-area: body;
  }
  .coupon-scope .coupon-card--logo .coupon-action {
    grid-area: action;
    width: 100%;
    min-width: auto;
  }
  .coupon-scope .is-expired-section .coupon-list {
    display: flex;
    flex-direction: row;
    gap: var(--cp-space-4);
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
  }
  .coupon-scope .is-expired-section .coupon-list::-webkit-scrollbar {
    height: 4px;
  }
  .coupon-scope .is-expired-section .coupon-list::-webkit-scrollbar-track {
    background: transparent;
  }
  .coupon-scope .is-expired-section .coupon-list::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
  }
  .coupon-scope .is-expired-section .coupon-card {
    min-width: 260px;
    max-width: 80vw;
    flex-shrink: 0;
    scroll-snap-align: start;
    margin-bottom: 0;
  }
  .coupon-scope .sidebar-commerce { grid-template-columns: 1fr; }
  .coupon-scope .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .coupon-scope .content-card { margin: var(--cp-space-3) 16px var(--cp-space-5); padding: var(--cp-space-4); }
  .coupon-scope .alpha-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--cp-space-2); -webkit-overflow-scrolling: touch; }
  .coupon-scope .store-grid { grid-template-columns: repeat(2, 1fr); }
  .coupon-scope .store-letter-heading { font-size: var(--cp-text-xl); }
}
@media (max-width: 576px) {
  .coupon-scope .hero-title-main { font-size: 22px; }
  .coupon-scope .hero-title-date { font-size: 16px; }
  .coupon-scope .coupon-card { padding: var(--cp-space-4); }
  .coupon-scope .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .coupon-scope .store-grid { grid-template-columns: repeat(2, 1fr); gap: var(--cp-space-3); }
  .coupon-scope .store-card { padding: var(--cp-space-4); }
  .coupon-scope .store-card-logo { width: 72px; height: 72px; }
  .coupon-scope .store-card-name { font-size: var(--cp-text-xs); }
}
/* ─── rating ───────────────────────────────────────────────────────── */
.coupon-scope .mkc-rating { margin-bottom: 12px; }
.coupon-scope .mkc-rating-stars { font-size: 24px; color: var(--cp-star); cursor: pointer; font-family: Arial, "Segoe UI", sans-serif; font-variant-emoji: text; }
.coupon-scope .mkc-rating.has-voted .mkc-rating-stars { cursor: default; }
.coupon-scope .mkc-rating-star { transition: transform .15s; display: inline-block; padding: 0 2px; }
.coupon-scope .mkc-rating-star:hover { transform: scale(1.2); }

/* ─── header search ────────────────────────────────────────────────── */
.coupon-scope .mkc-header-search { position: relative; }
.coupon-scope .mkc-header-search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}
.coupon-scope .mkc-header-search-results ul { list-style: none; margin: 0; padding: 4px 0; }
.coupon-scope .mkc-header-search-results li a {
  display: block;
  padding: 8px 12px;
  color: var(--cp-fg);
  text-decoration: none;
  font-size: 14px;
}
.coupon-scope .mkc-header-search-results li a:hover { background: var(--cp-surface); }
