/* リセットとベーススタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FFF;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.search-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ハンバーガーメニューボタン */
.hamburger-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    font-family: inherit;
}

.hamburger-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hamburger-menu-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
    height: 16px;
    position: relative;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu-btn.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu-btn.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.hamburger-text {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .hamburger-text {
        display: none;
    }
    
    .hamburger-menu-btn {
        padding: 0.625rem;
        width: 44px;
        height: 44px;
        justify-content: center;
    }
}

/* フィルターセクション */
.filter-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.filter-section.active {
    max-height: 2000px;
    padding: 1.5rem 2rem;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

@media (max-width: 768px) {
    .filter-section {
        padding: 0 1rem;
    }
    
    .filter-section.active {
        padding: 1rem;
    }
}

.filter-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.filter-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.5rem;
}

.filter-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: block;
    border: 2px solid transparent;
}

.filter-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.3);
}

.filter-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    pointer-events: none;
    z-index: 1;
}

.filter-card-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-primary);
}

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

.filter-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

.filter-card-icon {
    font-size: 3rem;
}

.filter-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2rem;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.filter-card-content {
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.filter-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.filter-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-card-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-count {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
}

/* メインコンテンツ */
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 3rem;
}

/* ギャラリーグリッド */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.6s ease-out;
    max-width: 100%;
}

@media (min-width: 1600px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ギャラリーカード */
.gallery-card {
    background: var(--bg-secondary);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.5s ease-out;
    animation-fill-mode: both;
}

.gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-card:nth-child(2) { animation-delay: 0.1s; }
.gallery-card:nth-child(3) { animation-delay: 0.15s; }
.gallery-card:nth-child(4) { animation-delay: 0.2s; }
.gallery-card:nth-child(5) { animation-delay: 0.25s; }
.gallery-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* カード画像 */
.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 4:3 アスペクト比 */
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* カードオーバーレイ */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(236, 72, 153, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}


/* カードコンテンツ */
.card-content {
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.card-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.booth-badge {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card-shop {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.shop-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.shop-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.detail-shop {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.detail-info-list {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.detail-info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

.detail-info-value {
    color: var(--text-primary);
}

.card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.2rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-item-id {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* エラーメッセージ */
.error-message {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-message h2 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 空の状態 */
.empty-state {
    background: white;
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* フッター */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* レスポンシブ対応 */
@media (min-width: 1200px) and (max-width: 1599px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .site-title {
        font-size: 1.5rem;
    }
    
    .search-info {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .empty-state,
    .error-message {
        padding: 2rem 1rem;
    }
}

@media (max-width: 599px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .site-title {
        font-size: 1.25rem;
    }
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

/* 詳細ページスタイル */
.detail-container {
    max-width: 1200px;
}

.detail-header {
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
}

.detail-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.detail-header-media {
    flex: 0 0 auto;
}

.detail-header-info {
    flex: 1 1 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.back-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-3px);
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.meta-item {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.booth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 5rem;
    background: #FF5C67;
    color: #FFF;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.1rem;
}

.image-gallery {
    background: rgba(255, 255, 255, 0.95);
}

.gallery-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
/* 画像スライダー（slick.js 用） */
.image-slider {
    max-width: 350px;
    margin: 0 auto 1.5rem;
}

.image-slider-slide {
    cursor: pointer;
}

.image-slider-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.no-images {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.compatible-models {
    padding: 0.5rem;
    margin-bottom: 2rem;
}

.compatible-models-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.model-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.5rem;
}

.model-card {
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.model-card-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
    color: inherit;
}

.model-card-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-primary);
}

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

.model-card-content {
}

.model-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    margin-top: 0.2rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.model-card-shop {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.no-models {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* 詳細ページのレスポンシブ対応 */
@media (max-width: 768px) {
    .detail-container {
        padding: 0 1rem;
    }

    .detail-header {
        padding: 1.5rem;
        display: block;
    }

    .detail-header-inner {
        flex-direction: column;
    }

    .detail-title {
        font-size: 1.5rem;
    }

    .image-gallery {
        padding: 1.5rem;
    }

    .model-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* パンくずリスト */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ショップヘッダー */
.shop-header {
    max-width: 1600px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.shop-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

/* カード画像プレースホルダー */
.card-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon {
    font-size: 3rem;
    opacity: 0.7;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .shop-header {
        padding: 0 1rem;
    }
    
    .shop-title {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
}
