/* تکمیل‌کننده‌ی توکن‌های Tailwind — مواردی که با کلاس تنظیم نمی‌شوند. */

/* مقیاس کلی: همه‌ی اندازه‌ها rem هستند، پس با بزرگ‌شدن فونت ریشه
   در صفحه‌های بزرگ، متن و فاصله‌ها و عرض محتوا با هم بزرگ می‌شوند. */
html { font-size: 16px; }
@media (min-width: 1024px) { html { font-size: 17px; } }
@media (min-width: 1536px) { html { font-size: 18px; } }

html, body { margin: 0; padding: 0; }
body { overscroll-behavior-y: none; }
.is-scroll-locked { overflow: hidden; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

/* خط‌چین ملایم پس‌زمینه سربرگ‌ها */
.hero-dots {
  background-image: radial-gradient(circle, rgba(2, 132, 199, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
}

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* برش چندخطی */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* کارت محصول: میکرو-لیفت و زوم تصویر */
.product-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.product-card:hover { transform: translateY(-2px); border-color: #CBD5E1; box-shadow: 0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.03); }
.product-card .card-img { transition: transform .3s ease; }
.product-card:hover .card-img { transform: scale(1.03); }

/* کشوی فیلتر فروشگاه در موبایل و تبلت.
   وضعیت با کلاس اختصاصی is-open کنترل می‌شود (نه کلاس‌های Tailwind که CDN باید
   در لحظه بسازد) و در حالت بسته visibility:hidden است تا حتی اگر انیمیشن
   عقب بیفتد، کشو هرگز روی صفحه نماند و فیلدهایش با Tab در دسترس نباشد. */
@media (max-width: 1023.98px) {
  .filter-drawer {
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s;
  }
  .filter-drawer.is-open {
    transform: none;
    visibility: visible;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s;
  }
}
.drawer-overlay { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .filter-drawer, .filter-drawer.is-open, .drawer-overlay { transition: none; }
}

/* باز/بسته شدن زیردسته‌ها در فیلتر فروشگاه */
.collapse-chevron { transition: transform .2s ease; }
[data-collapse-toggle][aria-expanded="true"] .collapse-chevron { transform: rotate(180deg); }

/* =====================================================================
   Hero تعاملی صفحه اصلی
   ===================================================================== */
.hero-bg {
  --mx: 60%;
  --my: 40%;
  background:
    linear-gradient(160deg, #EFF4FF 0%, #FFFFFF 42%, #F0F9FF 100%);
}
.hero-orb {
  position: absolute;
  z-index: -10;
  width: 34rem;
  height: 34rem;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  will-change: transform, translate;
  transition: translate .6s cubic-bezier(.2,.7,.2,1);
}
.hero-orb--ocean {
  top: -12rem; right: -8rem;
  background: radial-gradient(circle, rgba(56,189,248,.55), transparent 68%);
  animation: hero-drift-a 18s ease-in-out infinite alternate;
}
.hero-orb--amber {
  bottom: -16rem; left: -10rem;
  background: radial-gradient(circle, rgba(251,191,36,.35), transparent 68%);
  animation: hero-drift-b 24s ease-in-out infinite alternate;
}
.hero-orb--navy {
  top: 30%; left: 35%;
  width: 22rem; height: 22rem;
  background: radial-gradient(circle, rgba(30,58,138,.14), transparent 70%);
  animation: hero-drift-a 30s ease-in-out infinite alternate-reverse;
}
/* هاله‌ای که دنبال نشانگر ماوس می‌آید */
.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background: radial-gradient(38rem circle at var(--mx) var(--my), rgba(2,132,199,.10), transparent 60%);
}
@keyframes hero-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4rem, 3rem, 0) scale(1.12); }
}
@keyframes hero-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(5rem, -3rem, 0) scale(.92); }
}

/* کارت‌های شناور سمت تصویر Hero */
.hero-tilt {
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
}
.hero-float { animation: hero-float 6s ease-in-out infinite; }
.hero-float--slow { animation-duration: 8s; animation-delay: -3s; }
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.hero-shimmer {
  background: linear-gradient(90deg, #E2E8F0 0%, #F1F5F9 50%, #E2E8F0 100%);
  background-size: 200% 100%;
  animation: hero-shimmer 2.4s linear infinite;
}
@keyframes hero-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb, .hero-float, .hero-shimmer { animation: none !important; }
  .hero-orb, .hero-tilt { transition: none !important; }
  .product-card, .product-card .card-img { transition: none; }
}

/* متن غنی صفحات ثابت، توضیحات محصول و مقالات */
.rich-text { color: #45464d; font-size: 1rem; line-height: 1.85; }
.rich-text p { margin: 0 0 1rem; }
.rich-text h2 { color: #0F172A; font-size: 1.5rem; font-weight: 700; line-height: 1.5; margin: 2rem 0 .75rem; }
.rich-text h3 { color: #0F172A; font-size: 1.1875rem; font-weight: 600; line-height: 1.55; margin: 1.5rem 0 .5rem; }
.rich-text ul, .rich-text ol { margin: 0 0 1rem; padding-inline-start: 1.5rem; }
.rich-text li { margin-bottom: .35rem; }
.rich-text a { color: #0284C7; text-decoration: underline; }
.rich-text blockquote {
  margin: 1.5rem 0; padding: 1rem 1.25rem;
  border-inline-start: 3px solid #0284C7; background: #F8FAFC; border-radius: .5rem;
}

/* آکاردئون سرفصل‌ها */
details.chapter > summary { list-style: none; cursor: pointer; }
details.chapter > summary::-webkit-details-marker { display: none; }
details.chapter[open] .chapter-chevron { transform: rotate(180deg); }
.chapter-chevron { transition: transform .2s ease; }
details > summary::-webkit-details-marker { display: none; }

/* اسکرول‌بار نازک */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
