/* ==========================================================================
   Frontend stylesheet — The Alpha Picks
   Built entirely on tokens.css custom properties. No hardcoded colors here.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  margin: 0 0 var(--space-3);
  line-height: 1.3;
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) 0;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: var(--color-heading);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo span {
  color: var(--color-primary);
}

.site-search {
  display: flex;
  align-items: stretch;
  flex: 1;
  max-width: 360px;
  margin: 0 var(--space-6);
}

.site-search__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  padding: 0 var(--space-4);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
}

.site-search__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.site-search__button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  border: 1px solid var(--color-primary);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  cursor: pointer;
}

.site-search__button:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  color: var(--color-text);
  font-weight: 700;
  font-size: 15px;
}

.site-nav a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--color-heading);
  color: var(--color-footer-text);
  margin-top: var(--space-10);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-6);
  padding: var(--space-10) 0 var(--space-6);
}

.site-footer__brand .site-logo {
  color: var(--color-text-inverse);
}

.site-footer__brand .site-logo span {
  color: var(--color-primary);
}

.site-footer__tagline {
  color: var(--color-footer-text-muted);
  font-size: 14px;
  margin-top: var(--space-3);
}

.footer-col__title {
  color: var(--color-text-inverse);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: var(--space-3);
}

.footer-col a {
  color: var(--color-footer-link);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--color-text-inverse);
  text-decoration: none;
}

.site-footer__bottom {
  border-top: 1px solid var(--color-footer-border);
  padding: var(--space-4) 0;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Page shell                                                              */
/* ---------------------------------------------------------------------- */

.page-main {
  padding: var(--space-6) 0 var(--space-10);
}

.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* ---------------------------------------------------------------------- */
/* Homepage hero                                                           */
/* ---------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: var(--space-8) 0 var(--space-6);
}

.hero h1 {
  font-size: 34px;
  margin-bottom: var(--space-3);
}

.hero p {
  color: var(--color-text-muted-2);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-8);
  font-size: 14px;
  color: var(--color-text-muted-2);
}

.trust-strip__check {
  color: var(--color-primary);
  font-weight: 900;
}

.trust-strip__sep {
  color: var(--color-border);
  margin-right: var(--space-2);
}

.section-view-all {
  display: block;
  text-align: center;
  margin-top: var(--space-5);
  font-weight: 700;
  font-size: 14px;
}

.newsletter {
  text-align: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  padding: var(--space-8) var(--space-5);
  margin-bottom: var(--space-8);
}

.newsletter h2 {
  margin-bottom: var(--space-2);
}

.newsletter p {
  color: var(--color-text-muted-2);
  max-width: 480px;
  margin: 0 auto var(--space-5);
}

.newsletter__form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  max-width: 420px;
  margin: 0 auto;
}

.newsletter__form[hidden] {
  display: none;
}

.newsletter__input {
  flex: 1;
  min-width: 200px;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
}

.newsletter__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.newsletter__submit {
  flex-shrink: 0;
  height: 44px;
  padding: 0 var(--space-6);
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.newsletter__submit:hover {
  background: var(--color-primary-dark);
}

.newsletter__message {
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--space-4);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.section-heading h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.section-heading a {
  font-size: 14px;
  font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/* Category grid                                                           */
/* ---------------------------------------------------------------------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-sm);
  padding: var(--space-5) var(--space-4);
  color: var(--color-text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.category-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.category-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-circle);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
}

.category-card__image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-surface);
  padding: var(--space-1);
}

.category-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-heading);
}

/* ---------------------------------------------------------------------- */
/* Store header                                                            */
/* ---------------------------------------------------------------------- */

.store-header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

.store-logo {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-surface);
  padding: var(--space-2);
  flex-shrink: 0;
}

.store-logo-fallback {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-circle);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 900;
  flex-shrink: 0;
}

.store-header h1 {
  font-size: 28px;
  margin-bottom: var(--space-2);
}

.store-short-description {
  margin: var(--space-3) 0 0;
  color: var(--color-text-muted-2);
  font-size: 15px;
}

/* Rating + "Last Checked" merged into one wrapping line. */
.store-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: 13px;
}

.store-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.store-rating__stars {
  position: relative;
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--color-border);
}

.store-rating__stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--color-warning-text);
}

.store-rating__score {
  font-weight: 700;
  color: var(--color-heading);
  font-size: 14px;
}

.store-rating__votes {
  color: var(--color-text-muted);
  font-size: 13px;
}

.store-last-checked {
  color: var(--color-text-muted-2);
}

.store-last-checked::before {
  content: "\2022";
  color: var(--color-border);
  margin-right: var(--space-2);
}

.store-last-checked__icon {
  color: var(--color-primary);
  font-weight: 900;
}

/* ---------------------------------------------------------------------- */
/* Stats — one compact wrapping line instead of 3 big cards.               */
/* ---------------------------------------------------------------------- */

