/* ==================================
   RAMEXperts™️ - Products Page
   ロイター風洗練デザイン + 技術者向け機能性
   ================================== */

/* 製品ページヒーローセクション */
.products-hero {
    background: linear-gradient(135deg, #001f3f 0%, #003d7a 100%);
    padding: 140px 0 80px 0;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 116, 217, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(57, 204, 204, 0.1) 0%, transparent 50%);
    opacity: 0.6;
}

.products-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.products-hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 15px;
    font-family: var(--font-secondary);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.products-hero-subtitle {
    display: block;
    font-size: 1.4rem;
    font-weight: 400;
    margin-top: 12px;
    color: var(--accent-cyan);
    font-weight: 600;
}

.products-hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.92;
    font-weight: 300;
}

.products-hero-quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.quick-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* スティッキーナビゲーション（ロイター風） */
.sticky-product-nav {
    position: sticky;
    top: 80px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 100;
    transition: all 0.3s ease;
}

.sticky-product-nav.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.sticky-nav-links {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.sticky-nav-links::-webkit-scrollbar {
    height: 3px;
}

.sticky-nav-links::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sticky-nav-links a {
    padding: 20px 28px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.sticky-nav-links a:hover {
    color: var(--accent-blue);
    background: rgba(0, 116, 217, 0.04);
}

.sticky-nav-links a.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    background: rgba(0, 116, 217, 0.06);
}

/* 製品セクション */
.product-section {
    padding: 100px 0;
    background: #FAFBFC;
}

.product-section:nth-child(even) {
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.8rem;
    color: #1a1a1a;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-header .section-title i {
    color: var(--accent-blue);
    font-size: 2.4rem;
}

.section-description {
    font-size: 1.15rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.75;
    font-weight: 400;
}

/* 製品カテゴリー */
.product-category {
    margin-bottom: 80px;
}

.product-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 35px;
    padding-bottom: 18px;
    border-bottom: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.01em;
}

