/* Nicobay Product Page Redesign CSS */

/* product-info要素のスタイル */
product-info {
  display: block;
}

/* メインプロダクトレイアウト */
.product-redesign {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 40px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 30px;
  padding-top: 0;
  color: rgb(var(--color-foreground));
}

/* 背景色scheme-2適用 */
.color-scheme-2 {
}

/* 商品画像エリア */
.product-redesign__media {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-redesign__media-container {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}

.product-redesign__main-image {
  background-color: white;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.product-redesign__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.product-redesign__thumbnails {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 150px;
}

.product-redesign__thumbnail {
  width: 150px;
  height: 150px;
  border: none;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f5f5f5;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-redesign__thumbnail:hover {
  border-color: #e0e0e0;
  transform: scale(1.05);
}

.product-redesign__thumbnail.active {
  border-color: #333;
  background: #fff;
}

.product-redesign__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* レビューウィジェット - モバイルでは非表示 */
.product-redesign__reviews-widget-mobile {
  display: none;
}

/* レビューウィジェット - デスクトップ表示 */
.product-redesign__reviews-widget-desktop {
  background: #ffffff;
  border-radius: 3px;
  padding: 24px;
  width: 100%;
  flex-grow: 1;

  &:has(>div[class*="candyrack"]) {
    @media screen and (min-width: 768px) {
      display: none !important;
    }
  }
}

/* Klaviyoレビューアプリのスタイル調整 */
.product-redesign__reviews-widget-mobile .klaviyo-reviews-container,
.product-redesign__reviews-widget-mobile [data-klaviyo-reviews],
.product-redesign__reviews-widget-desktop .klaviyo-reviews-container,
.product-redesign__reviews-widget-desktop [data-klaviyo-reviews] {
  width: 100%;
}

#klaviyo-product-reviews-wrapper .kl_reviews__button {
  background-color: white;
  color: #7e9b70;
  padding: 15px 20px;
  border-radius: 4px;
  border: 1px solid #7e9b70;
  font-weight: 600;
  font-size: 14px;
  width: 8em;
  text-align: center;
}

#klaviyo-product-reviews-wrapper .kl_reviews__list__tab_buttons {
  align-content: flex-end;
}

#klaviyo-product-reviews-wrapper .kl_reviews__summary__average_and_stars {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  margin-bottom: 10px;
}

#klaviyo-product-reviews-wrapper .kl_reviews__summary__stars {
  flex-direction: row;
  gap: 10px;
}

#klaviyo-product-reviews-wrapper .kl_reviews__stars_badge {
  margin: 0;
}

#klaviyo-product-reviews-wrapper .kl_reviews__histogram__bar--background {
  height: 15px;
}

#klaviyo-product-reviews-wrapper .kl_reviews__histogram__value {
  display: none;
}

#klaviyo-product-reviews-wrapper .kl_reviews__histogram {
  max-width: 400px;
}

#klaviyo-product-reviews-wrapper .kl_reviews__histogram__row {
  margin: 0;
}

@media screen and (max-width: 768px) {
  #klaviyo-product-reviews-wrapper .kl_reviews__button_bar {
    justify-content: center;
  }

  #klaviyo-product-reviews-wrapper .kl_reviews__button {
    width: 50%;
    margin: 0;
    padding: 10px;
  }
}

#klaviyo-product-reviews-wrapper button.kl_reviews__list__tab {
  font-weight: 400;
  font-size: 1.5rem;
  height: 2rem;
}

#klaviyo-product-reviews-wrapper .kl_reviews__list__tab--active::after {
  height: 4px;
  border-radius: 0;
  background-color: #888888;
}

#klaviyo-product-reviews-wrapper .kl_reviews__filters {
  display: none;
}

#klaviyo-product-reviews-wrapper .kl_reviews__list_container {
  overflow-y: scroll;
  max-height: 35rem;
}

#klaviyo-product-reviews-wrapper .kl_reviews__review_item {
  border-radius: 8px;
  border: 1px solid #dddddd;
  padding: 10px;
  margin-bottom: 16px;
}

