/* 商品詳細ページ専用CSS（product page_type） */

.endo-product-page .layout_wrapper {
  width: 100%;
  max-width: none;
  background: transparent;
}
.endo-product-page .layout_header,
.endo-product-page .layout_footer {
  display: none;
}
.endo-product-page .layout_container {
  width: 100%;
  margin: 0;
}

.pd-container {
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
}

/* --- パンくずリスト --- */
.pd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  color: #8b5a43;
  font-size: 14px;
  font-weight: 700;
}
.pd-breadcrumb a:first-child { color: #9d2020; }
.pd-breadcrumb a:hover { text-decoration: underline; }

/* --- 商品ヒーロー（画像＋情報の2カラム） --- */
.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: 54px;
  align-items: start;
  padding-bottom: 44px;
}

/* 商品画像 */
.pd-main-photo-wrap {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: #f3e9dd;
  box-shadow: 0 18px 45px rgba(77, 35, 25, .08);
  aspect-ratio: 1 / 1;
}
.pd-main-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pd-thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.pd-thumb {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  position: relative;
}
.pd-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  pointer-events: none;
}
.pd-thumb.is-active::after {
  border-color: #9c1c15;
  box-shadow: inset 0 0 0 3px #fff;
}
.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 商品情報（右カラム） */
.pd-info { padding-top: 2px; }
.pd-label {
  display: inline-grid;
  place-items: center;
  min-width: 55px;
  height: 28px;
  padding: 0 14px;
  background: #5b0b08;
  color: #fff;
  border-radius: 99px;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
}
.pd-title .new_mark_img1 {
  width: 48px;
  height: auto;
  vertical-align: middle;
  margin-right: 4px;
}
.pd-title {
  margin: 20px 0 0;
  color: #6f1411;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.3;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-subtitle {
  margin: 8px 0 14px;
  color: #7b3e2e;
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.6;
  letter-spacing: .04em;
  font-weight: 500;
}
.pd-subtitle:empty {
  display: none;
}

/* 価格カード */
.pd-price-card {
  border: 1px solid #dcbf91;
  background: linear-gradient(145deg, rgba(253,249,242,.98), rgba(255,248,237,.86));
  border-radius: 12px;
  padding: 24px 32px 20px;
  box-shadow: 0 12px 34px rgba(110,63,33,.08);
}
.pd-price-label {
  margin: 0 0 5px;
  color: #813226;
  font-size: 19px;
  font-weight: 700;
}
.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  color: #9a744f;
  line-height: 1;
}
.pd-price-row strong {
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: .03em;
  font-weight: 700;
}
.pd-price-num {
  font-size: clamp(36px, 4.5vw, 50px);
  letter-spacing: .02em;
}
.pd-price-unit {
  font-size: clamp(14px, 1.6vw, 18px);
  color: #7b563f;
  margin-left: 4px;
}
.pd-discount {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 16px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(180deg, #d9b85f, #9a670b);
}
.pd-regular-price-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pd-regular-price {
  font-size: 15px;
  font-weight: 700;
  color: #7b563f;
}
.pd-off-badge {
  display: inline-grid;
  place-items: center;
  min-width: 100px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-style: normal;
  background: linear-gradient(180deg, #d9b85f, #9a670b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32);
}
.pd-off-badge:empty { display: none; }
.pd-point-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e9dac8;
  color: #87402d;
  font-size: 17px;
}
.pd-point-icon {
  color: #aa741b;
  font-size: 20px;
}
.pd-stock-line,
.pd-model-line {
  margin-top: 14px;
  padding: 10px 0;
  border-top: 1px solid #e9dac8;
  font-size: 14px;
  color: #87402d;
  font-weight: 700;
}

/* オプション */
.pd-option-table {
  margin-top: 14px;
}
.pd-option-table td div {
  margin-bottom: .5em;
}
.pd-option-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e9dac8;
}
.pd-option-line label {
  color: #7b3e2e;
  font-weight: 700;
  min-width: 80px;
  font-size: 14px;
}
.pd-option-line select,
.pd-option-line input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0d5cb;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

