.product-single-custom .item_detail .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  max-width: 1000px;
  color: #444;
}

.product_image_area {
  flex: 0 0 66%;
  min-width: 300px;
}

/* 商品一覧に戻るボタン */
.fi-back-to-shop {
  margin: 20px 0 40px;
}
.fi-back-to-shop--bottom {
  margin: 30px 0 0;
}
.fi-btn-back-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  color: #444 !important;
  font-weight: bold;
  font-size: 14px;
  border: 1px solid #4444444D;
  border-radius: 4px;
  padding: 10px 20px;
  line-height: 1.6;
  text-decoration: none;
  transition: background 0.2s;
}
.fi-btn-back-shop:hover {
  background: #f5f6f7;
}

.product_image_area .woocommerce-product-gallery {
  position: relative;
  margin-bottom: 20px;
}

.product_image_area .flex-viewport {
  background: #fff;
  width: 100%;
  height: auto !important;
  border: 1px solid #4444444D !important;
}

.product_image_area .woocommerce-product-gallery__image img {
  width: 100%;
  max-height: 390px !important;
  display: block;
  object-fit: cover;
  padding: 10px;
}

.product_image_area ol.flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 15px 0 0 0;
  list-style: none;
}

#contents article .woocommerce-product-gallery__wrapper a {
  display: inline;
}

#contents article .product_image_area ol li {
  padding: 0;
  margin: 0;
  background: none;
  border-left: none;
}

#contents article .product_image_area ol li:before {
  content: none;
}

.product_image_area ol.flex-control-thumbs li img {
  aspect-ratio: 1.41 / 1;
  cursor: pointer;
}

.product_image_area ol.flex-control-thumbs li img {
  width: 100%;
  height: auto;
  border: 1px solid #eee;
  border-radius: 2px;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.product_image_area ol.flex-control-thumbs li img.flex-active {
  opacity: 1;
}

/* 画像ズーム（🔍マーク）のボタンを非表示 */
.woocommerce-product-gallery__trigger {
  display: none !important;
}

/* スライダーボタン */
.product_image_area .woocommerce-product-gallery {
  position: relative !important;
}

.custom-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #A6B8C3;
  border-radius: 50%;
  z-index: 999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.custom-arrow:hover {
  opacity: 0.7;
}

.custom-arrow::before {
  content: '';
  width: 10px;
  height: 10px;
  border-top: 2px solid #444444;
  border-right: 2px solid #444444;
  display: block;
}

.arrow-prev {
  left: 10px;
}

.arrow-prev::before { 
  transform: rotate(-135deg); margin-left: 4px;
}

.arrow-next {
  right: 10px;
}

.arrow-next::before {
  transform: rotate(45deg); margin-right: 4px;
}

/* 右側：情報エリア */
.product_info_area {
  flex: 0 0 30%;
  text-align: left;
}

#contents article h1.product_title {
  font-size: 20px;
  font-weight: bold;
  margin: 80px 0 20px;
  line-height: 1.6;
  color: #444;
  position: relative;
}

#contents article .product_title:before {
  content: "";
  position: absolute;
  top: 2px; 
  left: 0;
  width: 5px;
  height: 1.4em;
  background: #a6b8c3;
  padding: 0; 
  margin-right: 0;
}

.price_display {
  font-size: 14px;
  text-align: right;
  margin-bottom: 20px;
}

.cart_action .single_add_to_cart_button {
  width: 100%;
  background-color: #444 !important;
  color: #fff !important;
  padding: 12px !important;
  border: none !important;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cart_action .single_add_to_cart_button:hover {
  opacity: 0.8;
}

/* 形式（いろ・デザイン）の選択：バリエーション商品
   F&I CREATE Shop デザインシステム準拠：ラベルは14px太字、セレクトは商品詳細の罫線（#444 の30%）と角丸4px */
.cart_action table.variations {
  width: 100%;
  margin: 0 0 16px;
  border: none;
  border-collapse: collapse;
}
.cart_action table.variations tr {
  display: block;
  margin-bottom: 12px;
}
.cart_action table.variations tr:last-child {
  margin-bottom: 0;
}
.cart_action table.variations th,
.cart_action table.variations td {
  display: block;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}
.cart_action table.variations th.label label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: bold;
  color: #444;
}
.cart_action table.variations select {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  padding: 12px 40px 12px 14px;
  border: 1px solid rgba(68, 68, 68, 0.3);
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444444' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px 16px;
  font: inherit;
  font-size: 15px;
  color: #444;
  cursor: pointer;
}
.cart_action table.variations select:focus {
  outline: none;
  border-color: #0091d3;
  box-shadow: 0 0 0 3px rgba(0, 144, 204, 0.18);
}
.cart_action .reset_variations {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #6b7177;
  text-decoration: underline;
}
.cart_action .single_variation_wrap .woocommerce-variation-price,
.cart_action .single_variation_wrap .woocommerce-variation-availability {
  display: none;
}

/* 注釈テキスト */
.free_download_note {
  font-size: 12px;
  color: rgba(68, 68, 68, 0.8);
  margin-top: 10px;
  line-height: 1.5;
}

.product_description {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(68, 68, 68, 0.3);
  font-size: 14px;
  line-height: 1.8;
}

.product_meta_custom {
  margin-top: 20px;
  font-size: 14px;
  border-top: 1px solid rgba(68, 68, 68, 0.3);
  padding-top: 10px;
}

/* 関連商品エリア */
.related_products_area {
  margin: 0 100px 0 100px;
}
.related_products_area .inner {
  max-width: 1000px;
  margin: 60px auto;
}

.related_products_area .related.products > h2 {
  display: none;
}

.custom_related_title {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: #444;
  margin-bottom: 30px;
}

.custom_related_title::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: #e0e0e0;
  margin-left: 20px;
}

.related_products_area ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  list-style: none;
  padding: 0;
}

.related_products_area ul.products li.product {
  width: 100%;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.related_products_area ul.products li.product img {
  border: 1px solid #4444444D;
  width: 100%;
  height: auto;
  padding: 5px;
  aspect-ratio: 1.41 / 1;
  object-fit: cover;
}

.related_products_area ul.products li.product .woocommerce-loop-product__title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.6;
  color: #444;
  padding: 0;
}

.related_products_area ul.products li.product .price {
  text-align: right;
  font-size: 14px;
  color: #444;
  margin-top: auto;
  display: block;
}

.related_products_area ul.products li.product .button {
  display: none;
}

@media screen and (max-width: 768px) {
  .product-single-custom .item_detail .inner {
    flex-direction: column;
  }
  .product_image_area, .product_info_area {
    flex: 0 0 100%;
    width: 100%;
  }

  .product_image_area ol.flex-control-thumbs {
    gap: 0 10px;
  }

  .product_image_area .woocommerce-product-gallery__image img {
    height: auto !important;
  }

  #contents article h1.product_title {
    margin: 0 0 20px;
  }

  .related_products_area ul.products {
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;
  }

  .custom_related_title {
    font-size: 18px;
  }
}

@media screen and (max-width: 480px) {
  .related_products_area {
    margin: 0 30px 0 30px;
  }
}

.single-product .woocommerce-product-gallery--columns-4,
.woocommerce-notices-wrapper,
.single-product .summary.entry-summary,
.single-product .tabs.wc-tabs,
.single-product section.related.products {
  display: none !important;
}