#klaviyo-product-reviews-wrapper .kl_reviews__summary__header {
  font-size: 1.8rem;
  font-weight: 500;
  color: #515151;
}

/* 商品情報エリア */
.product-redesign__info {
  padding: 32px;
  background: #ffffff;
  border-radius: 3px;
  position: relative;
}

/* Share button */
.product-redesign__share-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #000;
}

.product-redesign__share-button:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

.product-redesign__share-button svg,
.product-redesign__share-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Vendor */
.product-redesign__vendor-section {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.product-redesign__vendor {
  font-size: 14px;
  color: #158808;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-redesign__puffs-badges {
  display: inline-flex;
  gap: 12px;

  .product-redesign__puffs-badge {
    display: inline-flex;
    padding: 0.6rem 0.875rem;
    background: #46b924;
    color: white;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
  }
}

.product-redesign__title {
  font-size: 22px;
  font-weight: 500;
  color: #505050;
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Text block styles */
.product-redesign__text {
  margin-bottom: 16px;
  color: #666;
}

.product-redesign__text--body {
  font-size: 16px;
}

.product-redesign__text--subtitle {
  font-size: 18px;
  font-weight: 500;
}

.product-redesign__text--uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 14px;
  font-weight: 500;
}

.product-redesign__price-section {
  margin-bottom: 16px;
}

.product-redesign__price {
  font-size: 2.2rem;
  font-weight: 500;
  color: #505050;
  margin-bottom: 16px;
}

.product-redesign__price-sale {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.product-redesign__price-sale .before {
  font-size: 1.6rem;
  text-decoration: line-through;
}

.product-redesign__price-sale .after {
  color: #ff4757;
}

.product-redesign__price-shipping-note {
  font-size: 0.8em;
  font-weight: 400;
  margin-left: 8px;
}

.product-redesign__price-sale .product-redesign__price-shipping-note {
  color: #ff4757;
}

/* レビューセクション */
.product-redesign__reviews {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.product-redesign__stars {
  display: flex;
  gap: 2px;
}

.product-redesign__star {
  width: 20px;
  height: 20px;
  fill: #ffb400;
}

.product-redesign__star--empty {
  fill: #e0e0e0;
}

.product-redesign__rating {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-right: 4px;
}

.product-redesign__review-count {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  cursor: pointer;
}

/* LINE Promotion Section */
.product-redesign__line-promotion {
  margin-top: 16px;
  margin-bottom: 24px;
  padding: 8px 4px;
  color: #6c6c6c;
}

.product-redesign__line-promotion-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-redesign__line-icon {
  flex-shrink: 0;
}

.product-redesign__line-text {
  font-weight: 400;
}

.product-redesign__line-text strong {
  color: #f44545;
  font-weight: 400;
}

.product-redesign__line-text a {
  color: inherit;
  text-decoration: underline;
}

/* Shipping Info Section */
.product-redesign__shipping-info {
  margin-bottom: 24px;
}

.product-redesign__shipping-text {
  font-size: 14px;
  color: #797979;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}

.product-redesign__shipping-link {
  color: inherit;
  transition: color 0.2s ease;
}

.product-redesign__shipping-link:hover {
  color: #333;
}

.product-redesign__shipping-discount {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #797979;
  font-weight: 400;
  margin: 0;
}

.product-redesign__shipping-icon {
  flex-shrink: 0;
  color: #666;
}

/* 在庫バッジ */
.product-redesign__stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background-color: #eff6ff;
  color: #1e40af;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid #dbeafe;
}

.product-redesign__stock-badge::before {
  content: "●";
  font-size: 10px;
}

/* バリエーション選択 */
.product-redesign__variant-picker {
  margin-bottom: 24px;

  .form__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
  }

  .select {
    position: relative;
    display: inline-block;
    width: 100%;

    &::after {
      box-shadow: none;
    }

    &:hover&::after {
      box-shadow: none;
    }

    .select__select {
      width: 100%;
      height: 44px;
      padding: 12px 40px 12px 16px;
      border: 1px solid #ddd;
      border-radius: 3px;
      background-color: white;
      font-size: 14px;
      color: #333;
      -webkit-appearance: none;
      appearance: none;
      cursor: pointer;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;

      &:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
      }

      &:hover {
        border-color: #bbb;
      }
    }

    .select__select:hover + span.svg-wrapper {
      transform: translateY(-50%) rotate(180deg);
    }

    span.svg-wrapper {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 12px;
      height: 12px;
      pointer-events: none;
      transition: transform 0.2s ease;
    }
  }
}

.product-form__quantity {
  margin-bottom: 16px;
}

/* 購入セクション */
.product-redesign__purchase-wrapper {
  .product-form__buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;

    .product-form__submit {
      flex: 1;
      display: flex;
      gap: 12px;
      align-items: center;
      padding: 0.25rem 1rem;
      color: white;
      background-color: rgb(var(--nicobay-green));
      border: none;
      border-radius: 75px;
      font-size: 1.3rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      text-align: center;
      white-space: nowrap;
      justify-content: center;
      visibility: visible !important;
      line-height: 1;
      height: 48px;
      position: relative;

      &:hover {
        opacity: .75;
        transform: translateY(-1px);
      }

      &::after {
        box-shadow: none;
      }
    }

    .product-redesign__add-to-cart--text {
      display: flex;
      align-items: center;
      gap: .6rem;
    }
  }
}

