/* ===================================================================
   商品選択ページ - CSS
   ================================================================ */
   :root {
  --max: 1200px;
  --heading-L: 20px;
  --heading-M: 18px;
  --heading-S: 16px;
  --text-L: 16px;
  --text-M: 14px;
  --text-S: 12px;
  --text-XS: 10px;
  --margin-L: 48px;
  --margin-M: 32px;
  --margin-S: 24px;
  --margin-XS: 16px;
  --margin-XXS: 8px;
  --header-h: 72px;
  --section-padding: 60px;
  --nav-padding: 10px;
}
@media (max-width: 768px) {
  :root {
    --heading-L: 18px;
   --heading-M: 16px;
    --heading-S: 14px;
    --text-L: 14px;
    --text-M: 12px;
     --text-S: 10px;
    --text-S: 8px;
    --margin-L: 32px;
    --margin-M: 24px;
    --margin-S: 16px;
    --margin-XS: 12px;
    --margin-XXS: 8px;
    --section-padding: 30px;
    --nav-padding: 8px;
  }
  }

/* ===================================================================
   Reset & Base Styles
   ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden; /* 横スクロールを防止 */
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
    background-color: #f5f5f5;
    color: #222;
    overflow-x: hidden; /* 横スクロールを防止 */
    width: 100%;
    line-height: 1.6;
    position: relative; /* ネガティブマージンの基準点 */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===================================================================
   Container
   ================================================================ */
.select-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================================================
   Hero Section
   ================================================================ */
.select-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.select-hero-image {
    position: relative;
    width: 100%;
}

.hero-swiper {
    width: 100%;
}

.hero-swiper .swiper-slide img {
    width: 100%;
    height: auto;
}

/* PC/SP画像切り替え */
.pc-image {
    display: block;
}

.sp-image {
    display: none;
}

@media (max-width: 768px) {
    .pc-image {
        display: none;
    }
    
    .sp-image {
        display: block;
    }
}

/* ===================================================================
   Introduction Section
   ================================================================ */
.select-intro-section {
    background-color: #f5f5f5;
    padding: 60px 0;
}

