.product-rail-section {
  position: relative;
  overflow: hidden;
}

.pro-rail-section {
  background: linear-gradient(180deg, #f7f8f8 0%, #fff 100%);
}

.economy-rail-section {
  background: #fff;
}

/* Photographic Royal hero: separate desktop/mobile art direction. */
.royal-home-hero {
  position: relative;
  isolation: isolate;
  min-height: var(--hero-min-height, 650px);
  overflow: hidden;
  border-bottom: 1px solid #e3eaec;
  background: #f7f4ee;
}

.royal-home-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(270deg, rgba(255, 253, 249, .96) 0%, rgba(255, 253, 249, .86) 27%, rgba(255, 253, 249, .2) 46%, transparent 60%);
  mask-image: none;
  pointer-events: none;
}

.home-hero-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
}

.home-hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center left;
  transform-origin: center;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: var(--hero-min-height, 650px);
  align-items: center;
}

.home-hero-copy {
  width: min(100%, var(--hero-content-width, 560px));
  margin-left: auto;
  padding: 62px 0 70px;
  text-align: right;
}

.home-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #21888a;
  font-size: .98rem;
  font-weight: 780;
}

.home-hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.home-hero-title {
  max-width: 620px;
  margin: 15px 0 17px;
  color: var(--hero-title-color, #17394b);
  font-size: clamp(2.75rem, 4.8vw, var(--hero-title-size, 58px));
  line-height: 1.28;
  letter-spacing: -.035em;
}

.home-hero-rule {
  display: block;
  width: 66px;
  height: 3px;
  margin: 0 0 22px;
  border-radius: 99px;
  background: linear-gradient(90deg, #46a4a5, #1f6d70);
}

.home-hero-lead {
  max-width: 540px;
  margin: 0;
  color: #5e7280;
  font-size: var(--hero-text-size, 17px);
  line-height: 2.05;
}

.home-hero-cta {
  display: inline-flex;
  min-width: 230px;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 29px;
  padding: 7px 9px 7px 23px;
  border: 1px solid rgba(20, 79, 84, .14);
  border-radius: 18px;
  background: linear-gradient(125deg, #174e59, #209394);
  box-shadow: 0 17px 38px rgba(29, 105, 108, .22);
  color: #fff;
  font-size: .91rem;
  font-weight: 850;
  transition: transform .25s ease, box-shadow .25s ease;
}

.home-hero-cta b {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .13);
  font-size: 1.15rem;
  transition: transform .25s ease, background .25s ease;
}

.home-hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(29, 105, 108, .28);
}

.home-hero-cta:hover b {
  transform: translateX(-3px);
  background: rgba(255, 255, 255, .2);
}

.home-hero-cta:focus-visible {
  outline: 3px solid rgba(32, 147, 148, .28);
  outline-offset: 4px;
}

.home-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 25px;
  color: #536c78;
  font-size: .77rem;
  font-weight: 720;
}

.home-hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.home-hero-points span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #2b8c8e;
  box-shadow: 0 0 0 4px rgba(43, 140, 142, .1);
}

.rail-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.rail-title {
  max-width: 650px;
}

.rail-title h2 {
  margin: 7px 0 5px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.3;
}

.rail-title p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.rail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--teal-dark);
  font: 850 .72rem/1.4 Vazirmatn, sans-serif;
  letter-spacing: .13em;
}

.rail-eyebrow::before {
  content: "";
  width: 25px;
  height: 2px;
  border-radius: 3px;
  background: currentColor;
}

.rail-eyebrow.pro,
.rail-more.pro {
  color: #b48732;
}

.rail-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 10px 0;
  color: var(--teal-dark);
  font-size: .84rem;
  font-weight: 850;
}

.rail-more span {
  font-size: 1.15rem;
  transition: transform .2s ease;
}

.rail-more:hover span {
  transform: translateX(-5px);
}

.product-rail-shell {
  position: relative;
}

.product-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 54px) / 4);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  direction: ltr;
  padding: 10px 3px 20px;
  touch-action: pan-x pan-y;
}

.product-rail::-webkit-scrollbar {
  display: none;
}

.home-product-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(104px, auto);
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e2e5;
  border-radius: 24px;
  background: #fff;
  direction: rtl;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.home-product-card:hover {
  transform: translateY(-5px);
  border-color: #c4d2d7;
  box-shadow: 0 22px 50px rgba(27, 56, 72, .11);
}

.series-card-tag {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  min-width: 70px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 13px;
  border-radius: 0 0 13px 0;
  color: #fff;
  font: 900 .66rem/1 Arial, sans-serif;
  letter-spacing: .03em;
  pointer-events: none;
}

.series-card-tag.pro {
  background: linear-gradient(135deg, #9d7127, #d0a858);
}

.series-card-tag.economy {
  background: linear-gradient(135deg, #23777a, #42a0a0);
}

.home-product-media {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #fff 0%, #f0f3f4 63%, #e9edef 100%);
}

.home-product-media img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 15px 18px rgba(24, 45, 57, .15));
  transition: transform .3s ease;
}

.home-product-card:hover .home-product-media img {
  transform: scale(1.035);
}