.product-redesign__purchase-wrapper {

  .product-redesign__amazon {
    width: 100%;

    .amazon-button {
      flex: 1;
      padding: 0.25rem 1rem;
      color: white;
      background-color: #ff9900;
      border: none;
      border-radius: 75px;
      font-size: 1.3rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      text-align: center;
      white-space: nowrap;
      display: flex !important;
      align-items: center;
      justify-content: center;
      gap: 5px;
      visibility: visible !important;
      line-height: 1;
      height: 48px;
      position: relative;
      text-decoration: none;

      &:hover:not(:disabled) {
        opacity: 0.75;
        transform: translateY(-1px);
      }

      &:disabled {
        background: #ccc;
        cursor: not-allowed;
        opacity: 0.6;
      }
    }
  }
}

/* Wishlist Button Styles */
.product-redesign__like-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: #dddddd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  flex-shrink: 0;
}

/* Hide mobile button on desktop */
.product-redesign__like-btn--mobile {
  display: none;
}

/* Show desktop button on desktop */
.product-redesign__like-btn--desktop {
  display: flex;
}

.product-redesign__like-btn:hover {
  transform: scale(1.05);
  border-color: #ff4757;
  background-color: #ffe4e6;
}

.product-redesign__like-btn:active {
  transform: scale(0.95);
}

.product-redesign__like-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.product-redesign__like-icon {
  width: 18px;
  height: 18px;
  color: #666;
  transition: all 0.3s ease;
}

.product-redesign__like-btn:hover .product-redesign__like-icon {
  color: #ff4757;
}

/* Liked state */
.product-redesign__like-btn.liked .product-redesign__like-icon {
  color: #ff4757;
  fill: #ff4757;
}

.product-redesign__like-btn.liked {
  background-color: #ffe4e6;
  border-color: #ff4757;
}

/* Animation for like action */
@keyframes likeAnimation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.product-redesign__like-btn.animating {
  animation: likeAnimation 0.4s ease;
}

