/* --- 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;
}

html[lang="fa"] body {
  font-family: "Vazirmatn", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

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;
  visibility: hidden;
}

.hero-content * {
  pointer-events: auto;
}

.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;
  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;
  font-family: inherit;
  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;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, 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;
  text-align: right;
}

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

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

[dir="rtl"] .plan-card-period {
  margin-inline-start: 0;
  margin-inline-end: 0.25rem;
}

[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.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 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;
}

/* --- Login modal --- */
body.modal-open {
  overflow: hidden;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
}

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

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
}

.login-modal-dialog {
  position: relative;
  width: min(460px, 100%);
  margin: 0;
  z-index: 1;
}

.login-modal-close {
  position: absolute;
  top: 0.7rem;
  inset-inline-end: 0.7rem;
}

.login-modal-title {
  font-size: clamp(1.3rem, 3.5vw, 1.95rem);
  text-align: start;
  padding-inline-end: 2.75rem;
}

.login-modal-dialog .order-subtitle {
  text-align: start;
}

.login-step-link {
  margin-top: 0.82rem;
  font-size: 0.86rem;
}

.login-email-input,
.login-modal input[type="password"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.login-modal .order-otp {
  margin-top: 1.05rem;
}

[dir="rtl"] .login-modal-title,
[dir="rtl"] .login-modal-dialog .order-subtitle {
  text-align: right;
}

@media (max-width: 560px) {
  .login-modal {
    padding: 0.75rem;
  }

  .login-modal-dialog {
    padding: 1rem;
  }
}

/* --- 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: none;
  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;
}

/* --- Timeline page --- */
.timeline-page {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 55%);
}

.timeline-header {
  max-width: 46rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.timeline-subtitle {
  margin: -0.75rem 0 0;
  color: #4b5563;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d4ed8, #3b82f6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.timeline-row:last-child {
  margin-bottom: 0;
}

.timeline-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 1.1rem;
  border: 2px solid #1d4ed8;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.timeline-card-image {
  width: 124px;
  height: 124px;
  flex: 0 0 auto;
  border-radius: 0.9rem;
  object-fit: cover;
  background: #f3f4f6;
}

.timeline-card-content {
  min-width: 0;
}

.timeline-card-title {
  margin: 0;
  color: #1e3a8a;
  font-size: 1.5rem;
  line-height: 1.2;
}

.timeline-card-text {
  margin: 0.45rem 0 0.7rem;
  color: #374151;
}

.timeline-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.timeline-card-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.timeline-card-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.timeline-card-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  border: 0;
  background: #bfdbfe;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.timeline-card-dot.is-active {
  background: #1d4ed8;
  transform: scale(1.08);
}

.timeline-card-dot:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

[dir="rtl"] .timeline-card-controls {
  align-items: flex-end;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  margin-inline: auto;
  border-radius: 999px;
  border: 4px solid #1d4ed8;
  background: #fff;
  color: #1e3a8a;
  font-size: 1.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
}

.timeline-row--left .timeline-card {
  grid-column: 1;
}

.timeline-row--right .timeline-card {
  grid-column: 3;
}

