: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-S: 14px;
    --text-L: 14px;
    --text-M: 12px;
    --margin-L: 80px;
    --margin-M: 64px;
    --margin-S: 40px;
    --margin-XS: 24px;
    --margin-XXS: 12px;
    --section-padding: 30px;
    --nav-padding: 8px;
  }
  
  .gift-section-title {
    margin-bottom: 20px !important;
  }
  
  /* SP時のセクション間隔調整 */
  .gift-ranking,
  .gift-wrapping-comparison,
  .gift-category-select,
  .gift-budget-select,
  .gift-scene-select,
  .gift-column,
  .gift-faq {
    padding: var(--section-padding) 0;
  }
  
  /* SP時のセクション間隔調整 */
  .gift-category-select,
  .gift-budget-select,
  .gift-scene-select {
    padding-top: calc(var(--section-padding) / 2);
  }
}

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

/* SP時の斜めスクロール防止 - デフォルトで縦スクロールのみ */
*:not(.swiper):not(.swiper-container):not(.hero-swiper):not(.kinchaku-swiper):not(.gift-category-products-swiper):not(.gift-budget-products-swiper):not(.gift-scene-products-swiper):not(.gift-tab-navigation):not(.gift-page-nav) {
    touch-action: pan-y pinch-zoom;
}

h3 {
    padding:0px !important;
}

h2 {
    margin:0px !important;}

a:hover{
    text-decoration: none;
}

html {
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    width: 100%;
    max-width: 100vw;
    /* SP時の斜めスクロール防止 - 縦方向のみ許可 */
    touch-action: pan-y pinch-zoom;
}

.gift-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.gift-container--inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Hero Section - レスポンシブ対応 */
.gift-hero {
    width: 100%;
    overflow: hidden;
}

.gift-hero-image {
    width: 100%;
    height: 100%;
}

.gift-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero画像Swiper */
.hero-swiper {
    width: 100%;
    height: 100%;
    /* Swiper用タッチアクション - 横フリック機能を保持 */
    touch-action: pan-y pinch-zoom manipulation;
}

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

.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PC/SP画像切り替え - JavaScript判定ベース（ビューポート固定対応） */
/* デフォルト: PC画像表示 */
.hero-swiper .sp-image {
    display: none !important;
}

.hero-swiper .pc-image {
    display: block !important;
}

