/* =============================================
   single-product.css — 商品個別ページ
   ============================================= */

/* ----- 商品情報セクション ----- */
.sp-product {
  background-color: var(--color-white);
}

.sp-product__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 20px 40px 157px;
  display: flex;
  gap: 58px;
  align-items: flex-start;
}

.sp-product__gallery {
  width: 572px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-product__gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 572/630;
  background-color: var(--color-bg-light);
  overflow: hidden;
}

.sp-product__gallery-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.sp-product__gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.sp-product__gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sp-product__gallery-thumbs {
  display: flex;
  gap: 10px;
}

.sp-product__gallery-thumb {
  width: 80px;
  height: 80px;
  background-color: var(--color-bg-light);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  transition: border-color 0.3s ease;
}

.sp-product__gallery-thumb.is-active {
  border-color: var(--color-gold);
}

.sp-product__gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sp-product__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sp-product__meta {
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.sp-product__name {
  font-family: var(--font-mincho);
  font-weight: 900;
  font-size: 36px;
  line-height: 55px;
  color: var(--color-text);
}

.sp-product__size {
  font-family: var(--font-mincho);
  font-weight: 400;
  font-size: 18px;
  line-height: 26px;
  color: #939393;
}

.sp-product__price {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.sp-product__price-value {
  font-family: var(--font-mincho);
  font-weight: 900;
  font-size: 26px;
  line-height: 24px;
  color: var(--color-text);
}

.sp-product__desc {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.sp-product__desc-lead {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: var(--color-text);
}

.sp-product__desc-body {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text);
}

/* カート */
.sp-product__cart {
  max-width: 379px;
}

.sp-product__cart .quantity {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 17px;
}

.sp-product__cart .quantity label {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1px;
}

.sp-product__cart .quantity input {
  width: 89px;
  padding: 12px 15px 10px;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 16px;
  background-color: var(--color-bg-cream);
  border: 1px solid var(--color-gold-light);
  color: var(--color-text);
}

/* のし指定 */
.sp-product__noshi {
  margin-bottom: 20px;
  padding: 20px;
  background-color: var(--color-bg-cream);
  border: 1px solid var(--color-gold-light);
  border-radius: 4px;
}

.sp-product__noshi-label {
  display: block;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.sp-product__noshi-input {
  width: 100%;
  font-family: var(--font-mincho);
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  background-color: var(--color-white);
  color: var(--color-text);
}

.sp-product__noshi-input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.sp-product__noshi-note {
  font-family: var(--font-mincho);
  font-size: 13px;
  color: #999;
  margin-top: 6px;
}

/* バリエーション（可変商品） */
.sp-product__cart .variations {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.sp-product__cart .variations tr {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 12px;
}

.sp-product__cart .variations td,
.sp-product__cart .variations th {
  padding: 0;
  border: none;
}

.sp-product__cart .variations td.label {
  flex-shrink: 0;
  padding-top: 12px;
}

.sp-product__cart .variations td.label label {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-primary-dark);
  line-height: 1;
}

.sp-product__cart .variations td.value {
  flex: 1;
}

.sp-product__cart .variations td.value select {
  width: 100%;
  font-family: var(--font-mincho);
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--color-gold-light);
  background-color: var(--color-bg-cream);
  color: var(--color-text);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23282828' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.sp-product__cart .variations td.value select:focus {
  outline: none;
  border-color: var(--color-gold);
}

.sp-product__cart .variations .reset_variations {
  font-family: var(--font-mincho);
  font-size: 13px;
  color: var(--color-gold);
  margin-top: 4px;
  display: inline-block;
}

/* バリエーション選択後の価格は非表示（上の価格表示をJSで更新するため） */
.sp-product__cart .woocommerce-variation-price {
  display: none;
}

.sp-product__cart .woocommerce-variation {
  margin-bottom: 16px;
}

.sp-product__cart .woocommerce-variation-price {
  font-family: var(--font-mincho);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.sp-product__cart .woocommerce-variation-description {
  font-family: var(--font-mincho);
  font-size: 14px;
  line-height: 22px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.sp-product__cart .woocommerce-variation-availability {
  font-family: var(--font-mincho);
  font-size: 14px;
  margin-bottom: 12px;
}

.sp-product__cart .woocommerce-variation-availability .stock {
  color: var(--color-gold);
}

.sp-product__cart .woocommerce-variation-availability .out-of-stock {
  color: #e74c3c;
}

.sp-product__cart .single_add_to_cart_button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  background-color: var(--color-gold);
  border-radius: 110px;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--color-white);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.sp-product__cart .single_add_to_cart_button:hover {
  opacity: 0.8;
}

/* 品切れ時のボタン・案内文 */
/* woocommerce.css の .button.alt より後に効かせるため詳細度を上げる */
.sp-product__cart .single_add_to_cart_button.button.alt.is-soldout,
.sp-product__cart .single_add_to_cart_button.button.alt.disabled,
.sp-product__cart .single_add_to_cart_button.button.alt:disabled {
  background-color: #8d8880;
  color: var(--color-white);
  cursor: not-allowed;
}

.sp-product__cart .single_add_to_cart_button.button.alt.is-soldout:hover,
.sp-product__cart .single_add_to_cart_button.button.alt.disabled:hover,
.sp-product__cart .single_add_to_cart_button.button.alt:disabled:hover {
  opacity: 1;
  background-color: #8d8880;
}

.sp-product__soldout {
  margin-top: 12px;
  font-family: var(--font-mincho);
  font-size: 14px;
  line-height: 1.8;
  color: #e74c3c;
}

.sp-product__shipping {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text);
}

/* ----- 味の説明と使い方 ----- */
.sp-taste {
  position: relative;
  background-color: var(--color-primary-dark);
  overflow: hidden;
}

.sp-taste__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 110px var(--section-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 97px;
}

.sp-taste__content {
  display: flex;
  gap: 73px;
  align-items: center;
}

.sp-taste__image {
  width: 580px;
  height: 512px;
  background-color: var(--color-white);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-taste__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sp-taste__text {
  flex: 1;
  color: var(--color-white);
}

.sp-taste__text h3,
.sp-taste__text p:first-child {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 18px;
  line-height: 30px;
  margin-bottom: 25px;
}

.sp-taste__text p {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 30px;
}

.sp-taste__logo-bg {
  position: absolute;
  top: -10px;
  right: -77px;
  width: 483px;
  height: 359px;
  opacity: 0.05;
  pointer-events: none;
}

.sp-taste__logo-bg img {
  width: 100%;
  height: auto;
}

/* ----- おすすめの使い方 ----- */
.sp-usage {
  background-color: var(--color-bg-cream);
  position: relative;
  overflow: hidden;
}

.sp-usage__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 110px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.sp-usage__desc {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text);
  text-align: center;
}

.sp-usage__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 56px 58px;
  width: 100%;
  max-width: 1100px;
}

.sp-usage__card {
  display: flex;
  gap: 27px;
  align-items: center;
  padding: 34px 42px;
  background-color: var(--color-white);
  border: 1px solid var(--color-gold);
  width: calc(50% - 29px);
}

.sp-usage__card-text {
  flex: 1;
}

.sp-usage__card-title {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 26px;
  line-height: 30px;
  color: var(--color-primary-dark);
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.sp-usage__card-text p {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text);
  letter-spacing: 1px;
}

.sp-usage__card-image {
  width: 228px;
  height: 199px;
  background-color: var(--color-primary-dark);
  overflow: hidden;
  flex-shrink: 0;
}

.sp-usage__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

/* ----- 商品詳細情報（アコーディオン） ----- */
.sp-details {
  background-color: var(--color-white);
}

.sp-details__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 110px 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 55px;
}