.store-stats-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-2) 0 0;
  font-size: 14px;
  color: var(--color-text-muted-2);
}

.store-stats-line__sep {
  color: var(--color-border);
}

/* ---------------------------------------------------------------------- */
/* Offer filter tabs                                                       */
/* ---------------------------------------------------------------------- */

.offer-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.offer-tab {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  font-size: 14px;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.offer-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.offer-tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ---------------------------------------------------------------------- */
/* Offer list / cards                                                      */
/* ---------------------------------------------------------------------- */

.offer-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.offer-card {
  display: flex;
  align-items: stretch;
  gap: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-sm);
  padding: var(--space-4) var(--space-5);
}

.offer-card.is-hidden {
  display: none;
}

/* Fixed width (not a min/max range) so this column is IDENTICAL across
   every card — otherwise a long badge like "FREE MIGRATION" wrapping to 2
   lines forces a wider column than a short one like "15% OFF", pushing
   .offer-body to a different x-position per card. align-items: stretch on
   .offer-card (above) plus the flex column + justify-content: center here
   make the border-right divider always span the card's real height,
   whether the badge text is 1 or 2 lines. */
.offer-discount {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  width: 130px;
  text-align: center;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.25;
  color: var(--color-primary);
  border-right: 1px dashed var(--color-border);
  padding-right: var(--space-4);
  overflow-wrap: break-word;
}

/* Applied when the badge text is unusually long (3+ words) so it still
   fits the fixed-width column without looking oversized. */
.offer-discount.offer-badge--long {
  font-size: 16px;
}

.offer-body {
  flex: 1;
  min-width: 0;
}

.offer-type {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Mini store badge — shown on multi-store listings like /deals, where each
   card needs to identify which store the offer belongs to. */
.offer-card__store {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted-2);
}

.offer-card__store:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.offer-card__store-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-surface);
  padding: 2px;
}

.offer-card__store-logo-fallback {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-circle);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.offer-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 11px;
  text-transform: none;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
}

.offer-verified::before {
  content: "\2713";
  font-weight: 900;
}

.offer-badge-top {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

.offer-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-heading);
  margin: var(--space-1) 0 0;
}

.offer-description {
  font-size: 14px;
  color: var(--color-text-muted-2);
  margin: var(--space-1) 0 0;
}

.offer-action {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  width: 180px;
  height: 42px;
}

.offer-action .btn {
  display: block;
  width: 100%;
  text-align: center;
  height: 42px;
  line-height: 42px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.btn-get-deal {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
}

.btn-get-deal:hover {
  background: var(--color-primary-dark);
  color: var(--color-text-inverse);
  text-decoration: none;
}

/* The code sits dashed-bordered underneath the button, full width of
   .offer-action — normally almost entirely covered by the button, which
   stops 12px short of the right edge so a sliver stays visible. */
.offer-code-peek {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-1);
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  overflow: hidden;
  white-space: nowrap;
}

/* "Get Code" button — a folded paper corner, not a torn/jagged edge.
   Measured pixel-for-pixel off the reference button's own icon (170x40):
   the outer silhouette (the cut against the code underneath) is one
   smooth curve from the top-right down to the bottom-right corner. A
   second, inner curve — bulging further inward around mid-height before
   rejoining the outer curve near the bottom — marks where the folded
   flap's shaded underside (::before, --color-primary-dark) shows
   between it and the bright face (this element's own background,
   --color-primary). The button stops a fixed 32px short of the
   container's right edge (wide enough that the last 2 code characters
   are always readable) and slides to 48px on hover (revealing 3). */
.btn-get-code {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 32px;
  width: auto;
  height: auto;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary-dark);
  color: var(--color-text-inverse);
  clip-path: polygon(
    0 0,
    calc(100% - 31px) 0,
    calc(100% - 27px) 4px,
    calc(100% - 24px) 8px,
    calc(100% - 21px) 12px,
    calc(100% - 18px) 16px,
    calc(100% - 14px) 20px,
    calc(100% - 11px) 24px,
    calc(100% - 8px) 28px,
    calc(100% - 5px) 32px,
    calc(100% - 1px) 36px,
    100% 42px,
    100% 100%,
    0 100%
  );
  transition: left 0.2s ease, right 0.2s ease;
}

.btn-get-code__label {
  position: relative;
  z-index: 1;
}

.btn-get-code::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  clip-path: polygon(
    0 0,
    calc(100% - 31px) 0,
    calc(100% - 34px) 4px,
    calc(100% - 37px) 8px,
    calc(100% - 40px) 12px,
    calc(100% - 42px) 16px,
    calc(100% - 35px) 20px,
    calc(100% - 27px) 24px,
    calc(100% - 19px) 28px,
    calc(100% - 11px) 32px,
    calc(100% - 1px) 36px,
    100% 42px,
    100% 100%,
    0 100%
  );
}

.btn-get-code:hover {
  left: -16px;
  right: 48px;
  color: var(--color-text-inverse);
  text-decoration: none;
}

