/** Shopify CDN: Minification failed

Line 260:3 Cannot use type selector "--image" directly after nesting selector "&"

**/
/* 覆盖主题 base 样式 */
.page-width-wide,
.page-width-normal,
.page-width-narrow,
.page-width-content {
  --page-margin: 20px;
}
@media screen and (min-width: 750px) {
  .page-width-wide,
  .page-width-normal,
  .page-width-narrow,
  .page-width-content {
    --page-margin: 32px;
  }
}
/* 覆盖主题 base 样式 end */
.ug-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.ug-icon-arrow svg {
  width: 1.2em;
  height: 1.2em;
}
[data-animated='title'] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease-in-out, transform 0.7s ease-in-out;
}
.ug-animated-title {
  opacity: 1;
  transform: translateY(0);
}
[data-animated='container'] {
  transform: translateX(10%);
  transition: transform 0.5s 0.2s, -webkit-transform 0.5s 0.2s;
}
.ug-animated-container {
  transform: translateX(0);
}
[data-animated='container'] [data-animated='container-item'] {
  opacity: 0;
  /* transform: translateY(30px); */
  transition: opacity 0.5s;
}
[data-animated='container']
  [data-animated='container-item'].ug-animated-container-item {
  opacity: 1;
  /* transform: translateY(0); */
}

@media (min-width: 1025px) and (max-width: 1423px) {
  .ug-container {
    width: auto;
    margin: 0 32px;
  }
}

@media (max-width: 1024px) {
  .ug-container {
    margin: 0 32px;
  }
}

@media (max-width: 768px) {
  .ug-container {
    margin: 0 20px;
  }
}

/* button 全局 */

.ug-spx-button-primary {
  background: #000;
  color: #fff;
}
.ug-spx-button-primary:hover {
  background: #404040;
}
.ug-spx-button-secondary:disabled,
.ug-spx-button-primary:disabled {
  background: #a3a3a3;
  cursor: not-allowed;
  border: none;
}

.ug-spx-button-secondary {
  background: #fff;
  color: #000;
  border: 1px solid #dadada;
}
.ug-spx-button-secondary:hover {
  background: #000;
  color: #fff;
  border: 1px solid #000;
}

/* 全局 shop now 样式 start */
ug-product-shop-now {
  display: contents;
  color: inherit; /* 继承父元素文字颜色 */
  font-size: inherit;
}
.ug-product-buy-button {
  display: block;
  width: 100%;
  padding: 10px 0px;
  border-radius: 100px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  cursor: pointer;
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
  outline: none;
  transition: all 0.3s;
  &:hover {
    background-color: #404040;
    color: #fff;
    border-color: #404040;
  }
  @media screen and (max-width: 768px) {
    font-size: 14px;
    line-height: 1.5;
  }
}

/* 全局 shop now 样式 end */
/* zoom组件样式优化-产品缩略图弹窗 */
/* 主对话框样式 - 已合并黑色背景 */
zoom-dialog dialog {
  width: 100vw;
  height: 100vh;
  border: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
  max-height: 100%;
  background: #000; /* 统一黑色背景 */
  opacity: 0;
  transition: opacity var(--animation-speed) var(--animation-easing);
  scrollbar-width: none;

  &[open] {
    opacity: 1;
  }

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }

  &::backdrop {
    background: rgba(0, 0, 0, 0.9);
  }
}

/* 通用按钮基础样式 - 合并重复 */
.zoom-nav-button,
.close-button {
  position: fixed;
  z-index: var(--layer-raised);
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.2s ease, background-color 0.2s ease;
  
  &:hover:not([aria-disabled="true"]) {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
  }
  
  svg {
    color: white;
    fill: currentColor;
  }
}

/* 关闭按钮特定样式 */
.close-button {
  top: var(--margin-lg);
  right: var(--margin-lg);
  width: var(--minimum-touch-target, 48px);
  height: var(--minimum-touch-target, 48px);
  
  svg {
    width: var(--icon-size-xs, 20px);
    height: var(--icon-size-xs, 20px);
  }
}

/* 导航按钮特定样式 */
.zoom-nav-button {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  
  &[aria-disabled="true"] {
    opacity: 0.3;
    cursor: default;
  }
  
  svg {
    width: 24px;
    height: 24px;
  }
}

.zoom-nav-button--prev {
  left: 20px;
}

.zoom-nav-button--next {
  right: 20px;
}

/* 主图区域 - 统一黑色背景 */
.dialog-zoomed-gallery {
  width: 100%;
  height: 100%;
  display: flex;
  background: #000;
  scrollbar-width: none;
  
  /* 隐藏滚动条 - 合并声明 */
  &::-webkit-scrollbar {
    display: none;
  }
  
  &.list-unstyled {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    height: 100%;
  }
}

/* 通用媒体容器样式 - 合并重复 */
.product-media-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  
  &--image,
  &--video,
  &--external_video,
  &--model {
    .product-media {
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}

/* 通用媒体内容样式 */
.dialog-zoomed-gallery .product-media-container--image .product-media,
.dialog-zoomed-gallery .product-media-container--video .product-media,
.dialog-zoomed-gallery .product-media-container--external_video .product-media,
.dialog-zoomed-gallery .product-media-container--model .product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  
  img, video, model-viewer, .deferred-media__poster {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
}

/* 拖拽缩放包装器 - 统一样式 */
.product-media__drag-zoom-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  
  .product-media__image {
    object-fit: contain;
    transform-origin: center center;
  }
}

