.component-showcase-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 1200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.component-showcase-modal__toggle {
  position: absolute;
  right: 32px;
  top: 32px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  z-index: 2;
  width: 32px;
  height: 32px;
  justify-content: center;
  display: flex;
  display: none;
  align-items: center;
  color: #fff;
}

.component-showcase-modal__content {
  display: flex;
  gap: 20px;
  padding: 20px;
  max-height: 800px;
}

.component-showcase-modal__content-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.component-showcase-modal__content-right {
  flex: 1;
  position: relative;
  border-radius: 20px;
  overflow: hidden;

  @media (max-width: 768px) {
    min-height: 400px;
  }
}

/* 社交媒体图标 */
.component-showcase-modal__content-left .f-follow-us__social-media-icons {
  display: grid;
  /*grid-template-columns: repeat(10, 1fr);*/
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
}

.component-showcase-modal__content-left .f-follow-us__social-media-icons:not(:empty) + .see-in-action {
  margin-top: 16px;
}

.component-showcase-modal__content-left .f-follow-us__social-media-icons .f-follow-us__social-media-icon {
  width: 32px;
  height: 32px;
  /* background-color: #D9D9D9; */
  /* border-radius: 50%; */
  display: flex;
  justify-content: center;
  align-items: center;
  /* padding: 4px; */
}

.component-showcase-modal__content-left .f-follow-us__social-media-icons img {
  width: 100%;
  height: 100%;
}

/* See it in action */
.see-in-action {
  font-size: 16px;
}

.see-in-action + .instagram-icons:not(:empty) {
  margin-top: 16px;
}

/* Instagram Icons */
.instagram-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.instagram-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px; /* 为渐变边框预留空间 */
  background: linear-gradient(145deg, #FFC54B, #FF75DE, #9948F4, #4826D6);
  position: relative;
  cursor: pointer;
  transition: opacity 0.3s ease;

  &:hover {
    opacity: 0.8;
  }
}

.instagram-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  padding: 2px;
  background: #fff;
}

.description-text:not(:empty) {
  margin: 20px 0;
  font-size: 12px;
}

/* 商品展示 */
.product-showcase {
  width: 250px;
  display: flex;
  flex-direction: column;
}

/* 商品卡片主体 */
.product-showcase .product-card-wrapper {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.33);
  overflow: hidden;
}

.product-showcase .card__content {
  padding: 10px;
  margin-top: 0;
}

.product-image {
  width: 100%;
  padding-bottom: 100%;
  position: relative;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 商品信息容器 */
.product-info {
  padding: 12px;
}

.product__title {
  font-weight: 600;
}

.product-showcase .product-card__content .price .price-item--sale,
.product-showcase .product-card__content .price .price-item--regular {
  font-size: 12px;
  color: #000000;
  vertical-align: middle;
}

.product-showcase .product-card__content .sku-title {
  font-size: 12px;
  font-weight: 400;
}

.product-price {
  margin-bottom: 12px;
}

.product-price .price__sale {
  display: inline-flex;
  gap: 10px;
}

.product-price .price__container {
  text-align: center;
}

.product-price .price-position-sale {
  font-size: 10px;
  color: #000000;
}

.product-price .price-position-origin {
  font-size: 10px;
  color: #999999;
  text-decoration: line-through;
  margin-left: 4px;
}

/* 颜色选择器 */
.color-swatch-container {
  display: flex;
  gap: 4px;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  position: relative;
}

.color-swatch__inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
}

.color-swatch:hover .color-swatch__inner,
.color-swatch[aria-selected="true"] .color-swatch__inner {
  border-color: #000000;
}

/* Add to Cart 按钮 */
.add-to-cart {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 100px;
  background: linear-gradient(90deg, #FF7A7A 0%, #F65AFF 100%);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.3s;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-to-cart:hover {
  opacity: 0.9;
}

/* 视频播放器 */
.video-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-player__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  display: flex;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-player:hover .video-player__controls {
  opacity: 1;
}

.video-control {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #fff;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .component-showcase-modal__content {
    flex-direction: column;
    padding: 16px;
  }
  
  .component-showcase-modal__content-right {
    height: 300px;
  }
}

modal-dialog {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

modal-dialog[open] {
  display: block;
}

.component-media-modal__video {
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;

  &[loading] {
    opacity: 0.5;
  }
}

.showcase-modal-mobile {
  position: fixed;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: 95%;
  max-height: 80vh;
  overflow: hidden;
  z-index: 1000;
  transform: translate(-50%, -50%);
}

.showcase-modal-mobile.landscape {
  width: 95%;
}

.showcase-modal-mobile__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  
  svg {
    color: #fff;
  }

  &:hover {
    background: rgba(0, 0, 0, 0.7);
  }
}

.showcase-modal-mobile__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.2s ease;

  &:hover {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.showcase-modal-mobile__product {
  position: absolute;
  bottom: 20px;
  left: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 16px;
  z-index: 3;
}

.showcase-modal-mobile__product-content {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  
  &:hover {
    .showcase-modal-mobile__product-title {
      text-decoration: underline;
    }
  }
}

.showcase-modal-mobile__product-image {
  width: 70px;
  height: 70px;
  overflow: hidden;
  flex-shrink: 0;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.showcase-modal-mobile__product-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  margin: 0 0 4px;
  color: #000;
}

.showcase-modal-mobile__product-price {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  color: #000;
}

.showcase-modal-mobile__content {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}

.showcase-modal-mobile__media {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-modal-mobile__video {
  border-radius: 16px;
  overflow: hidden;
  /* width: 100%; */
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.75);

  video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 80vh;
  }

  iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    border: none;
  }
}

.showcase-modal-mobile__video.landscape {
  width: 100%;
  height: auto;
}

.showcase-modal-mobile__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.showcase-modal-mobile__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.75);

    g {
      opacity: 1;
    }
  }
}


/* 视频加载状态样式 */
.showcase-modal-mobile__video.loading {
  &::before {
    animation: pulse 1.5s infinite;
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
}

/* 移动端适配优化 */
@media screen and (max-width: 768px) {
  .showcase-modal-mobile__content {
    border-radius: 16px;
  }

  .showcase-modal-mobile__video {
    &::before {
      width: 48px;
      height: 48px;
    }

    &::after {
      border-width: 10px 0 10px 16px;
    }
  }

  .video-controller__play-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
  }

  .showcase-modal-mobile__play-button {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 11;
    width: 48px;
    height: 48px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    opacity: 0.45;

    svg {
      width: 50%;
      height: 50%;
      margin-left: 4px;
      color: #777;
    }
  }
}

/* 视频控制相关样式 */
.video-controller {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-controller video,
.video-controller iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media screen and (min-width: 960px) {
  .showcase-modal-mobile__product {
    bottom: 80px;
    width: 92%;
    left: 4%;
  }
}

@media screen and (max-height: 1000px) {
  .component-showcase-modal__content {
    max-height: 80vh;
    min-height: auto;
  }
}