/* ==========================================================================
   Fabrilife Coupon & Deals — Design System
   ========================================================================== */

:root {
  --primary: #7C3AED;
  --primary-dark: #5B21B6;
  --primary-light: #EDE9FE;
  --primary-rgb: 124, 58, 237;

  --text: #171717;
  --muted: #6B7280;
  --background: #FFFFFF;
  --surface: #F8F7FC;
  --border: #E5E7EB;

  --success: #16A34A;
  --danger: #DC2626;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(23, 23, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(23, 23, 23, 0.08);
  --shadow-lg: 0 16px 40px rgba(23, 23, 23, 0.12);

  --header-height: 72px;
  --max-width: 1120px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light;
}

[data-theme="dark"] {
  --text: #F5F3FF;
  --muted: #A1A1AA;
  --background: #121016;
  --surface: #1B1720;
  --border: #2D2836;
  --primary-light: #2A1F4D;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

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

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-header {
  display: none;
}

@media (min-width: 860px) {
  .btn-header {
    display: inline-flex;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.brand-name {
  font-size: 1.05rem;
  white-space: nowrap;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text);
  font-weight: 500;
}

.main-nav a.is-active {
  color: var(--primary-dark);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text);
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 859px) {
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
  }

  .main-nav li {
    border-bottom: 1px solid var(--border);
  }

  .main-nav a {
    display: block;
    padding: 14px 0;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 56px 0 40px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--background) 100%);
}

.hero-inner {
  text-align: center;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.page-hero {
  padding-top: 40px;
  padding-bottom: 24px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

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

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--surface);
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-align: center;
  margin-bottom: 8px;
}

.section-title-sm {
  font-size: 1.3rem;
}

.section-desc {
  text-align: center;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

.section-cta {
  text-align: center;
  margin-top: 24px;
}

.content-page .prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 1.5em;
  font-size: 1.3rem;
}

/* ==========================================================================
   Coupon Card
   ========================================================================== */

.featured-coupon-wrap {
  display: flex;
  justify-content: center;
}

.coupon-card {
  background: var(--surface);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
}

.coupon-card-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  padding: 6px 20px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.coupon-card-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.coupon-code-row {
  margin-bottom: 16px;
}

.coupon-code {
  display: inline-block;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 10px 24px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--primary-dark);
}

.coupon-card-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.coupon-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.coupon-fallback-msg {
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.9rem;
}

/* ==========================================================================
   Offer Summary (AI/crawler-readable facts block)
   ========================================================================== */

.offer-summary {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.offer-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  background: var(--background);
  padding: 14px 20px;
}

.offer-summary-row dt {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.offer-summary-row dd {
  margin: 0;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: right;
}

/* ==========================================================================
   Info grid (coupon information section)
   ========================================================================== */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.info-card-title {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.info-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.info-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ==========================================================================
   Deals grid
   ========================================================================== */

.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.deal-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.deal-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.deal-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
}

.deal-category {
  color: var(--muted);
  font-size: 0.8rem;
}

.deal-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.deal-desc {
  color: var(--muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

/* ==========================================================================
   Steps / How it works
   ========================================================================== */

.steps-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.steps-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.step-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.step-desc {
  color: var(--muted);
  margin-bottom: 0;
}

/* ==========================================================================
   Trust list
   ========================================================================== */

.trust-list {
  list-style: none;
  padding: 0;
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.trust-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 600;
}

.trust-list li::before {
  content: "\2713";
  color: var(--success);
  margin-right: 8px;
  font-weight: 800;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0;
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding: 18px 4px;
  cursor: pointer;
  min-height: 44px;
}

.faq-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.15s ease;
}

.faq-trigger[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-panel {
  padding: 0 4px 18px;
  color: var(--muted);
}

/* ==========================================================================
   Disclosure section
   ========================================================================== */

.disclosure-section {
  background: var(--surface);
  text-align: center;
}

.disclosure-section p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--background);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  max-width: calc(100% - 40px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: 32px;
}

.footer-brand {
  display: flex;
  gap: 12px;
  max-width: 320px;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col-title {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-disclosure {
  border-top: 1px solid var(--border);
  padding: 20px;
}

.footer-disclosure p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
  max-width: 760px;
}

.footer-bottom {
  padding: 16px 20px 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-bottom p {
  margin: 0;
}
