:root {
  --osv-z: 999999;
}

body.osv-modal-open {
  overflow: hidden !important;
  touch-action: none;
}

.osv-showcase {
  --osv-card-width: 246px;
  --osv-accent: #050505;
  --osv-border: #dedede;
  --osv-radius: 15px;
  color: #171717;
  font-family: inherit;
  position: relative;
  width: 100%;
}

.osv-heading {
  font: inherit;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  margin: 0 0 24px;
}

.osv-rail-wrap {
  position: relative;
}

.osv-rail {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 0 2px 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.osv-card {
  flex: 0 0 var(--osv-card-width);
  min-width: 0;
  scroll-snap-align: start;
}

.osv-card__media {
  appearance: none;
  background: #ececec;
  border: 0;
  border-radius: var(--osv-radius);
  cursor: pointer;
  display: block;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 15.4;
}

.osv-card__media video,
.osv-card__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
  width: 100%;
}

.osv-card__media:hover video {
  transform: scale(1.018);
}

.osv-card__play {
  align-items: center;
  background: rgba(0, 0, 0, .36);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  color: #fff;
  display: flex;
  height: 46px;
  justify-content: center;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity .2s ease;
  width: 46px;
}

.osv-card__media:hover .osv-card__play,
.osv-card__media:focus-visible .osv-card__play {
  opacity: 1;
}

.osv-card__play svg {
  fill: currentColor;
  height: 22px;
  margin-left: 2px;
  width: 22px;
}

.osv-card__product {
  align-items: center;
  background: #fff;
  border: 1px solid var(--osv-border);
  border-radius: 9px;
  color: inherit;
  display: flex;
  gap: 11px;
  margin: 8px 7px 0;
  min-height: 64px;
  overflow: hidden;
  padding: 5px 8px 5px 5px;
  text-decoration: none !important;
}

.osv-card__product img {
  background: #f4f0eb;
  border-radius: 5px;
  flex: 0 0 52px;
  height: 52px;
  object-fit: contain;
  width: 52px;
}

