@import url("content-base.css");

/* ===== product-detail.css ===== */
.product-page {
  min-width: 0;
}

/* パンくずリスト: 複数階層・長文対応 */
.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  line-height: 1.6;
}

.guide-breadcrumb a,
.guide-breadcrumb span[aria-hidden] {
  flex-shrink: 0;
  white-space: nowrap;
}

.order-minimum-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid #cfa4b2;
  border-left: 5px solid #a84f6c;
  background: #fbf2f5;
  color: #43272f;
}

.order-minimum-notice::before {
  content: "ご案内";
  flex: 0 0 auto;
  color: #9a3f5d;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.product-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
  gap: 44px;
  align-items: start;
}

.product-gallery {
  min-width: 0;
}

.product-gallery__main {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line, #dfd2cb);
  background: #f7f3f0;
}

.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.product-gallery__thumbs button {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid #d9cbc4;
  background: #fff;
  cursor: pointer;
}

.product-gallery__thumbs button:first-child {
  border-color: #9f4865;
  box-shadow: inset 0 0 0 1px #9f4865;
}

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

.product-buy {
  position: sticky;
  top: 18px;
  min-width: 0;
}

.product-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.product-labels span {
  padding: 5px 9px;
  border: 1px solid #d7c6bd;
  border-radius: 2px;
  background: #faf7f5;
  color: #66534b;
  font-size: 0.75rem;
}

.product-labels .product-labels__status {
  border-color: #c98aa0;
  background: #f8eaf0;
  color: #873a56;
}

.product-buy h1 {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.6;
}

.product-buy__maker {
  margin: 0 0 16px;
  color: #6c5a52;
  font-size: 0.875rem;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: #9d3e5e;
  font-size: 1.75rem;
}

.product-price small {
  color: #584a44;
  font-size: 0.8125rem;
}

.product-points {
  margin: 4px 0 20px;
  color: #6c5a52;
  font-size: 0.8125rem;
}