/* 数量 */
.pd-qty-line {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  padding-top: 16px;
  padding-bottom: 4px;
  border-top: 1px solid #e9dac8;
}
.pd-qty-line label {
  color: #7b3e2e;
  font-weight: 700;
}
.pd-quantity-control {
  display: flex;
  align-items: stretch;
  height: 44px;
}
.pd-qty-input {
  width: 56px;
  text-align: center;
  border: 1px solid #e0d5cb;
  background: #fff;
  color: #3d251e;
  font-size: 18px;
}
.pd-qty-buttons {
  display: grid;
  width: 32px;
}
.pd-qty-buttons button {
  border: 1px solid #e0d5cb;
  border-left: 0;
  background: #fff;
  color: #8c2924;
  line-height: 1;
  cursor: pointer;
  font-size: 10px;
}
.pd-qty-buttons button:hover { background: #faf3eb; }
.pd-unit {
  margin-left: 8px;
  color: #7b3e2e;
  font-weight: 700;
}

/* カートボタン */
.pd-cart-button {
  width: 100%;
  min-height: 64px;
  margin-top: 14px;
  border: 2px solid #aa8848;
  border-radius: 8px;
  background: linear-gradient(180deg, #8d0909 0%, #5d0000 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22), 0 8px 18px rgba(83,0,0,.2);
}
.pd-cart-button:hover {
  background: linear-gradient(180deg, #a01010 0%, #6d0000 100%);
}
.pd-quick-order-button {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 1px solid #a65046;
  border-radius: 4px;
  background: rgba(255,255,255,.68);
  color: #8c2924;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  line-height: 52px;
}
.pd-favorite-button {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid #a65046;
  border-radius: 4px;
  background: rgba(255,255,255,.68);
  color: #8c2924;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.pd-favorite-button:hover { background: #fff; }
.pd-favorite-button.is-active {
  background: #f9ece9;
  border-color: #8c2924;
}
.pd-quick-order-button:hover { background: #fff; }
.pd-soldout-msg {
  margin-top: 20px;
  padding: 20px;
  text-align: center;
  color: #8c2924;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid #d4a89e;
  border-radius: 8px;
  background: rgba(255,248,237,.86);
}
.pd-member-msg {
  margin-top: 20px;
  padding: 16px;
  text-align: center;
  color: #8c2924;
  font-size: 16px;
  font-weight: 700;
}
.stock_error {
  margin: .5em 0;
  color: #f00;
  font-weight: bold;
  font-size: 16px;
}

/* サポートリンク */
.pd-support-list {
  list-style: none;
  padding: 14px 0 0 24px;
  margin: 0;
  color: #7c342b;
  font-weight: 700;
  font-size: 14px;
}
.pd-support-list li {
  margin: 7px 0;
  position: relative;
}
.pd-support-list li::before {
  content: "\25C9";
  position: absolute;
  left: -24px;
  top: 0;
  color: #8d1e1b;
  font-size: 12px;
}
.pd-support-list a:hover { text-decoration: underline; }
.pd-share-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px !important;
}
.pd-support-list li.pd-share-line::before {
  top: 50%;
  transform: translateY(-50%);
}
.pd-share-icons {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.pd-share-icons a {
  display: inline-flex;
}
.pd-sns-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.pd-sns-icon[alt="LINE"] {
  width: 28px;
  height: 28px;
}

/* --- 商品ストーリー（説明文エリア） --- */
.pd-story {
  margin-top: 8px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(83,40,30,.05);
  background: rgba(255,255,255,.65);
}
.pd-story--with-image {
  display: grid;
  grid-template-columns: 50% 50%;
  background: none;
}
.pd-story--with-image .pd-story-copy {
  background: #f5ece0;
}
.pd-story-copy {
  padding: 44px 38px 38px;
  line-height: 2;
  font-size: 14px;
  color: #3f2b25;
}
.pd-story-headline {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.6;
  color: #2f201b;
  margin-bottom: 12px;
}
.pd-story-image {
  position: relative;
  min-height: 280px;
  background: #1c110a;
  overflow: hidden;
}
.pd-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  margin-top: 10px;
}
.pd-story-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right, #f5ece0 0%, rgba(245,236,224,0) 50%);
}
.pd-story-copy h2,
.pd-story-copy h3 {
  color: #2f201b;
  line-height: 1.55;
  letter-spacing: .06em;
}
.pd-story-copy img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 16px 0;
}
.pd-story-copy p {
  margin: 0 0 12px;
}

/* --- 特徴グリッド（4カード） --- */
.pd-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid #e4d8c9;
  border-left: 1px solid #e4d8c9;
  background: rgba(255,255,255,.56);
}
.pd-feature-card {
  min-height: 245px;
  position: relative;
  padding: 32px 26px 74px;
  border-right: 1px solid #e4d8c9;
  border-bottom: 1px solid #e4d8c9;
  overflow: hidden;
}
.pd-feature-card h3 {
  margin: 0 0 14px;
  padding-left: 40px;
  color: #7c2922;
  font-size: 18px;
  line-height: 1.35;
}
.pd-feature-card p {
  margin: 0;
  color: #4c342e;
  font-size: 13px;
  line-height: 1.85;
  position: relative;
  z-index: 1;
}
.pd-feature-icon {
  position: absolute;
  left: 23px;
  top: 30px;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.pd-feature-card:nth-child(1) .pd-feature-icon {
  width: 40px;
  height: 40px;
}
.pd-feature-illust {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 90px;
  height: 90px;
  object-fit: contain;
  opacity: .88;
}
.pd-feature-card:nth-child(2) .pd-feature-illust,
.pd-feature-card:nth-child(3) .pd-feature-illust {
  bottom: 2px;
}

/* --- レビュー --- */
.pd-review {
  margin-top: 28px;
  padding: 24px 0;
  border-top: 1px solid #e4d8c9;
}
.pd-review h2 {
  margin: 0 0 14px;
  color: #8a2420;
  font-size: 22px;
}
.pd-review-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 24px;
}
.pd-review-links a {
  color: #8a2420;
  font-weight: 700;
  font-size: 14px;
}
.pd-review-links a:hover { text-decoration: underline; }

/* --- おすすめ商品 --- */
.pd-section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 28px;
  margin-bottom: 18px;
}
.pd-section-title-row h2 {
  margin: 0;
  color: #8a2420;
  font-size: 26px;
  letter-spacing: .08em;
}
.pd-recommend-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 30px;
}
.pd-recommend-card {
  text-align: center;
  min-width: 0;
}
.pd-recommend-card a {
  display: block;
  height: 170px;
  margin-bottom: 13px;
}
.pd-recommend-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pd-recommend-card h3 {
  margin: 0;
  min-height: 40px;
  color: #2f1d19;
  font-size: 12px;
  line-height: 1.5;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.pd-recommend-card h3 a:hover { text-decoration: underline; }

/* --- バナー --- */
.pd-banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
  margin-bottom: 40px;
}
.pd-banner-row a {
  display: block;
  overflow: hidden;
  background: #eee;
  height: 125px;
  border-radius: 4px;
}
.pd-banner-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.pd-banner-row a:hover img { transform: scale(1.03); }

