h1 {
    font-weight: 400;
}

.makerlist-wrapper {
    max-width: 1020px;
    margin: 0rem auto 0 auto;
    font-family: "Helvetica Neue", sans-serif;
}

@media screen and (max-width: 1080px) {
  .makerlist-wrapper {
      padding: calc(2rem + 44px) 2rem 6rem;
  }
}

.maker-models-page {
    padding: 24px 0 5rem 0;
    font-family: "Noto Sans JP", sans-serif;
    color: #222;
}

.header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 12px;
}


.header-actions {
    text-align: right;
    padding: 5px;
    /* background-color: #fff; */
    /* border-bottom: 1px solid #e0e0e0; */
}

.search-btn {
    background-color: #ea5413;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:disabled {
    background-color: #dddddd;
    cursor: not-allowed;
    /* opacity: 0.6; */
}

.search-btn:hover:not(:disabled) {
    background-color: #d44a0f;
}

.view-all-link {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: none;
    text-indent: -9999px; /* テキスト非表示 */
    cursor: pointer;
    color: #000;
    text-decoration: none;
    position: relative;
}
.view-all-link::before {
    position: absolute;
    content: "";
    width: 12px;
    height: 12px;
    background-image: url("/assets/img/circle-arrow-right-orange.svg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    left: -225px;
    top: 6px;
}

/* 吸着ヘッダーコンテナ */
.sticky-header {
    position: sticky;
    top: 44px; /* ヘッダーの高さ分下げる */
    z-index: 50; /* ヘッダーより下、コンテンツより上 */
    /* background-color: #fff; */
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    margin: 20px 0 10px 0;
}

.kana-filter {
    background-color: #f8f8f8;
    /* border-top: 1px solid #e0e0e0; */
    padding: 10px;
    margin: 0; /* sticky-headerの中に入れたのでmarginを削除 */
}

.kana-filter ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}
@media screen and (max-width: 768px) {
    .kana-filter ul {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        font-size: 10px;
    }
}
.kana-filter ul li {
    list-style: none;
}

.kana-filter a {
    position: relative;
    display: inline-block;
    padding-right: 14px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.kana-filter a:hover {
    color: #ea5413;
}

.kana-filter a.active {
    color: #ea5413;
    font-weight: bold;
}

.kana-filter a::before,
.kana-filter a::after {
    content: "";
    position: absolute;
    top: calc(70% - 2px);
    right: 0;
    width: 6px;
    height: 1px;
    border-radius: 9999px;
    background-color: #ea5413;
    transform-origin: right center;
}
.kana-filter a::before {
    transform: rotate(135deg);
}

.kana-filter a::after {
    transform: rotate(45deg);
}

.section-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}
.section-title span {
    color: #d9d9d9;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(194px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.model-card {
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.model-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

.model-card img {
    width: 100%;
    height: auto;
}

.model-name {
    margin-top: 6px;
    font-size: 13px;
    font-weight: bold;
}

input[type="checkbox"] {
    margin-right: 4px;
}

hr {
    margin: 50px 0;
}

.model-card label{
    cursor: pointer;
}
.kana-heading { 
    margin: 40px 0 20px; 
    font-weight: 700; 
    font-size: 16px;
    color: #222;
    padding-bottom: 8px;
    border-bottom: .5px solid #e1e1e1;
    scroll-margin-top: 160px; /* ヘッダー(44px) + sticky-header(約100px) + 余白 */
}
/* model-grid样式已在上方定义 */
.model-card{padding:8px; }
.kana-filter ul{ display:flex; flex-wrap:wrap; gap:8px; }
.kana-filter a{ display:inline-block; padding:.25rem .5rem; border-radius:6px; }

@media screen and (max-width: 768px) {
    .maker-models-page h1{
        text-align: center;
        font-size: 25px;
        margin-top: 10px;
    }
    
    .sticky-header {
        top: 44px; /* モバイルでもヘッダー下に固定 */
        margin: 10px 0;
    }
    
    .kana-filter {
        padding: 8px;
    }
    
    .header-actions {
        text-align: center;
        padding: 8px 10px;
    }
    
    .search-btn {
        font-size: 12px;
        padding: 10px 16px;
    }
    
    .kana-heading {
        margin: 30px 0 8px;
        font-size: 16px;
        scroll-margin-top: 160px; /* ヘッダー(44px) + sticky-header(約100px) + 余白 */
        border-bottom: none;
    }
    .model-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .model-card {
        border-top: 1px solid #ddd;
        padding: 8px 12px;
        background: #fff;
    }

    .model-card label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .model-card img {
        width: 80px;
        height: auto;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .model-name {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        white-space: normal;
        flex-grow: 1;
        text-align: left;
        padding-right: 31px;
        justify-content: left;
    }

    .model-card label::before,
    .model-card label::after {
        content: "";
        position: absolute;
        top: calc(65% - 1px);
        right: 8px;
        width: 6px;
        height: 1px;
        border-radius: 9999px;
        background-color: #ea5413;
        transform-origin: 100% 50%;
    }

    .model-card label::before {
        transform: rotate(45deg);
    }

    .model-card label::after {
        transform: rotate(-45deg);
    }

    .model-name input[type="checkbox"] {
        transform: scale(1.2);
    }
    .maker-models-page {
        padding: 0;
    }
    /* .makerlist-wrapper {
        padding: 1rem 10px 100px 10px;
    } */
     .makerlist-wrapper {
        margin: 0 auto;
        padding: 24px 20px 60px;
    }
}