/* Features Section */
.product-redesign__features {
  background: #fafafa;
  border-radius: 3px;
  padding: 32px;
  margin-top: 24px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.product-redesign__feature {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-redesign__feature-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
}

.product-redesign__feature-content {
  flex: 1;
}

.product-redesign__feature-title {
  font-size: 18px;
  font-weight: 500;
  color: rgb(var(--nicobay-green));
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.product-redesign__feature-text {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.product-redesign__feature-subtext {
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
}

/* 商品説明セクション */
.product-redesign__description {
  padding: 24px 0;
  border-top: 1px solid #e0e0e0;
}

.product-redesign__description-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.product-redesign__description-content {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

/* ユーザーレビューセクション */
.product-redesign__user-reviews {
  padding: 24px 0;
  border-top: 1px solid #e5e7eb;
}

.product-redesign__user-reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.product-redesign__user-reviews-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.product-redesign__review-notice {
  background-color: #f9fafb;
  padding: 16px;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
}

.product-redesign__review-notice p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
}

.product-redesign__review-item {
  padding: 20px 0;
}

.product-redesign__review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.product-redesign__review-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-redesign__review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e0e0e0;
}

.product-redesign__review-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.product-redesign__review-date {
  font-size: 12px;
  color: #999;
}

.product-redesign__review-content {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  margin-top: 8px;
}

.product-redesign__review-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.product-redesign__review-star {
  width: 16px;
  height: 16px;
  fill: #ffb400;
}

.product-redesign__review-star--empty {
  fill: #e0e0e0;
}

/* レスポンシブデザイン */
@media screen and (max-width: 768px) {
  .product-redesign {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }

  .product-redesign__media {
    flex-direction: column-reverse;
  }

  .product-redesign__thumbnails {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: center;
    gap: 5px;
  }

  .product-redesign__thumbnail {
    flex-shrink: 0;
  }

  .product-redesign__main-image {
    min-height: 300px;
    width: 100%;
  }

  .product-redesign__title {
    font-size: 14px;
  }

  .product-redesign__price {
    font-size: 22px;
  }

  .product-redesign__price-shipping-note {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }

  /* バリエーション選択 - モバイル */
  .product-redesign__variant-picker {
    margin-bottom: 20px;
  }

  .product-redesign__variant-option {
    margin-bottom: 12px;
  }

  .product-redesign__variant-select-input {
    height: 48px;
    font-size: 16px; /* iOSでズームを防ぐため */
  }

  .product-redesign__variant-label {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .product-redesign__feature {
    gap: 28px;
  }

  .product-redesign__feature-icon {
    width: 42px;
    height: 42px;
  }
}

/* features */
.product-redesign__feature-text {
  font-size: 12px;
}

/* アコーディオン機能 */
.product-redesign__accordion {
  border-bottom: 1px solid #e5e7eb;
}

.product-redesign__accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.product-redesign__accordion-title {
  font-size: 1.8rem;
  font-weight: 500;
  color: #515151;
}

.product-redesign__accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
  background-color: #f5f5f5;
  border-radius: calc(infinity * 1px);
  padding: 2px;
  transform: rotate(-90deg);
}

.product-redesign__accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: #515151;
  font-size: 1.4rem;
  font-weight: 400;
}

.product-redesign__accordion.active .product-redesign__accordion-icon {
  transform: rotate(0deg);
}

.product-redesign__accordion.active .product-redesign__accordion-content {
  max-height: 1000px;
  padding-bottom: 20px;
}

.product-redesign__warning-title {
  font-size: 1.8rem;
  font-weight: 500;
  padding-top: 20px;
  color: #515151;
}

.product-redesign__warning-text {
  color: #515151;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  word-break: break-all;
}

/* 数量入力のスピンボタンを非表示 */
.product-redesign__quantity-input::-webkit-inner-spin-button,
.product-redesign__quantity-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-redesign__quantity-input[type="number"] {
  -moz-appearance: textfield;
}

/* バリエーション選択 */
.product-redesign__variant-picker {
  margin-bottom: 24px;
}

.product-redesign__variant-option {
  margin-bottom: 16px;
}

.product-redesign__variant-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.product-redesign__variant-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.product-redesign__variant-select-input {
  width: 100%;
  height: 44px;
  padding: 12px 40px 12px 16px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background-color: white;
  font-size: 14px;
  color: #333;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-redesign__variant-select-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.product-redesign__variant-select-input:hover {
  border-color: #bbb;
}

.product-redesign__variant-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.product-redesign__variant-select:hover
.product-redesign__variant-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* 購入ボタンの状態 */
.product-redesign__add-to-cart.sold-out {
  background-color: #ccc !important;
  cursor: not-allowed;
  opacity: 0.6;
  color: #666;
}

.product-redesign__add-to-cart--select-variant {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.product-redesign__add-to-cart--select-variant:hover {
  background-color: #e9ecef;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .product-redesign {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 20px 0;
  }

  .product-redesign__media {
    gap: 16px;
    margin-bottom: 16px;
  }

  .product-redesign__media-container {
    flex-direction: column;
    gap: 12px;
  }

  .product-redesign__thumbnails {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .product-redesign__thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  /* Restructure product page layout for mobile */
  .product-redesign {
    display: flex;
    flex-direction: column;
  }

  /* Show reviews widget on mobile, hide desktop version */
  .product-redesign__reviews-widget-mobile {
    display: block;
    background: #ffffff;
    border-radius: 3px;
    padding: 16px;
  }

  /* Hide desktop reviews widget on mobile */
  .product-redesign__reviews-widget-desktop {
    display: none;
  }

  .product-redesign__info {
    padding: 20px;
  }

  /* Mobile layout adjustments for purchase section */
  .product-redesign__purchase-wrapper {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }

  .product-redesign__purchase {
    width: 100%;
    order: 2;
  }

  /* Quantity and wishlist row */
  .product-redesign__quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    order: 1;
  }

  /* Move wishlist button back to quantity row on mobile */
  .product-redesign__like-btn {
    margin: 0 12px;
    order: 1;
  }

  /* Show mobile button, hide desktop button on mobile */
  .product-redesign__like-btn--mobile {
    display: flex;
  }

  .product-redesign__like-btn--desktop {
    display: none;
  }

  /* Add to cart button - full width on mobile */
  .product-redesign__add-to-cart {
    width: 100%;
    height: 55px;
    font-size: 1.5rem;
    order: 2; /* Move to bottom */
    padding: 0 1rem !important;
    line-height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 75px !important;
  }

  /* Ensure button text is visible on mobile */
  .product-redesign__add-to-cart span {
    visibility: visible !important;
  }
}

/* =========================================================================
 * ここから下は WooCommerce 側の差分補正（本番 Shopify の同名アセットには無い）。
 * 上の移植部分は本番と 1 対 1 で比較できるよう手を入れないこと。
 * 追補 CSS（assets/nicobay-product-detail.css）より後勝ちさせたい規則は
 * .nbpdp-reviews を重ねて詳細度を上げている。
 * ========================================================================= */

/* 商品詳細のキャンペーンバナー（本番 main-product-redesign.liquid 冒頭）。
   呼び出し側が .page-width の内側にあるため全幅へ戻す。 */
#custom-nicobay-banner-container-prd {
  margin-bottom: 20px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

#custom-nicobay-banner-container-prd a {
  display: block;
  width: 100%;
  text-decoration: none;
}

