/* 基本設定 */

/* ヘッダー設定（高さ80pxと仮定） */
.main-header {
    height: 80px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.5rem; font-weight: bold; color: #e60012; }
.btn-shop { background: #e60012; color: #fff; padding: 10px 20px; text-decoration: none; border-radius: 5px; font-weight: bold; }

/* ヒーローセクション本体 */
.hero-video-section {
    position: relative;
    width: 100%;
    /* ヘッダー分を引いた画面いっぱい、ただし最大1000px */
    height: calc(100vh - 80px);
    max-height: 800px;
    min-height: 500px; /* 小さくなりすぎないよう調整 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

/* 動画のコンテナ */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* 背面に配置 */
}

/* 動画自体のスタイル（アスペクト比を保ちつつ全画面） */
.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute; /* absoluteにするのがコツ */
    top: 0;
    left: 0;
    z-index: -2; /* オーバーレイより下に配置 */
}

/* 文字を読みやすくするための黒い半透明の重なり */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 背景色を調整（黒の40%など） */
/*    background-color: rgba(255, 255, 255, 0.65); */
background: linear-gradient(to bottom, rgba(40,40,40,0.1) 0%, rgba(40,40,40,0.6) 100%);
    /* videoタグより必ず上にくるように z-index を指定 */
    z-index: -1; 
}

/* コンテンツのスタイル */
.hero-content {
    padding: 0 20px;
    margin-bottom:250px;
    z-index: 1;
}

