/* Yiwu Trade Media — storefront styles.
   Scoped to .ytd-media-* selectors so the catalogue, product detail and the
   sample draft keep their existing appearance. */

.ytd-media-slides {
  position: relative;
  margin: 0 auto 20px;
  padding: 0 16px;
  box-sizing: border-box;
}

.ytd-media-slides__splide {
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: #edf2f5;
}
.ytd-media-slides__splide .splide__track,
.ytd-media-slides__splide .splide__list,
.ytd-media-slides__splide .splide__slide { height: 100%; }
.ytd-media-slides__splide .splide__slide { list-style: none; }
.ytd-media-slides__link { display: block; width: 100%; height: 100%; }
.ytd-media-slides__splide picture { display: block; width: 100%; height: 100%; }
.ytd-media-slides__splide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.ytd-media-slides__splide.is-single img { border-radius: 12px; }

.ytd-media-slides__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.ytd-media-slides__nav,
.ytd-media-slides__toggle {
  width: 34px;
  height: 34px;
  border: 1px solid #d8e2ea;
  border-radius: 50%;
  background: #fff;
  color: #52606d;
  cursor: pointer;
  line-height: 1;
  font-size: 16px;
}
.ytd-media-slides__nav:hover,
.ytd-media-slides__toggle:hover { border-color: #0b7285; color: #0b7285; }
.ytd-media-slides__dots { display: flex; align-items: center; gap: 7px; }
.ytd-media-slides__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cbd5df;
  cursor: pointer;
}
.ytd-media-slides__dot.is-active { background: #0b7285; }

@media (max-width: 782px) {
  .ytd-media-slides { padding: 0 12px; margin-bottom: 16px; }
  .ytd-media-slides__splide { height: 112px; border-radius: 10px; }
  .ytd-media-slides__splide img { border-radius: 10px; }
}

/* Product detail gallery */
.ytd-media-gallery { display: flex; flex-direction: column; gap: 12px; outline: none; }
.ytd-media-gallery:focus-visible { box-shadow: 0 0 0 2px #0b7285; border-radius: 10px; }
.ytd-media-gallery__stage {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #edf2f5;
  aspect-ratio: 4 / 3;
}
.ytd-media-gallery__stage img,
.ytd-media-gallery__stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #102a43;
}
.ytd-media-gallery__empty { display: grid; place-items: center; height: 100%; color: #829ab1; font-size: 13px; }
.ytd-media-gallery__error {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  color: #7a2626;
  background: #fdf3f3;
  font-size: 13px;
}
.ytd-media-gallery__action {
  border: 1px solid #d64545;
  background: #fff;
  color: #7a2626;
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}
.ytd-media-gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.ytd-media-gallery__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #edf2f5;
  cursor: pointer;
}
.ytd-media-gallery__thumb.is-active { border-color: #0b7285; }
.ytd-media-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ytd-media-gallery__badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 42, 67, .45);
  color: #fff;
  font-size: 14px;
}

@media (max-width: 782px) {
  .ytd-media-gallery__thumb { width: 60px; height: 46px; }
}
