@charset "UTF-8";

/* ========================================
   商品詳細ページ CSS（カラーミーショップ対応）
   エレガントなベージュデザイン
   ======================================== */

:root {
  /* 商品画像 */
  --main-image-border-radius: 8px;
  --thumbnail-image-border-radius: 4px;
  
  /* 商品の文字 */
  --product-name-font-size-sp: 24px;
  --product-name-font-size-pc: 32px;
  --product-name-font-weight: 600;
  --product-price-font-size-sp: 20px;
  --product-price-font-size-pc: 28px;
  --product-price-font-weight: 600;
  
  /* カートボタン */
  --cart-button-background-color: var(--color-beige-dark);
  --cart-button-border-radius: 6px;
  --cart-button-text-color: #fff;
  --cart-button-font-size-sp: 14px;
  --cart-button-font-size-pc: 16px;

  /* 詳細ページのセクション */  
  --product-section-margin-sp: 40px auto 60px;
  --product-section-margin-pc: 60px auto 80px;

  /* オプション表の丸印 */
  --option-table-dot-color: var(--color-beige-darker);
}

/* 共通コンテナ設定 */
.p-product {
  max-width: var(--container-max-width, 1400px);
  margin: 0 auto;
  padding: 0 var(--container-padding-sp, 10px);
}

@media (min-width: 768px) {
  .p-product {
    padding: 0 var(--container-padding-pc, 40px);
    margin-bottom: 100px;
  }
}

.c-section {
  margin: var(--product-section-margin-sp);
}

@media screen and (min-width: 768px) {
  .c-section {
    margin: var(--product-section-margin-pc);
  }
}

/* メインレイアウト */
.p-product-main {
  display: block;
  width: 100%;
  margin-bottom: 60px;
}

@media (min-width: 768px) {
  .p-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .p-product-main {
    grid-template-columns: 55% 45%;
    gap: 60px;
  }
}

/* 画像エリア */
.p-product-img {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 40px;
}

@media screen and (min-width: 768px) {
  .p-product-img {
    margin: 0;
    max-width: 100%;
  }
}

.p-product-img__main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #F8F8F8;
  border-radius: var(--main-image-border-radius);
  overflow: hidden;
  margin-bottom: 16px;
}

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

/* サムネイルリスト */
.p-product-img__thumb {
  margin-top: 16px;
}