.sp-details__accordion {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sp-details__item {
  border: 1px solid var(--color-gold-light);
  background-color: var(--color-white);
}

.sp-details__item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  width: 100%;
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text);
  cursor: pointer;
}

.sp-details__item-icon {
  transition: transform 0.3s ease;
  transform: rotate(90deg);
}

.sp-details__item-header[aria-expanded="true"] .sp-details__item-icon {
  transform: rotate(-90deg);
}

.sp-details__item-body {
  padding: 0 30px 20px;
  font-family: var(--font-mincho);
  font-size: 14px;
  line-height: 24px;
  color: var(--color-text);
}

/* ----- お店についてセクション ----- */
.sp-about-shop {
  position: relative;
  height: 577px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.sp-about-shop__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(26, 26, 46, 0.5);
}

.sp-about-shop__content {
  position: absolute;
  top: 50%;
  left: 90px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 63px;
  width: 396px;
}

.sp-about-shop__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 23px;
  text-align: center;
  color: var(--color-white);
}

.sp-about-shop__title {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 36px;
  line-height: 55px;
}

.sp-about-shop__desc {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  max-width: 368px;
}

/* ----- こちらもおすすめ ----- */
.sp-related {
  background-color: var(--color-bg-cream);
}

.sp-related__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 110px var(--section-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.sp-related__desc {
  font-family: var(--font-mincho);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text);
  text-align: center;
}

.sp-related__products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  width: 100%;
}

.sp-related__products .shop-product-card__image {
  aspect-ratio: 1;
}

.sp-related__products .shop-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sp-related__btn {
  margin-top: 23px;
}

/* ----- レスポンシブ ----- */
@media (max-width: 1024px) {
  .sp-product__inner {
    flex-direction: column;
    gap: 40px;
    padding: 20px 40px 80px;
  }

  .sp-product__gallery {
    width: 100%;
    max-width: 572px;
    margin: 0 auto;
  }

  .sp-taste__content {
    flex-direction: column;
    gap: 40px;
  }

  .sp-taste__image {
    width: 100%;
    height: auto;
    aspect-ratio: 580/512;
  }

  .sp-usage__card {
    width: 100%;
  }

  .sp-details__inner {
    padding: 80px 40px;
  }

  .sp-about-shop__content {
    left: 40px;
    width: calc(100% - 80px);
    max-width: 396px;
  }

  .sp-related__products {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .sp-product__inner {
    padding: 15px 20px 60px;
  }

  .sp-product__name {
    font-size: 24px;
    line-height: 36px;
  }

  .sp-product__price-value {
    font-size: 22px;
  }

  .sp-product__cart {
    max-width: 100%;
  }

  .sp-taste__inner {
    padding: 60px 20px;
    gap: 40px;
  }

  .sp-usage__inner {
    padding: 60px 20px;
  }

  .sp-usage__card {
    flex-direction: column;
    padding: 24px;
  }

  .sp-usage__card-image {
    width: 100%;
    height: 180px;
  }

  .sp-usage__card-title {
    font-size: 20px;
  }

  .sp-details__inner {
    padding: 60px 20px;
  }

  .sp-about-shop {
    height: auto;
    min-height: 400px;
  }

  .sp-about-shop__overlay {
    background-color: rgba(26, 26, 46, 0.7);
  }

  .sp-about-shop__content {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
    padding: 60px 20px;
    gap: 40px;
  }

  .sp-about-shop__title {
    font-size: 26px;
    line-height: 40px;
  }

  .sp-related__inner {
    padding: 60px 20px;
  }

  .sp-related__products {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}