/* JavaScript判定による確実なSP表示制御 */
body.is-mobile .hero-swiper .pc-image,
.hero-swiper.is-mobile .pc-image {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body.is-mobile .hero-swiper .sp-image,
.hero-swiper.is-mobile .sp-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* JavaScript判定による確実なPC表示制御 */
body.is-desktop .hero-swiper .pc-image,
.hero-swiper.is-desktop .pc-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.is-desktop .hero-swiper .sp-image,
.hero-swiper.is-desktop .sp-image {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 単一スライド表示（Swiperを初期化しない場合） */
.hero-swiper.single-slide {
    /* Swiperの機能を無効化 */
    touch-action: auto;
}

.hero-swiper.single-slide .swiper-wrapper {
    /* Swiperのwrapperスタイルを無効化 */
    transform: none !important;
    display: block;
}

.hero-swiper.single-slide .swiper-slide {
    /* 最初のスライドのみ表示 */
    display: block;
    opacity: 1;
}

.hero-swiper.single-slide .swiper-slide:not(:first-child) {
    /* 2枚目以降は非表示 */
    display: none !important;
}

/* Page Navigation */
.gift-page-navigation {
    background: #fff;
    padding: var(--nav-padding) 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    display: block;
}

@media (max-width: 768px) {
    .gift-page-navigation {
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .gift-page-navigation {
        padding: 6px 0;
    }
}

.gift-page-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.gift-nav-item {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: var(--nav-padding) 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gift-nav-item:hover {
    background: #f0f0f0;
    color: #666;
}

/* Section Titles */
.gift-section-title {
    font-size: var(--heading-L);
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px !important;
    color: #333;
}

/* おすすめギフトランキング */
.gift-ranking {
    padding: var(--section-padding) 0;
    background: #F5F5F5;
    /* インナースクロール防止 */
    overflow: visible;
    height: auto;
    max-height: none;
    /* ランキングセクションのタッチ制御 */
    touch-action: pan-y pinch-zoom;
}

.gift-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    /* ギフトカードコンテナのタッチ制御 */
    touch-action: pan-y pinch-zoom;
}

.gift-card {
    background: transparent;
    overflow: hidden;
    transition: opacity 0.3s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    /* ギフトカードのタッチ制御を明確化 */
    touch-action: pan-y pinch-zoom;
    pointer-events: auto;
}

.gift-card:hover {
    opacity: 0.6;
}

.gift-rank-number {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #333;
    color: #fff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
}

.gift-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:#F5F5F5;
}

.gift-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.gift-product-info {
    padding: 0;
}

.gift-card .gift-product-info {
    padding: 0;
}

.gift-icon {
    font-size: var(--text-XS);
    color: #666;
    margin-bottom: 14px;
    margin-top: 20px;
    text-transform: uppercase;
    border: 1px solid #CCC;
    padding: 6px 8px;
    display: inline-block;
}

.gift-product-name {
    font-size: var(--text-M);
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
}

.gift-product-description {
    font-size: var(--text-S);
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.gift-product-price {
    font-size: var(--text-S);
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.gift-product-attribute {
    font-size: var(--text-S);
    color: #666;
    margin-bottom: 0;
}

/* ラッピング比較 */
.gift-wrapping-comparison {
    padding: var(--section-padding) 0;
    background: #fff;
}

/* ラッピング比較テーブル */
.gift-wrapping-table {
    overflow-x: auto;
}

.gift-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 0 auto;
}

.gift-comparison-table th,
.gift-comparison-table td {
    border-top: 1px solid #E5E5E5;
    border-bottom: 1px solid #E5E5E5;
    text-align: center;
    vertical-align: middle;
}

.gift-comparison-table tbody td {
    background: #fff;
}

/* ヘッダー */
.category-header {
    background: #F5F5F5;
    padding: 20px 16px;
    font-size: var(--text-M);
    font-weight: 600;
    color: #333;
    width: 120px;
}

.gift-option-header {
    background: #F5F5F5;
    padding: 20px 16px;
    font-size: var(--text-M);
    font-weight: 600;
    color: #333;
    width: calc((100% - 120px) / 3);
}

.gift-option-icon {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gift-option-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.gift-option-name {
    font-size: var(--text-M);
    font-weight: 600;
}

/* セル */
.gift-category-cell {
    background: #F5F5F5;
    padding: 20px 16px;
    font-size: var(--text-M);
    font-weight: 600;
    color: #333;
}

.gift-content-cell {
    padding: 20px 16px;
    font-size: var(--text-S);
    color: #333;
    line-height: 1.6;
}

.gift-feature-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.gift-feature-desc {
    color: #666;
    font-size: var(--text-XS);
    line-height: 1.4;
}

.gift-price-detail {
    margin-bottom: 2px;
}

.gift-tax {
    font-size: var(--text-XS);
    color: #666;
}

.gift-recommend-text {
    margin-bottom: 4px;
    color: #333;
}

/* PC/SP表示切替 */
.gift-pc-only {
    display: block;
}

.gift-sp-only {
    display: none;
}

/* SP版アコーディオン */
.gift-wrapping-accordion {
    background: #fff;
}

.gift-accordion-item {
    background: #F5F5F5;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.gift-accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.gift-accordion-icon {
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gift-accordion-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.gift-accordion-title {
    font-size: var(--text-L);
    font-weight: 600;
    color: #333;
    flex-grow: 1;
}

.gift-accordion-toggle {
    font-size: 24px;
    font-weight: 300;
    color: #666;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.gift-accordion-item.active .gift-accordion-toggle {
    transform: rotate(45deg);
}

.gift-accordion-content {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    transition: max-height 0.3s ease;
}

.gift-accordion-item.active .gift-accordion-content {
    max-height: 500px;
}

.gift-accordion-row {
    padding: 16px;
    border-bottom: 1px solid #E5E5E5;
}

.gift-accordion-row:last-child {
    border-bottom: none;
}

.gift-row-label {
    font-size: var(--text-S);
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.gift-row-content {
    font-size: var(--text-S);
    color: #333;
    line-height: 1.6;
}

/* Product Selection Sections */
.gift-category-select,
.gift-budget-select,
.gift-scene-select {
    padding: var(--section-padding) 0;
    background: #fff;
}

/* セクション間隔調整 */
.gift-category-select {
    padding-top: calc(var(--section-padding) / 2);
}

.gift-budget-select {
    padding-top: calc(var(--section-padding) / 2);
}

.gift-scene-select {
    padding-top: calc(var(--section-padding) / 2);
}

/* Tab Navigation */
.gift-tab-navigation {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    /* タブナビゲーションは横スクロールのみ許可 */
    touch-action: pan-x pinch-zoom;
}

/* PC時は中央寄せ */
@media (min-width: 769px) {
    .gift-tab-navigation {
        justify-content: center;
    }
}

.gift-tab-navigation::-webkit-scrollbar {
    display: none;
}

.gift-tab-btn {
    background: #fff;
    border: 1px solid #CCCCCC;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
    font-size: var(--text-M);
    white-space: nowrap;
    flex-shrink: 0;
}

.gift-tab-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.gift-tab-btn:hover {
    border-color: #333;
}

/* Tab Content - 定義は下部のアニメーション部分にまとめ */

/* Product Swiper Container */
.product-swiper-container {
    position: relative;
    margin-bottom: 20px;
    overflow: visible;
    width: 100%;
    min-height: 450px; /* 最小高さでレイアウト安定化 */
}

.gift-category-products-swiper,
.gift-budget-products-swiper,
.gift-scene-products-swiper {
    overflow: visible;
    padding: 0 0 40px 0;
    width: 100%;
    height: auto;
    /* Swiper用タッチアクション - 横フリック機能を保持 */
    touch-action: pan-y pinch-zoom manipulation;
}

.gift-category-products-swiper .swiper-wrapper,
.gift-budget-products-swiper .swiper-wrapper,
.gift-scene-products-swiper .swiper-wrapper {
    display: flex;
}

/* PC時のSwiper slide間隔調整 */
@media (min-width: 769px) {
    .gift-category-products-swiper .swiper-slide,
    .gift-budget-products-swiper .swiper-slide,
    .gift-scene-products-swiper .swiper-slide {
        margin-right: 24px;
    }
}

/* SP時のSwiper slide間隔調整 */
@media (max-width: 768px) {
    .gift-category-products-swiper .swiper-slide,
    .gift-budget-products-swiper .swiper-slide,
    .gift-scene-products-swiper .swiper-slide {
        margin-right: 16px;
    }
    
    .gift-category-products-swiper .swiper-slide:last-child,
    .gift-budget-products-swiper .swiper-slide:last-child,
    .gift-scene-products-swiper .swiper-slide:last-child {
        margin-right: 20px; /* 最後のカードに右マージン */
    }
}

/* Product Card */
.gift-product-card {
    background: transparent;
    overflow: hidden;
    transition: opacity 0.3s ease;
    width: 280px;
    flex-shrink: 0;
}

.swiper-slide {
    width: 280px;
    flex-shrink: 0;
}

.gift-product-card:hover {
    opacity: 0.6;
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.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%);
}

.swiper-button-next:after,
.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用のフォールバック矢印 */
.swiper-button-next:after {
    content: '→';
}

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

.swiper-button-next {
    right: 0;
}

.swiper-button-prev {
    left: 0;
}

@media (max-width: 768px) {
    .swiper-button-next {
        right: -10px;
    }
    
    .swiper-button-prev {
        left: 0;
    }
}

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

/* Swiper Scrollbar */
.swiper-scrollbar {
    background: rgba(0, 0, 0, 0.1);
    height: 4px;
    margin-top: 20px;
    border-radius: 2px;
}

.swiper-scrollbar-drag {
    background: #333;
    border-radius: 2px;
}

/* ギフトコラム */
.gift-column {
    padding: var(--section-padding) 0;
    background: #F5F5F5;
}

.gift-column-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    justify-items: center;
}

.gift-column-card {
    background: transparent;
    overflow: hidden;
    transition: opacity 0.3s ease;
    width: 100%;
    max-width: 450px;
}

.gift-column-card:hover {
    opacity: 0.6;
}

.gift-column-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gift-column-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gift-column-content {
    padding: 20px 0 0 0;
}

.gift-column-title {
    font-size: var(--text-L);
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.gift-column-summary {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: var(--text-S);
}

.gift-column-link {
    display: inline-block;
    background: #333333;
    color: #FFF;
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-M);
    padding: 12px 24px;
    transition: opacity 0.3s ease;
}

.gift-column-link:hover {
    opacity: 0.6;
}

/* ラッピングについて */
.gift-wrapping-about {
    background: #fff;
}

.wrapping-option {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.wrapping-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0px;
}

.wrapping-content {
}

.wrapping-title {
    font-size: var(--heading-S);
    font-weight: 600;
    color: #333;
    margin-top: 0px !important;
    margin-bottom: 20px;
}

.wrapping-description {
    font-size: var(--text-M);
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.wrapping-steps {
    margin-bottom: 20px;
}

.wrapping-step {
    font-size: var(--text-M);
    color: #333;
    line-height: 1.6;
    margin-bottom: 8px;
}

.wrapping-notes {
    margin-top: 20px;
}

.note {
    font-size: var(--text-S);
    color: #666;
    line-height: 1.6;
    margin-bottom: 6px;
}

.wrapping-divider {
    height: 1px;
    background: #eee;
    margin: 40px 0;
}

.size-options {
    margin-top: 20px;
}

.size-option {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.size-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.size-title {
    font-size: var(--text-M);
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.size-title a{
    text-decoration: underline;
}

.size-spec {
    font-size: var(--text-S);
    color: #333;
    line-height: 1.6;
    margin-bottom: 4px;
}

.size-note {
    font-size: var(--text-S);
    color: #666;
    line-height: 1.6;
}

/* 巾着画像Swiper */
.kinchaku-swiper {
    width: 100%;
    height: 300px;
    border-radius: 0px;
    overflow: hidden;
    position: relative; /* 位置の基準点を明確化 */
    /* Swiper用タッチアクション - 横フリック機能を保持 */
    touch-action: pan-y pinch-zoom manipulation;
}

/* PC時は固定高さ、SP時は4:3アスペクト比 */
@media (min-width: 769px) {
    .kinchaku-swiper {
        height: 300px;
    }
}

.kinchaku-swiper .swiper-wrapper {
    /* フェード効果用 - transformは条件付きで制御 */
    width: 100% !important;
    height: 100% !important;
}

/* 異常値の場合のみtransformをリセット（JavaScriptで制御） */
.kinchaku-swiper .swiper-wrapper[style*="e+"] {
    transform: translate3d(0px, 0px, 0px) !important;
}

.kinchaku-swiper .swiper-slide {
    width: 100% !important;
    height: 100% !important;
    /* フェード効果のためのposition設定はSwiperに任せる */
    max-width: 100% !important;
    min-width: 100% !important;
}

.kinchaku-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* よくあるご質問 */
.gift-faq {
    padding: var(--section-padding) 0;
    background: #fff;
}

.gift-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.gift-faq-item {
    border-bottom: 1px solid #eee;
}

.gift-faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 25px 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-L);
    font-weight: 500;
    color: #333;
    transition: color 0.3s ease;
}

.gift-faq-question:hover {
    color: #666;
}

.gift-faq-icon {
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.gift-faq-item.active .gift-faq-icon {
    transform: rotate(45deg);
}

.gift-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                padding 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0;
}

.gift-faq-item.active .gift-faq-answer {
    padding: 8px 0 41px 0;
    transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                padding 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gift-faq-answer p {
    color: #666;
    line-height: 1.6;
    font-size: var(--text-S);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Scroll Animation - 本来のフェードインアニメーション */
.gift-fade-in {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.8s cubic-bezier(0.165, 0.84, 0.44, 1),
                transform 1.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* フェードインアニメーション要素でのタッチ制御を明確化 */
    touch-action: pan-y pinch-zoom;
    /* ポインターイベントを確保 */
    pointer-events: auto;
}

.gift-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    /* 表示状態でもタッチ制御を維持 */
    touch-action: pan-y pinch-zoom;
    pointer-events: auto;
}

/* 遅延アニメーション用クラス */
.gift-fade-in-delay-1 {
    transition-delay: 0.2s;
}

.gift-fade-in-delay-2 {
    transition-delay: 0.4s;
}

.gift-fade-in-delay-3 {
    transition-delay: 0.6s;
}

/* タブコンテンツ用アニメーション - 正常なタブ切り替え */
.gift-tab-content {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.gift-tab-content.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeIn 0.4s ease-out;
}

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

/* 全セクションの幅制限 */
.gift-hero,
.gift-ranking,
.gift-wrapping-comparison,
.gift-category-select,
.gift-budget-select,
.gift-scene-select,
.gift-column,
.gift-wrapping-about,
.gift-faq {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ナビゲーション以外のセクションのみに適用 */
.gift-page-navigation {
    width: 100%;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hero - SP: 1/1 */
    .gift-hero {
        aspect-ratio: 1/1;
    }
    
    .gift-container {
        padding: 0 20px;
        /* SP時のインナースクロール防止 */
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    .gift-container--inner {
        padding: 0 20px;
        /* SP時のインナースクロール防止 */
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    .gift-page-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .gift-nav-item {
        padding: 6px 4px;
        font-size: 11px;
        white-space: nowrap;
        text-align: center;
        line-height: 1.2;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 400;
    }
    
    .gift-section-title {
        font-size: 18px;
    }
    
    .gift-cards {
        grid-template-columns: 1fr;
        gap: 30px;
        /* SP時のインナースクロール防止 */
        overflow: visible;
        height: auto;
        max-height: none;
        /* SP時のギフトカードコンテナでタッチ制御強化 */
        touch-action: pan-y pinch-zoom;
        overscroll-behavior: none;
    }
    
    /* SP時のギフトカード個別制御 */
    .gift-card {
        /* インナースクロール防止 */
        overflow: visible;
        height: auto;
        max-height: none;
        /* タッチ制御 */
        touch-action: pan-y pinch-zoom;
        pointer-events: auto;
        /* アニメーション中もタッチイベントを確保 */
        will-change: transform, opacity;
    }
    
    .gift-product-image {
    }
    
    .gift-tab-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0;
        margin: 0 0 40px 0;
        overflow: visible;
    }
    
    .gift-tab-btn {
        padding: 12px 8px;
        font-size: var(--text-S);
        text-align: center;
        flex-shrink: 1;
        white-space: normal;
        line-height: 1.3;
    }
    
    .gift-category-products-swiper,
    .gift-budget-products-swiper,
    .gift-scene-products-swiper {
        padding: 0 0 20px 0;
        overflow: visible;
        max-width: 100%;
        width: 100%;
    }
    
    .product-swiper-container {
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        min-height: 350px; /* SP時は高さを調整 */
    }
    
    .gift-column-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gift-column-card {
        width: 100%;
        max-width: 480px;
    }
    
    .gift-column-content {
        padding: 15px 0 0 0;
    }
    
    /* ラッピングセクションのSP対応 */
    .wrapping-option {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .wrapping-image {
        order: -1;
    }
    
    .wrapping-title {
        font-size: var(--heading-S);
    }
    
    .wrapping-step,
    .wrapping-description {
        font-size: var(--text-S);
    }
    
    .size-title {
        font-size: var(--text-M);
    }
    
    /* 巾着SwiperのSP対応 - 4:3アスペクト比 */
    .kinchaku-swiper {
        height: auto;
        aspect-ratio: 4/3;
    }
    
    /* aspect-ratioをサポートしていないブラウザ用のフォールバック */
    @supports not (aspect-ratio: 4/3) {
        .kinchaku-swiper {
            height: 0;
            padding-top: 75%; /* 4:3の比率 (3/4 = 0.75 = 75%) */
            position: relative;
        }
        
        .kinchaku-swiper .swiper-wrapper {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
    }
    
    /* SP時も異常値対策 - フェード効果を妨げない設定 */
    .kinchaku-swiper .swiper-wrapper {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* 異常値の場合のみtransformをリセット */
    .kinchaku-swiper .swiper-wrapper[style*="e+"] {
        transform: translate3d(0px, 0px, 0px) !important;
    }
    
    .kinchaku-swiper .swiper-slide {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    /* SP時の表示切替 */
    .gift-pc-only {
        display: none;
    }
    
    .gift-sp-only {
        display: block;
    }
    
    /* SP版アコーディオンの調整 */
    .gift-accordion-header {
        padding: 12px;
    }
    
    .gift-accordion-icon {
        margin-right: 8px;
    }
    
    .gift-accordion-icon img {
        width: 30px;
        height: 30px;
    }
    
    .gift-accordion-title {
        font-size: var(--text-M);
    }
    
    .gift-accordion-row {
        padding: 12px;
    }
    
    .gift-row-label {
        font-size: var(--text-XS);
    }
    
    .gift-row-content {
        font-size: var(--text-XS);
    }
    
    .gift-faq-question {
        font-size: var(--heading-S);
        padding: 20px 0;
    }
    
    /* SP時の画像とテキストアイコンの間隔調整 */
    .gift-icon {
        margin-top: 16px;
    }
    
    /* SP時の詳細なタッチ制御 - インナースクロール完全防止 */
    .gift-container,
    .gift-container--inner,
    .gift-section,
    .gift-ranking,
    .gift-wrapping-comparison,
    .gift-category-select,
    .gift-budget-select,
    .gift-scene-select,
    .gift-column,
    .gift-faq,
    .gift-wrapping-about {
        touch-action: pan-y pinch-zoom;
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    /* コンテンツエリアで縦スクロールのみ許可・インナースクロール防止 */
    .gift-cards,
    .gift-column-grid,
    .gift-faq-list,
    .gift-wrapping-table {
        touch-action: pan-y pinch-zoom;
        overflow: visible;
        height: auto;
        max-height: none;
    }
}

@media (max-width: 480px) {
    html, body {
        max-width: 100%;
        width: 100%;
    }
    
    body {
        position: relative;
    }
    
    /* インナースクロール完全防止（Swiperコンテナは除く） */
    .gift-container,
    .gift-container--inner {
        overflow-x: hidden;
        overflow-y: visible;
        max-width: 100%;
        height: auto;
        max-height: none;
    }
    
    /* ランキングセクションの特別対応 */
    .gift-ranking {
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    .gift-cards {
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    /* SP時のSwiperコンテナ - 画面右端まで表示 */
    .product-swiper-container {
        overflow: visible;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        width: calc(100vw);
        max-width: calc(100vw);
    }
    
    .container {
        padding: 0 20px;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container--inner {
        padding: 0 20px;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }
    
    .gift-page-navigation {
        background: #fff;
        width: 100%;
        display: block;
    }
    
    .gift-page-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        overflow: visible;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        /* ページナビゲーションのタッチ制御 */
        touch-action: pan-y pinch-zoom;
    }
    
    .gift-page-nav::-webkit-scrollbar {
        display: none;
    }
    
    .gift-nav-item {
        padding: 4px 2px;
        font-size: 10px;
        white-space: nowrap;
        text-align: center;
        line-height: 1.1;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 400;
    }
    
    .gift-tab-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0;
        margin: 0 0 40px 0;
        overflow: visible;
    }
    
    .gift-product-card {
        width: 240px;
    }
    
    .swiper-slide {
        width: 160px;
    }
    
    .gift-category-products-swiper .swiper-button-next,
    .gift-category-products-swiper .swiper-button-prev,
    .gift-budget-products-swiper .swiper-button-next,
    .gift-budget-products-swiper .swiper-button-prev,
    .gift-scene-products-swiper .swiper-button-next,
    .gift-scene-products-swiper .swiper-button-prev {
        display: none;
    }
    
    /* 超小画面での厳格なタッチ制御 */
    body {
        touch-action: pan-y pinch-zoom;
        overscroll-behavior: none;
    }
    
    /* 全ての非Swiper要素で縦スクロールのみ・インナースクロール完全防止 */
    .gift-section,
    .gift-ranking,
    .gift-wrapping-comparison,
    .gift-category-select,
    .gift-budget-select, 
    .gift-scene-select,
    .gift-column,
    .gift-faq,
    .gift-wrapping-about,
    .gift-cards,
    .gift-column-grid,
    .gift-faq-list,
    .gift-wrapping-table,
    .gift-container,
    .gift-container--inner {
        touch-action: pan-y pinch-zoom;
        overscroll-behavior: none;
        /* インナースクロール完全防止 */
        overflow: visible;
        height: auto;
        max-height: none;
    }
    
    /* フェードインアニメーション要素の超小画面対応 */
    .gift-fade-in,
    .gift-fade-in.visible {
        touch-action: pan-y pinch-zoom !important;
        pointer-events: auto !important;
        /* アニメーション最適化 */
        will-change: transform, opacity;
        backface-visibility: hidden;
    }
    
    /* ギフトカードリンクの確実なタッチ制御 */
    .gift-card,
    .gift-card:link,
    .gift-card:visited,
    .gift-card:hover,
    .gift-card:active {
        touch-action: pan-y pinch-zoom !important;
        pointer-events: auto !important;
    }
}

/* ギフトセクションのスタイル - 背景画像付き見出し */
.gift-section {
    position: relative;
    width: 100%;
    height: 400px;
    background-image: url('wrapping_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    margin-bottom: var(--section-padding);
}

/* 背景画像の暗いオーバーレイ */
.gift-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* テキストコンテンツを前面に配置 */
.gift-section-inner
{
    max-width:1000px;
    width:100%;
    padding: 0 20px;
    margin:0 auto;
    position: relative;
    z-index: 2;
}

/* ギフトセクション内の見出しスタイル */
.gift-section .gift-section-title {
    font-family: 'Inter', sans-serif;
    font-size: var(--heading-L);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.4;
    text-align: left;
}

.gift-section p{
    font-size: var(--text-M);
    color: #fff;
    line-height: 1.6;
}

/* 説明文のコンテナ */
.gift-section-content {
    max-width: 500px;
}

/* 説明文のスタイル */
.gift-section-content p {
    font-family: 'Inter', sans-serif;
    font-size: var(--text-L);
    font-weight: 400;
    color: #ffffff;
    line-height: 1.6;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* レスポンシブ対応 - タブレット */
@media (max-width: 768px) {
    .gift-section {
        height: 300px;
        padding: 0 40px;
    }
    
    .gift-section .gift-section-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .gift-section-content {
        max-width: 400px;
    }
    
    .gift-section-content p {
        font-size: var(--text-M);
    }
}

/* レスポンシブ対応 - スマートフォン */
@media (max-width: 480px) {
    .gift-section {
        height: 250px;
        padding: 0 var(--margin-XS);
    }
    
    .gift-section .gift-section-title {
        font-size: var(--heading-L);
        margin-bottom: 12px;
    }
    
    .gift-section-content {
        max-width: 100%;
    }
    
    .gift-section-content p {
        font-size: var(--text-S);
        line-height: 1.5;
    }
}

/* 商品カードの固定幅設定 */
.gift-product-card {
    width: 280px; /* 固定幅を設定 */
    max-width: 280px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Swiperスライドの幅制御 */
.gift-category-products-swiper .swiper-slide,
.gift-budget-products-swiper .swiper-slide,
.gift-scene-products-swiper .swiper-slide {
    width: 280px !important; /* 固定幅を強制適用 */
    max-width: 280px;
    flex-shrink: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .gift-product-card {
        width: 240px;
        max-width: 240px;
    }
    
    .gift-category-products-swiper .swiper-slide,
    .gift-budget-products-swiper .swiper-slide,
    .gift-scene-products-swiper .swiper-slide {
        width: 240px !important;
        max-width: 240px;
    }
}

@media (max-width: 480px) {
    .gift-product-card {
        width: 220px;
        max-width: 220px;
    }
    
    .gift-category-products-swiper .swiper-slide,
    .gift-budget-products-swiper .swiper-slide,
    .gift-scene-products-swiper .swiper-slide {
        width: 220px !important;
        max-width: 220px;
    }
}

/* 商品が1つの場合の特別調整 */
.swiper[data-single-product="true"] {
    justify-content: flex-start; /* 左寄せ */
}

.swiper[data-single-product="true"] .swiper-wrapper {
    justify-content: flex-start; /* 左寄せ */
}

