/**
 * 重なりパララックスアニメーション CSS
 * スクロールに応じて要素が固定され後続の要素が重なる
 *
 * @package makuai-ippai
 */

/* ===== 重なりパララックスコンテナ ===== */
.overlap-parallax-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* ===== 重なりセクション共通スタイル ===== */
.js-scroll-overlap:not(.is-disabled) {
    --sticky-offset: -1px;
    position: sticky;
    top: var(--sticky-offset);
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.js-scroll-overlap .section-inner {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== セクションコンテンツ ===== */
.js-scroll-overlap .section-content {
    position: relative;
    z-index: 10;
    /* max-width: 800px; */
    padding: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    margin: 0 auto;
}

.js-scroll-overlap .section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===== ヒーローセクション ===== */
.js-scroll-overlap .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.js-scroll-overlap .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
}

.js-scroll-overlap .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ===== 無効化状態のスタイル ===== */
.js-scroll-overlap.is-disabled {
    position: relative;
}

/* ===== ペアリングセクション専用 ===== */
.section-pairing-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.section-pairing-intro {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

.section-pairing-story {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
}

.section-pairing-compatibility {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #333;
}

.section-pairing-scene {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

/* ===== 生産者セクション専用 ===== */
.section-producer-hero {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.section-producer-philosophy {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
}

.section-producer-story {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    color: #ffffff;
}

.section-wine-details {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.section-tasting-notes {
    background: linear-gradient(135deg, #ff8a80 0%, #ffb74d 100%);
    color: #333;
}

/* ===== 商品詳細セクション専用 ===== */
.section-product-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.section-purchase-info {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

.section-product-specs {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
}

.section-category-info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #333;
}

.section-conclusion {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

/* ===== バッジ共通スタイル ===== */
.category-badge,
.producer-badge,
.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-icon,
.badge-icon {
    font-size: 1.2rem;
}

/* ===== タイトル共通スタイル ===== */
.pairing-title,
.producer-title,
.product-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.pairing-subtitle,
.producer-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* ===== コンテンツエリア ===== */
.intro-text,
.story-content,
.compatibility-content,
.scene-content,
.philosophy-content,
.tasting-content {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== グリッドレイアウト ===== */
.producer-info-grid,
.wine-attributes-grid,
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-item,
.attribute-item,
.spec-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.info-label,
.attribute-label,
.spec-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.info-value,
.attribute-value,
.spec-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.attribute-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* ===== 価格表示 ===== */
.wine-price-display,
.product-price-hero,
.main-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff6b6b;
    margin: 1rem 0;
}

.price-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* ===== 購入情報 ===== */
.purchase-content {
    max-width: 600px;
    margin: 0 auto;
}

.product-actions {
    margin: 2rem 0;
}

.product-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

.feature-icon {
    font-size: 1.5rem;
}

/* ===== ワインタイプ情報 ===== */
.wine-type-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.wine-type-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.wine-type-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.pairing-suggestions h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.pairing-suggestions ul {
    list-style: none;
    padding: 0;
}

.pairing-suggestions li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pairing-suggestions li:last-child {
    border-bottom: none;
}

/* ===== 引用 ===== */
.pairing-quote {
    font-size: 1.3rem;
    font-style: italic;
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border-left: 4px solid #ff6b6b;
}

/* ===== スクロールインジケーター ===== */
.overlap-scroll-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.indicator-dots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

.indicator-text {
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: #ffffff;
}

/* ===== レスポンシブデザイン ===== */
@media (max-width: 768px) {
    .js-scroll-overlap .section-title {
        font-size: 2rem;
    }

    .pairing-title,
    .producer-title,
    .product-title {
        font-size: 2.5rem;
    }

    .js-scroll-overlap .section-content {
        padding: 1rem;
        margin: 1rem;
    }

    .producer-info-grid,
    .wine-attributes-grid,
    .specs-grid {
        grid-template-columns: 1fr;
    }

    .overlap-scroll-indicator {
        right: 1rem;
    }

    .indicator-dot {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 480px) {

    .pairing-title,
    .producer-title,
    .product-title {
        font-size: 2rem;
    }

    .wine-price-display,
    .product-price-hero,
    .main-price {
        font-size: 2rem;
    }

    .js-scroll-overlap .section-content {
        padding: 0.5rem;
        margin: 0.5rem;
    }
}

/* ===== アニメーション ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.js-scroll-overlap .section-content>* {
    animation: fadeInUp 0.8s ease-out;
}

/* ===== フォールバックモード ===== */
.overlap-parallax-container.fallback-mode .js-scroll-overlap {
    position: relative;
    height: auto;
    min-height: 100vh;
}

.overlap-parallax-container.fallback-mode .js-scroll-overlap .section-inner {
    position: relative;
    height: auto;
    min-height: 100vh;
}

/* ===== カテゴリセクション専用 ===== */
.section-cinema-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
}

.section-literature-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
}

.section-kabuki-hero {
    background: linear-gradient(135deg, #8b0000 0%, #dc143c 100%);
    color: #ffffff;
}

/* カテゴリバッジのスタイル調整 */
.section-cinema-hero .category-badge,
.section-literature-hero .category-badge,
.section-kabuki-hero .category-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* カテゴリ説明文のスタイル */
.category-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* カテゴリCTAボタン */
.category-cta .btn-category {
    display: inline-block;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-cta .btn-category:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.related-products-wrapper {
    max-width: 100%;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-product-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-product-item .product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ===== 商品詳細ページでの#primaryマージン無効化 ===== */
body.single-product #primary {
    margin: 0 !important;
}

/* 重なりパララックスセクションのマージン調整 */
body.single-product .overlap-parallax-section {
    margin: 0;
    padding: 0;
}