/* カートコンポーネント - カラーピッカースタイル */
.cart-component {
  margin-top: 24px;
}

/* カラーピッカーセクション */
.color-picker-section {
  margin-bottom: 2rem;
}

.color-picker-section:last-of-type {
  border-bottom: none;
}

.color-picker-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 16px;
}

.color-picker-header h3 {
  font-family: 'Noto Sans JP', 'Noto Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 300;
  margin: 0;
}

.color-picker-header .sold-out-label, .stock-label {
  color: #C1272D;
  line-height: 1.1;
}
/* 販売開始前（「12月01日 11時 販売開始」）・販売終了 */
.color-picker-header .sale-label {
  color: #666;
  line-height: 1.1;
}

/* カラードット */
.color-picker-dots {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.color-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 選んでいる丸：大きさは変えず、外側にグラデーションの枠（2px）、その内側に白の隙間（3px）。
   白の隙間は border（3px のうち枠の下にならない 1px）と内側の影（2px）。隙間を変えるときは影の太さを変える
   （なし・本体ホワイトは color-picker-colors.css にも同じ数字がある） */
.color-dot.active {
  border: 3px solid #fff;
  box-shadow: inset 0 0 0 2px #fff;
}

.color-dot.active::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #ec4899);
  padding: 2px; /* 枠の太さ */
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.color-dot:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.color-dot.sold-out {
  position: relative;
}

.color-dot.sold-out::before {
  content: '';
  position: absolute;
  width: 141%; /* 円の対角線長 (√2 ≈ 1.414) */
  height: 2px;
  background: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg) scale(.8);
  pointer-events: none;
  mix-blend-mode: difference;
}
.color-picker-header {
  font-size: 1.2rem;
  font-family: 'noto sans jp', 'noto sans', sans-serif;
  font-weight: 300;
}
/* 商品メッセージ */
/* CMS の商品のお知らせ：通常は文字色、level 1 は赤字（.is-red）。中身は HTML */
.product-message {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.product-message .is-red {
  color: #C1272D;
}

.product-message a {
  text-decoration: underline;
}

/* 商品情報を読み込めなかったときの案内 */
.cart-load-error {
  font-size: 1.3rem;
  line-height: 1.7;
  color: #C1272D;
}

/* カートアクション */
.cart-actions {
  margin-top: 3.2rem;
}

.resale-notice {
  font-size: 1.2rem;
  color: #C1272D;
  margin-top: 2rem;
}

.add-to-cart-button {
  width: 100%;
  font-family: 'A1 Gothic M JIS2004', sans-serif;
  letter-spacing: -0.32px;
  padding: 1.6rem 0;
  color: #fff;
  background-color: #1D1D1F;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-to-cart-button:hover:not(:disabled) {
  background-color: #000;
}

.add-to-cart-button:disabled {
  background-color: #ccc;
  color: var(--text-color);
  cursor: not-allowed;
  opacity: 0.6;
}

/* 種類の選択（組み合わせごとに rmn-id が1つの商品：ストラップなど。cart-component.js の VariantCart） */
.variant-types {
  display: flex;
  gap: 1rem;
}

/* 同じ幅のボタンを横に並べる。選んでいるものは色の丸と同じグラデーションの枠 */
.variant-type {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 0.8rem 1rem;
  border: 1px solid #808080;
  border-radius: 5px;
  background: #fff;
  color: #1D1D1F;
  font-family: 'Noto Sans JP', 'Noto Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s;
}

.variant-type.active {
  border-color: transparent;
}
.variant-type.active::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 5px;
  padding: 2px; /* 枠の太さ */
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #ec4899);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@media (hover: hover) {
  .variant-type:not(.active):hover {
    border-color: #1D1D1F;
  }
}

/* その種類の色がすべて買えないとき（在庫なし・販売期間外） */
.variant-type.sold-out:not(.active) {
  color: #999;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .color-picker-header {
    /* flex-direction: column; */
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .points {
    font-size: 1.6rem;
    letter-spacing: -0.9px;    
  }
  .points ul {
    column-gap: 0;
  }
  .points ul li {
    width: 50%;
  }
  .points ul.points__features li {
    width: auto;
  }
}

/* 色を選んで離れたスライドへ一度で移ったとき、移った先の画像だけをふわっと出す（cart-component.js の slideTo） */
.swiper-slide.is-fade-in img {
  animation: slide-fade-in 0.3s ease;
}

@keyframes slide-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .swiper-slide.is-fade-in img {
    animation: none;
  }
}
