/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* --- Header --- */
.site-header {
  position: sticky;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.header-inner {
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 2rem; width: auto; }
.nav { display: flex; gap: 1.5rem; }
.nav a {
  font-weight: 500;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 0.8; }

/* --- Hero: height always matches image (no fixed height, no color bands) --- */
.hero {
  position: relative;
  min-height: 0;
  height: 60vh;
  max-height: 60vh;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: block;
}
.hero-image-layer {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  will-change: transform;
}
.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  vertical-align: middle;
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.hero-content * {
  pointer-events: auto;
}
.hero-content {
  visibility: hidden;
}
.hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
}
.hero-tagline {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.8;
  opacity: 0;
  animation: heroFadeIn 0.8s 0.2s ease forwards;
}
@keyframes heroFadeIn {
  to { opacity: 1; }
}

/* --- Section overlap (subscription over hero) --- */
.section-overlap {
  position: relative;
  z-index: 10;
  margin-top: -100px;
  padding-top: 2rem;
  padding-bottom: 3rem;
  background: #fff;
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .section-overlap {
    margin-top: 0;
    border-radius: 0;
  }
}

/* --- Section titles --- */
.section {
  padding: 3rem 0;
}
.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
}

/* --- Journey section (3-step flow) --- */
.journey {
  background: #f9fafb;
  position: relative;
}

.journey-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.journey-header {
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
}

.journey-title {
  margin-bottom: 0.75rem;
}

.journey-subtitle {
  margin: 0;
  font-size: 0.98rem;
  color: #4b5563;
}

.journey + .section-overlap {
  margin-top: 0;
}

.journey-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.journey-steps::-webkit-scrollbar {
  display: none;
}

.journey-step {
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.journey-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.journey-step-media {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0.85rem 0.85rem 0;
  background: #fff;
}

.journey-step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.9rem;
}

.journey-step-body {
  padding: 1.1rem 1.4rem 1.4rem;
}