.offer-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-8) 0;
  font-size: 15px;
}

/* ---------------------------------------------------------------------- */
/* Get Code modal                                                          */
/* ---------------------------------------------------------------------- */

.code-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.code-modal-overlay.is-open {
  display: flex;
}

.code-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border-top: 6px solid var(--color-primary);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.code-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.code-modal__close:hover {
  opacity: 1;
  color: var(--color-text);
}

.code-modal__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-align: left;
  padding: var(--space-5) var(--space-6) 0;
}

.code-modal__logo,
.code-modal__logo-fallback {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-circle);
  flex-shrink: 0;
}

.code-modal__logo {
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-modal__logo img {
  max-width: 48px;
  max-height: 48px;
  border-radius: var(--radius-circle);
}

.code-modal__logo-fallback {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
}

.code-modal__offer-name {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-heading);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.code-modal__body {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.code-modal__copy-line {
  text-align: center;
  margin: 0 0 var(--space-4);
  font-size: 15px;
  color: var(--color-text);
}

.code-modal__copy-line:hover .code-modal__store-name {
  text-decoration: underline;
}

.code-modal__store-name {
  color: var(--color-primary);
  font-weight: 700;
}

.code-modal__code-box {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 48px;
  max-width: 300px;
  margin: 0 auto var(--space-5);
}

.code-modal__code-value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--color-primary);
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 0 var(--space-3);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--color-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-modal__copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 0 var(--space-4);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.code-modal__copy-btn:hover {
  background: var(--color-primary-dark);
}

.code-modal__copy-btn .copy-label {
  display: none;
}

.code-modal__copy-btn.is-copied {
  background: var(--color-primary-dark);
}

.code-modal__copy-btn.is-copied .copy-icon {
  display: none;
}

.code-modal__copy-btn.is-copied .copy-label {
  display: inline;
}

.code-modal__more-link {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.code-modal__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.code-modal__footer .site-logo {
  font-size: 16px;
}

/* ---------------------------------------------------------------------- */
/* Content sections (about / how-to-apply / FAQ)                           */
/* ---------------------------------------------------------------------- */

.content-section {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

.content-section h2 {
  font-size: 21px;
  margin-bottom: var(--space-4);
}

.content-section .prose {
  color: var(--color-text);
  font-size: 15px;
}

.content-section .prose p {
  margin-bottom: var(--space-4);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-heading);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin: var(--space-3) 0 0;
  color: var(--color-text-muted-2);
  font-size: 14px;
}

/* ---------------------------------------------------------------------- */
/* Blog post (single)                                                      */
/* ---------------------------------------------------------------------- */

.post-thumbnail {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
}

.post-header h1 {
  font-size: 30px;
  margin-bottom: var(--space-2);
}

.post-meta {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: var(--space-5);
}

.post-related {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-6);
}

.post-related:hover {
  text-decoration: none;
  color: var(--color-primary-dark);
}

.post-content {
  font-size: 16px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------------- */
/* Blog listing grid                                                       */
/* ---------------------------------------------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-sm);
  overflow: hidden;
  color: var(--color-text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.post-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.post-card__thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card__body {
  padding: var(--space-4);
}

.post-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__excerpt {
  font-size: 14px;
  color: var(--color-text-muted-2);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__date {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------- */
/* Store grid (category page)                                              */
/* ---------------------------------------------------------------------- */

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-sm);
  padding: var(--space-5) var(--space-4);
  color: var(--color-text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.store-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.store-card__logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-surface);
  padding: var(--space-2);
}

.store-card__logo-fallback {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-circle);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
}

.store-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-heading);
}

.store-card__offer {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
}

/* ---------------------------------------------------------------------- */
/* Pagination                                                              */
/* ---------------------------------------------------------------------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-6) 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.pagination .is-current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.pagination .is-disabled {
  color: var(--color-text-muted);
  opacity: 0.5;
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* 404 / error page                                                        */
/* ---------------------------------------------------------------------- */

.error-page {
  text-align: center;
  padding: var(--space-10) 0;
}

.error-page__code {
  font-size: 72px;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}

.error-page__message {
  font-size: 18px;
  color: var(--color-text-muted);
  margin: var(--space-4) 0 var(--space-6);
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-grid,
  .category-grid,
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-search {
    order: 3;
    max-width: none;
    width: 100%;
    margin: 0;
  }

  .site-nav {
    gap: var(--space-4);
  }

  .store-grid,
  .category-grid,
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 26px;
  }

  .store-header {
    flex-direction: column;
    text-align: center;
  }

  .store-meta-line,
  .store-stats-line {
    justify-content: center;
  }

  .offer-card {
    flex-wrap: wrap;
  }

  .offer-discount {
    border-right: none;
    border-bottom: 1px dashed var(--color-border);
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-bottom: var(--space-3);
  }

  .offer-action {
    width: 100%;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
