.media-section { font-family: Manrope, Arial, sans-serif; }
.media-carousel {
  --slide-width: 244px;
  --image-width: 200px;
  position: relative;
  margin: 0 44px 28px;
  padding: 12px 0 18px;
  overflow: hidden;
  border: 1px solid #eee3e8;
  border-radius: 18px;
  background: #fbf8fa;
  text-align: center;
}
.media-carousel-stage { position: relative; width: 100%; overflow: visible; touch-action: pan-y pinch-zoom; user-select: none; }
.media-carousel-window { position: relative; width: var(--slide-width); height: 450px; margin-inline: auto; }
.media-carousel-track { position: relative; display: flex; align-items: center; width: max-content; height: 100%; }
.media-carousel-slide {
  position: relative;
  display: flex;
  flex: 0 0 var(--slide-width);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: var(--slide-width);
  transform-origin: center;
}
/* Position and fan transforms share one animation clock for seamless wrapping. */
.media-carousel-track { will-change: transform; }
.media-slide-title {
  max-width: calc(var(--slide-width) - 24px);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  opacity: 0;
  transform: scale(.75);
  transition: none;
}
.media-carousel-slide[data-active="true"] .media-slide-title { opacity: 1; transform: scale(1); }
.media-slide-image {
  display: block;
  flex-shrink: 0;
  width: var(--image-width);
  aspect-ratio: 440 / 748;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2d7dd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 15px 32px -15px #5021343d, 0 2px 5px #50213408;
}
.media-slide-image img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.media-slide-image:focus-visible { outline: 3px solid var(--brand); outline-offset: 5px; }
.media-carousel-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 6px auto 0;
  padding: 5px;
  border: 1px solid #eadde3;
  border-radius: 999px;
  background: #ffffffed;
  box-shadow: 0 4px 12px #50213408;
}
.media-carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--brand);
  transition: background .2s, transform .2s;
}
.media-carousel-arrow[data-previous] svg { transform: rotate(90deg); }
.media-carousel-arrow[data-next] svg { transform: rotate(-90deg); }
.media-carousel-arrow:enabled:hover { background: var(--brand-rose-light); }
.media-carousel-arrow:enabled:active { transform: scale(.95); }
.media-carousel-dots {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 340px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.media-carousel-dots::-webkit-scrollbar { display: none; }
.media-carousel-dot { display: flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; }
.media-carousel-dot span { display: block; width: 6px; height: 6px; border-radius: 4px; background: #b994a1; transition: width .25s, background .25s; }
.media-carousel-dot[aria-pressed="true"] span { width: 20px; background: var(--brand); }
.media-carousel-dot:hover span { background: var(--brand); }
.media-carousel-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.media-preview-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 8px auto 0; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--brand); font-size: 12px; font-weight: 600; transition: background .2s; }
.media-preview-button:hover { background: var(--brand-rose); }
.media-carousel-secondary { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.media-carousel-secondary .media-preview-button { margin: 0; }
.media-playback-button { min-height: 44px; padding: 10px 14px; border: 0; border-radius: 6px; background: transparent; color: var(--brand); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.media-playback-button:hover { background: var(--brand-rose); }
.media-carousel-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1000px) {
  .media-carousel { --slide-width: 224px; --image-width: 184px; margin-inline: 30px; }
  .media-carousel-window { height: 425px; }
}
@media (max-width: 720px) {
  .media-section .section-heading { padding-bottom: 20px; }
  .media-carousel { --slide-width: 188px; --image-width: 164px; margin: 0 16px 20px; padding-top: 6px; border-radius: 14px; }
  .media-carousel-window { height: 360px; }
  .media-slide-title { font-size: 12px; }
  .media-slide-image { border-radius: 10px; }
  .media-carousel-controls { gap: 0; padding: 4px; }
  .media-carousel-dot { flex-basis: 25px; width: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .media-carousel[data-ready] .media-carousel-track,
  .media-carousel[data-ready] .media-carousel-slide,
  .media-carousel *, .media-carousel *::before, .media-carousel *::after { transition: none; }
}
