/*
Theme Name: اس پی | SP
Theme URI: https://tofiqsp.ir
Author: توفیق | Tofiq
Author URI: https://tofiqsp.ir
Description: قالب فوق‌سبک و خودمونی برای فروش پلاگین‌های وردپرس و ووکامرس. دارک/لایت، AJAX با اسکلتون کارت، کنترل هدر/فوتر، سازگار با EDD. داستان‌محور و پر از حس کمک به همدیگه.
Version: 0.0.65
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sp
Tags: dark-mode, light-mode, ajax, lightweight, digital-downloads, woocommerce, edd, rtl, custom-menu, featured-images, translation-ready
*/

:root {
  /* Own the Patch–inspired: forest + cream + coral */
  --sp-color-forest: #1a2e28;
  --sp-color-forest-deep: #0d1f1a;
  --sp-color-forest-mid: #243d34;
  --sp-color-cream: #f5f0e8;
  --sp-color-cream-muted: #c8c0b4;
  --sp-color-coral: #e63946;

  --sp-bg: #f3f1ec;
  --sp-bg-card: #ffffff;
  --sp-bg-elevated: #faf8f5;
  --sp-text: #0f1412;
  --sp-text-muted: #5c6560;
  --sp-text-soft: #8a928c;
  --sp-primary: #e63946;
  --sp-primary-hover: #c1121f;
  --sp-primary-soft: rgba(230, 57, 70, 0.12);
  --sp-accent: #e63946;
  --sp-accent-soft: rgba(230, 57, 70, 0.14);
  --sp-success: #16a34a;
  --sp-warning: #d97706;
  --sp-danger: #dc2626;
  --sp-border: #e0ddd6;
  --sp-border-soft: #ebe8e1;
  --sp-shadow: 0 4px 6px -1px rgba(15, 20, 18, 0.08), 0 2px 4px -2px rgba(15, 20, 18, 0.05);
  --sp-shadow-lg: 0 14px 28px -8px rgba(15, 20, 18, 0.12), 0 4px 8px -4px rgba(15, 20, 18, 0.07);
  --sp-radius: 16px;
  --sp-radius-sm: 10px;
  --sp-radius-full: 9999px;
  --sp-font: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --sp-fs-display: clamp(2.5rem, 6vw, 4.25rem);
  --sp-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --sp-header-height: 72px;
  --sp-container: 1200px;

  /* لایه‌ی مارکتینگ (Own the Patch shell) — قبلاً تو otp-shell.css جدا تعریف شده بودن، اینجا یکی شدن */
  --sp-rail-w: 13.5rem;
  --sp-sec-pad: clamp(5rem, 10vw, 8.5rem);
  --sp-gutter: clamp(1.25rem, 4vw, 3rem);
  --sp-ease-osmo: cubic-bezier(0.625, 0.05, 0, 1);
  --sp-ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
  --sp-label-size: 0.64rem;
  --sp-label-track: 0.14em;
}

[data-theme="dark"] {
  --sp-bg: #0d1f1a;
  --sp-bg-card: #1a2e28;
  --sp-bg-elevated: #243d34;
  --sp-text: #f5f0e8;
  --sp-text-muted: #c8c0b4;
  --sp-text-soft: rgba(245, 240, 232, 0.55);
  --sp-primary: #e63946;
  --sp-primary-hover: #ff4d5a;
  --sp-primary-soft: rgba(230, 57, 70, 0.2);
  --sp-accent: #e63946;
  --sp-accent-soft: rgba(230, 57, 70, 0.2);
  --sp-success: #34d399;
  --sp-warning: #fbbf24;
  --sp-danger: #f87171;
  --sp-border: rgba(245, 240, 232, 0.12);
  --sp-border-soft: rgba(245, 240, 232, 0.06);
  --sp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
  --sp-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

/* Form controls follow theme */
input, select, textarea, button {
  color-scheme: inherit;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sp-font);
  background-color: var(--sp-bg);
  color: var(--sp-text);
  line-height: 1.75;
  font-size: 16px;
  transition: background-color var(--sp-transition), color var(--sp-transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sp-primary); text-decoration: none; transition: color var(--sp-transition), transform var(--sp-transition); }