/* --- 商品非表示時 --- */
.pd-unavailable {
  padding: 80px 0;
  text-align: center;
  font-size: 16px;
  color: #8b5a43;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 1100px) {
  .pd-hero {
    grid-template-columns: 1fr;
  }
  .pd-gallery {
    max-width: 640px;
    margin-inline: auto;
    width: 100%;
  }
  .pd-recommend-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pd-story--with-image {
    grid-template-columns: 1fr;
  }
  .pd-story-image {
    min-height: 200px;
  }
  .pd-story-image::before {
    background: linear-gradient(to bottom, #f5ece0 0%, rgba(245,236,224,0) 55%);
  }
  .pd-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .pd-container {
    width: min(100% - 28px, 640px);
  }
  .pd-breadcrumb {
    font-size: 12px;
    min-height: 48px;
  }
  .pd-hero {
    gap: 28px;
    padding-bottom: 28px;
  }
  .pd-thumb-row { gap: 10px; }
  .pd-title { letter-spacing: .02em; }
  .pd-price-card { padding: 22px 18px; }
  .pd-price-row strong { font-size: 36px; }
  .pd-cart-button {
    min-height: 60px;
    font-size: 20px;
  }
  .pd-story-copy {
    padding: 28px 20px 24px;
  }
  .pd-feature-grid {
    grid-template-columns: 1fr;
  }
  .pd-recommend-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
  }
  .pd-recommend-card a { height: 148px; }
  .pd-banner-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pd-banner-row a { height: auto; }
}

@media (max-width: 420px) {
  .pd-recommend-grid {
    grid-template-columns: 1fr;
  }
  .pd-share-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