#custom-banner-wrap-pc-prd {
  display: block;
}

#custom-banner-wrap-sp-prd {
  display: none;
}

@media screen and (max-width: 768px) {
  #custom-banner-wrap-pc-prd {
    display: none;
  }

  #custom-banner-wrap-sp-prd {
    display: block;
  }
}

/* 価格行: WooCommerce は金額・通貨・送料込み表記が別要素になるぶん幅を食い、
   本番では 1 行に収まる「（商品送料込み：…）」が折り返してしまう。
   本番 .product-redesign__price-sale と同じ flex ベースラインで 1 行に並べる。 */
@media screen and (min-width: 769px) {
  .product-redesign__price {
    display: flex;
    align-items: baseline;
  }
}

/* バリアント select: WooCommerce 既定の背景 caret（濃い chevron）を消し、
   本番と同じ .svg-wrapper の SVG caret だけを見せる。
   打ち消す相手は .woocommerce div.product form.cart .variations select（詳細度 0,4,3）なので、
   同じセレクタに .select__select を足して 0,5,3 で確実に上回る。 */
.woocommerce div.product form.cart .variations select.select__select,
.product-redesign .product-redesign__variant-picker .select select.select__select {
  background-image: none;
  /* 本番の実測値（padding 12/40/12/16、背景は白）に合わせる。
     WooCommerce 既定の padding は上下 0 で、文字がボックス内で上寄りに見えていた。 */
  background-color: rgb(255, 255, 255);
  padding: 1.2rem 4rem 1.2rem 1.6rem;
  margin: var(--inputs-border-width);
  min-width: calc(7rem + (var(--inputs-border-width) * 2));
}

