/* Advertisement details.
   Physical layout stays LTR in both languages (gallery left, info panel right); text direction follows the language. */
.rs-details__layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 31%, 400px); gap: 18px; align-items: start; direction: ltr; }
.rs-details__layout > * { direction: var(--rs-text-dir); }
.rs-details__main, .rs-details__aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- Gallery ---------- */
.rs-gallery { direction: ltr; min-width: 0; max-width: 100%; }
.rs-gallery__stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 10; max-height: clamp(220px, 46vh, 400px); width: 100%;
  border: 1px solid var(--rs-border); border-radius: var(--rs-radius-lg); background: #050506;
}
/* Blurred copy fills the frame so portrait / odd-sized photos never look cropped or stretched */
.rs-gallery__backdrop { position: absolute; inset: -24px; background: center / cover no-repeat; filter: blur(22px) brightness(.45); }
.rs-gallery__img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .18s ease; }
.rs-gallery__img.is-loading { opacity: .35; }
.rs-gallery.is-unavailable .rs-gallery__img { filter: grayscale(.7) brightness(.6); }
.rs-gallery__stage:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; }

.rs-gallery__btn {
  position: absolute; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%;
  background: rgba(11, 11, 12, .62); color: #fff; font-size: 18px; cursor: pointer;
  backdrop-filter: blur(4px); transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.rs-gallery__btn:hover { background: var(--rs-racing-red); border-color: var(--rs-racing-red); }
.rs-gallery__btn:focus-visible { outline: none; box-shadow: var(--rs-focus-ring); }
.rs-gallery__fav { top: 12px; right: 12px; }
.rs-gallery__fav[aria-pressed="true"] { color: var(--rs-signal-red); }
.rs-gallery__fav[aria-pressed="true"]:hover { color: #fff; }
.rs-gallery__nav { top: 50%; transform: translateY(-50%); }
.rs-gallery__nav--prev { left: 14px; }
.rs-gallery__nav--next { right: 14px; }
.rs-gallery__full { bottom: 12px; left: 12px; border-radius: var(--rs-radius-md); width: 40px; height: 40px; font-size: 16px; }
.rs-gallery__count {
  position: absolute; bottom: 12px; right: 12px; padding: 6px 12px; border-radius: var(--rs-radius-md);
  background: rgba(11, 11, 12, .7); color: #fff; font-family: var(--rs-font-latin); font-weight: 700; font-size: 14px;
}
.rs-gallery__featured { position: absolute; top: 12px; left: 12px; font-size: 13px; padding: 5px 12px; }
.rs-gallery__stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  display: flex; align-items: center; gap: 14px; padding: 10px 26px;
  border: 4px solid var(--rs-chrome-silver); background: rgba(11, 11, 12, .65);
  font-size: 30px; font-weight: 800; color: #fff;
}
.rs-gallery__stamp b { font-family: var(--rs-font-display); font-style: italic; font-weight: 900; font-size: 40px; color: var(--rs-chrome-silver); }

.rs-gallery__thumbs {
  display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; min-width: 0; scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding-bottom: 2px;
}
.rs-gallery__thumb {
  flex: 0 0 96px; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; scroll-snap-align: start;
  border: 2px solid var(--rs-border); border-radius: var(--rs-radius-md); background: var(--rs-surface-2); cursor: pointer;
  opacity: .72; transition: opacity .15s ease, border-color .15s ease;
}
.rs-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-gallery__thumb:hover { opacity: 1; }
.rs-gallery__thumb.is-active { opacity: 1; border-color: var(--rs-racing-red); }
.rs-gallery__thumb:focus-visible { outline: none; box-shadow: var(--rs-focus-ring); }

/* ---------- Highlights strip ---------- */
.rs-highlights {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid var(--rs-border); border-radius: var(--rs-radius-lg); background: var(--rs-card-bg); overflow: hidden;
}
.rs-highlights li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--rs-text);
}
.rs-highlights li + li { border-inline-start: 1px solid var(--rs-border); }
.rs-highlights i { font-size: 26px; line-height: 1; color: var(--rs-signal-red); }

