/* ============================================
   価格比較プラットフォーム - フロントページ専用CSS
   ============================================ */

/* リセット：SWELLのデフォルトスタイルを上書き */
.hero-section * {
    box-sizing: border-box;
}

/* ============================================
   ヒーローセクション
   ============================================ */
.hero-section {
    position: relative;
    min-height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    text-align: center;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 500;
}

/* 検索フォーム */
.hero-search {
    max-width: 600px;
    margin: 0 auto 50px;
}

.search-wrapper {
    position: relative;
}

.hero-search-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.hero-search-input:focus {
    outline: none;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

/* 統計情報 */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-stat {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.hero-stat:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-5px);
}

.hero-stat-number {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* ============================================
   カテゴリセクション
   ============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.category-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.category-count {
    font-size: 14px;
    color: #666;
}

/* ============================================
   ランキングセクション
   ============================================ */
.ranking-container {
    max-width: 900px;
    margin: 0 auto;
}

.ranking-item {
    display: grid;
    grid-template-columns: 60px 100px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    margin-bottom: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.ranking-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ranking-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 800;
}

.ranking-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.ranking-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.ranking-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.ranking-title a:hover {
    color: #667eea;
}

.ranking-prices {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 14px;
}

.price-jp {
    color: #666;
}

.price-us {
    color: #10b981;
    font-weight: 600;
}

.ranking-diff {
    text-align: right;
}

.price-diff {
    display: inline-block;
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

/* ============================================
   比較カードセクション
   ============================================ */
.comparison-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.comparison-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.comparison-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 16px 0;
    color: #1a1a1a;
}

.comparison-card-diff {
    color: #10b981;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
}

.comparison-card-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.comparison-card-link:hover {
    gap: 8px;
    color: #764ba2;
}

/* ============================================
   商品カード
   ============================================ */
.product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.product-card-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-content {
    padding: 16px;
}

.product-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.product-card-prices {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

/* ============================================
   価格アラートセクション
   ============================================ */
.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.price-alert-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.price-alert-input-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.price-alert-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
}

.price-alert-submit {
    padding: 14px 32px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.price-alert-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================
   使い方ガイド
   ============================================ */
.guide-item {
    text-align: center;
}

.guide-number {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.guide-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.guide-text {
    color: #666;
    line-height: 1.6;
}

/* ============================================
   チャットウィジェット
   ============================================ */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-container.active {
    display: flex;
}

.chat-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 16px;
    max-width: 80%;
}

.chat-message.bot {
    background: #f0f0f0;
    padding: 12px 16px;
    border-radius: 16px 16px 16px 4px;
}

.chat-message.user {
    background: #667eea;
    color: white;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    margin-left: auto;
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
}

.chat-send {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 16px;
        min-height: 500px;
    }
    
    .ranking-item {
        grid-template-columns: 50px 80px 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .ranking-diff {
        grid-column: 2 / -1;
        text-align: left;
        margin-top: 8px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .price-alert-input-group {
        flex-direction: column;
    }
    
    .chat-container {
        width: calc(100vw - 32px);
        right: 16px;
    }
}

/* ============================================
   ユーティリティクラス
   ============================================ */
.py-12 {
    padding-top: 80px;
    padding-bottom: 80px;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.md\:grid-cols-3 {
    @media (min-width: 768px) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.md\:grid-cols-4 {
    @media (min-width: 768px) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.gap-6 {
    gap: 24px;
}

.gap-8 {
    gap: 32px;
}

.text-center {
    text-align: center;
}

.text-3xl {
    font-size: 30px;
}

.font-bold {
    font-weight: 700;
}

.mb-8 {
    margin-bottom: 32px;
}

.text-gray-600 {
    color: #4b5563;
}