/* 売り切れ／バリアント未確定のカートボタンは本番 base.css の .button:disabled と同じ淡色。 */
.product-redesign__purchase-wrapper .product-form__submit:disabled,
.product-redesign__purchase-wrapper .product-form__submit[aria-disabled='true'],
.product-redesign__purchase-wrapper .product-form__submit.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---- レビュー（本番 Klaviyo アプリブロックの静的クローン）の配置補正 ---- */

.nbpdp-reviews .nbpdp-reviews__title {
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ececec;
  font-size: 1.6rem;
  font-weight: 600;
  color: #3a3a3a;
  letter-spacing: 0.02em;
}

/* 星と「0件のレビュー」は同じ行、スコアはその下。 */
.nbpdp-reviews .nbpdp-reviews__score-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 本番はヒストグラムがカードの右半分に載る。 */
.nbpdp-reviews .nbpdp-reviews__summary {
  align-items: center;
  flex-wrap: nowrap;
}

.nbpdp-reviews .nbpdp-reviews__score {
  flex: 1 1 auto;
}

.nbpdp-reviews .nbpdp-reviews__bars {
  flex: 0 0 50%;
  gap: 16px;
}

.nbpdp-reviews .nbpdp-reviews__bar-track {
  height: 10px;
  border-radius: 2px;
}

/* タブ（左）とアクションボタン（右）を同じ帯に置き、下端に罫線を引く。
   本番は DOM 順が「ボタン帯 → タブ」で row-reverse。マークアップ側も同じ順に
   揃えたので、ここは row-reverse のままで見た目が本番と一致する。 */
.nbpdp-reviews .nbpdp-reviews__toolbar {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  border-bottom: 1px solid #ececec;
}

.nbpdp-reviews .nbpdp-reviews__tabs {
  margin-top: 0;
  border-bottom: 0;
}

.nbpdp-reviews .nbpdp-reviews__actions {
  margin-top: 0;
  margin-bottom: 12px;
}

/* 本番実測（1440px）: padding 15px 20px / fw 600 / 文字とボーダーは rgb(126,155,112) /
   2 ボタンは gap 8px で等幅（親 316px → 154px ずつ）。
   移行後は薄いグレー枠・fw400・幅が文字量なりで 152/180 とバラついていた。 */
/* 2 ボタンを等幅にする。flex だと親が shrink-to-fit なので min-width:auto が効いて
   文字量なりの 112/140 になってしまう。grid の 1fr は列幅を両者の max-content の
   大きい方に揃えるため、親が内容幅でも等幅になる。 */
.nbpdp-reviews .nbpdp-reviews__actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
}

.nbpdp-reviews .nbpdp-reviews__action {
  padding: 15px 20px;
  font-size: 1.4rem;
  font-weight: 600;
  /* 本番の行高は 15px（実測）。これで高さが 15+30+2=47px と一致する。 */
  line-height: 15px;
  white-space: nowrap;
  color: #7e9b70;
  border-color: #7e9b70;
  border-radius: 4px;
}

.nbpdp-reviews .nbpdp-reviews__action:hover {
  border-color: #7e9b70;
}

.nbpdp-reviews .nbpdp-reviews__empty {
  color: #3a3a3a;
  font-weight: 700;
}

@media screen and (max-width: 768px) {
  .nbpdp-reviews .nbpdp-reviews__summary {
    flex-wrap: wrap;
  }

  .nbpdp-reviews .nbpdp-reviews__bars {
    flex: 1 1 100%;
  }

  /* 本番実測（390px）: column / 帯の gap 24px、ボタンは padding 10px で等幅 165px ずつ。 */
  .nbpdp-reviews .nbpdp-reviews__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .nbpdp-reviews .nbpdp-reviews__action {
    padding: 10px;
    /* モバイルの本番実測は高さ 52px（padding 10px・ボーダー 1px）＝行高 30px。 */
    line-height: 30px;
  }
}