/* ---------- Tabs ---------- */
.rs-dtabs { display: block; border: 1px solid var(--rs-border); border-radius: var(--rs-radius-lg); background: var(--rs-card-bg); padding: 0 18px 18px; }
.rs-dtabs__list { display: flex; border-bottom: 1px solid var(--rs-border); margin-bottom: 16px; }
.rs-dtabs__tab {
  flex: 1 1 0; padding: 14px 10px 12px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  background: none; color: var(--rs-text-muted); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.rs-dtabs__tab:hover { color: var(--rs-text); }
.rs-dtabs__tab[aria-selected="true"] { color: var(--rs-text); border-bottom-color: var(--rs-racing-red); }
.rs-dtabs__tab:focus-visible { outline: none; box-shadow: inset var(--rs-focus-ring); }
.rs-dtabs__panel { padding: 14px 16px; border: 1px solid var(--rs-border); border-radius: var(--rs-radius-md); background: var(--rs-tint-bg); }
.rs-dtabs__panel:focus-visible { outline: none; box-shadow: var(--rs-focus-ring); }
.rs-details__desc { line-height: 1.95; font-size: 15px; color: var(--rs-text-secondary); }
.rs-details__desc p { margin: 0 0 10px; text-align: start; }
.rs-details__desc p:last-child { margin: 0; }
.rs-details__place { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rs-details__place > div { flex: 1 1 220px; }
.rs-details__place strong { display: block; font-size: 16px; color: var(--rs-text); }
.rs-details__place p { margin: 4px 0 0; font-size: 13.5px; color: var(--rs-text-muted); }
.rs-details__place .rs-flag { margin: 0; border-radius: 2px; }

/* ---------- Buy panel ---------- */
.rs-buy { padding: 16px; }
.rs-buy__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rs-buy__logo {
  flex: none; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; border: 2px solid var(--rs-border); box-shadow: var(--rs-shadow-sm);
}
.rs-buy__logo img { width: 34px; height: 34px; object-fit: contain; }
.rs-buy__title { flex: 1; min-width: 0; margin: 0; font-family: var(--rs-font-latin); font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--rs-text); }
html[dir="rtl"] .rs-buy__title { text-align: right; }

.rs-buy__price {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  padding: 12px 14px; margin-bottom: 8px; direction: ltr;
  border: 1px solid rgba(215, 25, 32, .55); border-radius: var(--rs-radius-md);
  background: linear-gradient(90deg, rgba(215, 25, 32, .16), rgba(215, 25, 32, .04));
}
.rs-buy__amount { font-family: var(--rs-font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--rs-price); letter-spacing: .3px; }
.rs-buy__amount small { font-size: 24px; }
.rs-buy__country { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--rs-text); direction: var(--rs-text-dir); }
.rs-buy__country .rs-flag { margin: 0; border-radius: 2px; }
html[dir="rtl"] .rs-buy__country { flex-direction: row; }
html[dir="ltr"] .rs-buy__country { flex-direction: row-reverse; }
.rs-buy__nego { flex-basis: 100%; font-size: 12.5px; font-weight: 800; color: var(--rs-text-muted); direction: var(--rs-text-dir); text-align: start; }
.rs-buy__nego::before { content: "\2022"; margin-inline-end: 6px; color: var(--rs-signal-red); }

.rs-specs { margin: 0 0 14px; }
.rs-specs > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 6px 2px; border-bottom: 1px solid var(--rs-border); }
.rs-specs dt { font-weight: 600; font-size: 14px; color: var(--rs-text-muted); }
.rs-specs dd { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--rs-text); text-align: end; }
.rs-specs dd i { flex: none; width: 20px; font-size: 17px; text-align: center; color: var(--rs-silver); }

.rs-buy__actions { display: grid; gap: 10px; }
.rs-buy__actions .rs-btn { height: 46px; font-size: 15px; }
.rs-buy__actions .rs-btn i { font-size: 18px; }
.rs-buy__actions .rs-buy__wa { height: 54px; font-size: 17px; }
.rs-buy__actions .rs-buy__wa i { font-size: 22px; }
.rs-buy__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-buy__row [aria-pressed="true"] { color: var(--rs-signal-red); border-color: rgba(255, 59, 63, .45); }
.rs-buy__report { border: 1px solid rgba(255, 59, 63, .45); background: transparent; color: var(--rs-signal-red); }
.rs-buy__report:hover { background: rgba(215, 25, 32, .1); color: var(--rs-signal-red); }
.rs-details__unavailable { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--rs-radius-md); background: var(--rs-tint-bg); font-size: 13.5px; color: var(--rs-text-secondary); }

