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

body {
    font-family: "Yu Gothic", "游ゴシック", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* ヘッダー */
.header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: #e60012;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.page-title {
    font-size: 24px;
    color: #333;
    font-weight: normal;
}

/* セクション共通 */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e60012;
}

.section-label {
    background-color: #e60012;
    color: white;
    padding: 5px 15px;
    font-size: 14px;
    margin-right: 10px;
    border-radius: 3px;
    font-weight: bold;
}

/* 直営店舗セクション */
.official-stores {
    margin-bottom: 60px;
}

.official-highlight {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.official-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.store-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.store-item {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.store-badge {
    background-color: #e60012;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
}

.store-item p {
    font-size: 14px;
    line-height: 1.4;
}

.official-stores-link {
    background-color: #e60012;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.official-stores-link:hover {
    background-color: #c5000f;
}

/* 統合検索条件エリア */
.integrated-search-container {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* 検索条件タグエリア（最上部） */
.search-tags-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

/* テキスト入力エリア */
.search-input-area {
    margin-bottom: 20px;
}

/* エリア選択と絞り込みの間隔 */
.search-group,
.filter-section {
    margin-bottom: 20px;
}

.integrated-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.integrated-search-input:focus {
    outline: none;
    border-color: #e60012;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1), 0 4px 8px rgba(0,0,0,0.1);
}

.integrated-search-input::placeholder {
    color: #999;
    font-style: italic;
}

/* 幅広入力欄 */
.wide-input {
    min-width: 500px;
    max-width: 800px;
}

/* オートコンプリートコンテナを幅広に */
.wide-input + .autocomplete-container,
.autocomplete-container:has(.wide-input) {
    flex: 3;
    min-width: 500px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 45px;
    max-height: 80px;
    overflow-y: auto;
    align-content: flex-start;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(230, 0, 18, 0.1);
}

/* 検索条件がない時のメッセージ */
.no-tags-message {
    color: #999;
    font-style: italic;
    font-size: 14px;
    padding: 10px 0;
    text-align: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
}

.search-tag {
    background-color: #e60012;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.search-tag:hover {
    background-color: #c5000f;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.tag-remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.clear-all-tags {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clear-all-tags:hover {
    background-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 検索セクション */
.search-section {
    margin-bottom: 60px;
}

.search-description {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-size: 16px;
}

.search-form {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.search-group {
    margin-bottom: 30px;
}

.search-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

/* オートコンプリート */
.autocomplete-container {
    position: relative;
    width: 100%;
    flex: 1;
}

.suggest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none;
}

.suggest-dropdown.show {
    display: block;
}

.suggest-group {
    border-bottom: 1px solid #f0f0f0;
}

.suggest-group:last-child {
    border-bottom: none;
}

.suggest-group-title {
    background-color: #f8f9fa;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    border-bottom: 1px solid #e9ecef;
}

.suggest-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    font-size: 14px;
}

.suggest-item:hover,
.suggest-item.highlighted {
    background-color: #f0f8ff;
}

.suggest-item:last-child {
    border-bottom: none;
}

.suggest-item .suggest-type {
    background-color: #e60012;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-right: 8px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #e60012;
    box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.1);
}

.search-btn {
    background-color: #e60012;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #c5000f;
}

/* ロケーション選択 */
.location-select-container {
    position: relative;
}

.location-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.location-select:focus {
    outline: none;
    border-color: #e60012;
    box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.1);
}

.location-select option {
    padding: 10px;
}

/* フィルター */
.filter-section {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

.filter-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.filter-option input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.filter-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn.apply {
    background-color: #e60012;
    color: white;
}

.filter-btn.apply:hover {
    background-color: #c5000f;
}

.filter-btn.reset {
    background-color: #6c757d;
    color: white;
}

.filter-btn.reset:hover {
    background-color: #545b62;
}

/* 外部検索アクション */
.external-search-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
}

.main-search-btn {
    background: linear-gradient(135deg, #e60012 0%, #c5000f 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    min-width: 160px;
}

.main-search-btn:hover {
    background: linear-gradient(135deg, #c5000f 0%, #a8000d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.4);
}

.main-search-btn:active {
    transform: translateY(0);
}

.reset-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.reset-btn:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* 検索結果 */
.results-section {
    margin-bottom: 60px;
}

.results-header {
    margin-bottom: 30px;
    text-align: center;
}

.results-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

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

.store-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.store-card {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.store-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
}

.store-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
}

.store-type {
    background-color: #e60012;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
}

.store-prefecture {
    background-color: #f0f0f0;
    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 10px;
    display: inline-block;
}

.store-details {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.store-details p {
    margin-bottom: 5px;
}

.store-address {
    color: #333;
    margin-bottom: 10px;
}

.store-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.brand-tag {
    background-color: #f8f9fa;
    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid #e9ecef;
}

/* オンラインショップ */
.online-shop {
    background-color: #f8f8f8;
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 40px;
}

.online-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.online-link {
    background-color: white;
    color: #333;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.3s;
    font-size: 14px;
}

.online-link:hover {
    background-color: #e60012;
    color: white;
    border-color: #e60012;
}

/* フッター */
.footer {
    border-top: 1px solid #eee;
    padding: 40px 0;
    text-align: center;
    color: #666;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #e60012;
}

.footer-info {
    margin-bottom: 20px;
}

.stock-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.stock-logo {
    background-color: #003366;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.stock-info p {
    font-size: 12px;
    line-height: 1.4;
}

.copyright {
    font-size: 11px;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .store-gallery {
        flex-direction: column;
    }
    
    .store-item {
        min-width: auto;
    }
    
    .external-search-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .main-search-btn,
    .reset-btn {
        width: 80%;
        max-width: 280px;
    }
    
    .integrated-search-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .search-area-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .search-input-area {
        flex-direction: column;
        gap: 12px;
    }
    
    .integrated-search-input {
        font-size: 16px; /* iOS ズーム防止 */
        padding: 10px 14px;
    }
    
    .wide-input {
        min-width: 100%;
        max-width: 100%;
    }
    
    .autocomplete-container:has(.wide-input) {
        flex: 1;
        min-width: 100%;
    }
    
    .search-tags {
        justify-content: center;
        min-height: 40px;
        max-height: 70px;
        padding: 6px;
    }
    
    .no-tags-message {
        font-size: 12px;
        padding: 8px 0;
    }
    
    .clear-all-tags {
        width: 100%;
        text-align: center;
    }
    
    .search-tag {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .suggest-dropdown {
        max-height: 200px;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .store-list {
        grid-template-columns: 1fr;
    }
    
    .online-links {
        flex-direction: column;
        align-items: center;
    }
    
    .stock-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 22px;
    }
    
    .store-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .store-type {
        align-self: flex-start;
    }
}

/* ローディング状態 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: "...";
    animation: loading 1s infinite;
}

@keyframes loading {
    0%, 33% { content: ""; }
    34%, 66% { content: "."; }
    67%, 99% { content: ".."; }
    100% { content: "..."; }
}

/* 検索結果なし */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.no-results p {
    font-size: 14px;
    line-height: 1.6;
}