/* PDP のカルーセル群（SET / RECOMMEND）: 本番は商品セクションと同じ 30px の
   左右余白の中に収まる（1440px 幅で実測 1380px @ x30）。PDP は page-width
   ラッパを持たないぶん、ここで同じ余白と最大幅を与える。 */
.product-redesign__sections {
  max-width: 1600px;
  margin: 0 auto;
  /* 左右余白は中の .featured-collection-swiper-container.page-width が既に持っている
     （本番と同じくモバイル 15px / デスクトップ 30px）。ここで足すと二重になり、
     カード幅がモバイルで 175→145px、デスクトップで 330→315px に痩せる。 */
  padding-left: 0;
  padding-right: 0;
}

/* ===== WooCommerce Composite Products（セット商品）の意匠合わせ =====
   ステージングではセット商品が Composite Products プラグインで組まれており、
   プラグインの素の出力（英語ラベル・素の select・選択内容の再掲・既定の紫ボタン）が
   そのまま出ていた。本番（Shopify）のセット商品 PDP は「ラベル + 装飾済み select を
   縦に並べ、緑のピルボタン」なので、同じ見た目になるよう当てる。
   データ構造には触らない（プラグイン側の設定はそのまま）。 */

/* 「Available options:」は本番に無い英語ラベル。読み上げ用に残して視覚的に隠す。 */
.product-redesign .component_section_title .select_label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* コンポーネント見出し（「フレーバー選択 #1」等）は本番のバリアントラベル相当に。 */
.product-redesign .component_title_wrapper {
	margin: 0 0 8px;
}
.product-redesign .component_title,
.product-redesign .component_title_text {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: rgb(var(--color-foreground));
	margin: 0;
	padding: 0;
	border: 0;
	text-transform: none;
	letter-spacing: normal;
}
.product-redesign .composite_component {
	margin-bottom: 16px;
}

/* select は本番実測値（枠 1px #ddd / 角丸 3px / padding 12-40-12-16 / 背景白 / 14px 500）。 */
.product-redesign .component_options_select_wrapper {
	position: relative;
}
.woocommerce div.product .product-redesign select.component_options_select,
.product-redesign select.component_options_select {
	width: 100%;
	min-height: 44px;
	padding: 1.2rem 4rem 1.2rem 1.6rem;
	border: 1px solid #ddd;
	border-radius: 3px;
	background-color: #fff;
	background-image: none;
	font-size: 1.4rem;
	font-weight: 500;
	color: #333;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}
/* appearance:none で消えた caret を本番と同じ位置に描く。 */
.product-redesign .component_options_select_wrapper::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 10px;
	height: 6px;
	transform: translateY(-50%);
	pointer-events: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M9.354.646a.5.5 0 0 0-.708 0L5 4.293 1.354.646a.5.5 0 0 0-.708.708l4 4a.5.5 0 0 0 .708 0l4-4a.5.5 0 0 0 0-.708' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M9.354.646a.5.5 0 0 0-.708 0L5 4.293 1.354.646a.5.5 0 0 0-.708.708l4 4a.5.5 0 0 0 .708 0l4-4a.5.5 0 0 0 0-.708' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 「Your selection:」＋サムネイル＋在庫数は本番に無いので隠す。 */
.product-redesign .component_summary,
.product-redesign .component_data,
.product-redesign .composite_message {
	display: none !important;
}

/* カートボタンは本番と同じ緑のピル。WooCommerce 側は
   `.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) … button.button.alt`
   で紫（#7f54b3）を当ててくるので、フォームとクラスまで含めて確実に上回る。 */
.woocommerce div.product form.cart button.composite_add_to_cart_button.button.alt,
.woocommerce div.product .product-redesign button.composite_add_to_cart_button,
.product-redesign .composite_add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 2.5px 10px;
	border: 0;
	border-radius: 75px;
	background: rgb(21, 136, 8);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.woocommerce div.product form.cart button.composite_add_to_cart_button.button.alt:hover:not(:disabled),
.woocommerce div.product .product-redesign button.composite_add_to_cart_button:hover:not(:disabled) {
	background: rgb(18, 115, 7);
}
.woocommerce div.product .product-redesign button.composite_add_to_cart_button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