/* ---------- Seller ---------- */
.rs-seller { padding: 16px; }
.rs-seller__title { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rs-border); font-size: 18px; font-weight: 800; }
.rs-seller__who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rs-seller__avatar {
  flex: none; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #2a2b30, #0b0b0c); border: 2px solid var(--rs-racing-red);
  font-size: 30px; color: var(--rs-chrome-silver);
}
.rs-seller__who > div { display: grid; gap: 3px; min-width: 0; }
.rs-seller__who strong { font-size: 18px; color: var(--rs-text); }
.rs-seller__who > div > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--rs-text-muted); }
.rs-seller__who .rs-flag { margin: 0; }
.rs-seller__wa { width: 100%; height: 48px; font-size: 16px; }
.rs-seller__wa i { font-size: 20px; }
.rs-seller__more { margin: 18px 0 10px; font-size: 14px; font-weight: 800; color: var(--rs-text-muted); }
.rs-seller__ads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rs-seller__ads a {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 6px; border: 1px solid var(--rs-border); border-radius: var(--rs-radius-md); color: var(--rs-text); text-decoration: none;
}
.rs-seller__ads a:hover { border-color: var(--rs-silver); background: var(--rs-hover-bg); }
.rs-seller__ads img { grid-row: span 2; width: 72px; height: 48px; object-fit: cover; border-radius: var(--rs-radius-sm); }
.rs-seller__ads span { font-family: var(--rs-font-latin); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.rs-seller__ads b { font-family: var(--rs-font-latin); font-size: 13.5px; color: var(--rs-price); text-align: start; }

/* ---------- Similar rail ---------- */
.rs-similar { margin-top: 22px; padding: 16px 0 4px; border-top: 1px solid var(--rs-border); }
.rs-similar__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rs-similar__title { margin: 0; font-size: 22px; font-weight: 800; }
.rs-similar__head .rs-btn i { font-size: 13px; }
.rs-similar__rail { position: relative; direction: ltr; }
.rs-similar__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--rs-card-gap-x)) / 4); gap: var(--rs-card-gap-x);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px;
}
.rs-similar__track::-webkit-scrollbar { display: none; }
.rs-similar__track > * { scroll-snap-align: start; direction: var(--rs-text-dir); }
.rs-similar__arrow {
  position: absolute; top: 38%; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--rs-line); border-radius: 50%; background: var(--rs-card-bg); color: var(--rs-text); cursor: pointer;
  box-shadow: var(--rs-shadow-md); transition: background-color .15s ease, opacity .15s ease;
}
.rs-similar__arrow:hover { background: var(--rs-racing-red); border-color: var(--rs-racing-red); color: #fff; }
.rs-similar__arrow:disabled { opacity: 0; pointer-events: none; }
.rs-similar__arrow--prev { left: -12px; }
.rs-similar__arrow--next { right: -12px; }
@media (min-width: 1600px) { .rs-similar__track { grid-auto-columns: calc((100% - 4 * var(--rs-card-gap-x)) / 5); } }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  /* One column. Unwrap the two columns so the price / contact panel sits right after the photos. */
  .rs-details__layout { display: flex; flex-direction: column; }
  .rs-details__main, .rs-details__aside { display: contents; }
  .rs-gallery { order: 1; }
  .rs-buy { order: 2; }
  .rs-highlights { order: 3; }
  .rs-dtabs { order: 4; }
  .rs-seller { order: 5; }
  .rs-similar__track { grid-auto-columns: calc((100% - 2 * var(--rs-card-gap-x)) / 3); }
}
@media (max-width: 767.98px) {
  .rs-similar__track { grid-auto-columns: calc((100% - var(--rs-card-gap-x)) / 2); }
  .rs-highlights { grid-template-columns: 1fr 1fr; }
  .rs-highlights li:nth-child(odd) { border-inline-start: 0; }
  .rs-highlights li:nth-child(n + 3) { border-top: 1px solid var(--rs-border); }
  .rs-similar__arrow { display: none; }
}
@media (max-width: 519.98px) {
  .rs-gallery__btn { width: 38px; height: 38px; font-size: 16px; }
  .rs-gallery__nav--prev { left: 8px; }
  .rs-gallery__nav--next { right: 8px; }
  .rs-gallery__thumb { flex-basis: 76px; }
  .rs-buy__amount { font-size: 30px; }
  .rs-similar__track { grid-auto-columns: 74%; }
  .rs-dtabs { padding: 0 12px 12px; }
}
.rs-buy__row > :only-child { grid-column: 1 / -1; }