a:hover { color: var(--sp-primary-hover); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.sp-container {
  width: 100%;
  max-width: var(--sp-container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@keyframes sp-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sp-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sp-main {
  flex: 1;
  padding-block: 2.5rem;
  animation: sp-fade-up 0.55s ease both;
}
.sp-animate { animation: sp-fade-up 0.6s ease both; }
.sp-animate-delay-1 { animation-delay: 0.1s; }
.sp-animate-delay-2 { animation-delay: 0.2s; }
.sp-animate-delay-3 { animation-delay: 0.3s; }
.sp-animate-delay-4 { animation-delay: 0.4s; }

.sp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--sp-header-height);
  background: color-mix(in srgb, var(--sp-bg-card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--sp-border) 70%, transparent);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.sp-main {
  padding-top: var(--sp-header-height);
}
.sp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}
.sp-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--sp-text);
  letter-spacing: -0.02em;
}
.sp-logo span {
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sp-logo__icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 4px 12px var(--sp-primary-soft);
  transition: transform var(--sp-transition);
}
.sp-logo:hover .sp-logo__icon { transform: rotate(-8deg) scale(1.05); }

.sp-nav { display: flex; align-items: center; gap: 0.15rem; }
.sp-nav a {
  position: relative;
  padding: 0.55rem 0.85rem;
  color: var(--sp-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.005em;
  transition: color var(--sp-transition);
}
.sp-nav a::after {
  content: '';
  position: absolute; right: 0.85rem; left: 0.85rem; bottom: 0.25rem;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sp-primary), var(--sp-accent));
  transform: scaleX(0); transition: transform 0.25s ease;
}
.sp-nav a:hover, .sp-nav a.current-menu-item {
  color: var(--sp-text);
}
.sp-nav a:hover::after, .sp-nav a.current-menu-item::after {
  transform: scaleX(1);
}
.sp-header__actions { display: flex; align-items: center; gap: 0.5rem; }

.sp-menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--sp-radius-full);
  border: none;
  background: transparent;
  color: var(--sp-text);
  cursor: pointer;
  font-size: 1.25rem;
  transition: background var(--sp-transition);
}
.sp-menu-btn:hover { background: var(--sp-primary-soft); }

.sp-card {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  overflow: hidden;
  transition: transform var(--sp-transition), box-shadow var(--sp-transition), border-color var(--sp-transition);
}
.sp-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sp-shadow-lg);
  border-color: color-mix(in srgb, var(--sp-primary) 30%, var(--sp-border));
}
.sp-card__body { padding: 1.5rem; }

.sp-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--sp-border);
}
@media (min-width: 768px) {
  .sp-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.sp-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--sp-border);
  border-radius: 0;
  box-shadow: none;
  padding: 1.75rem 0;
}
@media (min-width: 768px) {
  .sp-product-card {
    border-bottom: none;
    border-left: 1px solid var(--sp-border);
    padding: 1.75rem 1.35rem;
  }
  .sp-product-card:first-child { border-left: none; padding-right: 0; }
  .sp-product-card:last-child { padding-left: 0; }
}
.sp-product-card:hover {
  transform: none;
  box-shadow: none;
}
.sp-product-card__thumb {
  aspect-ratio: 16 / 10;
  background: var(--sp-border-soft);
  position: relative;
  overflow: hidden;
}
.sp-product-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease;
}
.sp-product-card:hover .sp-product-card__thumb img { transform: scale(1.06); }
.sp-product-card__badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--sp-primary); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--sp-radius-full);
}
.sp-product-card__title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem;
  color: var(--sp-text); line-height: 1.4;
}
.sp-product-card__desc {
  font-size: 0.9rem; color: var(--sp-text-muted); margin-bottom: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sp-product-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid var(--sp-border-soft);
}
.sp-product-card__price { font-weight: 800; font-size: 1.15rem; color: var(--sp-primary); }

