/* ==========================================================================
   STORE PAGE — design system
   Matches the Saving Creator homepage: cream background, navy ink,
   coral CTA, Fraunces display serif + Inter body + Space Mono labels.
   Signature element: the perforated coupon "ticket stub", echoing the
   scanned-deal ticket on the homepage hero.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

.store-page {
  --sc-bg:            #edecdd;
  --sc-bg-band:       #e3e1cd;
  --sc-card:          #ffffff;
  --sc-navy:          #1c2541;
  --sc-navy-deep:     #141a30;
  --sc-coral:         #c1440e;
  --sc-coral-hover:   #a23a0c;
  --sc-line:          #d8d5c2;
  --sc-muted:         #6b6858;
  --sc-ink:           #2a2a22;
  --sc-gold:          #c9a15a;

  --sc-display: 'Fraunces', Georgia, serif;
  --sc-body:    'Inter', -apple-system, sans-serif;
  --sc-mono:    'Space Mono', monospace;

  background: var(--sc-bg);
  color: var(--sc-ink);
  font-family: var(--sc-body);
}

.store-page a { text-decoration: none; color: inherit; }
.store-page .sc-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Defensive: neutralize any inherited ::before/::after content on the grid
   wrappers below. Bootstrap's clearfix (and other legacy sheets on this site)
   attach `content: " "; display: table;` to a number of shared class names —
   if a generated pseudo-element ever lands on an element that is also
   display:grid, it gets auto-placed as a phantom grid item and breaks the
   column layout. This keeps that class of bug from recurring even if a
   future class name collides. */
.store-page .store-hero__grid::before,
.store-page .store-hero__grid::after,
.store-page .store-content__grid::before,
.store-page .store-content__grid::after,
.store-page .coupon-card::before,
.store-page .coupon-card::after {
  content: none !important;
  display: none !important;
}

.store-page .eyebrow {
  font-family: var(--sc-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sc-coral);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}
.store-page .eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sc-coral);
  display: inline-block;
}

/* ---------- buttons ---------- */
.store-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sc-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.store-page .btn:hover { transform: translateY(-1px); }
.store-page .btn--navy { background: var(--sc-navy); color: #fff; }
.store-page .btn--navy:hover { background: var(--sc-navy-deep); }
.store-page .btn--outline { background: transparent; color: var(--sc-navy); border-color: var(--sc-navy); }
.store-page .btn--outline:hover { background: var(--sc-navy); color: #fff; }
.store-page .btn--coral { background: var(--sc-coral); color: #fff; }
.store-page .btn--coral:hover { background: var(--sc-coral-hover); }
.store-page .btn--block { width: 100%; }

/* ---------- hero ---------- */
.store-hero { padding: 56px 0 40px; }
.store-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.store-hero__title {
  font-family: var(--sc-display);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.08;
  color: var(--sc-navy);
  margin: 0 0 18px;
}
.store-hero__title .accent { font-style: italic; color: var(--sc-coral); }
.store-hero__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--sc-muted);
  max-width: 52ch;
  margin: 0 0 28px;
}
.store-hero__desc #myBtn {
  color: var(--sc-coral);
  font-family: var(--sc-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.store-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ticket card — signature element, reused from homepage hero motif */
.ticket {
  position: relative;
  background: var(--sc-card);
  border-radius: 14px;
  box-shadow: 0 20px 45px -22px rgba(28,37,65,0.35);
  padding: 30px 30px 26px;
  max-width: 340px;
  margin: 0 auto;
  transform: rotate(1.5deg);
}
.ticket::before {
  content: '';
  position: absolute; top: 46px; left: -10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sc-bg);
}
.ticket::after {
  content: '';
  position: absolute; top: 46px; right: -10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sc-bg);
}
.ticket__eyebrow {
  font-family: var(--sc-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--sc-muted);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.ticket__logo {
  max-height: 64px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
}
.ticket__store-name {
  font-family: var(--sc-display);
  font-size: 22px;
  text-align: center;
  color: var(--sc-navy);
  margin: 0 0 20px;
}
.ticket__divider {
  border-top: 1.5px dashed var(--sc-line);
  margin: 0 -6px 18px;
}
.ticket__barcode {
  height: 34px;
  margin: 0 0 8px;
  background: repeating-linear-gradient(90deg, var(--sc-navy) 0 2px, transparent 2px 5px, var(--sc-navy) 5px 6px, transparent 6px 10px, var(--sc-navy) 10px 13px, transparent 13px 15px);
  opacity: .85;
}
.ticket__code-label {
  font-family: var(--sc-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--sc-muted);
  margin: 0 0 18px;
}
.verified-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--sc-navy);
  color: #fff;
  font-family: var(--sc-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 9px 0;
}

/* ---------- section titles ---------- */
.section-title {
  font-family: var(--sc-display);
  font-size: 28px;
  color: var(--sc-navy);
  margin: 0 0 24px;
}
.section-title--muted { color: var(--sc-muted); font-style: italic; }