.timeline-row--left .timeline-card::after,
.timeline-row--right .timeline-card::before {
  content: "";
  width: 28px;
  height: 3px;
  background: #1d4ed8;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.timeline-row--left .timeline-card,
.timeline-row--right .timeline-card {
  position: relative;
}

.timeline-row--left .timeline-card::after {
  inset-inline-end: -29px;
}

.timeline-row--right .timeline-card::before {
  inset-inline-start: -29px;
}

.timeline-spacer {
  min-height: 1px;
}

[dir="rtl"] .timeline-card {
  text-align: right;
}

@media (max-width: 960px) {
  .timeline::before {
    inset-inline-start: 18px;
    transform: none;
  }

  .timeline-row {
    display: block;
    position: relative;
    padding-inline-start: 72px;
  }

  .timeline-spacer {
    display: none;
  }

  .timeline-marker {
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
  }

  .timeline-row .timeline-card {
    grid-column: auto;
  }

  .timeline-row .timeline-card::after {
    display: none;
  }

  .timeline-row .timeline-card::before {
    content: "";
    display: block;
    width: 14px;
    height: 3px;
    background: #1d4ed8;
    position: absolute;
    inset-inline-start: -14px;
    top: 50%;
    transform: translateY(-50%);
  }

  [dir="rtl"] .timeline::before {
    inset-inline-start: auto;
    inset-inline-end: 18px;
    transform: none;
  }

  [dir="rtl"] .timeline-row {
    padding-inline-start: 0;
    padding-inline-end: 72px;
  }

  [dir="rtl"] .timeline-marker {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }

  [dir="rtl"] .timeline-row .timeline-card::before {
    inset-inline-start: auto;
    inset-inline-end: -14px;
  }
}

@media (max-width: 560px) {
  .timeline-card {
    padding: 0.8rem;
    gap: 0.7rem;
  }

  .timeline-card-image {
    width: 92px;
    height: 92px;
  }

  .timeline-card-title {
    font-size: 1.1rem;
  }

  .timeline-card-text {
    font-size: 0.9rem;
    margin-top: 0.3rem;
  }
}

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

/* --- Order flow page --- */
.order-page {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 60%);
}

.order-shell {
  max-width: 760px;
}

.order-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.order-back svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.order-back.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.order-progress-track {
  width: 100%;
  height: 0.56rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.order-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  transition: width 0.25s ease;
}

.order-progress-text {
  margin: 0;
  min-width: 3.5rem;
  text-align: right;
  font-size: 0.9rem;
  color: #4b5563;
}

.order-step-kicker {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: #4b5563;
}

.order-flow {
  margin-top: 0.9rem;
}

.order-step {
  padding: 1.3rem;
  border-radius: 1.15rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.order-step.is-active {
  animation: orderStepFade 0.2s ease;
}

@keyframes orderStepFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.order-title {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.5rem);
  text-align: center;
  line-height: 1.2;
}

.order-subtitle {
  margin: 0.55rem 0 0;
  text-align: center;
  color: #4b5563;
}

.order-mini-kicker {
  margin: 0;
  text-align: center;
  color: #2563eb;
  font-weight: 600;
}

.order-parcel-preview {
  position: relative;
  max-width: 340px;
  margin: 1.25rem auto 1rem;
}

.order-parcel-preview img {
  width: 100%;
  height: auto;
}

.order-parcel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  min-width: 142px;
  max-width: 76%;
  padding: 0.5rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  line-height: 1.2;
}

.order-parcel-for {
  display: block;
  margin-bottom: 0.2rem;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 500;
}

.order-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.order-field-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.order-input-group {
  display: block;
}

.order-input-group span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: #374151;
  font-weight: 600;
}

.order-input-group--single {
  margin-top: 1rem;
}

.order-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.72rem 0.82rem;
  font: inherit;
  background: #fff;
}

.order-input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.order-help {
  margin: 0.65rem 0 0;
  color: #6b7280;
  font-size: 0.87rem;
  text-align: center;
}

.order-action {
  width: 100%;
  margin-top: 1rem;
}

.order-step-actions {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}