.sp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.5rem; border-radius: var(--sp-radius-full);
  font-weight: 600; font-size: 0.92rem; border: none; cursor: pointer;
  transition: all var(--sp-transition); text-decoration: none;
}
.sp-btn--primary {
  background: linear-gradient(135deg, var(--sp-primary), color-mix(in srgb, var(--sp-primary) 70%, var(--sp-accent)));
  color: #fff; box-shadow: 0 4px 14px var(--sp-primary-soft);
}
.sp-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--sp-primary) 55%, transparent);
  color: #fff;
}
.sp-btn--primary:active { transform: translateY(0); }
.sp-btn--outline {
  background: transparent; border: 1.5px solid var(--sp-border); color: var(--sp-text);
}
.sp-btn--outline:hover {
  border-color: var(--sp-primary); color: var(--sp-primary); background: var(--sp-primary-soft);
}
.sp-btn--sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.sp-btn--lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; }
.sp-btn--whatsapp { background: #25d366; color: #fff; }
.sp-btn--whatsapp:hover { background: #1da851; color: #fff; transform: translateY(-2px); }
.sp-btn--telegram { background: #0088cc; color: #fff; }
.sp-btn--telegram:hover { background: #006da3; color: #fff; transform: translateY(-2px); }

.sp-skeleton {
  background: var(--sp-bg-card); border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius); overflow: hidden; position: relative;
}
.sp-skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--sp-primary) 18%, transparent) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: sp-shimmer 1.6s ease-in-out infinite;
}
.sp-skeleton__thumb { aspect-ratio: 16 / 10; background: var(--sp-border-soft); }
.sp-skeleton__line { height: 14px; border-radius: 6px; background: var(--sp-border-soft); margin: 0.6rem 1.25rem; }
.sp-skeleton__line--title { height: 20px; width: 70%; margin-top: 1.1rem; }
.sp-skeleton__line--short { width: 40%; }
.sp-skeleton__footer {
  display: flex; justify-content: space-between;
  padding: 1rem 1.25rem 1.25rem; margin-top: 0.5rem;
}
.sp-skeleton__price { width: 80px; height: 22px; border-radius: 6px; background: var(--sp-border-soft); }
.sp-skeleton__btn { width: 90px; height: 34px; border-radius: var(--sp-radius-sm); background: var(--sp-border-soft); }

.sp-footer {
  background: var(--sp-bg-elevated); border-top: 1px solid var(--sp-border);
  padding-block: 3rem 1.5rem; margin-top: auto;
}
.sp-footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem;
}
.sp-footer__brand {
  font-weight: 800; font-size: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem;
  min-height: 1.75rem; margin-bottom: 1rem;
}
.sp-footer__desc {
  color: var(--sp-text-muted); font-size: 0.95rem; line-height: 1.85; max-width: 340px;
}
.sp-footer__title {
  font-weight: 700; font-size: 1rem; color: var(--sp-text);
  display: flex; align-items: center;
  min-height: 1.75rem; margin-bottom: 1rem;
}
.sp-footer__links a {
  display: block; color: var(--sp-text-muted); padding: 0.3rem 0; font-size: 0.95rem;
  transition: all var(--sp-transition);
}
.sp-footer__links a:hover { color: var(--sp-primary); padding-right: 6px; }
.sp-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.5rem; border-top: 1px solid var(--sp-border);
  color: var(--sp-text-soft); font-size: 0.875rem; flex-wrap: wrap; gap: 1rem;
}
.sp-footer__social { display: flex; gap: 0.75rem; }
.sp-footer__social a {
  width: 40px; height: 40px; border-radius: var(--sp-radius-full);
  border: 1px solid var(--sp-border); display: flex; align-items: center; justify-content: center;
  color: var(--sp-text-muted); transition: all var(--sp-transition); font-size: 1.1rem;
}
.sp-footer__social a:hover {
  background: var(--sp-primary); border-color: var(--sp-primary); color: #fff; transform: translateY(-3px);
}

.sp-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--sp-primary-soft); color: var(--sp-primary);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 0.4rem 1rem; border-radius: var(--sp-radius-full);
  margin-bottom: 1.1rem;
}