.product-availability {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 20px;
  border-top: 1px solid var(--line, #dfd2cb);
  border-bottom: 1px solid var(--line, #dfd2cb);
}

.product-availability p {
  margin: 0;
  padding: 13px 10px;
  font-size: 0.875rem;
}

.product-availability p + p {
  border-left: 1px solid var(--line, #dfd2cb);
}

.product-purchase-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.product-purchase-form__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.product-purchase-form input {
  flex: 0 0 92px;
  width: 92px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid #bbaaa1;
  border-radius: 3px;
  text-align: center;
  box-sizing: border-box;
}

.product-purchase-form button,
.product-purchase-form a,
.product-purchase-form span.is-soldout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #a24b68;
  border-radius: 3px;
  background: #a24b68;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}

.product-purchase-form a:hover,
.product-purchase-form button:hover {
  opacity: 0.9;
}

.product-purchase-form button:disabled,
.product-purchase-form button[disabled],
.product-purchase-form button.is-soldout,
.product-purchase-form span.is-soldout,
.product-purchase-form .is-soldout {
  border-color: #b9afaa;
  background: #eeeae7;
  color: #716864;
  cursor: not-allowed;
  pointer-events: none;
}

.product-subactions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.product-subactions a,
.product-subactions button {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 8px;
  border: 1px solid #c8b8b0;
  border-radius: 3px;
  background: #fff;
  color: #493d38;
  text-align: center;
}

.product-purchase-note {
  margin-top: 18px;
  padding: 16px;
  background: #f3f6f1;
  color: #405142;
  font-size: 0.875rem;
}

.product-purchase-note p {
  margin: 0;
}

.product-purchase-note p + p {
  margin-top: 6px;
}

.product-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line, #dfd2cb);
}

.product-section__head {
  margin-bottom: 24px;
}

.product-section__head span {
  display: block;
  margin-bottom: 6px;
  color: #a13f60;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.product-section__head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.makeshop-description-output {
  padding: 28px;
  border: 1px solid var(--line-color, #dfd2ca);
  background: #fff;
  line-height: 2;
  overflow-wrap: anywhere;
}

.product-description-item + .product-description-item {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px dashed var(--line-color, #dfd2ca);
}

.product-additional-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-additional-item {
  margin: 0;
  border: 1px solid var(--line-color, #dfd2ca);
  background: #fff;
}

.product-additional-item a,
.product-additional-item button,
.product-additional-item__trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.product-additional-item a:hover,
.product-additional-item a:focus-visible,
.product-additional-item button:hover,
.product-additional-item button:focus-visible,
.product-additional-item__trigger:hover,
.product-additional-item__trigger:focus-visible {
  color: #9d3f5b;
  background: #fcf7f5;
}

.product-additional-item a:focus-visible,
.product-additional-item button:focus-visible,
.product-additional-item__trigger:focus-visible {
  outline: 2px solid #9d3f5b;
  outline-offset: 3px;
}

.product-additional-item img {
  display: block;
  width: 100%;
  height: auto;
  background: #f7f3f0;
}

.product-additional-item figcaption {
  padding: 14px 16px;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.product-category-paths {
  display: grid;
  gap: 10px;
}

.product-category-paths p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #e2d6cf;
  background: #fff;
}

.product-category-paths a {
  color: #8f3e57;
  text-underline-offset: 0.2em;
}

.product-category-paths p > span:not(.is-pending) {
  color: #87766c;
}

.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.recently-viewed-card {
  min-width: 0;
}

.recently-viewed-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid #e2d6cf;
}

.recently-viewed-card h3 {
  margin: 12px 0 8px;
  font-size: 15px;
  line-height: 1.7;
}

.recently-viewed-card h3 a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.recently-viewed-card p {
  margin: 0;
  font-weight: 600;
}

.product-review-panel {
  padding: 24px;
  border: 1px solid #e2d6cf;
  background: #fff;
}

.product-review-empty {
  margin: 0;
  text-align: center;
  color: #75675f;
}

.product-review-actions {
  margin-top: 20px;
  text-align: center;
}

.product-review-actions a {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid #9d3f5b;
  background: #9d3f5b;
  color: #fff;
  text-decoration: none;
}

.product-review-actions a:hover,
.product-review-actions a:focus-visible {
  background: #7f3048;
}

.product-additional-grid--thumbs {
  margin-top: 14px;
  gap: 8px;
}

.product-additional-grid--thumbs .product-additional-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.product-additional-grid--thumbs .product-additional-item figcaption {
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 700px) {
  .makeshop-description-output {
    padding: 20px;
  }

  .product-additional-grid {
    grid-template-columns: 1fr;
  }

  .product-additional-grid--thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recently-viewed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

.product-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line, #dfd2cb);
  border-left: 1px solid var(--line, #dfd2cb);
}

.product-facts div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line, #dfd2cb);
  border-bottom: 1px solid var(--line, #dfd2cb);
}

.product-facts dt {
  margin-bottom: 7px;
  color: #765f55;
  font-size: 0.75rem;
}

.product-facts dd {
  margin: 0;
}

.product-description {
  max-width: 860px;
}

.product-description p {
  margin: 0;
  line-height: 2;
}

.product-description p + p {
  margin-top: 14px;
}

.growing-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.growing-guide section {
  padding: 22px;
  border: 1px solid var(--line, #dfd2cb);
  background: #fff;
}

.growing-guide h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.growing-guide p {
  margin: 0;
}

.quantity-discount {
  width: 100%;
  border-collapse: collapse;
}

.quantity-discount th,
.quantity-discount td {
  padding: 13px 16px;
  border: 1px solid var(--line, #dfd2cb);
  text-align: left;
}

.quantity-discount th {
  background: #f7f1f3;
}

.product-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.product-categories a,
.product-categories span {
  padding: 9px 13px;
  border: 1px solid #bfaeb0;
  border-radius: 999px;
  color: #714054;
}

.product-categories .is-pending {
  border-style: dashed;
  color: #786b66;
}

.related-product {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  max-width: 650px;
  border: 1px solid var(--line, #dfd2cb);
  background: #fff;
}

.related-product img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.related-product__body {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.related-product__body h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.related-product__body p {
  margin: auto 0 0;
  color: #9d3e5e;
}

.purchase-guide-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line, #dfd2cb);
  border-left: 1px solid var(--line, #dfd2cb);
}

.purchase-guide-links a {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border-right: 1px solid var(--line, #dfd2cb);
  border-bottom: 1px solid var(--line, #dfd2cb);
  color: #332a26;
}

.purchase-guide-links a::after {
  content: "→";
  color: #a13f60;
}

.product-image-note {
  margin-top: 24px;
  padding: 20px;
  background: #faf7f5;
  font-size: 0.875rem;
}

@media (max-width: 1100px) {
  .product-main {
    grid-template-columns: 1fr;
  }

  .product-buy {
    position: static;
  }

  .product-facts,
  .purchase-guide-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .order-minimum-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .product-gallery__thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-facts,
  .growing-guide,
  .purchase-guide-links {
    grid-template-columns: 1fr;
  }

  .related-product {
    grid-template-columns: 120px minmax(0, 1fr);
  }
}

/* ==========================================================================
   補足案内画像モーダル（追加商品画像の自動収縮モーダル）
   ========================================================================== */
.guide-modal[hidden] {
  display: none !important;
}

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.guide-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: guideFadeIn 0.2s ease;
}

.guide-modal__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(92vw, 840px);
  max-height: 92vh;
  max-height: 92dvh;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  animation: guideScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-modal__close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 30, 30, 0.7);
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.guide-modal__close-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.08);
}

.guide-modal__close-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.guide-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 14px;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
}

.guide-modal__image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex-shrink: 1;
}

/* どんなアスペクト比・縦横比でもブラウザ表示枠（dvh/vh）に合わせて自動収縮 */
.guide-modal__image-wrapper img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 90px);
  max-height: calc(88dvh - 90px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* 画像説明文（キャプション）バッジUI */
.guide-modal__caption-wrap {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f8f6f3;
  border: 1px solid #e5ded7;
  border-radius: 9999px;
  padding: 5px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
  max-width: 90%;
}

.guide-modal__caption-icon {
  color: #8c827a;
  flex-shrink: 0;
}

.guide-modal__caption-prefix {
  font-size: 11px;
  font-weight: 600;
  color: #8c827a;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.guide-modal__caption {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #5c554e;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  word-break: break-word;
}

@keyframes guideFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes guideScaleUp {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 700px) {
  .guide-modal {
    padding: 10px;
  }
  .guide-modal__container {
    max-width: 95vw;
    max-height: 94dvh;
  }
  .guide-modal__content {
    padding: 10px;
  }
  .guide-modal__image-wrapper img {
    max-height: calc(90dvh - 85px);
  }
  .guide-modal__caption-wrap {
    padding: 4px 12px;
    margin-top: 8px;
    max-width: 95%;
  }
  .guide-modal__caption {
    font-size: 12px;
  }
}

/* ==========================================================================
   商品バリエーション（オプション選択）スタイル
   ========================================================================== */
.product-variation-select {
  margin: 16px 0 20px 0;
  padding: 14px 16px;
  background: #faf8f5;
  border: 1px solid var(--line-color, #dfd2ca);
  border-radius: 6px;
}
.product-variation-select dl,
.product-variation-select .makeshop-option-item {
  margin: 0;
  padding: 0;
}
.product-variation-select dl + dl,
.product-variation-select .makeshop-option-item + .makeshop-option-item {
  margin-top: 12px;
}
.product-variation-select dt,
.product-variation-select label,
.product-variation-select .makeshop-option-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a423d;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.product-variation-select dd,
.product-variation-select .makeshop-option-body {
  margin: 0;
}
.product-variation-select select {
  width: 100%;
  max-width: 100%;
  height: 44px;
  padding: 0 36px 0 12px;
  font-size: 14px;
  color: #333333;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  border: 1px solid var(--line-color, #dfd2ca);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.product-variation-select select:focus-visible {
  border-color: #9d3f5b;
  box-shadow: 0 0 0 2px rgba(157, 63, 91, 0.15);
}