.badges { margin-bottom: 20px; }
.badge-red { background: #e60012; color: #fff; padding: 5px 15px; border-radius: 20px; font-weight: bold; margin-right: 10px; }
.badge-white { background: rgba(255,255,255,0.9); color: #333; padding: 5px 15px; border-radius: 20px; font-weight: bold; }
.badge-blue { background: rgba(0,0,255,0.9); color: #fff; padding: 5px 15px; border-radius: 20px; font-weight: bold; }

h1 {
    font-size: clamp(2rem, 5vw, 4rem); /* 画面幅に合わせてサイズが可変 */
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

p1 {
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.btn-primary {
    display: inline-block;
    background: #ffcc00;
    color: #333;
    padding: 18px 50px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.btn-primary:hover { transform: scale(1.05); }

/* スマホ対応の微調整 */
@media (max-width: 768px) {
    .hero-video-section { height: calc(100vh - 60px);max-height: 600px; } /* スマホはヘッダーを低く想定 */
    h1 { font-size: 2.2rem; }
.hero-content {
    margin-bottom:180px;
}
}





.overlap-slider {
    position: relative;
    z-index: 20;
    margin-top: -120px;
}
@media (max-width: 768px) {
.overlap-slider {
    margin-top: -150px;
}
}
.main-slider {
    width: 100%;
    max-width: 1300px; /* カード4枚分が入る幅 */
    margin: 0 auto;
}

.slides-container {
    display: flex;
    justify-content: center; /* PCでは中央表示 */
    gap: 20px;
    padding: 0 20px;
    transition: transform 0.4s ease-out;
}

.slide-item {
    flex: 0 1 300px; /* PCでは幅300pxを基準に並べる */
    max-width: 300px;
}

.slide-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    /* 影を消す */
    box-shadow: none; 
    border: 1px solid #eee; /* 影の代わりに薄い枠線で境界を出す */
    display: flex;
    flex-direction: column;
}

.slide-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-info {
    padding: 15px;
    background: #fff;
}

.tag {
    font-size: 0.7rem;
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    display: inline-block;
}

.card-info p {
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

/* PCではボタンを非表示 */
.sp-only {
    display: none;
}

/* スマホ対応（768px以下） */
@media (max-width: 768px) {
    .overlap-slider {
        overflow: hidden;
    }
    .slides-container {
        justify-content: flex-start; /* スマホでは左詰めでスライド可能に */
        padding-left: 10%; /* 最初のカードのチラ見え調整 */
        gap: 15px;
    }
    .slide-item {
        flex: 0 0 260px; /* スマホでは少し小さくして隣を見せる */
    }
    /* スマホのみボタンを表示 */
    .sp-only {
        display: block;
        position: absolute;
        top: 35%;
        z-index: 30;
        background: rgba(255,255,255,0.9);
        border: 1px solid #ddd;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
    }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}
@media (max-width: 768px) {
    .slides-container {
        /* 指での操作をなめらかにする */
        touch-action: pan-y; /* 上下スクロールは許可し、左右はJSで制御 */
        user-select: none;   /* テキスト選択を防ぐ */
        cursor: grab;
    }
    .slides-container:active {
        cursor: grabbing;
    }
}

@media (min-width: 769px) {
    .slide-card {
        transition: transform 0.3s ease;
    }
    .slide-card:hover {
        transform: translateY(-5px); /* 少し浮く */
        border-color: #e60012; /* 枠線をリブロック赤に */
    }
}



.container { max-width: 1000px; margin: 0 auto; padding: 60px 20px; }
.section-title { text-align: center; margin-bottom: 40px; font-size: 1.2rem; line-height:1.0;}
.grid-1 { display: grid; grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
/* 年齢別カード */
.age-card { background: #fff; padding:0; border-radius: 10px; text-align: center; border: 2px solid #eee; transition: 0.3s; cursor: pointer;}
.age-card:hover, .age-card.active { border-color: #ffcc00; transform: translateY(-5px); }

@media (min-width: 769px) {
.age-card { font-size: 1.5rem; font-weight: bold;}
.setimgbox { max-width:100%; }

}
@media (max-width: 768px) {
.age-card { font-size: 1rem; font-weight: bold;}
.setimgbox { max-width:80%; }
}

/* 特徴セクション */
.features { background: #fff; }
.feature-item { text-align: center; padding: 20px; }
.feature-item .icon { font-size: 3rem; margin-bottom: 15px; }

/* 製品カード */
.product-card { background: #fff; padding: 20px; border-radius: 8px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.img-placeholder { display: flex; align-items: center; justify-content: center; margin-bottom: 15px; color: #999; }
.price { font-weight: bold; color: #e60012; margin: 10px 0; }
.btn-outline { display: inline-block; border: 1px solid #333; padding: 8px 20px; text-decoration: none; color: #333; border-radius: 5px; }




:root {
    --item-width: 120px;
    --gap: 15px;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 80px; /* ボタン用の余白 */
    box-sizing: border-box;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* スクロール領域 */
.slider-wrapper {
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    scroll-behavior: smooth; /* スムーズに動かす */
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefoxでスクロールバー非表示 */
}

/* Chrome/Safariでスクロールバー非表示 */
.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex: 0 0 var(--item-width);
    scroll-snap-align: start;
    text-align: center;
}

.icon-box {
    width: var(--item-width);
    height: var(--item-width);
    background-color: #f8f8f8;
/*    border: 1px solid #ddd;
    border-radius: 4px;*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.icon-box:hover {
    transform: scale(1.05);
}

/* 左右ボタン */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nav-btn:hover {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.prev-btn { left: 0; border-radius: 0 4px 4px 0; }
.next-btn { right: 0; border-radius: 4px 0 0 4px; }

.item-label { font-size: 0.85rem; font-weight: bold; }



/* --- 固定ヘッダー --- */
.navbarx {
    position: -webkit-sticky; /* Safari対応 */
    position: sticky;    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.navbarx nav {
    display: flex;
    gap: 15px;
}

.nav-btnx {
    text-decoration: none;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.nav-btnx:hover {
    background-color: #0056b3;
}

/* --- コンテンツエリア --- */
.containerx {
    margin-top: 20px; /* ヘッダーに被らないよう余白を空ける */
    padding: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.product-groupx {
    background: white;
    border-radius: 8px;
    padding-top: 160px;    /* ヘッダーの高さ分だけ余白を作る */
    margin-top: -160px;   /* 作った余白をネガティブマージンで打ち消す */    /* スクロールした時にヘッダーの高さ分だけ上に隙間を作る */
    scroll-margin-top: 160px; 
}

.product-groupx h2 {
    border-left: 5px solid #007bff;
    padding-left: 15px;
    margin-bottom: 20px;
}

/* ダミーのグリッド表示 */
.placeholder-gridx {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.itemx {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

@media screen and (max-width: 720px) {
    .product-groupx {
    padding-top: 70px;    /* ヘッダーの高さ分だけ余白を作る */
    margin-top: -70px;   /* 作った余白をネガティブマージンで打ち消す */    /* スクロールした時にヘッダーの高さ分だけ上に隙間を作る */
        scroll-margin-top: 70px; /* スマホのヘッダー高さに合わせる */
    }
}



.related-products {
  margin: 50px auto;
  max-width: 1000px;
  padding: 0 20px;
  text-align: center;
}

.related-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #333;
}

.slider-container {
  position: relative;
  display: flex;
  align-items: center;
  padding:0;
}

.slider-inner {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 0;
  -ms-overflow-style: none; /* IE, Edge用 */
  scrollbar-width: none;    /* Firefox用 */
}

/* スクロールバーを非表示に（Chrome, Safari） */
.slider-inner::-webkit-scrollbar {
  display: none;
}

.product-item {
  min-width: 200px; /* 商品の幅 */
  flex: 0 0 auto;
  border: 1px solid #eee;
  padding: 10px;
  background: #fff;
}

.product-item img {
  width: 100%;
  height: auto;
}

.product-item p {
  font-size: 0.9rem;
  margin: 10px 0 5px;
}

.price {
  color: #d00;
  font-weight: bold;
}

.slider-btn {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  position: absolute;
  z-index: 10;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.prev { left: -20px; }
.next { right: -20px; }

/* スマホ対応 */
@media (max-width: 768px) {
  .related-products {
    padding: 0 10px; /* 全体の左右余白を少し削る */
  }

  .slider-inner {
    /* スナップ機能（ピタッと止まる設定）を追加 */
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-left: 20px;  /* 最初の商品の左側に余白 */
    padding-right: 20px; /* 最後の商品の右側に余白 */
  }

  .product-item {
    /* 画面幅の約70%〜80%に設定することで、次の商品が右側に「チラ見え」するようになります */
    min-width: 45%; 
    flex: 0 0 45%;
    scroll-snap-align: center; /* スクロールした時に中央で止まる */
    box-sizing: border-box;
  }
  
  .slider-btn {
    display: none; /* スマホでは指で動かすのでボタンは不要 */
  }
}
.conitem {
	width:100%;
	max-width:240px;
}


/* 合計バーのスタイル */
#total-bar {
  position: -webkit-sticky; /* Safari対応 */
  position: sticky;
  bottom: 0; /* 画面下部に固定 */
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 15px 0;
  text-align: center;
  font-weight: bold;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

#total-bar {
  position: sticky;
  bottom: 0;
  width: 100%;
  background-color: #222; /* 高級感のある黒 */
  color: #fff;
  padding: 10px 20px;
  z-index: 1000;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.3);
}

.total-content {
  display: flex;
  justify-content: center; /* 中央寄せ */
  align-items: center;
  gap: 20px; /* 各要素の間隔 */
  max-width: 1000px;
  margin: 0 auto;
}

/* カートボタンの装飾 */
.cart-button {
  background-color: #e60012; /* 目立つ赤 */
  color: white;
  border: none;
  padding: 10px 25px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}

.cart-button:hover {
  background-color: #b3000e;
}

.cart-button:active {
  transform: scale(0.95); /* クリックした時の凹み演出 */
}

/* スマホ対応：縦並びにする場合 */
@media (max-width: 600px) {
  .total-content {
    flex-direction: column;
    gap: 10px;
  }
}



#total-quantity {
  font-size: 1.5em;
  color: #ffde00; /* 目立つ色 */
  margin: 0 5px;
}

#total-price {
  font-size: 1.5em;
  color: #ffde00; /* 目立つ色 */
  margin: 0 5px;
}

