.hidden-color-filter {
  display: none !important;
}
.color-group-filter__inner {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
  flex-wrap: wrap;
}
.color-group__item{
	position: relative;
    padding: 0 12px 10px;
    z-index: 10;
}
.color-group-item__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.color-group-item__image::after {
  content: '';
  position: absolute;
  /* 核心：使用 top/left 50% 配合 translate 居中 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6); 
  
  width: 40px;  /* 增加底圆大小，居中会更好看 */
  height: 40px;
  z-index: 2;

  /* 背景设置 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px; /* 内部对勾的大小 */
  
  border-radius: 50%;
  
  /* 交互动画 */
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.color-group-item__image img, .color-group-item__image svg{
	width: 54px;
	height: 54px;
	padding: 2px;
	border: 2px solid transparent;
	border-radius: 100%;
}
.color-group-item__image svg {
	border-color: #ccc;
}
.color-group__item:hover img {
	border: 2px solid #cc7f85;
}
.color-group__item.is-all-selected .color-group-item__image::after {
  opacity: 1;
  /* 保持居中偏移的同时，恢复缩放倍率 */
  transform: translate(-50%, -50%) scale(1);
}
.color-group__item.is-all-selected .color-group-item__image img {
  filter: brightness(0.7);
}
.color-group-item__title {
	font-size: 12px;
    line-height: 18px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}
.color-group__item-dropdown {
	position: absolute;
	display: none;
	padding-top: 20px;
  left: 50%;
  transform: translateX(-50%);
}
.color-group__item-dropdown-content {
	position: relative;
	padding: 10px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  text-transform: capitalize;
  max-width: 345px;
  max-height: 40%;
  background: #f6f6f6;
  box-shadow: 0 0 4px rgba(0, 0, 0, .5);
  border-radius: 12px;
}
.color-group__item-dropdown-content:before, .color-group__item-dropdown-content:after {
	  position: absolute;
	  content: "";
    background: #f6f6f6;
    -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, .5);
    box-shadow: 0 0 4px rgba(0, 0, 0, .5);
    width: 16px;
    height: 16px;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
    left: 50%;
    top: -8px;
    margin-bottom: -7px;
    margin-left: -9px;
    border-radius: 0px 2px;
    z-index: -1;
}
.color-group__item-dropdown-content:after {
	z-index: 12;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
}
.color-group__item:last-child .color-group__item-dropdown {
  left: auto;
  right: 0;
  transform: none;
}
.color-group__item:last-child .color-group__item-dropdown-content:before, .color-group__item:last-child .color-group__item-dropdown-content:after {
  right: 30px;
  left: auto;
}

.color-group__item:first-child .color-group__item-dropdown {
  left: 0;
  right: auto;
  transform: none;
}
.color-group__item:first-child .color-group__item-dropdown-content:before, .color-group__item:first-child .color-group__item-dropdown-content:after {
  left: 30px;
  right: auto;
}
.color-group__checkbox {
	white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 20px;
}
.color-group__list {
	display: flex;
	flex-wrap: wrap;
	width: max-content;
  max-height: 360px;
  overflow-y: auto;
}
.color-group__color {
	width: 65px;
}
.color-group__color--hidden {
	display: none;
}
.color-group__color-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 0;
}
/* 隐藏原始复选框 */
.color-group__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.color-group__color-content {
	border-radius: 8px;
	border: 2px solid transparent;
}
.color-group__color-name {
	margin-top: 4px;
	text-align: center;
	line-height: 1.2;
	font-size: 10px;
}
/* 悬停效果 */
.color-group__color-item:hover .color-group__color-content {
  border: 2px solid #cc7f85;
}
.color-group__color-item:hover .color-group__color-name {
  color: #cc7f85;
}
/* 色块基础样式 */
.color-group__color-val {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  margin: 2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); /* 给浅色系加个微边框 */
  background-size: 100%;
}

