/*
Theme Name: TopSaverWorld Child
Template: coupon
Version: 3.2.0
Description: Compact premium storefront styling for TopSaverWorld.
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --tsw-bg: #f5f5f1;
  --tsw-bg-accent: #efefe8;
  --tsw-surface: rgba(255, 255, 255, 0.88);
  --tsw-surface-strong: #ffffff;
  --tsw-border: rgba(20, 20, 20, 0.08);
  --tsw-border-strong: rgba(20, 20, 20, 0.12);
  --tsw-text: #151515;
  --tsw-muted: #6b6d68;
  --tsw-shadow: 0 12px 28px rgba(15, 15, 15, 0.04);
  --tsw-radius: 18px;
  --tsw-shell: min(1180px, calc(100% - 32px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 32%),
    linear-gradient(180deg, #f7f7f3 0%, #f2f2ec 100%);
  color: var(--tsw-text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.custom-background { background-color: var(--tsw-bg) !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
main.tsw-site-main { display: block; }
body.admin-bar .tsw-site-header { top: 32px; }

.tsw-shell { width: var(--tsw-shell); margin: 0 auto; }
.tsw-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tsw-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 245, 241, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 20, 20, 0.06);
}
.tsw-nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tsw-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tsw-brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #111;
  color: #fff;
  font: 700 13px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
}
.tsw-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tsw-brand-copy strong,
.tsw-page-head h1,
.tsw-landing-head h1,
.tsw-about-card h2,
.tsw-offers-header h2,
.tsw-offer-card-minimal h3,
.tsw-empty-state h2,
.tsw-store-title {
  font-family: 'Space Grotesk', sans-serif;
}
.tsw-brand-copy strong { font-size: 15px; line-height: 1; }
.tsw-brand-copy span,
.tsw-footer-copy,
.tsw-store-summary,
.tsw-page-head p,
.tsw-landing-head p,
.tsw-about-card p,
.tsw-offer-card-minimal p,
.tsw-empty-state p,
.tsw-store-domain {
  color: var(--tsw-muted);
}
.tsw-brand-copy span { font-size: 11px; }
.tsw-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.tsw-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--tsw-muted);
}
.tsw-menu a:hover,
.tsw-menu .current-menu-item a,
.tsw-menu .current_page_item a {
  background: var(--tsw-surface-strong);
  color: var(--tsw-text);
  border-color: var(--tsw-border);
}

.tsw-landing-head {
  padding: 26px 0 10px;
}
.tsw-landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.tsw-page-head {
  padding: 22px 0 6px;
}
.tsw-page-head-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.tsw-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.05);
  color: var(--tsw-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tsw-landing-head h1,
.tsw-page-head h1,
.tsw-store-title {
  margin: 10px 0 6px;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.tsw-landing-head h1 {
  max-width: 11ch;
  font-size: clamp(31px, 4.6vw, 50px);
}
.tsw-page-head h1,
.tsw-store-title {
  font-size: clamp(24px, 3.3vw, 34px);
}
.tsw-landing-head p,
.tsw-page-head p,
.tsw-store-summary,
.tsw-about-card p,
.tsw-store-rich-text,
.tsw-offer-card-minimal p,
.tsw-empty-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}
.tsw-stat-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.tsw-stat-pill,
.tsw-inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--tsw-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  color: var(--tsw-muted);
}
.tsw-inline-link:hover { color: var(--tsw-text); }

.tsw-detail-topbar { padding: 18px 0 0; }
.tsw-section { padding: 18px 0 40px; }
.tsw-section--compact { padding-top: 14px; }
.tsw-section--detail { padding-top: 12px; }

.tsw-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--tsw-border);
  border-radius: var(--tsw-radius);
  background: var(--tsw-surface);
  box-shadow: var(--tsw-shadow);
}
.tsw-search-wrap {
  flex: 0 1 300px;
}
.tsw-search-wrap input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--tsw-border);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  font: 600 14px/1 'Manrope', sans-serif;
  color: var(--tsw-text);
}
.tsw-search-wrap input:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.24);
}
.tsw-filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.tsw-filter-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--tsw-border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  color: var(--tsw-muted);
  cursor: pointer;
}
.tsw-filter-chip.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.tsw-store-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.tsw-store-card {
  min-height: 118px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 16px 12px;
  border: 1px solid var(--tsw-border);
  border-radius: 16px;
  background: var(--tsw-surface);
  box-shadow: var(--tsw-shadow);
  text-align: center;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.tsw-store-card:hover {
  transform: translateY(-2px);
  border-color: var(--tsw-border-strong);
  box-shadow: 0 14px 28px rgba(15, 15, 15, 0.07);
}
.tsw-store-card-logo {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--tsw-border);
  border-radius: 16px;
  background: #fff;
}
.tsw-store-card-logo img,
.tsw-logo-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tsw-store-card-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.tsw-store-layout-minimal {
  display: grid;
  grid-template-columns: minmax(280px, 35%) minmax(0, 65%);
  gap: 18px;
  align-items: start;
}
.tsw-store-sidebar-minimal {
  display: grid;
  gap: 14px;
}
.tsw-logo-card,
.tsw-about-card,
.tsw-offers-panel-minimal,
.tsw-empty-state {
  border: 1px solid var(--tsw-border);
  border-radius: var(--tsw-radius);
  background: var(--tsw-surface);
  box-shadow: var(--tsw-shadow);
}
.tsw-logo-card,
.tsw-about-card,
.tsw-offers-panel-minimal,
.tsw-empty-state {
  padding: 18px;
}
.tsw-logo-card {
  display: grid;
  gap: 12px;
}
.tsw-logo-card-media {
  min-height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--tsw-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--tsw-bg-accent) 100%);
}
.tsw-logo-card-media img {
  max-width: 92px;
  max-height: 92px;
}
.tsw-store-title { margin-bottom: 2px; }
.tsw-store-domain {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: lowercase;
}
.tsw-store-summary {
  font-size: 13px;
}
.tsw-button-secondary,
.tsw-offer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}
.tsw-button-secondary {
  border: 1px solid var(--tsw-border);
  background: #fff;
}
.tsw-button-secondary--full { width: 100%; }
.tsw-about-card h2,
.tsw-offers-header h2 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.1;
}
.tsw-store-rich-text > *:first-child { margin-top: 0; }
.tsw-store-rich-text > *:last-child { margin-bottom: 0; }

.tsw-offers-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tsw-offers-header span:last-child {
  font-size: 12px;
  font-weight: 800;
  color: var(--tsw-muted);
}
.tsw-offer-list {
  display: grid;
  gap: 10px;
}
.tsw-offer-card-minimal {
  border: 1px solid var(--tsw-border);
  border-radius: 16px;
  background: #fff;
  padding: 15px;
}
.tsw-offer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tsw-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tsw-type-badge--deal { background: #f1f1ec; color: #111; }
.tsw-type-badge--coupon { background: #111; color: #fff; }
.tsw-offer-count {
  font-size: 12px;
  color: var(--tsw-muted);
  font-weight: 700;
}
.tsw-offer-card-minimal h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}
.tsw-offer-bottom-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tsw-offer-code {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f2f2ed;
  font: 700 12px/1 'Space Grotesk', monospace;
}
.tsw-offer-link {
  background: #111;
  color: #fff;
}

.tsw-empty-state { margin-top: 14px; }
.tsw-empty-state h2 { margin: 0 0 6px; font-size: 20px; }

.tsw-footer { padding: 10px 0 26px; }
.tsw-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--tsw-border);
  border-radius: var(--tsw-radius);
  background: var(--tsw-surface);
  box-shadow: var(--tsw-shadow);
}
.tsw-footer-copy {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
}
.tsw-footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tsw-footer-links a {
  font-size: 12px;
  font-weight: 800;
  color: var(--tsw-muted);
}

@media (max-width: 1180px) {
  .tsw-store-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .tsw-landing-grid,
  .tsw-page-head-inner,
  .tsw-footer-inner,
  .tsw-filter-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
  .tsw-search-wrap { width: 100%; flex-basis: auto; }
  .tsw-filter-row { justify-content: flex-start; }
  .tsw-store-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tsw-stat-row { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .tsw-store-layout-minimal { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body.admin-bar .tsw-site-header { top: 46px; }
  .tsw-nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0 14px;
  }
  .tsw-brand-copy span { display: none; }
  .tsw-menu ul { justify-content: center; flex-wrap: wrap; }
  .tsw-store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tsw-shell { width: min(1180px, calc(100% - 20px)); }
  .tsw-landing-head h1 { max-width: none; }
  .tsw-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tsw-store-card { min-height: 104px; padding: 14px 10px; }
  .tsw-store-card-logo { width: 52px; height: 52px; border-radius: 14px; }
  .tsw-logo-card,
  .tsw-about-card,
  .tsw-offers-panel-minimal,
  .tsw-empty-state,
  .tsw-filter-bar { padding: 14px; }
  .tsw-offer-bottom-minimal { align-items: stretch; }
  .tsw-offer-link,
  .tsw-offer-code { width: 100%; }
}


a,
a:hover,
a:focus,
a:active,
.tsw-offer-link,
.tsw-offer-link:hover,
.tsw-offer-link:focus,
.tsw-button-secondary,
.tsw-button-secondary:hover,
.tsw-inline-link,
.tsw-inline-link:hover,
.tsw-footer a:hover,
.tsw-menu a:hover {
  text-decoration: none !important;
}

.tsw-offer-link,
.tsw-offer-link:hover,
.tsw-offer-link:focus,
.tsw-offer-link:visited {
  color: #fff;
}

.tsw-offer-link--deal:hover,
.tsw-offer-link--coupon:hover {
  color: #fff;
}

.tsw-store-card.is-hidden {
  display: none !important;
}

.tsw-modal-open {
  overflow: hidden;
}

.tsw-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 12, 12, 0.52);
}

.tsw-modal[hidden] {
  display: none;
}

.tsw-modal-dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid var(--tsw-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 15, 15, 0.2);
}

.tsw-modal-dialog h2 {
  margin: 12px 0 8px;
  font: 700 28px/1 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}

.tsw-modal-dialog p {
  margin: 0;
  color: var(--tsw-muted);
  font-size: 14px;
  line-height: 1.65;
}

.tsw-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--tsw-border);
  border-radius: 999px;
  background: #fff;
  color: var(--tsw-text);
  font: 800 11px/1 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.tsw-modal-code {
  margin: 16px 0 14px;
  padding: 16px;
  border-radius: 16px;
  background: #f2f2ed;
  color: var(--tsw-text);
  font: 700 18px/1.2 'Space Grotesk', monospace;
  text-align: center;
  letter-spacing: 0.08em;
  word-break: break-word;
}


.tsw-filter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tsw-filter-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--tsw-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  color: var(--tsw-muted);
}

.tsw-filter-meta-pill strong {
  color: var(--tsw-text);
  margin-left: 4px;
}

.tsw-modal-dialog {
  overflow: hidden;
  width: min(520px, 100%);
  padding: 26px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,245,240,0.98) 100%);
  box-shadow: 0 28px 80px rgba(15, 15, 15, 0.24);
}

.tsw-modal-accent {
  width: 100%;
  height: 88px;
  margin: -26px -26px 18px;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.44), transparent 34%), linear-gradient(135deg, #111111 0%, #292929 100%);
}

.tsw-modal-code-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin: 18px 0 14px;
}

.tsw-modal-code {
  margin: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 18px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
  font: 700 18px/1.2 'Space Grotesk', monospace;
}

.tsw-modal-copy {
  min-width: 112px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font: 800 12px/1 'Manrope', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.tsw-modal-copy.is-copied {
  background: #2d6a4f;
}

.tsw-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 980px) {
  .tsw-filter-meta {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .tsw-filter-meta {
    width: 100%;
  }

  .tsw-filter-meta-pill {
    width: 100%;
    justify-content: flex-start;
  }

  .tsw-modal-dialog {
    padding: 20px;
  }

  .tsw-modal-accent {
    height: 74px;
    margin: -20px -20px 16px;
  }

  .tsw-modal-code-wrap {
    grid-template-columns: 1fr;
  }

  .tsw-modal-copy,
  .tsw-modal-actions .tsw-offer-link {
    width: 100%;
  }
}


.tsw-modal-dialog {
  position: relative;
  overflow: hidden;
  padding: 118px 26px 26px;
}

.tsw-modal-dialog > :not(.tsw-modal-accent):not(.tsw-modal-close) {
  position: relative;
  z-index: 1;
}

.tsw-modal-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 122px;
  margin: 0;
  border-radius: 20px 20px 0 0;
  z-index: 0;
}

.tsw-modal-close {
  top: 18px;
  right: 18px;
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(10px);
}

.tsw-modal-close:hover,
.tsw-modal-close:focus {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

@media (max-width: 560px) {
  .tsw-modal-dialog {
    padding: 104px 20px 20px;
  }

  .tsw-modal-accent {
    height: 108px;
    margin: 0;
  }

  .tsw-modal-close {
    top: 14px;
    right: 14px;
  }
}


.tsw-page-head--legal {
  padding-bottom: 4px;
}

.tsw-legal-card {
  padding: 24px;
  border: 1px solid var(--tsw-border);
  border-radius: var(--tsw-radius);
  background: var(--tsw-surface);
  box-shadow: var(--tsw-shadow);
}

.tsw-legal-content {
  max-width: 760px;
}

.tsw-legal-content > *:first-child {
  margin-top: 0;
}

.tsw-legal-content h2,
.tsw-legal-content h3 {
  margin: 24px 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.tsw-legal-content h2 {
  font-size: 26px;
}

.tsw-legal-content h3 {
  font-size: 18px;
}

.tsw-legal-content p,
.tsw-legal-content li {
  color: var(--tsw-muted);
  font-size: 14px;
  line-height: 1.75;
}

.tsw-legal-content ul,
.tsw-legal-content ol {
  padding-left: 20px;
}

.tsw-legal-content a {
  color: var(--tsw-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .tsw-legal-card {
    padding: 18px;
  }

  .tsw-legal-content h2 {
    font-size: 22px;
  }
}