.osv-card__copy,
.osv-modal-product__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.osv-card__title {
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.osv-card__price {
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.osv-card__price del,
.osv-modal-product__price del {
  color: #777;
  font-size: .86em;
  font-weight: 400;
  margin-right: 5px;
}

.osv-card__price ins,
.osv-modal-product__price ins {
  background: transparent;
  text-decoration: none;
}

.osv-rail-arrow {
  align-items: center;
  background: rgba(255,255,255,.94);
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  box-shadow: 0 3px 14px rgba(0,0,0,.08);
  color: #2c2c2c;
  cursor: pointer;
  display: flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  position: absolute;
  top: 43%;
  transform: translateY(-50%);
  width: 42px;
  z-index: 4;
}

.osv-rail-arrow--prev { left: -12px; }
.osv-rail-arrow--next { right: -12px; }
.osv-rail-arrow[disabled] { opacity: 0; pointer-events: none; }
.osv-rail-arrow svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 22px; }

.osv-modal {
  align-items: center;
  background: rgba(10, 10, 10, .84);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  position: fixed;
  transition: opacity .22s ease;
  visibility: hidden;
  z-index: var(--osv-z);
}

.osv-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.osv-modal__viewport {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.osv-modal__side {
  background: #151515;
  border-radius: 2px;
  height: min(80vh, 772px);
  opacity: .72;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity .2s ease, transform .25s ease;
  width: min(29vw, 435px);
}

.osv-modal__side img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.osv-modal__side::after {
  background: rgba(0,0,0,.28);
  content: '';
  inset: 0;
  position: absolute;
}

.osv-modal__side--prev { right: calc(50% + min(270px, 17vw) + 34px); }
.osv-modal__side--next { left: calc(50% + min(270px, 17vw) + 34px); }

.osv-modal__player {
  background: #050505;
  border-radius: 5px;
  box-shadow: 0 20px 80px rgba(0,0,0,.45);
  height: min(96vh, 900px);
  max-height: calc(100vh - 10px);
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  transform: translateX(0);
  transition: transform .24s ease;
  width: min(506px, calc(100vw - 24px));
  z-index: 3;
}

.osv-modal__video {
  background: #000;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.osv-modal__shade {
  background: linear-gradient(to bottom, rgba(0,0,0,.23) 0%, transparent 16%, transparent 58%, rgba(0,0,0,.82) 100%);
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.osv-modal__progress {
  display: flex;
  gap: 4px;
  left: 8px;
  position: absolute;
  right: 8px;
  top: 7px;
  z-index: 6;
}

.osv-progress-segment {
  background: rgba(255,255,255,.32);
  border-radius: 4px;
  flex: 1;
  height: 3px;
  overflow: hidden;
}

.osv-progress-segment span {
  background: #fff;
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
}

.osv-progress-segment.is-past span { transform: scaleX(1); }

.osv-modal__close {
  align-items: center;
  background: rgba(30,30,30,.35);
  border: 0;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 27px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 3px;
  position: absolute;
  right: 8px;
  top: 18px;
  width: 38px;
  z-index: 7;
}

.osv-modal__brand {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  left: 10px;
  position: absolute;
  text-transform: uppercase;
  top: 22px;
  z-index: 6;
}

.osv-modal__actions {
  bottom: 158px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  right: 9px;
  z-index: 7;
}

.osv-action {
  align-items: center;
  backdrop-filter: blur(5px);
  background: rgba(222, 199, 186, .65);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.osv-action svg {
  fill: none;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 21px;
}

.osv-action.is-active svg { fill: currentColor; }

.osv-modal-product {
  backdrop-filter: blur(9px);
  background: rgba(49, 39, 34, .73);
  border-radius: 8px 8px 0 0;
  bottom: 8px;
  color: #fff;
  left: 8px;
  overflow: hidden;
  position: absolute;
  right: 8px;
  z-index: 6;
}

.osv-modal-product__info {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 10px;
  min-height: 78px;
  padding: 8px;
  text-decoration: none !important;
}

.osv-modal-product__info img {
  background: #f3f0ec;
  border-radius: 4px;
  height: 60px;
  object-fit: contain;
  width: 60px;
}

.osv-modal-product__title {
  font-size: 14px;
  line-height: 1.25;
}

.osv-modal-product__price {
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
}

.osv-modal-product__buy {
  appearance: none;
  background: var(--osv-accent);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 42px;
  padding: 10px 12px;
  text-align: center;
  width: 100%;
}

.osv-modal-product__buy:disabled { cursor: default; opacity: .6; }
.osv-modal-product__buy.is-loading { color: transparent; position: relative; }
.osv-modal-product__buy.is-loading::after {
  animation: osv-spin .7s linear infinite;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  border-top-color: #fff;
  content: '';
  height: 17px;
  left: calc(50% - 8px);
  position: absolute;
  top: calc(50% - 8px);
  width: 17px;
}

.osv-toast {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  color: #161616;
  font-size: 13px;
  left: 50%;
  max-width: calc(100% - 30px);
  opacity: 0;
  padding: 10px 16px;
  pointer-events: none;
  position: absolute;
  top: 54px;
  transform: translate(-50%, -8px);
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
  z-index: 10;
}

.osv-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.osv-modal__nav {
  align-items: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 46px;
  justify-content: center;
  padding: 0;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  z-index: 5;
}

.osv-modal__nav--prev { left: 18px; }
.osv-modal__nav--next { right: 18px; }
.osv-modal__nav svg { fill: none; height: 25px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 25px; }

@keyframes osv-spin { to { transform: rotate(360deg); } }

@media (max-width: 780px) {
  .osv-showcase { --osv-card-width: min(72vw, 260px); }
  .osv-rail { gap: 10px; padding-inline: 14px; }
  .osv-rail-arrow { display: none; }
  .osv-card__product { margin-inline: 3px; }
  .osv-modal { background: #000; }
  .osv-modal__player { border-radius: 0; height: 100dvh; max-height: none; width: 100vw; }
  .osv-modal__side, .osv-modal__nav { display: none; }
  .osv-modal-product { bottom: max(8px, env(safe-area-inset-bottom)); }
  .osv-modal__progress { top: max(7px, env(safe-area-inset-top)); }
  .osv-modal__close { top: max(18px, calc(env(safe-area-inset-top) + 10px)); }
  .osv-modal__brand { top: max(22px, calc(env(safe-area-inset-top) + 14px)); }
}

@media (prefers-reduced-motion: reduce) {
  .osv-rail, .osv-modal, .osv-modal__player { scroll-behavior: auto; transition: none; }
}