/* ---------- content layout ---------- */
.store-content { padding: 20px 0 80px; }
.store-content__grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ---------- active coupon cards (ticket stub) ---------- */
.coupon-list { display: flex; flex-direction: column; gap: 18px; }

.coupon-card {
  display: grid;
  grid-template-columns: 96px 1fr 176px;
  align-items: stretch;
  background: var(--sc-card);
  border-radius: 12px;
  box-shadow: 0 10px 30px -18px rgba(28,37,65,0.28);
  overflow: hidden;
}
.coupon-card__left {
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  border-right: 1px dashed var(--sc-line);
}
.coupon-card__left img { max-width: 100%; max-height: 60px; object-fit: contain; }

.coupon-card__body { padding: 20px 22px; }
.coupon-card__tags { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tag {
  font-family: var(--sc-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tag--discount { background: rgba(193,68,14,0.12); color: var(--sc-coral); }
.tag--verified { background: rgba(28,37,65,0.08); color: var(--sc-navy); }

.coupon-card__title {
  font-family: var(--sc-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--sc-navy);
  margin: 0 0 6px;
}
.coupon-card__desc { font-size: 14px; color: var(--sc-muted); margin: 0 0 10px; line-height: 1.5; }
.coupon-card__meta { font-family: var(--sc-mono); font-size: 11px; color: var(--sc-muted); margin: 0; }

.coupon-card__terms { margin-top: 10px; }
.terms-btn {
  font-family: var(--sc-mono);
  font-size: 10.5px;
  background: none;
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--sc-muted);
  cursor: pointer;
}
.terms-copy { font-size: 12.5px; color: var(--sc-muted); margin-top: 8px; line-height: 1.5; }

/* right stub, perforated from the body */
.coupon-card__stub {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--sc-bg-band);
}
.coupon-card__stub::before {
  content: '';
  position: absolute; left: -9px; top: -9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sc-bg);
}
.coupon-card__stub::after {
  content: '';
  position: absolute; left: -9px; bottom: -9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sc-bg);
}
.coupon-card__stub-line {
  position: absolute; left: 0; top: 9px; bottom: 9px;
  border-left: 1.5px dashed var(--sc-line);
}
.code-btn {
  width: 100%;
  text-align: center;
  background: var(--sc-navy);
  color: #fff;
  font-family: var(--sc-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 13px 10px;
  border-radius: 8px;
  transition: background .15s ease;
}
.code-btn:hover { background: var(--sc-coral); }
.hidden-code { display: none; }

/* ---------- expired section ---------- */
.expired-section { margin-top: 56px; }
.expired-list { display: flex; flex-direction: column; gap: 12px; }
.expired-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--sc-card);
  opacity: .72;
  filter: grayscale(0.35);
  border: 1px dashed var(--sc-line);
  border-radius: 10px;
  padding: 14px 18px;
  overflow: hidden;
}
.expired-card__title { font-size: 14.5px; color: var(--sc-ink); margin: 0; }
.expired-card__code {
  font-family: var(--sc-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--sc-muted);
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: default;
  text-transform: uppercase;
  white-space: nowrap;
}
.expired-stamp {
  position: absolute; right: -30px; top: 6px;
  transform: rotate(18deg);
  font-family: var(--sc-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--sc-coral);
  border: 1.5px solid var(--sc-coral);
  padding: 2px 34px;
  text-transform: uppercase;
}
.no-coupons, .no-expired {
  font-family: var(--sc-body);
  color: var(--sc-muted);
  text-align: center;
  padding: 30px;
  border: 1px dashed var(--sc-line);
  border-radius: 12px;
  background: var(--sc-card);
}

/* ---------- sidebar ---------- */
.store-sidebar__card {
  background: var(--sc-card);
  border-radius: 14px;
  box-shadow: 0 14px 34px -22px rgba(28,37,65,0.3);
  padding: 28px 22px;
  text-align: center;
  margin-bottom: 28px;
}
.store-sidebar__logo { max-width: 160px; max-height: 90px; object-fit: contain; margin: 0 auto 20px; }

.sidebar-title {
  font-family: var(--sc-display);
  font-size: 18px;
  color: var(--sc-navy);
  margin: 0 0 14px;
}
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li { margin: 0; }
.chip-list a {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--sc-navy);
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  padding: 8px 14px;
  transition: background .15s ease, color .15s ease;
}
.chip-list a:hover { background: var(--sc-navy); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .store-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .store-hero__title { font-size: 34px; }
  .ticket { transform: none; }
  .store-content__grid { grid-template-columns: 1fr; }
  .store-sidebar { order: -1; }
}
@media (max-width: 620px) {
  .coupon-card { grid-template-columns: 1fr; }
  .coupon-card__left { border-right: none; border-bottom: 1px dashed var(--sc-line); }
  .coupon-card__stub { background: var(--sc-bg-band); }
  .coupon-card__stub-line { display: none; }
  .expired-card { flex-direction: column; align-items: flex-start; }
}