.youtube_original{
    position:relative;
    width:100%;
    height:0;
    padding-top:56.25%;
}
.youtube_original iframe{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
}



.video{
width:100%;
padding-bottom: 56.25%;
height:0px;
position: relative;
}
.video iframe{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}




/*商品一覧のページ送りの文字サイズの変更*/
.fs-c-pagination {
    font-size: 2rem;
}



// 予約データを読み込む関数
async function loadReservationData() {
    try {
        const response = await fetch('itembox/item/csv/reserve_cal.csv');
        const text = await response.text();
        return parseCSV(text);
    } catch (error) {
        console.error('データの読み込みに失敗しました:', error);
        return {};
    }
}

// CSVパース関数
function parseCSV(csvText) {
    const lines = csvText.split('\n').filter(line => line.trim());
    const reservationsBySku = {};

    // ヘッダー行をスキップ
    lines.slice(1).forEach(line => {
        const [sku, startDate, endDate] = line.split(',').map(item => item.trim());
        
        if (!reservationsBySku[sku]) {
            reservationsBySku[sku] = [];
        }

        if (startDate && endDate) {
            reservationsBySku[sku].push({
                startDate: new Date(startDate),
                endDate: new Date(endDate)
            });
        }
    });

    return reservationsBySku;
}



/*レンタル予約状況カレンダー用ここから*/

.sku-link-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
}

.sku-link {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.sku-link:hover {
    background-color: #e9ecef;
}

.sku-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}


/*レンタル予約状況カレンダー用ここまで*/

/*定価に取消線を入れる*/
.fs-c-productPrice--listed .fs-c-price {
    text-decoration: line-through;
}
/*定価に取消線を入れるここまで*/


/* スマホ（768px以下）でシーンリストを2×2グリッドにする */
@media screen and (max-width: 768px) {
  .scene-list.fs-pt-column {
    display: flex;
    flex-wrap: wrap;
  }
  .scene-list.fs-pt-column > * {
    width: 50%;
    box-sizing: border-box;
    padding: 4px;
  }
}


.item-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}


/* キャッチフレーズ:1行で省略 */
.fs-c-productName__copy {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  height: 1.4em;
}

/* 商品名本体:2行で省略 */
.fs-c-productName__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  height: calc(1.4em * 2);
}



/* ページ見出しが空 or 存在しない場合、その下の横線も消す */

/* パターン1：見出し要素そのものが存在しない場合 */
.contents-area:not(:has(.page-title)) .page-title-divider {
  display: none !important;
}

/* パターン2：見出し要素はあるが中身が空の場合 */
.page-title:empty,
.page-title:has(:empty:only-child) {
  display: none !important;
}
.page-title:empty + .page-title-divider,
.page-title:has(:empty:only-child) + .page-title-divider {
  display: none !important;
}

/* ============================================================
   ページ見出しが空の場合、見出し下の横線・余白を非表示
   ============================================================ */
.fs-c-heading--page:empty {
  display: none !important;
}




/* =========================
   商品詳細画像まわり：スマホ用
   サムネイル横一列化
========================= */
@media screen and (max-width: 767px) {

  /* 商品画像エリア全体 */
  .fs-c-productMainImage,
  .fs-c-productImage,
  .fs-c-productCarousel,
  .fs-c-productCarouselMainImage,
  .fs-c-productImageModalCarousel {
    position: relative;
  }

  /* サムネイル一覧を横一列にする */
  .fs-c-productThumbnail,
  .fs-c-productThumbnailList,
  .fs-c-productMainImage__thumbnail,
  .fs-c-productMainImage__thumbnailList,
  .fs-c-productSubImage,
  .fs-c-productSubImageList,
  .fs-c-productImage__thumbnailList,
  .fs-c-productImageCarousel__thumbnailList {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 8px;
    padding: 10px 8px 14px;
    margin-top: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* サムネイル1個ずつを折り返さない */
  .fs-c-productThumbnail > *,
  .fs-c-productThumbnailList > *,
  .fs-c-productMainImage__thumbnail > *,
  .fs-c-productMainImage__thumbnailList > *,
  .fs-c-productSubImage > *,
  .fs-c-productSubImageList > *,
  .fs-c-productImage__thumbnailList > *,
  .fs-c-productImageCarousel__thumbnailList > * {
    flex: 0 0 auto !important;
    width: 64px;
    max-width: 64px;
  }

  /* サムネイル画像サイズ */
  .fs-c-productThumbnail img,
  .fs-c-productThumbnailList img,
  .fs-c-productMainImage__thumbnail img,
  .fs-c-productMainImage__thumbnailList img,
  .fs-c-productSubImage img,
  .fs-c-productSubImageList img,
  .fs-c-productImage__thumbnailList img,
  .fs-c-productImageCarousel__thumbnailList img {
    width: 64px !important;
    height: auto !important;
    display: block;
  }

  /* 横スクロールバーを目立たなくする */
  .fs-c-productThumbnail::-webkit-scrollbar,
  .fs-c-productThumbnailList::-webkit-scrollbar,
  .fs-c-productMainImage__thumbnailList::-webkit-scrollbar,
  .fs-c-productSubImageList::-webkit-scrollbar,
  .fs-c-productImage__thumbnailList::-webkit-scrollbar,
  .fs-c-productImageCarousel__thumbnailList::-webkit-scrollbar {
    height: 4px;
  }

  /* メイン画像を画面幅にきれいに収める */
  .fs-c-productMainImage img,
  .fs-c-productImage img,
  .fs-c-productCarouselMainImage img {
    max-width: 100% !important;
    height: auto !important;
  }

}


/* =========================
   スマホ用：カート位置へ戻る固定ボタン
   既存の水色カートボタン風・横幅小さめ
========================= */
@media screen and (max-width: 767px) {

  .ac-back-to-cart {
    position: fixed;
    right: 0;
    bottom: 74px;
    z-index: 9999;
    display: none;
  }

  .ac-back-to-cart__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    min-height: 76px;
    padding: 8px 6px;
    background: rgba(180, 221, 250, 0.92);
    color: #37404a !important;
    border: none;
    border-radius: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.25;
    box-shadow: none;
    white-space: normal;
  }

  .ac-back-to-cart__button:hover {
    background: rgba(180, 221, 250, 0.98);
    color: #37404a !important;
  }

  body.ac-back-to-cart-active {
    padding-bottom: 72px;
  }
}