.home-product-body {
  position: relative;
  z-index: 3;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-top: 1px solid #e0e7ea;
  background: #fff;
  overflow: hidden;
}

.home-product-body > div { min-width: 0; }

.home-product-card .card-link { z-index: 8; }

.home-product-body h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.home-product-body p {
  margin: 0;
  color: #85959d;
  font-size: .7rem;
}

.card-arrow {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #f0f5f5;
  color: var(--teal-dark);
  font-size: 1.15rem;
  transition: .2s ease;
}

.pro-card .card-arrow {
  background: #faf4e7;
  color: #a77a2b;
}

.home-product-card:hover .card-arrow {
  background: var(--ink);
  color: #fff;
  transform: translateX(-3px);
}

.rail-button {
  position: absolute;
  z-index: 8;
  top: 42%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #d4dfe3;
  border-radius: 50%;
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
  box-shadow: 0 13px 34px rgba(32, 61, 79, .15);
  cursor: pointer;
  transition: .2s ease;
}

.rail-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.rail-prev { right: -22px; }
.rail-next { left: -22px; }

.rail-pagination {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 6px;
  direction: ltr;
}

.rail-pagination i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #d1dcdf;
  transition: width .22s ease, background .22s ease;
}

.rail-pagination i.active {
  width: 25px;
  background: var(--teal);
}

.pro-rail-section .rail-pagination i.active {
  background: #b48732;
}

@media (max-width: 1100px) {
  .product-rail {
    grid-auto-columns: calc((100% - 36px) / 3);
  }
}

@media (max-width: 900px) {
  .royal-home-hero {
    min-height: clamp(740px, 125vw, 920px);
    background: #f3ede4;
  }
  .royal-home-hero::after { display: none; }
  .home-hero-content {
    min-height: clamp(740px, 125vw, 920px);
    align-items: flex-start;
    padding: 0;
  }
  .home-hero-copy {
    width: min(100%, 720px);
    max-width: none;
    margin: 0;
    padding: 46px 0 0;
  }
  .home-hero-media {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow: hidden;
    border-top: 0;
  }
  .home-hero-media::before {
    display: none;
  }
  .home-hero-media img {
    object-fit: contain;
    object-position: center bottom;
  }
}

@media (max-width: 760px) {
  .home-hero-copy { padding: 38px 0 0; }
  .home-hero-eyebrow { font-size: .82rem; }
  .home-hero-title {
    max-width: 520px;
    margin-block: 12px 14px;
    font-size: clamp(2.25rem, 11vw, 3.25rem);
    line-height: 1.32;
  }
  .home-hero-rule {
    width: 52px;
    margin-bottom: 17px;
  }
  .home-hero-lead {
    font-size: .93rem;
    line-height: 2;
  }
  .home-hero-cta {
    min-width: 214px;
    min-height: 55px;
    margin-top: 23px;
  }
  .home-hero-points {
    display: none;
  }
  .rail-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .rail-title p { font-size: .79rem; }
  .rail-more {
    align-self: flex-start;
    font-size: .74rem;
  }
  .product-rail {
    grid-auto-columns: calc((100% - 10px) / 2);
    gap: 10px;
    padding-inline: 0;
  }
  .rail-button { display: none; }
  .home-product-card {
    grid-template-rows: auto minmax(98px, auto);
    border-radius: 19px;
  }
  .series-card-tag {
    min-width: 54px;
    height: 27px;
    padding-inline: 8px;
    border-radius: 0 0 9px 0;
    font-size: .54rem;
  }
  .home-product-media {
    aspect-ratio: 1 / 1;
  }
  .home-product-media img { inset: 7%; width: 86%; height: 86%; }
  .home-product-body {
    min-height: 98px;
    gap: 7px;
    padding: 12px 11px;
  }
  .home-product-body h3 {
    margin-bottom: 2px;
    font-size: .77rem;
    line-height: 1.55;
  }
  .home-product-body p {
    font-size: .59rem;
    line-height: 1.6;
  }
  .card-arrow {
    width: 31px;
    height: 31px;
    font-size: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-cta,
  .home-hero-cta b { transition: none; }
}

@media (max-width: 430px) {
  .home-product-body { min-height: 98px; }
}

/* Final photographic artwork carries its own visible Persian copy. Keep the
   semantic heading available to assistive technology without duplicating it. */
.royal-home-hero--artwork {
  min-height: 0;
  aspect-ratio: 16 / 7;
  background: #c9ced1;
}

.royal-home-hero--artwork::after {
  display: none;
}

.royal-home-hero--artwork .home-hero-content {
  position: absolute;
  inset: 0;
  min-height: 0;
  pointer-events: none;
}

.royal-home-hero--artwork .home-hero-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.royal-home-hero--artwork .home-hero-media img {
  object-fit: cover;
  object-position: center;
}

@media (max-width: 900px) {
  .royal-home-hero.royal-home-hero--artwork {
    min-height: 0;
    aspect-ratio: 4 / 5;
    background: #c9ced1;
  }

  .royal-home-hero--artwork .home-hero-content {
    min-height: 0;
    padding: 0;
  }

  .royal-home-hero--artwork .home-hero-media img {
    object-fit: cover;
    object-position: center;
  }
}
