/**
 * FANZA VR Affiliate System - Style
 * Lightning互換デザイン（1-162行保護）
 */

/* ========================================
   最新商品スライダー（スワイプスクロール）
======================================== */
.fanza-vr-latest-slider {
    margin: 40px 0;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.fanza-vr-latest-title {
    text-align: center;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.fanza-vr-slider-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.fanza-vr-slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
}

.fanza-vr-slider-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.fanza-vr-slider-item {
    flex: 0 0 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fanza-vr-slider-item:hover {
    transform: scale(1.05);
}

.fanza-vr-slider-item a {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.fanza-vr-slider-item a:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.fanza-vr-slider-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ナビゲーションボタン */
.fanza-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.fanza-slider-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fanza-slider-prev {
    left: 10px;
}

.fanza-slider-next {
    right: 10px;
}

@media (max-width: 768px) {
    .fanza-vr-slider-container {
        padding: 0 50px;
    }
    
    .fanza-vr-slider-item {
        flex: 0 0 200px;
    }
    
    .fanza-slider-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

/* ========================================
   商品一覧グリッド
======================================== */
.fanza-vr-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .fanza-vr-products {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========================================
   商品アイテム
======================================== */
.fanza-vr-product-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fanza-vr-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================
   ジャケット画像（最大400px・クリッカブル）
======================================== */
.fanza-vr-jacket {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    cursor: pointer;
    overflow: hidden;
}

.fanza-vr-jacket-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.fanza-vr-jacket:hover .fanza-vr-jacket-img {
    transform: scale(1.05);
}

.fanza-vr-jacket::after {
    content: "🔍";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fanza-vr-jacket:hover::after {
    opacity: 0.8;
}

/* ========================================
   商品情報
======================================== */
.fanza-vr-info {
    padding: 20px;
}

.fanza-vr-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.fanza-vr-actress,
.fanza-vr-genre {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.fanza-vr-conversion-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
}

/* ========================================
   アフィリエイトボタン（ボタン下配置）
======================================== */
.fanza-vr-btn {
    display: inline-block;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.fanza-vr-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* ========================================
   第1階層モーダル（サンプル画像グリッド）
======================================== */
.fanza-modal {
    display: none;
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.fanza-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fanza-modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.fanza-modal-close:hover,
.fanza-modal-close:focus {
    color: #000;
}

/* サンプル画像グリッド（3列・スマホ2列） */
.fanza-sample-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .fanza-sample-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fanza-sample-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fanza-sample-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* モーダルアクションボタン */
.fanza-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.fanza-modal-btn {
    padding: 12px 30px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fanza-modal-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* ========================================
   第2階層モーダル（拡大画像・スワイプ）
======================================== */
.fanza-modal-overlay {
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.95);
}

.fanza-modal-image-viewer {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fanza-modal-close-layer2 {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.fanza-modal-close-layer2:hover {
    color: #e74c3c;
}

#fanza-modal-large-img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* 矢印ナビゲーション */
.fanza-modal-prev,
.fanza-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 32px;
    font-weight: bold;
    border: none;
    padding: 20px 25px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10000;
}

.fanza-modal-prev:hover,
.fanza-modal-next:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.fanza-modal-prev {
    left: 30px;
}

.fanza-modal-next {
    right: 30px;
}

@media (max-width: 768px) {
    .fanza-modal-prev,
    .fanza-modal-next {
        padding: 15px 20px;
        font-size: 24px;
    }
    
    .fanza-modal-prev {
        left: 10px;
    }
    
    .fanza-modal-next {
        right: 10px;
    }
}

/* ========================================
   レスポンシブデザイン
======================================== */
@media (max-width: 480px) {
    .fanza-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .fanza-sample-grid {
        grid-template-columns: 1fr;
    }
    
    .fanza-modal-actions {
        flex-direction: column;
    }
    
    .fanza-modal-btn {
        width: 100%;
    }
}