.sp-hero {
  position: relative;
  text-align: center;
  padding-block: 3.5rem 2.25rem;
  overflow: hidden;
  isolation: isolate;
}
.sp-hero::before {
  content: '';
  position: absolute;
  inset: -10% -5% auto -5%;
  height: 440px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48% 65% at 28% 20%, color-mix(in srgb, var(--sp-primary) 20%, transparent), transparent 70%),
    radial-gradient(40% 55% at 78% 45%, color-mix(in srgb, var(--sp-accent) 18%, transparent), transparent 70%);
  filter: blur(50px);
}
.sp-hero__title {
  font-size: clamp(1.85rem, 4.5vw, 2.9rem); font-weight: 900; letter-spacing: -0.035em;
  margin-bottom: 0.85rem; line-height: 1.3;
  background: linear-gradient(135deg, var(--sp-text) 25%, var(--sp-primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sp-hero__subtitle {
  color: var(--sp-text-muted); font-size: 1.08rem; max-width: 620px;
  margin-inline: auto; line-height: 1.85;
}
.sp-story {
  max-width: 720px; margin-inline: auto; color: var(--sp-text-muted);
  font-size: 1.05rem; line-height: 1.95;
}
.sp-story p { margin-bottom: 1.15rem; }
.sp-story strong { color: var(--sp-text); font-weight: 700; }

.sp-landing-hero {
  position: relative;
  text-align: center;
  padding-block: 3.5rem 2.5rem;
  overflow: hidden;
  isolation: isolate;
}
.sp-landing-hero::before {
  content: '';
  position: absolute;
  inset: -10% -5% auto -5%;
  height: 380px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 60% at 25% 20%, color-mix(in srgb, var(--sp-primary) 16%, transparent), transparent 70%),
    radial-gradient(38% 50% at 80% 40%, color-mix(in srgb, var(--sp-accent) 14%, transparent), transparent 70%);
  filter: blur(46px);
}
.sp-landing-hero__badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--sp-primary-soft); color: var(--sp-primary);
  font-size: 0.85rem; font-weight: 700; padding: 0.4rem 1rem;
  border-radius: var(--sp-radius-full); margin-bottom: 1.25rem;
}
.sp-landing-section { padding-block: 2.75rem; }
.sp-landing-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800;
  margin-bottom: 1rem; letter-spacing: -0.02em;
}
/* Minimal line-separated columns (Own the Patch style) */
.sp-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid var(--sp-border);
}
@media (min-width: 768px) {
  .sp-feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.sp-feature {
  position: relative;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--sp-border);
  border-radius: 0;
  padding: 1.75rem 0;
  transition: opacity var(--sp-transition);
  overflow: visible;
}
@media (min-width: 768px) {
  .sp-feature {
    border-bottom: none;
    border-left: 1px solid var(--sp-border);
    padding: 1.75rem 1.5rem;
  }
  .sp-feature:first-child { border-left: none; padding-right: 0; }
  .sp-feature:last-child { padding-left: 0; }
}
.sp-feature::before { display: none; }
.sp-feature:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.92;
}
.sp-feature__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto; font-size: 1.35rem;
  border-radius: 0; margin-bottom: 0.85rem;
  background: none;
}
.sp-feature h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.45rem; }
.sp-feature p { font-size: 0.92rem; color: var(--sp-text-muted); line-height: 1.7; }

.sp-cta-box {
  position: relative;
  background: linear-gradient(135deg, var(--sp-primary-soft), var(--sp-accent-soft));
  border: 1px solid color-mix(in srgb, var(--sp-primary) 25%, var(--sp-border));
  border-radius: var(--sp-radius); padding: 2.75rem 1.75rem; text-align: center; margin-block: 2.5rem;
  overflow: hidden;
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--sp-primary) 40%, transparent);
}
.sp-cta-box::before {
  content: '';
  position: absolute; inset: -50% -10% auto -10%; height: 240px;
  background: radial-gradient(55% 100% at 50% 0%, color-mix(in srgb, var(--sp-primary) 28%, transparent), transparent 70%);
  filter: blur(34px); pointer-events: none; z-index: 0;
}
.sp-cta-box > * { position: relative; z-index: 1; }
.sp-cta-box h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.sp-cta-box p { color: var(--sp-text-muted); margin-bottom: 1.5rem; max-width: 480px; margin-inline: auto; }
.sp-cta-buttons { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

.sp-pain {
  background: color-mix(in srgb, var(--sp-danger) 8%, var(--sp-bg-card));
  border-right: 4px solid var(--sp-danger); border-radius: var(--sp-radius-sm);
  padding: 1.25rem 1.35rem; margin-bottom: 1rem; color: var(--sp-text-muted);
}
.sp-solution {
  background: color-mix(in srgb, var(--sp-success) 10%, var(--sp-bg-card));
  border-right: 4px solid var(--sp-success); border-radius: var(--sp-radius-sm);
  padding: 1.25rem 1.35rem; margin-bottom: 1rem; color: var(--sp-text-muted);
}

.sp-about-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: start; margin-top: 2rem;
}
.sp-about-card {
  background: var(--sp-bg-card); border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius); padding: 1.75rem; box-shadow: var(--sp-shadow);
}
.sp-edu-item {
  display: flex; gap: 0.85rem; padding: 0.85rem 0; border-bottom: 1px solid var(--sp-border-soft);
}
.sp-edu-item:last-child { border-bottom: none; }
.sp-edu-item__icon { font-size: 1.4rem; flex-shrink: 0; }