/* --- 核心：选中状态 --- */
.color-group__input:checked + .color-group__color-content{
  border: 2px solid #cc7f85;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 选中后的文字加粗或变色 */
.color-group__input:checked ~ .color-group__color-name {
  color: #cc7f85;
}

/* 逻辑：选中 color-group__item，
   条件是：它的内部【不包含】带有 .color-group__color--active 类的元素 */
.color-group__item:not(:has(.color-group__color--active)) {
  display: none;
}

/* 1. PC端：当鼠标悬浮在组项上时显示 */
@media (hover: hover) {
    .color-group__item:hover .color-group__item-dropdown {
        display: block;
    }
}

/* 2. 预留给 JS 或移动端点击的激活类 */
.color-group__item.is-active .color-group__item-dropdown {
    display: block;
}

.facets-collection-title {
  text-transform: uppercase;
  font-weight: 400; 
}
.facets-sorting {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quick-ship-48hrs-trigger {
  height: 30px;
  line-height: 30px;
  display: block;
  padding: 0 12px;
  border: 1px solid #ddd;
  background-color: #fff;
  text-transform: uppercase;
}
.quick-ship-48hrs-trigger.is-active, .quick-ship-48hrs-trigger:hover {
  border-color: #cc7f85;
  background-color: #f4e4e5;
}
.block-product-image__ship_in_48hrs {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  background: rgb(204 127 133 / 50%);
  padding: 4px 0;
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.block-product-image__ship_in_48hrs svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 959px) { 
  .color-group__item-dropdown-content {
    max-width: 100%;
    flex-direction: column;
  }
  .color-group__item-dropdown-content:before, .color-group__item-dropdown-content:after {
    content: none;
  }
  .color-group-filter {
    position: relative;    
    z-index: calc(var(--z-index-fixed));
  }
  .color-group__item-dropdown{
    padding: 0;
    z-index: calc(var(--z-index-fixed));
  }
  .color-group-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: calc(var(--z-index-fixed) - 2);
    background: rgba(0, 0, 0, 0.4);
    /* 初始隐藏由 inline style 控，这里加个 transition */
    transition: opacity 0.3s ease;
    pointer-events: auto; /* 确保能点到它用来关闭 */
  }
  .color-group__list {
    width: inherit;
  }
}


/*
	商品详情页定制部分样式
*/

/* 商品详情页选中option */
.current-select-option {
	font-weight: 400;
}

.variant-picker__group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;  
}
.swatch-link a{ 
  font-size: 13px;
  text-decoration: underline;
}
.swatch-link a:hover {
  color: #cc7f85;
  text-decoration: underline;
}

/* 商品详情页颜色滑动放大效果 */
.variant-picker__swatch-zoom {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  bottom: 100%;
  left: 50%;
  margin-bottom: 15px;
  width: 120px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 
              0 6px 10px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  z-index: 100;
  text-align: center;
}
@media (hover: hover) {
  .variant-picker__option:hover .variant-picker__swatch-zoom {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.variant-picker__swatch-zoom .color-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto;
  background-repeat: no-repeat;
}

.variant-picker__swatch-zoom .color-name{
  display: block;
  margin-top: 8px;
  font-family: var(--title-font-stack);
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

.variant-picker__swatch-zoom::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}


/* 自定义属性校验错误提示 */
.validation-advice {
  font-size: 12px;
  color: #F31544;
  animation-name: validation;
  animation-duration: 1.5s;	
}

@keyframes validation {
    0% {
        margin-left: 0px;
    }

    25% {
        margin-left: 5px;
    }

    50% {
        margin-left: 18px;
    }

    100% {
        margin-left: 0px;
    }

}

.is-initializing {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

/* 只有当按钮被设为 disabled 时生效 */
#js-custom-checkout-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  filter: grayscale(1);
}
.fake-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  display: inline-block;
  vertical-align: middle;
}

/* 选中状态的背景色 */
.fake-checkbox.is-checked {
  background-color: #000; /* 匹配主题色 */
  border-color: #000;
}

/* 选中状态的勾勾 (用伪元素画) */
.fake-checkbox.is-checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}


.gl-shipping-card {
  background: #fdf8f7;
  border-radius: 4px;
  padding: 12px 15px;
  margin: 10px 0;
  border: 1px solid rgba(92, 60, 48, 0.08);
}

/* 标题样式 */
.gl-shipping-title {
  font-size: 14px;
  color: #5C3C30;
  margin: 0 0 10px 0;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gl-shipping-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gl-shipping-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}