.p-product-thumb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media screen and (min-width: 768px) {
  .p-product-thumb-list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

.p-product-thumb-list__item {
  width: 100%;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.p-product-thumb-list__img {
  width: 100%;
  height: 100%;
  background-color: #F8F8F8;
  border-radius: var(--thumbnail-image-border-radius);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.p-product-thumb-list__item:hover .p-product-thumb-list__img,
.p-product-thumb-list__item.slick-current .p-product-thumb-list__img {
  border-color: #C9A962;
}

.p-product-thumb-list__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 商品情報エリア */
.p-product-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.p-product-info__ttl {
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
  font-size: var(--product-name-font-size-sp);
  font-weight: var(--product-name-font-weight);
  line-height: 1.3;
  color: #3D3228;
  margin: 0;
}

@media screen and (min-width: 768px) {
  .p-product-info__ttl {
    font-size: var(--product-name-font-size-pc);
  }
}

.p-product-info__id {
  font-size: 12px;
  color: #808080;
  letter-spacing: 0.05em;
}

/* 価格 */
.p-product-price {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid #E8E8E8;
  border-bottom: 1px solid #E8E8E8;
}

.p-product-price__sell {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: var(--product-price-font-size-sp, 20px);
  font-weight: var(--product-price-font-weight, 600);
  color: #202020;
  line-height: 1.2;
}

@media screen and (min-width: 768px) {
  .p-product-price__sell {
    font-size: var(--product-price-font-size-pc, 28px);
  }
}

/* 税込表示の調整 */
.u-font-small, 
.p-product-price__sell .u-font-small {
  font-size: 0.55em !important;
  font-weight: 400 !important;
  color: #808080 !important;
  margin-left: 2px;
  vertical-align: baseline !important;
  line-height: 1 !important;
}

.p-product-price__discount {
  background-color: #C9A962;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.p-product-price__normal {
  font-size: 14px;
  color: #808080;
}

.p-product-price__normal.is-strikethrough {
  text-decoration: line-through;
}

.p-product-price__list-price {
  font-size: 12px;
  color: #808080;
}

.p-product-sexpl {
  font-size: 14px;
  line-height: 1.8;
  color: #606060;
}

/* オプション */
.p-product-option {
  margin: 20px 0;
}

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

.p-product-option-select__ttl {
  font-size: 12px;
  font-weight: 500;
  color: #3D3228;
  margin-bottom: 8px;
}

.p-product-option-select select.product_cart_select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E8E8E8;
  border-radius: 4px;
  font-size: 14px;
  background-color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
}

.p-product-option-select select.product_cart_select:hover {
  border-color: #B8A894;
}

.p-product-option-select select.product_cart_select:focus {
  outline: none;
  border-color: #C9A962;
}

/* 名入れ */
.p-product-name__ttl {
  font-size: 12px;
  font-weight: 500;
  color: #3D3228;
  margin-bottom: 8px;
}

.p-product-name__body input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E8E8E8;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.p-product-name__body input[type="text"]:focus {
  outline: none;
  border-color: #C9A962;
}

/* 購入フォーム */
.p-product-form {
  margin: 24px 0;
  width: 100%;
}

.p-product-form__quantity {
  font-size: 12px;
  font-weight: 500;
  color: #3D3228;
  margin-bottom: 8px;
}

.p-product-form-stock {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.p-product-form-stock__input {
  display: flex;
  align-items: center;
  border: 1px solid #E8E8E8;
  border-radius: 4px;
  overflow: hidden;
}

.p-product-form-stock__down,
.p-product-form-stock__up {
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: #E8E8E8 !important;
  border: 1px solid #D0D0D0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.p-product-form-stock__down:hover,
.p-product-form-stock__up:hover {
  background-color: #C9A962 !important;
  border-color: #C9A962 !important;
}

.p-product-form-stock__down svg,
.p-product-form-stock__up svg {
  width: 20px;
  height: 20px;
  stroke: #000000 !important;
  stroke-width: 2.5 !important;
  fill: none;
}

.p-product-form-stock__down:hover svg,
.p-product-form-stock__up:hover svg {
  stroke: #FFFFFF !important;
}

.p-product-form-stock__input input[type="text"] {
  width: 60px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid #E8E8E8;
  border-right: 1px solid #E8E8E8;
  font-size: 14px;
  font-weight: 500;
}

.p-product-form-stock__input input[type="text"]:focus {
  outline: none;
}

.p-product-form-stock__unit,
.p-product-form-stock__stock {
  font-size: 12px;
  color: #606060;
}

.p-product-form-btn {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media screen and (min-width: 768px) {
  .p-product-form-btn {
    flex-direction: row;
    align-items: center;
  }
}

.p-product-form-btn__cart {
  flex: 1;
}

/* カートボタン */
.c-btn-cart {
  width: 100%;
  max-width: 100%;
  padding: 16px 24px;
  background-color: #B8A894;
  color: #FFFFFF;
  font-size: var(--cart-button-font-size-sp);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--cart-button-border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
}

@media screen and (min-width: 768px) {
  .c-btn-cart {
    font-size: var(--cart-button-font-size-pc);
  }
}

.c-btn-cart:hover {
  background-color: #9B8B77;
}

.c-btn-cart svg {
  width: 20px;
  height: 20px;
  stroke: #FFFFFF;
}

.c-btn-cart.is-soldout,
.c-btn-cart.is-disabled {
  background-color: #D0D0D0;
  cursor: not-allowed;
}

.c-btn-cart.is-membersonly {
  background-color: #A0A0A0;
  cursor: not-allowed;
}

/* お気に入りボタン */
.c-btn-favorite button {
  width: 48px;
  height: 48px;
  background-color: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.c-btn-favorite button:hover {
  background-color: #F5F0EA;
  border-color: #C9A962;
}

.c-btn-favorite svg {
  width: 24px;
  height: 24px;
  stroke: #5C4F42;
  transition: all 0.2s ease;
}

.c-btn-favorite button.on svg {
  fill: #C9A962;
  stroke: #C9A962;
}

/* キャンペーンセクションCSS */
.p-product-campaign {
  border: 1px solid #dcd5ca;
  border-radius: 6px;
  margin-top: 30px;
  overflow: hidden;
  background: #fff;
}
.p-product-campaign__ttl {
  background-color: #B8A894;
  color: #fff;
  font-weight: 500;
  padding: 10px;
  text-align: center;
  font-size: 15px;
  font-family: 'Shippori Mincho', serif;
  letter-spacing: 0.05em;
}
.p-product-campaign__body {
  padding: 20px 16px;
  background: #fff;
}
.p-product-campaign__body p {
  margin: 0 0 16px;
  line-height: 1.8;
  font-size: 13px;
  text-align: left;
}
.p-product-campaign__btn {
  text-align: center;
}
.p-product-campaign__example {
  background-color: #f9f8f6;
  border-radius: 4px;
  padding: 16px;
  margin: 16px 0 20px;
}
.p-product-campaign__example-ttl {
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  margin-bottom: 10px;
  color: #5C4F42;
}
.p-product-campaign__example-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #666;
  text-align: center;
}
.p-product-campaign__example-list li {
  margin-bottom: 6px;
}
.p-product-campaign__example-price {
  color: #9B8B77;
  font-weight: bold;
  font-size: 1.1em;
  margin-left: 8px;
}
.c-btn-campaign {
  display: inline-block;
  background-color: #B8A894;
  color: #fff !important;
  padding: 10px 24px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.3s;
}
.c-btn-campaign:hover {
  opacity: 0.8;
}

/* 関連商品・おすすめ商品 */
.p-together-list,
.p-product-recommend-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media screen and (min-width: 768px) {
  .p-together-list,
  .p-product-recommend-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media screen and (min-width: 1024px) {
  .p-product-recommend-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.p-product-recommend-list__item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.p-product-recommend-list__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.p-product-recommend-list__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #F8F8F8;
  overflow: hidden;
}

.p-product-recommend-list__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.p-product-recommend-list__item:hover .p-product-recommend-list__img img {
  transform: scale(1.05);
}

.p-product-recommend-list__ttl {
  padding: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #3D3228;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-product-recommend-list__price {
  padding: 0 12px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #202020;
}

.p-product-recommend-list__price.is-discount {
  color: #C9A962;
}

.p-product-recommend-list__price.is-strikethrough {
  font-size: 12px;
  color: #808080;
  text-decoration: line-through;
}

.p-product-recommend-list__price.is-soldout {
  color: #EF4444;
}

.p-product-recommend-list__discount {
  background-color: #C9A962;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: 4px;
}

.p-product-recommend-list__price .u-font-small {
  font-size: 0.6em !important;
}

/* リンクリスト */
.p-product-link-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-product-link-list__item {
  font-size: 11px;
  text-align:center;
}

.p-product-link-list__item a {
  color: #5C4F42;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.p-product-link-list__item a:hover {
  color: #C9A962;
  opacity: 1;
}

/* 商品説明（DETAIL） */
.p-product-detail {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0;
}

.p-product-explain {
  margin-bottom: 40px;
  width: 100%;
}

.p-product__ttl {
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: #3D3228;
  letter-spacing: 0.05em;
  padding-bottom: 16px;
  border-bottom: 1px solid #E8E8E8;
}

.p-product-explain__body {
  font-size: 14px;
  line-height: 1.8;
  color: #5C4F42;
}

.p-product-explain__body img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

/* レビュー */
.p-product-review {
  margin: 60px 0;
}

.p-product-review-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.p-product-review-item {
  padding: 24px;
  background-color: #F8F8F8;
  border-radius: 8px;
}

.p-product-review-item__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.p-product-review-item__rating {
  display: flex;
  gap: 2px;
}

.p-product-review-item__rating svg {
  width: 16px;
  height: 16px;
  fill: #C9A962;
}

.p-product-review-item__date {
  font-size: 11px;
  color: #808080;
}

.p-product-review-item__body {
  font-size: 14px;
  line-height: 1.8;
  color: #5C4F42;
}

/* エラーメッセージ */
.p-product-form__error-message {
  font-size: 12px;
  color: #EF4444;
  margin-top: 8px;
}

/* ========================================
   スマホ表示（767px以下）の最適化
   ======================================== */
@media screen and (max-width: 767px) {
  
  /* 1. 商品説明（DETAIL）周りの余白 */
  .p-product-detail {
    margin: 20px 0 30px !important;
  }

  .p-product__ttl {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    font-size: 20px !important;
  }

  .p-product-explain {
    margin-bottom: 20px !important;
  }

  .p-product-img {
    margin-bottom: 20px !important;
  }

  /* 2. 商品サムネイルを横スクロールにする */
  .p-product-thumb-list {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: none !important;
  }

  .p-product-thumb-list__item {
    width: 70px !important;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
  }
  
  .p-product-thumb-list::-webkit-scrollbar {
    display: none;
  }
  .p-product-thumb-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

/* ========================================
   追加修正スタイル（キャンペーン、セレクトボックス、レビュー）
   ======================================== */

/* セレクトボックスの修正（文字切れ対策） */
select.product_cart_select {
  height: auto !important;
  min-height: 48px !important;
  padding: 10px 16px !important;
  line-height: 1.5 !important;
  color: #3D3228 !important;
  background-color: #fff !important;
  font-size: 14px !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  appearance: auto !important; /* 標準的な表示に戻してバグを防ぐ */
}

/* フォントの修正（しっぽり明朝） */
.p-product-info__ttl {
  font-family: 'Shippori Mincho', serif !important;
  letter-spacing: 0.05em !important;
  font-weight: 500 !important;
  font-size: 22px !important; /* 文字サイズ調整 */
  line-height: 1.4 !important;
  margin-bottom: 20px !important;
}

/* スタイリッシュなレビューエリア */
.p-product-review-area {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}
.p-product-review-area__ttl {
  font-family: 'Shippori Mincho', serif;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 0.1em;
}
.p-product-review-simple-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dotted #eee;
}
.p-product-review-simple-item:last-child {
  border-bottom: none;
}
.p-product-review-simple-item__star {
  font-size: 14px;
  margin-bottom: 4px;
}
.star-on { color: #C9A962; } /* ゴールド */
.star-off { color: #ddd; }
.p-product-review-simple-item__ttl {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #333;
}
.p-product-review-simple-item__body {
  font-size: 12px;
  line-height: 1.6;
  color: #666;
}
.p-product-review-area__more {
  text-align: center;
  margin-top: 10px;
}
.p-product-review-area__more a {
  font-size: 12px;
  color: #999;
  text-decoration: underline;
}
.p-product-review-area__btn {
  margin-top: 20px;
  text-align: center;
}
.c-btn-review-post {
  display: inline-block;
  padding: 10px 30px;
  border: 1px solid #333;
  color: #333;
  font-size: 12px;
  text-decoration: none;
  background: #fff;
  transition: all 0.3s;
  letter-spacing: 0.1em;
}
.c-btn-review-post:hover {
  background: #333;
  color: #fff;
}
.p-product-review-area__empty {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 20px;
}