.sp-contact-strip {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.5rem;
}

.sp-content { max-width: 780px; margin-inline: auto; }
.sp-content h1, .sp-content h2, .sp-content h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; line-height: 1.35; }
.sp-content p { margin-bottom: 1.1rem; color: var(--sp-text-muted); }
.sp-content img { border-radius: var(--sp-radius-sm); margin-block: 1.5rem; }

.sp-hidden { display: none !important; }
.sp-text-center { text-align: center; }
.sp-mt-1 { margin-top: 0.5rem; }
.sp-mt-2 { margin-top: 1rem; }
.sp-mt-3 { margin-top: 1.5rem; }
.sp-mt-4 { margin-top: 2rem; }
.sp-mb-2 { margin-bottom: 1rem; }
.sp-mb-3 { margin-bottom: 1.5rem; }
.sp-mb-4 { margin-bottom: 2rem; }
.sp-ajax-zone { min-height: 200px; }
.sp-ajax-zone.is-loading { pointer-events: none; }

.sp-mobile-nav {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--sp-bg) 96%, transparent);
  backdrop-filter: blur(16px); z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.sp-mobile-nav.is-open { opacity: 1; visibility: visible; }
.sp-mobile-nav a {
  font-size: 1.3rem; font-weight: 700; color: var(--sp-text);
  padding: 0.5rem 1.5rem; border-radius: var(--sp-radius-sm);
}
.sp-mobile-nav a:hover { color: var(--sp-primary); background: var(--sp-primary-soft); }
.sp-mobile-nav__close {
  position: absolute; top: 1.25rem; left: 1.25rem;
  width: 44px; height: 44px; border-radius: var(--sp-radius-full);
  border: 1px solid var(--sp-border); background: var(--sp-bg-card);
  font-size: 1.4rem; cursor: pointer; color: var(--sp-text);
}

@media (max-width: 900px) {
  .sp-footer__grid { grid-template-columns: 1fr 1fr; }
  .sp-nav { display: none; }
  .sp-menu-btn { display: flex; align-items: center; justify-content: center; }
  .sp-about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sp-footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .sp-footer__bottom { flex-direction: column; text-align: center; }
  .sp-products-grid { grid-template-columns: 1fr; }
  .sp-cta-buttons { flex-direction: column; align-items: center; }
}


/* FAQ accordion — minimal lines + smooth open */
.sp-faq-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--sp-border);
  border-radius: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: background 0.25s ease;
}
.sp-faq-item[open] {
  border-color: var(--sp-border);
  box-shadow: none;
  background: transparent;
}
.sp-faq-item summary {
  padding: 1.15rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--sp-text);
  transition: color 0.2s ease;
}
.sp-faq-item summary:hover { color: var(--sp-primary); }
.sp-faq-item summary::-webkit-details-marker { display: none; }
.sp-faq-item summary::after {
  content: '+';
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--sp-primary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.sp-faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}
.sp-faq-body {
  color: var(--sp-text-muted);
  line-height: 1.85;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  transition:
    max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    padding 0.35s ease;
}
.sp-faq-item[open] .sp-faq-body {
  max-height: 320px;
  opacity: 1;
  padding: 0 0 1.25rem;
}