.journey-step-label {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.journey-step-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.journey-step-text {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
}

.journey-arrow {
  display: none;
}

/* --- Subscription plans (full-width cards) --- */
.subscription-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.plan-card--yearly {
  background: linear-gradient(135deg, #ecfdf3, #f0fdf4);
  border-color: #4ade80;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.plan-card-heading {
  max-width: 24rem;
}

.plan-card-label {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.plan-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #22c55e1a;
  color: #15803d;
}

.plan-card-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.plan-card-price {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.plan-card-amount {
  font-size: 1.9rem;
  font-weight: 700;
}

.plan-card-period {
  margin-inline-start: 0.25rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.plan-card-features {
  margin: 1.1rem 0 1.35rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.plan-card-features li {
  position: relative;
  padding-inline-start: 1.35rem;
}

.plan-card-features li::before {
  content: "";
  position: absolute;
  inset-block-start: 0.6em;
  inset-inline-start: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #22c55e;
}

.plan-card-cta {
  margin-top: auto;
  align-self: stretch;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.plan-card-cta--accent {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.4);
}

.plan-card-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45);
}

.plan-card-cta--accent:hover {
  box-shadow: 0 14px 32px rgba(22, 163, 74, 0.5);
}

@media (max-width: 640px) {
  .hero {
    height: auto;
    max-height: none;
  }

  .hero-inner {
    height: auto;
    max-height: none;
  }

  .hero-image-layer {
    height: auto;
    max-height: none;
  }

  .hero-image {
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .plan-card {
    padding-inline: 1.4rem;
  }

  .plan-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .plan-card-price {
    text-align: left;
  }
}

@media (min-width: 768px) {
  .journey-steps {
    justify-content: center;
    overflow-x: visible;
  }

  .journey-step {
    flex: 0 0 280px;
  }

  .journey-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .journey-arrow img {
    width: 3rem;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .journey-step {
    flex: 0 0 220px;
  }

  .journey-step-body {
    padding: 0.9rem 1rem 1.1rem;
  }

  .journey-step-title {
    font-size: 1rem;
  }

  .journey-step-text {
    font-size: 0.85rem;
  }
}

/* --- Products grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card-link {
  display: block;
  color: inherit;
}
.product-card-link:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  border-radius: 1rem;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}
.product-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  overflow: hidden;
}
.product-card-slider {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.product-card-slider::-webkit-scrollbar { display: none; }
.product-card-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  height: 100%;
}
.product-card-slide img,
.product-card-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card-slide video {
  background: #000;
}
.product-card-play-icon {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.product-card-play-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-inline-start: 2px;
}
.product-card-body {
  padding: 1rem;
}
.product-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.product-card-desc {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
}
.product-card-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2563eb;
}

/* --- Footer --- */
.site-footer {
  padding: 2rem 0;
  background: #1a1a1a;
  color: #ccc;
}
.footer-inner {
  display: grid;
  gap: 1rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.footer-logo { border-radius: 8px; }
.footer-brand-name { font-weight: 600; color: #fff; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.footer-nav a {
  transition: color 0.2s;
}
.footer-nav a:hover { color: #fff; }
.footer-social a:hover { color: #fff; }
.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #888;
}

/* --- RTL (Farsi) --- */
[dir="rtl"] .product-card-play-icon { left: auto; right: 0.5rem; margin-inline-start: 0; margin-inline-end: 2px; }

[dir="rtl"] .plan-card-header {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .plan-card-price {
  text-align: left;
}

[dir="rtl"] .plan-card-features li {
  padding-inline-start: 0;
  padding-inline-end: 1.35rem;
}

[dir="rtl"] .plan-card-features li::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

[dir="rtl"] .journey-steps {
  flex-direction: row;
}

[dir="rtl"] .journey-arrow img {
  transform: scaleX(-1);
}

[dir="rtl"] .product-info {
  text-align: right;
}

[dir="rtl"] .product-actions {
  justify-content: flex-start;
}

[dir="rtl"] .thumb-badge,
[dir="rtl"] .community-badge {
  inset-inline-start: auto;
  inset-inline-end: 0.4rem;
}

/* --- Product card fade-in on scroll (polish) --- */
.product-card {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.product-card:hover {
  transform: translateY(-4px);
}

/* --- Buttons (shared) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  background: #fff;
  color: #1a1a1a;
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.45);
}
.btn-outline {
  border-color: #c7d2fe;
  color: #1f3a8a;
  background: #fff;
}
.btn-ghost {
  border-color: #e5e7eb;
  color: #4b5563;
}
.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.btn-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

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

/* --- Product details page --- */
.product-detail {
  padding: 3rem 0 2rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: start;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.product-viewer {
  position: relative;
  background: #f3f4f6;
  border-radius: 1.2rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.product-viewer img,
.product-viewer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-thumb {
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-thumb.is-active {
  border-color: #4f46e5;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
}

.product-thumb-media {
  position: relative;
  aspect-ratio: 4 / 3;
}

.product-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-badge {
  position: absolute;
  inset-block-end: 0.4rem;
  inset-inline-start: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.product-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: #6b7280;
}

.product-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
}

.product-summary {
  margin: 0;
  color: #4b5563;
  font-size: 1rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.9rem;
  color: #4b5563;
}

.product-meta span {
  font-weight: 600;
  color: #111827;
}

.defect-card {
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.defect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.defect-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
}

.defect-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

.defect-meter span {
  height: 0.5rem;
  border-radius: 999px;
  background: #e5e7eb;
}

.defect-meter span.is-filled {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.defect-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.product-section-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.product-description {
  background: #f8fafc;
}

.product-description p {
  margin: 0 0 1rem;
  color: #4b5563;
}

.product-description ul {
  margin: 0;
  padding-inline-start: 1.2rem;
  color: #374151;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.review-card {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.review-card h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.review-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.rating-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
  font-size: 0.85rem;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.community-item {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  position: relative;
}

.community-item img,
.community-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.community-badge {
  position: absolute;
  inset-block-start: 0.6rem;
  inset-inline-start: 0.6rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

.optional-section[data-enabled=\"false\"] {
  display: none;
}

@media (max-width: 600px) {
  .product-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