/* 移动端样式 */
@media screen and (max-width: 749px) {
  .zoom-nav-button {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    
    svg {
      width: 20px;
      height: 20px;
    }
  }
  
  .zoom-nav-button--prev {
    left: 12px;
  }
  
  .zoom-nav-button--next {
    right: 12px;
  }
  
  .close-button {
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.15);
    top: 12px;
    right: 12px;
  }
  
  .dialog-zoomed-gallery {
    overscroll-behavior: none;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    scroll-behavior: smooth;
    height: calc(100% - 60px);
  }
  
  .dialog-zoomed-gallery .product-media-container {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 100%;
    min-width: 100%;
    background-color: rgb(0 0 0)!important;
  }
  
  .product-media__drag-zoom-wrapper {
    width: 100%;
    height: 100%;
  }
}

/* 桌面端样式 */
@media screen and (min-width: 750px) {
  .dialog-zoomed-gallery {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: calc(100% - 120px);
  }
  
  .dialog-zoomed-gallery .product-media-container {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 100%;
    min-width: 100%;
    background-color: rgb(0 0 0)!important;
  }
  
  .dialog-zoomed-gallery .product-media-container--image .product-media,
  .dialog-zoomed-gallery .product-media-container--video .product-media,
  .dialog-zoomed-gallery .product-media-container--external_video .product-media,
  .dialog-zoomed-gallery .product-media-container--model .product-media {
    max-width: 90vw;
    max-height: 80vh;
  }
  
  .product-media__drag-zoom-wrapper .product-media__image {
    max-width: 90vw;
    max-height: 80vh;
  }
}

/* 底部缩略图/指示器容器 */
.dialog-thumbnails-list-container {
  position: fixed;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: var(--layer-flat);
  display: flex;
  justify-content: center;
  padding: var(--padding-md) 0;
  background: transparent;
}

/* 缩略图列表 - 合并重复 */
.dialog-thumbnails-list {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  opacity: 0;
  padding: var(--padding-sm) var(--padding-md);
  scrollbar-width: none;
  animation: thumbnailsSlideInBottom calc(var(--animation-speed) * 0.75) var(--animation-easing) forwards;
  animation-delay: calc(var(--animation-speed) * 1.5);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  margin: 0 auto;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  
  &::-webkit-scrollbar {
    display: none;
  }
}

.dialog--closed .dialog-thumbnails-list {
  animation: thumbnailsSlideOutBottom var(--animation-speed) var(--animation-easing) forwards;
}

/* 缩略图项 - 通用样式 */
.dialog-thumbnails-list__thumbnail {
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--media-radius, 4px);
  transition: transform var(--animation-speed) var(--animation-easing);
  flex-shrink: 0;

  &:hover {
    transform: scale(1.05);
  }

  &:is([aria-selected='true']) {
    transform: scale(1.1);
  }
}

/* 桌面端缩略图 */
.dialog-thumbnails-list__thumbnail {
  width: var(--thumbnail-width, 60px);
  border: 1px solid rgba(255, 255, 255, 0.1);

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
  }

  &:hover {
    border-color: rgba(255, 255, 255, 0.3);
  }

  &:is([aria-selected='true']) {
    outline: 2px solid white;
    outline-offset: 2px;
    border-color: white;
  }
}

/* 移动端指示器 - 小圆点 */
@media screen and (max-width: 749px) {
  .dialog-thumbnails-list-container {
    padding: 20px 0;
  }
  
  .dialog-thumbnails-list {
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .dialog-thumbnails-list__thumbnail {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    
    img {
      display: none;
    }
    
    &:hover {
      transform: scale(1.2);
      background: rgba(255, 255, 255, 0.5);
    }
    
    &:is([aria-selected='true']) {
      background: white;
      transform: scale(1.3);
      outline: none;
      border: none;
    }
  }
}

/* 桌面端优化 */
@media screen and (min-width: 750px) {
  .dialog-thumbnails-list {
    max-width: 90%;
    justify-content: center;
  }
}

/* 动画定义 */
@keyframes thumbnailsSlideInBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes thumbnailsSlideOutBottom {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Safari 兼容性修复 - 保持独立 */
@supports not (background-color: rgb(from red 150 g b / alpha)) {
  .close-button:focus-visible {
    outline: none;
    overflow: visible;
  }

  .close-button:focus-visible::after {
    content: '';
    position: absolute;
    inset: calc(-1 * var(--focus-outline-offset));
    border: var(--focus-outline-width) solid white;
    border-radius: 50%;
    display: inherit;
  }
}
/* 按钮禁用状态样式 */
.zoom-nav-button.button-disabled {
  pointer-events: none;
  opacity: 0.3 !important;
}

/* 防止用户快速点击 */
.zoom-nav-button {
  transition: opacity 0.15s ease, background-color 0.15s ease;
  
  &:active {
    transform: translateY(-50%) scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* 防止双击选中文本 */
.dialog-zoomed-gallery,
.zoom-nav-button,
.dialog-thumbnails-list__thumbnail {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 添加切换动画 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* 应用动画到当前活动的图片 */
.dialog-zoomed-gallery .product-media-container.active {
  animation: slideIn 0.3s ease forwards;
}