/* Fit box – این پلاگین به دردت می‌خوره اگر */
.sp-fit-box {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 1.75rem;
  margin-block: 1.5rem;
  box-shadow: var(--sp-shadow);
}
.sp-fit-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sp-fit-list {
  display: grid;
  gap: 0.65rem;
}
.sp-fit-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--sp-text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}
.sp-fit-list li::before {
  content: '✓';
  color: var(--sp-success);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.1rem;
}


/* EDD buy buttons blend with theme */
.sp-edd-buy,
.edd-add-to-cart,
.edd_go_to_checkout {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.8rem !important;
  border-radius: var(--sp-radius-sm) !important;
  font-weight: 600 !important;
  font-family: var(--sp-font) !important;
  background: linear-gradient(135deg, var(--sp-primary), color-mix(in srgb, var(--sp-primary) 70%, var(--sp-accent))) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px var(--sp-primary-soft);
  transition: all var(--sp-transition) !important;
  text-decoration: none !important;
}
.sp-edd-buy:hover,
.edd-add-to-cart:hover {
  transform: translateY(-2px);
  color: #fff !important;
}


/* Hybrid SPA */
.sp-main.sp-spa-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.sp-nav a.is-active,
.sp-mobile-nav a.is-active {
  color: var(--sp-primary);
  font-weight: 800;
}

/* ---- Cart button (header) ---- */
.sp-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--sp-radius-full);
  border: none;
  background: transparent;
  text-decoration: none !important;
  color: var(--sp-text) !important;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.sp-cart-btn:hover {
  background: var(--sp-primary-soft);
  color: var(--sp-primary) !important;
}
.sp-cart-btn__icon { font-size: 1.15rem; line-height: 1; display: inline-flex; }
.sp-cart-btn__icon svg { width: 20px; height: 20px; display: block; }
.sp-cart-btn__count {
  position: absolute;
  top: -3px;
  left: -3px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--sp-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.sp-cart-btn.has-items {
  background: var(--sp-primary-soft);
  color: var(--sp-primary) !important;
}

/* ---- Responsive tables → cards on mobile ---- */
.sp-table-responsive {
  width: 100%;
}
@media (max-width: 720px) {
  table.sp-table-responsive,
  #edd_checkout_cart.sp-table-responsive {
    display: block;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  table.sp-table-responsive thead,
  #edd_checkout_cart.sp-table-responsive thead {
    display: none;
  }
  table.sp-table-responsive tbody,
  #edd_checkout_cart.sp-table-responsive tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  table.sp-table-responsive tr,
  #edd_checkout_cart.sp-table-responsive tr {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--sp-shadow);
  }
  table.sp-table-responsive td,
  #edd_checkout_cart.sp-table-responsive td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border: none !important;
    padding: 0.25rem 0 !important;
    text-align: left;
  }
  table.sp-table-responsive td::before,
  #edd_checkout_cart.sp-table-responsive td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--sp-text-muted);
    text-align: right;
  }
}

/* Account tables / admin-like lists in theme */
@media (max-width: 720px) {
  .sp-account__list .sp-account__row {
    flex-direction: column;
    align-items: stretch;
  }
}

.sp-footer__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sp-footer__copy-line {
  font-weight: 600;
}
.sp-footer__copy-fun {
  font-size: 0.85rem;
  color: var(--sp-text-soft);
}

/* Cart badge always visible */
.sp-cart-btn__count {
  display: inline-flex !important;
}
.sp-cart-btn__count:empty::before {
  content: '0';
}