.category-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-badge.ddr5 {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.category-badge.ddr4 {
    background: linear-gradient(135deg, #00B8D4, #0097A7);
    color: white;
}

.category-badge.ddr3 {
    background: linear-gradient(135deg, #009688, #00796B);
    color: white;
}

.category-badge.legacy {
    background: linear-gradient(135deg, #757575, #616161);
    color: white;
}

/* 製品グリッド（ロイター風カードレイアウト） */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
    margin-bottom: 50px;
}

/* 製品カード（ニュース記事風洗練デザイン） */
.product-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: visible;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* トップグラデーションバー（ホバー時アニメーション） */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0074D9, #39CCCC);
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 8px 8px 0 0;
    z-index: 3;
}

.product-card:hover::after {
    opacity: 1;
}

.product-card.selected::after {
    opacity: 1;
    background: linear-gradient(90deg, #0074D9, #0055FF);
}

/* ランダムカラーバッジ（カードの左上） */
.product-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    width: auto;
    height: auto;
    padding: 6px 14px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 0 0 6px 6px;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ランダムカラー（JSで制御） */
.product-card[data-accent="orange"]::before {
    background: linear-gradient(135deg, #FF6B35, #E85D25);
    color: white;
    content: 'MEMORY';
}

.product-card[data-accent="cyan"]::before {
    background: linear-gradient(135deg, #00B8D4, #0097A7);
    color: white;
    content: 'SERVER';
}

.product-card[data-accent="purple"]::before {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
    content: 'RDIMM';
}

.product-card[data-accent="green"]::before {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    content: 'ECC';
}

.product-card[data-accent="blue"]::before {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    content: 'DDR5';
}

.product-card[data-accent="red"]::before {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: white;
    content: 'HOT';
}

.product-card[data-accent="teal"]::before {
    background: linear-gradient(135deg, #009688, #00796B);
    color: white;
    content: 'PRO';
}

.product-card[data-accent="indigo"]::before {
    background: linear-gradient(135deg, #3F51B5, #303F9F);
    color: white;
    content: 'SPEC';
}

.product-card:hover {
    border-color: #D1D5DB;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.product-card:hover::before {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.product-card.selected {
    border-color: var(--accent-blue);
    background: rgba(0, 116, 217, 0.015);
    box-shadow: 0 6px 20px rgba(0, 116, 217, 0.12);
}

.product-card.selected::before {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 116, 217, 0.3);
}

/* 製品ヘッダー */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 36px 24px 20px 24px;
    background: white;
    border-bottom: 1px solid #F3F4F6;
}

.product-model {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d0d0d;
    letter-spacing: 0.02em;
    user-select: all;
    line-height: 1.5;
    flex: 1;
    cursor: text;
}

.product-model:hover {
    color: #1a1a1a;
}

.add-to-quote-btn {
    width: 38px;
    height: 38px;
    border: 2px solid #E5E7EB;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.add-to-quote-btn i {
    color: #9CA3AF;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.add-to-quote-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 116, 217, 0.06);
    transform: scale(1.08);
}

.add-to-quote-btn:hover i {
    color: var(--accent-blue);
}

.product-card.selected .add-to-quote-btn {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 116, 217, 0.3);
}

.product-card.selected .add-to-quote-btn i {
    color: white;
}

.product-card.selected .add-to-quote-btn i::before {
    content: '\f00c'; /* checkmark */
}

/* 製品スペック（バッジ形式） */
.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 16px 24px;
}

.spec-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    letter-spacing: 0.2px;
}

.spec-badge.capacity {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #DBEAFE;
}

.spec-badge.speed {
    background: #FFF7ED;
    color: #C2410C;
    border: 1px solid #FFEDD5;
}

.spec-badge.type {
    background: #FAF5FF;
    color: #7C3AED;
    border: 1px solid #F3E8FF;
}

.spec-badge.ecc {
    background: #F0FDF4;
    color: #15803D;
    border: 1px solid #DCFCE7;
}

/* 製品詳細 */
.product-detail {
    padding: 16px 24px;
    background: #F9FAFB;
    border-top: 1px solid #F3F4F6;
    border-bottom: 1px solid #F3F4F6;
}

.product-detail p {
    font-size: 0.88rem;
    color: #6B7280;
    margin: 5px 0;
    line-height: 1.6;
}

.product-detail strong {
    color: #374151;
    font-weight: 600;
    display: inline-block;
    min-width: 60px;
    font-size: 0.85rem;
}

/* 製品説明（ロイター風テキスト） */
.product-description {
    padding: 20px 24px 24px 24px;
    font-size: 0.92rem;
    color: #4B5563;
    line-height: 1.75;
    font-weight: 400;
}

.product-description p {
    margin: 0;
}

/* 見積もりフッターバー（洗練版） */
.quote-footer-bar {
    position: fixed;
    bottom: -250px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #001f3f 0%, #003d7a 100%);
    color: white;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px 0;
}

.quote-footer-bar.active {
    bottom: 0;
}

.quote-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 12px;
}

.quote-bar-info {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.quote-bar-info i {
    font-size: 1.6rem;
    color: var(--accent-cyan);
}

.quote-count {
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
}

.quote-models {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 450px;
}

.quote-bar-actions {
    display: flex;
    gap: 14px;
}

.quote-clear-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quote-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.quote-submit-btn {
    padding: 12px 32px;
    background: var(--accent-cyan);
    color: #001f3f;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(57, 204, 204, 0.3);
}

.quote-submit-btn:hover {
    background: #7FDBFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(57, 204, 204, 0.4);
}

.quote-bar-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 400;
}

.quote-bar-note i {
    margin-right: 6px;
    color: var(--accent-cyan);
}

/* レスポンシブデザイン */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: 120px 0 60px 0;
    }

    .products-hero-title {
        font-size: 2.2rem;
    }

    .products-hero-subtitle {
        font-size: 1.15rem;
    }

    .products-hero-description {
        font-size: 1rem;
    }

    .products-hero-quick-nav {
        flex-direction: column;
    }

    .quick-nav-btn {
        width: 100%;
        justify-content: center;
    }

    .sticky-product-nav {
        top: 60px;
    }

    .sticky-nav-links a {
        padding: 16px 20px;
        font-size: 0.85rem;
    }

    .product-section {
        padding: 70px 0;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .section-header .section-title {
        font-size: 2.2rem;
    }

    .category-title {
        font-size: 1.6rem;
        flex-wrap: wrap;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .quote-bar-content {
        flex-direction: column;
        align-items: stretch;
    }

    .quote-bar-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-models {
        max-width: 100%;
    }

    .quote-bar-actions {
        width: 100%;
    }

    .quote-clear-btn,
    .quote-submit-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .products-hero-title {
        font-size: 1.8rem;
    }

    .product-header {
        padding: 20px 20px 16px 20px;
    }

    .product-model {
        font-size: 1rem;
    }

    .product-specs {
        padding: 0 20px 14px 20px;
        gap: 6px;
    }

    .spec-badge {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    .product-detail {
        padding: 14px 20px;
    }

    .product-description {
        padding: 18px 20px 20px 20px;
        font-size: 0.88rem;
    }
}