.select-intro-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.select-intro-text {
    font-size: var(--text-L);
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.select-diagnostic-btn {
    display: inline-block;
    font-size: var(--text-M);
    font-weight: 600;
    color: #fff;
    background-color: #222;
    padding: 16px 60px;
    text-decoration: none;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.select-diagnostic-btn:hover {
    opacity: 0.8;
}

/* Responsive: SP */
@media (max-width: 768px) {
    .select-intro-section {
        padding: 40px 20px;
    }

    .select-intro-text {
        font-size: var(--text-M);
        line-height: 1.7;
        margin-bottom: 30px;
    }

    .select-diagnostic-btn {
        font-size: var(--text-S);
        padding: 14px 40px;
    }
}

/* ===================================================================
   Page Navigation
   ================================================================ */
.select-page-navigation {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.select-page-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 20px 0;
}

.select-nav-item {
    font-size: var(--text-M);
    font-weight: 500;
    color: #222;
    padding: 10px 30px;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

/* 縦罫線（最初のアイテム以外の前に表示） */
.select-nav-item:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background-color: #ccc;
}

.select-nav-item:hover {
    color: #666;
}

.select-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    width: calc(100% - 60px);
    height: 2px;
    background-color: #222;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.select-nav-item:hover::after {
    opacity: 1;
}

/* PC時は改行を非表示 */
.sp-only {
    display: none;
}

@media (max-width: 768px) {
    /* SP時は改行を表示 */
    .sp-only {
        display: inline;
    }
    
    .select-page-nav {
        padding: 15px 10px;
    }
    
    .select-nav-item {
        font-size: var(--text-M);
        padding: 8px 16px;
        text-align:center;
    }
    
    /* SP時の縦罫線 */
    .select-nav-item:not(:first-child)::before {
        height: 16px;
    }
    
    .select-nav-item::after {
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
    }
    
    /* SP時：「初めての方に<br>おすすめ」のように改行 */
    .select-nav-item:last-child {
        line-height: 1.4;
    }
}

/* ===================================================================
   Section Styles
   ================================================================ */
.select-concern-section {
    padding: 60px 0;
}

.select-item-section {
    padding: 60px 0;
    background-color: #fff;
}

.select-section-title {
    font-size: var(--heading-M);
    font-weight: 500;
    text-align: center;
    margin-bottom: var( --margin-S);
    color: #222;
}

.select-section-description {
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

@media (max-width: 768px) {
    .select-concern-section {
        padding: 40px 0;
    }
    
    .select-item-section {
        padding: 40px 0;
    }
    
    .select-section-description {
        font-size: 14px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    /* SP時：商品Swiperを画面端まで表示 */
    .select-product-swiper-container {
        overflow: hidden;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        width: calc(100% + 40px);
    }
}

/* ===================================================================
   Tab Navigation
   ================================================================ */
.select-tab-navigation {
    margin-bottom: var(--margin-S);
    margin-left: -20px; /* コンテナのpaddingを打ち消す */
    margin-right: -20px;
    padding-left: 20px; /* タブ開始位置の余白 */
    padding-right: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* iOS用スムーズスクロール */
    scrollbar-width: none; /* Firefox用スクロールバー非表示 */
    -ms-overflow-style: none; /* IE/Edge用スクロールバー非表示 */
}

/* Webkit用スクロールバー非表示 */
.select-tab-navigation::-webkit-scrollbar {
    display: none;
}

.select-tab-navigation-inner {
    display: flex;
    gap: 12px;
    min-width: min-content;
    padding: 4px 0;
}

/* PC: 中央揃え */
@media (min-width: 769px) {
    .select-tab-navigation-inner {
        justify-content: center;
    }
}

/* SP: 左揃え */
@media (max-width: 768px) {
    .select-tab-navigation-inner {
        justify-content: flex-start;
    }
}

.select-tab-btn {
    background:none;
    color: #222;
    border: 1px solid #ddd;
    padding: 12px 32px;
    font-size: var(--text-M);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    outline: none;
    white-space: nowrap; /* 改行防止 */
    flex-shrink: 0; /* 縮小防止 */
}

.select-tab-btn:hover {
    border: 1px solid #222;
}

.select-tab-btn.active {
    background-color: #222;
    color: #fff;
    border-color: #222;
}

@media (max-width: 768px) {
    .select-tab-navigation {
        margin-bottom: var(--margin-XS);
    }
    
    .select-tab-navigation-inner {
        gap: 8px;
    }
    
    .select-tab-btn {
        padding: 10px 20px;
    }
}

/* ===================================================================
   Product Swiper Container
   ================================================================ */
.select-product-swiper-container {
    position: relative;
    overflow: hidden; /* はみ出しを防止 */
    margin-left: -20px; /* コンテナのpaddingを打ち消す */
    margin-right: -20px;
    padding-left: 20px; /* スライド開始位置のpadding */
    padding-right: 20px;
    width: calc(100% + 40px); /* paddingを打ち消した分の幅を追加 */
}

.select-tab-content {
    display: none;
}

.select-tab-content.active {
    display: block;
}

.select-concern-products-swiper {
    overflow: visible; /* スライドが見えるように */
    padding: 0 0 40px 0;
    width: 100%;
    height: auto;
}

.select-concern-products-swiper .swiper-wrapper {
    display: flex;
    width: auto !important;
}

/* 初めての方向けSwiper: 商品数が少ない場合はセンター配置 */
.select-beginner-swiper .swiper-wrapper {
    justify-content: center;
}

/* Swiper Navigation Buttons */
.select-concern-products-swiper .swiper-button-next,
.select-concern-products-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
    background: #333;
    color: #fff;
    font-size: var(--text-XL);
    border: none;
    margin-top: -20px;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.select-concern-products-swiper .swiper-button-next:after,
.select-concern-products-swiper .swiper-button-prev:after {
    font-size: var(--text-L);
    font-weight: 600;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

/* Swiper v4.5.0用のフォールバック矢印 */
.select-concern-products-swiper .swiper-button-next:after {
    content: '→';
}

.select-concern-products-swiper .swiper-button-prev:after {
    content: '←';
}

.select-concern-products-swiper .swiper-button-next {
    right: 0;
}

.select-concern-products-swiper .swiper-button-prev {
    left: 0;
}

.select-concern-products-swiper .swiper-button-next:hover,
.select-concern-products-swiper .swiper-button-prev:hover {
    opacity: 0.8;
}

/* Swiper Scrollbar */
.select-concern-products-swiper .swiper-scrollbar {
    background-color: #e0e0e0;
    height: 4px;
}

.select-concern-products-swiper .swiper-scrollbar-drag {
    background-color: #222;
}

@media (max-width: 768px) {
    .select-concern-products-swiper .swiper-button-next {
        right: -10px;
    }
    
    .select-concern-products-swiper .swiper-button-prev {
        left: 0;
    }
    
    .select-concern-products-swiper .swiper-button-next,
    .select-concern-products-swiper .swiper-button-prev {
        display: none;
    }
    
    /* 初めての方向けSwiper: SP時は左揃え */
    .select-beginner-swiper .swiper-wrapper {
        justify-content: flex-start;
    }
}

/* ===================================================================
   Product Card
   ================================================================ */
.select-product-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 0;
    overflow: hidden;
    height: 100%;
}

/* Product Title */
.select-product-title {
    padding: 20px 20px 0;
}

.select-product-name {
    font-size: var(--text-L);
    font-weight: 500;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.select-product-price {
    font-size: var(--text-M);
    font-weight: 500;
    color: #222;
    margin-bottom: 0;
}

/* Product Image Container - Swiper対応 */
.select-product-image-container {
    width: 100%;
    position: relative;
    touch-action: pan-y;
    box-sizing: border-box;
    overflow: hidden;
}

.select-product-image-swiper {
    width: 100% !important;
    height: auto;
    touch-action: pan-y;
    box-sizing: border-box;
}

.select-product-image-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
    touch-action: pan-y;
}

/* 画像Swiper（子Swiper）のスライド */
.select-product-image-swiper .swiper-slide {
    width: 100% !important;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: pan-y;
    box-sizing: border-box;
    margin-right: 0 !important; /* 商品カードSwiperのmargin-rightを上書き */
    background: transparent !important; /* 商品カードSwiperの背景を上書き */
    border-radius: 0 !important; /* 商品カードSwiperのborder-radiusを上書き */
    overflow: visible !important; /* 商品カードSwiperのoverflowを上書き */
}

/* Product Image */
.select-product-image {
    padding: 20px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 240px;
    height: 240px;
    box-sizing: border-box;
    touch-action: pan-y;
    margin: 0 auto;
}

.select-product-image img {
    width: auto;
    height: auto;
    max-width: 240px;
    max-height: 240px;
    object-fit: contain;
    touch-action: pan-y;
    pointer-events: none;
}

@media (max-width: 768px) {
    .select-product-image {
        padding: 20px;
        width: 240px;
        height: 240px;
        margin: 0 auto;
    }
    
    .select-product-image img {
        max-width: 240px;
        max-height: 240px;
    }
}

/* Product Image Swiper Pagination (ドット) */
.select-product-image-swiper .swiper-pagination {
    bottom: 10px !important;
    position: relative;
    margin-top: 8px;
}

.select-product-image-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #ccc;
    opacity: 1;
    margin: 0 4px;
}

.select-product-image-swiper .swiper-pagination-bullet-active {
    background-color: #222;
}

/* Product Info */
.select-product-info {
    padding: 20px;
}

.select-product-description {
    font-size: var(--text-M);
    line-height: 1.6;
    color: #555;
    word-break: break-word;
    margin-bottom: 16px;
}

/* Cart Button */
.select-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: #222;
    color: #fff;
    padding: 14px 20px;
    font-size: var(--text-M);
    font-weight: 500;
    border: none;
    cursor: pointer;
    margin-bottom: 16px;
}

.select-cart-btn img {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Text Link */
.select-text-link {
    display: block;
    text-align: center;
    font-size: var(--text-M);
    color: #222;
    text-decoration: underline;
}

/* ===================================================================
   Swiper Slide Styles
   ================================================================ */
/* 商品カードSwiper（親Swiper）のスライド - PC版（デフォルト：769px以上） */
.select-concern-products-swiper > .swiper-wrapper > .swiper-slide {
    width: 280px !important;
    max-width: 280px;
    flex-shrink: 0;
    margin-right: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

/* 最後のスライドのマージンをリセット */
.select-concern-products-swiper > .swiper-wrapper > .swiper-slide:last-child {
    margin-right: 0 !important;
}

/* 商品カードSwiper（親Swiper）のスライド - SP版（768px以下） */
@media (max-width: 768px) {
    .select-concern-products-swiper {
        padding: 0 0 20px 0;
    }
    
    .select-concern-products-swiper > .swiper-wrapper > .swiper-slide {
        width: 280px !important;
        max-width: 280px;
        flex-shrink: 0;
        margin-right: 16px;
        background: #fff;
        border-radius: 10px;
        overflow: hidden;
    }
    
    /* 最後のスライドのマージンをリセット */
    .select-concern-products-swiper > .swiper-wrapper > .swiper-slide:last-child {
        margin-right: 0 !important;
    }
    
    .select-product-name {
        font-size: var(--text-L)
    }
    
    .select-product-price {
        font-size:  var(--text-M);
    }
    
    .select-product-image {
        padding: 15px;
    }
    
    .select-product-info {
        padding: 15px;
    }
    
    .select-cart-btn {
        padding: 12px 16px;
        font-size: var(--text-M);
        margin-bottom: 12px;
    }
    
    /* スクロールバー位置調整 */
    .select-concern-products-swiper .swiper-scrollbar {
        margin-top: 20px;
    }
}

/* 商品カードSwiper（親Swiper）のスライド - 小型SP版（480px以下） */
@media (max-width: 480px) {
    .select-concern-products-swiper > .swiper-wrapper > .swiper-slide {
        width: 260px !important;
        max-width: 260px;
    }
}

/* ===================================================================
   Comparison Table（比較表）
   ================================================================ */
.comparison-table-container {
    margin: 0;
    margin-left: -20px; /* コンテナのpaddingを打ち消す */
    margin-right: -20px;
    padding: 0;
}

.comparison-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 0 20px; /* 左右の余白 */
}

.comparison-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: #fff;
}

.comparison-table-header {
    background: #fff;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    vertical-align: top;
}

.comparison-table-header:first-child {
    width: 80px;
    background: #fff;
}

.comparison-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.comparison-product-image {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.comparison-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.comparison-product-name {
    font-size: var(--text-M);
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    color: #222;
}

.comparison-label {
    background: #fff;
    padding: 20px;
    font-weight: 500;
    font-size: var(--text-M);
    color: #222;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.comparison-value {
    padding: 20px;
    font-size: var(--text-M);
    line-height: 1.6;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.comparison-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 12px;
    background-color: #222;
    color: #fff;
    padding: 12px 16px;
    font-size: var(--text-M);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comparison-cart-btn:hover {
    background-color: #444;
}

.comparison-cart-btn img {
    width: 18px;
    height: 18px;
    filter: invert(1);
}

.comparison-text-link {
    display: block;
    text-align: center;
    font-size: var(--text-M);
    color: #222;
    text-decoration: underline;
    margin-top: 8px;
}

.comparison-text-link:hover {
    text-decoration: none;
}

@media (max-width: 768px) {
    
    .comparison-table-scroll {
        padding: 0 20px; /* SP時も左右20pxの余白 */
    }
    
    .comparison-table {
        min-width: 600px;
    }
    
    .comparison-product-image {
        width: 100px;
        height: 100px;
    }
    
    .comparison-product-name {
        font-size: var(--text-M);
    }
    
    .comparison-label,
    .comparison-value {
        padding: 16px 12px;
    }
}

/* ===================================================================
   Utility Classes
   ================================================================ */
.is-mobile {
    /* モバイルデバイス用のスタイル */
}

.is-desktop {
    /* デスクトップデバイス用のスタイル */
}

/* ===================================================================
   Animation & Transitions
   ================================================================ */