.order-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.order-plan-card {
  position: relative;
  border: 1px solid #d1d5db;
  border-radius: 0.95rem;
  padding: 0.9rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.order-plan-card.is-selected {
  border-color: #2563eb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
}

.order-plan-badge {
  position: absolute;
  top: -0.62rem;
  inset-inline-start: 0.7rem;
  margin: 0;
  border-radius: 999px;
  padding: 0.16rem 0.62rem;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
}

.order-plan-head {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  text-transform: uppercase;
}

.order-plan-offer {
  margin: 0.25rem 0 0;
  color: #1d4ed8;
  font-weight: 600;
}

.order-plan-features {
  margin: 0.7rem 0 0.9rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  color: #4b5563;
  font-size: 0.9rem;
}

.order-plan-features li {
  position: relative;
  padding-inline-start: 1.15rem;
}

.order-plan-features li::before {
  content: "";
  position: absolute;
  inset-block-start: 0.46rem;
  inset-inline-start: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #60a5fa;
}

.order-plan-price {
  margin: auto 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.order-plan-select {
  width: 100%;
}

.order-step-note {
  margin: 0.8rem 0 0;
  text-align: center;
  color: #1e3a8a;
  font-size: 0.92rem;
  font-weight: 500;
}

.order-step-note.is-error {
  color: #b91c1c;
}

.order-step-timeline {
  margin-top: 1rem;
}

.order-step-timeline .timeline::before {
  width: 10px;
}

.order-step-timeline .timeline-row {
  margin-bottom: 0.9rem;
}

.order-step-timeline .timeline-card {
  gap: 0.7rem;
  padding: 0.7rem 0.78rem;
  border-width: 1px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.order-step-timeline .timeline-card-image {
  width: 80px;
  height: 80px;
  border-radius: 0.75rem;
}

.order-step-timeline .timeline-card-title {
  font-size: 1rem;
  color: #111827;
}

.order-step-timeline .timeline-card-text {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: #374151;
}

.order-step-timeline .timeline-card-controls {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.order-step-timeline .timeline-marker {
  width: 48px;
  height: 48px;
  border-width: 3px;
  font-size: 1.05rem;
}

.order-otp {
  margin: 1rem auto 0.7rem;
  max-width: 390px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.order-otp-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.62rem;
  height: 2.85rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: inherit;
}

.order-otp-input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.order-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.order-link:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Keep login modal OTP switch spacing despite shared .order-link reset */
.login-modal .login-step-link {
  display: inline-block;
  margin-top: 0.82rem;
}

.order-summary-card {
  margin-top: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.95rem;
  padding: 1rem;
  background: #fff;
}

.order-summary-title {
  margin: 0;
  font-size: 1.2rem;
}

.order-summary-plan {
  margin: 0.4rem 0 0.75rem;
  font-weight: 600;
  color: #1e3a8a;
}

.order-summary-products {
  margin: 0.4rem 0 0.75rem;
}

.order-summary-products summary {
  cursor: pointer;
  list-style: none;
}

.order-summary-products summary::-webkit-details-marker {
  display: none;
}

.order-summary-products-list {
  margin: 0.65rem 0 0;
  padding-inline-start: 1.2rem;
  color: #374151;
}

.order-summary-products-list li + li {
  margin-top: 0.35rem;
}

.order-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem;
  font-size: 0.94rem;
  margin-top: 0.52rem;
}

.order-summary-row strong {
  white-space: nowrap;
}

.order-summary-row--saving strong {
  color: #15803d;
}

.order-summary-row--total {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid #d1d5db;
  font-size: 1.1rem;
}

.order-coupon {
  margin-top: 0.9rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.9rem;
}

.order-extras {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #f8fafc;
}

.order-extras-title {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.order-extra-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.8rem;
  color: #374151;
  line-height: 1.6;
}

.order-extra-option:first-of-type {
  margin-top: 0;
}

.order-extra-option input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.order-extra-option a {
  color: #1d4ed8;
  text-underline-offset: 0.15em;
}

.order-coupon summary {
  cursor: pointer;
  font-weight: 500;
  color: #1f2937;
}

.order-step--success {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.order-success-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.6rem;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.order-receipt-note {
  margin: 0.8rem 0 0;
  text-align: center;
  color: #4b5563;
  font-size: 0.88rem;
}

.order-complete-message {
  margin: 0.7rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: #dcfce7;
  color: #166534;
  font-size: 0.88rem;
}

.order-complete-message.is-visible {
  display: block;
}

[dir="rtl"] .order-back svg {
  transform: scaleX(-1);
}

[dir="rtl"] .order-progress-text {
  text-align: left;
}

[dir="rtl"] .order-parcel-label {
  text-align: right;
}

[dir="rtl"] .order-plan-features li {
  padding-inline-start: 1.15rem;
  padding-inline-end: 0;
  text-align: right;
}

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

[dir="rtl"] .order-plan-features {
  direction: rtl;
}

.order-input[type="email"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

[dir="rtl"] .order-summary-row {
  flex-direction: row;
}

[dir="rtl"] .order-summary-row span {
  text-align: right;
}

[dir="rtl"] .order-summary-row strong {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

[dir="rtl"] .order-extra-option {
  text-align: right;
}

[dir="rtl"] .order-otp {
  direction: ltr;
}

@media (max-width: 960px) {
  .order-step-timeline .timeline::before {
    width: 8px;
  }

  .order-step-timeline .timeline-card {
    border-width: 1px;
  }
}

@media (max-width: 760px) {
  .order-step {
    padding: 1rem;
  }

  .order-title {
    font-size: clamp(1.35rem, 6vw, 2rem);
  }

  .order-field-grid,
  .order-plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-step-note {
    font-size: 0.88rem;
  }
}

@media (max-width: 560px) {
  .order-progress {
    gap: 0.55rem;
  }

  .order-progress-text {
    min-width: 2.9rem;
    font-size: 0.82rem;
  }

  .order-otp {
    gap: 0.35rem;
  }

  .order-otp-input {
    height: 2.6rem;
  }

  .order-step-timeline .timeline-card-image {
    width: 70px;
    height: 70px;
  }
}

/* --- Admin panel page --- */
.admin-page {
  padding: 2.25rem 0 3rem;
  background: #f8fafc;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  max-width: none;
  padding-inline: 1.5rem;
  transition: grid-template-columns 0.25s ease;
}

.admin-layout.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0;
}

.admin-sidebar {
  position: sticky;
  top: 5.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  min-width: 0;
  transition: opacity 0.25s ease, padding 0.25s ease, border-width 0.25s ease;
}

.admin-layout.sidebar-collapsed .admin-sidebar {
  opacity: 0;
  padding: 0;
  border-width: 0;
  box-shadow: none;
  pointer-events: none;
}

.admin-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.admin-sidebar-toggle:hover {
  background: #f1f5f9;
  border-color: #c7d2fe;
}

.admin-sidebar-title {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  font-weight: 700;
}

.admin-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-menu a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  font-size: 0.92rem;
  color: #1f2937;
  border: 1px solid transparent;
}

.admin-menu a:hover,
.admin-menu a[aria-current="page"] {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-list-search {
  flex: 1 1 280px;
}

.admin-list-search input {
  width: 100%;
  min-height: 2.3rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.58rem 0.85rem;
  background: #fff;
  color: #111827;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-list-search input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.admin-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.admin-panel-header {
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-panel-subtitle {
  margin: 0.25rem 0 0;
  color: #6b7280;
  font-size: 0.88rem;
}

.admin-stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-stat {
  padding: 0.8rem;
  border-radius: 0.8rem;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

.admin-stat-label {
  margin: 0 0 0.35rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.admin-stat-value {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.admin-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.admin-badge--ok {
  background: #dcfce7;
  color: #166534;
}

.admin-badge--warn {
  background: #fef9c3;
  color: #854d0e;
}

.admin-badge--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-badge--accent {
  background: #ede9fe;
  color: #5b21b6;
}

.admin-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.admin-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #374151;
}

.admin-list li+li {
  margin-top: 0.42rem;
}

.admin-form-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-field span {
  font-size: 0.82rem;
  color: #4b5563;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.6rem 0.7rem;
  font: inherit;
  background: #fff;
}

.admin-field textarea {
  min-height: 84px;
  resize: vertical;
}

.admin-field--full {
  grid-column: 1 / -1;
}

.admin-main-only {
  max-width: none;
}

.admin-products-table {
  min-width: 860px;
}

.admin-users-table {
  min-width: 980px;
}

.admin-orders-table {
  min-width: 920px;
}

.admin-user-cell {
  display: grid;
  gap: 0.18rem;
}

.admin-user-name {
  font-weight: 700;
  color: #111827;
}

.admin-user-meta {
  font-size: 0.82rem;
  color: #6b7280;
}

.admin-order-model {
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 0.8rem 0.9rem;
}

.admin-order-model-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-order-detail-row td {
  background: #f8fafc;
  border-bottom: 0;
  padding-top: 0.25rem;
  padding-bottom: 0.75rem;
}

.admin-order-expanded {
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  background: #f8fafc;
  padding: 0.7rem;
  display: grid;
  gap: 0.75rem;
}

.admin-order-expanded-block {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.65rem;
}

.admin-order-products-row,
.admin-order-deliveries-section {
  padding: 0;
}

.admin-order-products-row {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.7rem;
}

.admin-order-block-title {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-order-product-list {
  margin: 0;
  padding: 0.5rem 0.6rem;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.7rem;
  background: #fff;
}

.admin-order-product-item {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0 0.45rem;
}

.admin-order-product-item:last-child {
  padding-bottom: 0;
}

.admin-order-product-item+.admin-order-product-item {
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.45rem;
}

.admin-order-product-name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
}

.admin-order-product-meta {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #475569;
}

.admin-delivery-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 26rem;
  overflow-y: auto;
}

.admin-delivery-list::-webkit-scrollbar {
  width: 6px;
}

.admin-delivery-list::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 999px;
}

.admin-delivery-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.5rem 0.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.25fr) auto minmax(0, 1.6fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.admin-delivery-header {
  margin-bottom: 0.45rem;
}

.admin-delivery-main {
  min-width: 0;
}

.admin-delivery-product {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.admin-delivery-address {
  margin: 0.18rem 0 0;
  font-size: 0.8rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-delivery-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
}

.admin-delivery-meta--time {
  white-space: nowrap;
}

.admin-delivery-meta--note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-delivery-actions {
  justify-content: flex-end;
}

.admin-order-empty-block {
  margin: 0;
  padding: 0.55rem 0.6rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.65rem;
  background: #fff;
  font-size: 0.82rem;
  color: #64748b;
}

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

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.admin-modal-dialog {
  position: relative;
  z-index: 1;
  margin: 5vh auto;
  width: min(620px, calc(100% - 1.5rem));
  max-height: 90vh;
  overflow: auto;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
  padding: 1rem;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.admin-product-cell {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.admin-product-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-product-desc {
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 32ch;
}

.admin-inline-message {
  margin: 0.9rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.88rem;
}

.admin-topbar--with-tools {
  justify-content: flex-start;
  gap: 0.75rem;
}

.admin-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-inline-start: auto;
  border: 1px solid #dbeafe;
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
}

.admin-language-switcher span {
  font-size: 0.82rem;
  color: #475569;
  white-space: nowrap;
}

.admin-language-switcher select {
  border: 0;
  background: transparent;
  font: inherit;
  color: #0f172a;
}

.admin-language-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.admin-slug-row {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #fff;
}

.admin-slug-prefix {
  padding: 0.6rem 0.55rem 0.6rem 0.7rem;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  border-inline-end: 1px solid #d1d5db;
  direction: ltr;
}

.admin-slug-input {
  flex: 1;
  border: 0;
  padding: 0.6rem 0.7rem;
  font: inherit;
  background: transparent;
  direction: ltr;
  text-align: left;
}

.admin-slug-input:focus {
  outline: none;
}

.admin-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-language-hint {
  grid-column: 1 / -1 !important;
}

.admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.admin-meta-grid .admin-field--compact {
  grid-column: span 1;
}

.admin-meta-grid .admin-field--span-2 {
  grid-column: span 2;
}

.admin-field--checkbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100%;
  text-align: center;
  padding-top: 0.15rem;
}

.admin-field--checkbox input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
}

.admin-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-rich-toolbar .btn.is-active {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
}

.admin-rich-editor {
  min-height: 120px;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.65rem 0.7rem;
  background: #fff;
  overflow: auto;
}

.admin-rich-editor:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.admin-rich-source {
  min-height: 140px;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.65rem 0.7rem;
  font: 0.86rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fff;
  resize: vertical;
}

.admin-color-control {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid #d1d5db;
  border-radius: 0.6rem;
  padding: 0.28rem 0.45rem;
  background: #fff;
}

.admin-color-control span {
  font-size: 0.78rem;
  color: #475569;
}

.admin-color-control input[type="color"] {
  width: 1.8rem;
  height: 1.3rem;
  border: 0;
  background: transparent;
  padding: 0;
}

.admin-media-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.95rem;
}

.admin-media-item {
  border: 1px solid #dbe4f0;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 1rem;
  display: grid;
  gap: 0.9rem 1rem;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  align-items: start;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.admin-media-item.is-marked-for-removal {
  opacity: 0.6;
  border-style: dashed;
}

.admin-media-item--empty {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
  color: #6b7280;
}

.admin-media-preview {
  width: 116px;
  height: 84px;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid #d7deea;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.admin-media-preview img,
.admin-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-media-meta {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.admin-media-content {
  display: grid;
  gap: 0.9rem;
}

.admin-media-type {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.04em;
}

.admin-media-src {
  margin: 0.12rem 0 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: #1f2937;
  word-break: break-all;
}

.admin-media-fields {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.admin-media-fields .admin-field {
  min-width: 0;
}

.admin-media-fields .admin-field span {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.admin-media-fields .admin-field input[type="text"],
.admin-media-fields .admin-field input[type="file"],
.admin-media-fields .admin-field select {
  width: 100%;
  min-width: 0;
}

.admin-media-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  align-self: start;
  padding-top: 0.15rem;
  min-width: 180px;
}

.admin-media-add {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 0.45rem;
}

.admin-media-add select,
.admin-media-add input {
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.6rem 0.7rem;
  font: inherit;
  background: #fff;
}

.admin-upload-row {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.admin-upload-row input[type="file"] {
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  padding: 0.4rem 0.55rem;
  background: #fff;
}

.admin-media-queue {
  margin-top: 0.65rem;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  color: #f59e0b;
  letter-spacing: 0.02em;
}

.rating-stars span {
  font-size: 1rem;
  line-height: 1;
}

.rating-stars span.is-empty {
  color: #cbd5e1;
}

.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.review-rating {
  margin-bottom: 0.55rem;
}

.review-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.review-media-grid img,
.review-media-grid video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0.8rem;
  border: 1px solid #e5e7eb;
}

.share-toast {
  position: fixed;
  z-index: 400;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  transform: translate(12px, 12px);
  white-space: nowrap;
}

[dir="rtl"] .admin-menu,
[dir="rtl"] .admin-panel,
[dir="rtl"] .admin-table th,
[dir="rtl"] .admin-table td,
[dir="rtl"] .admin-field,
[dir="rtl"] .admin-panel-subtitle {
  text-align: right;
}

[dir="rtl"] .admin-list {
  padding-left: 0;
  padding-right: 1.1rem;
}

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

[dir="rtl"] .admin-topbar--with-tools {
  justify-content: flex-start;
}

[dir="rtl"] .admin-language-switcher {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

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

[dir="rtl"] .share-toast {
  transform: translate(-12px, 12px);
}

[dir="rtl"] .admin-upload-row {
  justify-content: flex-start;
}

[dir="rtl"] .admin-delivery-header,
[dir="rtl"] .admin-modal-header {
  flex-direction: row-reverse;
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 1rem;
  }

  .admin-layout.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    position: static;
    top: auto;
  }

  .admin-layout.sidebar-collapsed .admin-sidebar {
    display: none;
  }

  .admin-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .admin-page {
    padding-top: 1.4rem;
  }

  .admin-table {
    min-width: 560px;
  }

  .admin-delivery-list {
    max-height: none;
    overflow: visible;
  }

  .admin-delivery-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
  }

  .admin-delivery-actions {
    justify-content: flex-start;
  }

  .admin-edit-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-meta-grid .admin-field--compact,
  .admin-meta-grid .admin-field--span-2 {
    grid-column: span 1;
  }

  .admin-media-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-media-preview {
    width: 100%;
    max-width: 220px;
    height: 130px;
  }

  .admin-media-actions {
    justify-content: flex-start;
  }

  .admin-media-add {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-media-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-media-preview {
    width: 100%;
    height: 180px;
  }

  .admin-media-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-media-actions {
    min-width: 0;
  }
}