.gl-dot {
  width: 3px;
  height: 3px;
  background: #d1d1d1;
  border-radius: 50%;
}

.gl-tag {
  background: #5C3C30;
  color: #fff;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: bold;
}

/* 核心保留：精美日期高亮样式 */
.gl-shipping-arrival {
  font-size: 13px;
  color: #333;
  margin-top: 2px;
}

.gl-arrival-date {
  color: #000;
  font-weight: 600;
  /* 优雅的底色高亮效果 */
  background: linear-gradient(180deg, transparent 65%, #f4e3e1 65%);
  padding: 0 4px;
  margin-left: 4px;
}


/* 国旗图标基础容器 */
.flag-icon {
  display: inline-block;
  width: 20px; /* 可根据需要调整大小 */
  height: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 50%; /* 圆形 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.08); /* 给浅色国旗加个细边框，防止和背景融为一体 */
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* 轻微立体感 */
}

/* 国务定义 (使用公开 CDN 资源，你也可以换成本地图片) */
.flag-united_states { background-image: url('https://flagcdn.com/w80/us.png'); }
.flag-france { background-image: url('https://flagcdn.com/w80/fr.png'); }
.flag-de { background-image: url('https://flagcdn.com/w80/de.png'); }
.flag-gb { background-image: url('https://flagcdn.com/w80/gb.png'); }
.flag-ca { background-image: url('https://flagcdn.com/w80/ca.png'); }
.flag-au { background-image: url('https://flagcdn.com/w80/au.png'); }
.flag-it { background-image: url('https://flagcdn.com/w80/it.png'); }
.flag-es { background-image: url('https://flagcdn.com/w80/es.png'); }


/* 购物车upsell */
.cart-upsell-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 15px 0;
    background: #fff;
    overflow: hidden;
}

.cart-upsell__tips {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 14px;
}

/* 标题行 */
.cart-upsell__header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    cursor: pointer;
}

.cart-upsell__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.upsell-arrow { transition: transform 0.3s; }
.cart-upsell__header.is-open .upsell-arrow { transform: rotate(180deg); }

/* 内容区 */
.cart-upsell__content {
    display: none;
    padding: 15px 0; /* 左侧留白，右侧由 Swiper 露出下个卡片 */
}
.cart-upsell__content.is-active { display: block; }

/* Swiper 容器定制 */
.swiper-upsell {
  padding: 0 15px; /* 左右各 15px，确保第一张和最后一张都有呼吸感 */
  box-sizing: border-box;
  /* 关键：允许 slide 滑出容器边界，但在 container 范围内显示 */
  overflow: hidden;
}

.swiper-slide {
    /* 关键：设置宽度为 80% 左右 */
    width: 82% !important; 
    height: auto;
}

/* 商品项样式优化 */
.upsell-item {
    display: flex;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    height: 100%;
    transition: border-color 0.2s;
}

.upsell-item__image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}
.upsell-item__image img { width: 100%; height: 100%; object-fit: cover; }

.upsell-item__info {
    margin-left: 12px;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 撑开标题和价格 */
    min-width: 0; /* 修复 flex 子元素溢出问题 */
}

/* 标题溢出处理：2行省略 */
.upsell-item__title {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    color: #333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    overflow: hidden;
    word-break: break-word;
}

.upsell-item__price { margin-top: 8px; }
.upsell-item__price .current { color: #333; font-weight: bold; font-size: 14px; }
.upsell-item__price .old { color: #999; text-decoration: line-through; font-size: 12px; margin-left: 4px; }

.upsell-add-btn {
    position: absolute;
    right: 0;
    bottom: -2px;
    background: #E88A6D;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

@media (max-width: 959px) { 
  .facets-collection-title {
    background: #f9f9f9;
    display: flex;
    align-items: center;
    margin-left: -20px;
    margin-right: -20px;
    padding: 10px 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .facets-collection-title svg {
    width: 20px;
    height: 20px;;
  }
  .color-group-filter__inner {
    padding: 10px 0;
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: inherit;
    margin-bottom: 0;
/*    margin-left: -20px;
    margin-right: -20px;
    background: #fff;*/
  }

  .color-group-filter__inner::-webkit-scrollbar {
    display: none;
  }
  .color-group__item {
    padding: 0 2px 0px;
  }
}