/* Homepage plugin cards */
.sp-product-card {
  position: relative;
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 1.5rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.sp-product-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--sp-primary), var(--sp-accent));
  transform: scaleX(0); transition: transform 0.35s ease;
}
.sp-product-card:hover::before { transform: scaleX(1); }
.sp-product-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--sp-primary) 30%, var(--sp-border));
  box-shadow: 0 22px 42px -18px color-mix(in srgb, var(--sp-primary) 28%, transparent);
}
.sp-product-card__emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; font-size: 1.5rem; line-height: 1;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--sp-primary-soft), var(--sp-accent-soft));
}
.sp-product-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}
.sp-product-card__blurb {
  margin: 0;
  flex: 1;
  color: var(--sp-text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.sp-product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.35rem;
}
.sp-product-card__buy .edd_download_purchase_form,
.sp-product-card__buy form {
  display: inline;
  margin: 0;
}
.sp-product-card__buy .sp-btn,
.sp-product-card__buy .edd-submit {
  padding: 0.4rem 0.85rem !important;
  font-size: 0.85rem !important;
  min-height: auto !important;
}
/* Never leave spinner forever */
.edd-submit.sp-btn-loading:not(.edd-loading) {
  opacity: 1;
}
.edd-submit .sp-btn-spinner { display: none; }
.edd-submit.edd-loading .sp-btn-spinner,
.edd-submit.sp-btn-loading .sp-btn-spinner { display: inline-block; }

/* Product card actions — one row, same size, buy more visible by color only */
.sp-product-card__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: stretch;
  margin-top: 0.5rem;
}
.sp-product-card__actions > .sp-btn,
.sp-product-card__actions .sp-product-card__buy,
.sp-product-card__actions .sp-product-card__buy .sp-btn,
.sp-product-card__actions button.sp-btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  text-align: center;
  padding: 0.45rem 0.5rem !important;
  font-size: 0.82rem !important;
  min-height: 2.35rem;
  white-space: nowrap;
}
.sp-product-card__buy {
  flex: 1 1 0;
  display: flex;
}
.sp-product-card__buy .sp-btn {
  width: 100%;
}
@media (max-width: 520px) {
  .sp-product-card__actions {
    flex-wrap: wrap;
  }
  .sp-product-card__actions > .sp-btn,
  .sp-product-card__actions .sp-product-card__buy {
    flex: 1 1 calc(50% - 0.4rem);
  }
}

/* Domain modal */
.sp-domain-modal[hidden] { display: none !important; }
.sp-domain-modal {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.sp-domain-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.sp-domain-modal__box {
  position: relative;
  width: min(420px, 100%);
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  box-shadow: var(--sp-shadow-lg);
  padding: 1.35rem 1.25rem 1.25rem;
  z-index: 1;
}
.sp-domain-modal__x {
  position: absolute;
  top: 0.6rem;
  left: 0.7rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--sp-text-muted);
}
.sp-domain-modal__box h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 800;
}
.sp-domain-modal__hint {
  margin: 0 0 0.75rem;
  color: var(--sp-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.sp-domain-modal__product {
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--sp-primary);
}
.sp-domain-modal__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.sp-domain-modal__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--sp-border);
  background: var(--sp-bg);
  color: var(--sp-text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.sp-domain-modal__err {
  color: var(--sp-danger);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}
.sp-domain-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}
.sp-cart__domain {
  display: block;
  font-size: 0.85rem;
  color: var(--sp-text-muted);
  margin-top: 0.15rem;
}
.sp-cart__domain--missing {
  color: var(--sp-danger);
  font-weight: 600;
}
.sp-ty-domain {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 14%, var(--sp-bg-card));
  color: #92400e;
  font-weight: 700;
  font-size: 0.95rem;
}
[data-theme="dark"] .sp-ty-domain {
  color: #fcd34d;
}

/* یکسان‌سازی کامل دکمه‌های کارت */
.sp-product-card__actions .sp-btn,
.sp-product-card__actions a.sp-btn,
.sp-product-card__actions button.sp-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 2.4rem;
  min-height: 2.4rem;
  max-height: 2.4rem;
  padding: 0 0.55rem !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  line-height: 1.2 !important;
  box-sizing: border-box;
}
.sp-product-card__actions .sp-btn--outline {
  border-width: 1.5px;
}
.sp-product-card__actions .sp-btn--primary {
  border: 1.5px solid transparent;
}

.sp-product-card__actions {
  align-items: center !important;
}
.sp-product-card__actions .sp-product-card__buy {
  display: flex;
  align-items: center;
  align-self: center;
}
.sp-product-card__actions .sp-btn,
.sp-product-card__actions button.sp-btn {
  margin: 0 !important;
  vertical-align: middle;
}
.sp-domain-modal__actions--stack {
  flex-direction: column;
  align-items: stretch;
}
.sp-domain-modal__actions--stack .sp-btn {
  width: 100%;
  justify-content: center;
}

