/* CSS Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color:#222;
    padding: 0;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

main {
    width: 100%;
}


a {
    color: #426599;
    transition: color 0.3s ease;
}

a:hover {
    color: #668ABE;
}

button {
    font-family: "Noto sans JP",sans-serif;
}

h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 24px;
    padding: 0;
}

h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
    padding: 0;
}

h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    padding: 0;
}

h4 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 16px;
    padding: 0;
}

/* 以下追加 */
main {
    margin: 8rem auto 3rem;
}

/* ぱんくずリスト（仮作成） */
.pankuzu {
    width: 100%;
}

.pankuzu ul {
    display: flex;
    list-style: none;
}

.pankuzu li {
    margin-right: 0.5rem;
    font-size: 12px;
}

/* favorite-page */
#favorite {
    width: 100%;
    max-width: 1064px;
    height: auto;
    margin: 0 auto;
    padding: 0 20px;
    overflow: visible;
}

#favorite h1 {
    margin: 0;
    margin-right: 1rem;
    font-size: 24px;
}

#favorite .modal-fav-detail {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

#favorite .modal-fav-detail .hawto {
    display: flex;
    align-items: center;
}

#favorite .modal-fav-detail .hawto img{
    width: 25px;
    margin-left: 0.4rem;
}

#favorite .modal-fav-detail .hawto .js-modal-open {
    text-decoration: underline;
    font-size: 1.1rem;
    cursor: pointer;
    color: #426599;
}

#favorite .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#favorite .modal-content {
    background: #fff;
    max-height: 90vh;       /* 90vh を上限にする */
    height: auto;           /* デフォルトは中身に合わせる */
    overflow-y: auto;
    padding: 40px 40px 0px;
    max-width: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    text-align: left;
}

#favorite .modal-content h2{
    margin-top: 0;
    margin-bottom: 1rem;
}

#favorite .modal-content h3{
    margin-top: 1.5rem;
    margin-bottom: 0;
}

#favorite .modal-content p{
    text-align: left;
    font-size: 0.9rem;
    margin-top: 0;
}

#favorite .modal-content a{
    text-align: left;
    color: #426599;
    text-decoration: underline;
}

#favorite .modal-content .js-modal-close{
    background-color: #fff;
    width: 146px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px auto 32px;
}

#favorite .modal-content .js-modal-close:hover {
    border: 2px solid #868686;
    color: #868686;
    cursor: pointer;
}

/* すべて選択 */
#favorite p.all-check-text {
    font-size: 0.8rem;
    text-align: left;
    margin-left: 0rem;
}

/* お気に入り一覧リスト */
#favorite .list-base {
    display: flex;
}

#favorite .list-button-all {
    display: flex;
}

#favorite .list-area {
    grid-template-columns: repeat(1,5fr);
    width: 100%;
}

#favorite .fav-list-title-header {
    background-color: #E6EDF5;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid #222;
}

#favorite .fav-list-title {
    background-color: #ffffff;
    border-bottom: 1px solid #222;
    padding: 0.5rem 1rem;
}

#favorite .fav-list-title-header ,
#favorite .fav-list-title {
    display: grid;
    grid-template-columns: 20px 1fr 1fr 1fr 180px;
    gap: 40px;
    align-items: center;
    min-height: 52px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

#favorite .fav-list-title img {
    width: 80px;
    height: auto;
}

#favorite .fav-list-title .delete-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    background-color: #D9D9D9;
    height: 40px;
    width: 88px;
    border-radius: 8px;
    cursor: pointer;
}

#favorite #favorite-checkbox{
    justify-content: center;
    z-index: 10;
    transform: scale(1.7);
    margin: auto;
}

#favorite #selectAll {
    justify-content: center;
    transform: scale(1.7);
    margin: auto;
}

input[type="checkbox"] {
    width: 14px;
    height: 14px;
    border: 1px solid #A3A3A3;
    border-radius: 4px;
    background-color: #EFEFEF;
    cursor: pointer;
    position: relative;
}

/* お気に入りボタンエリア */
#favorite .button-area{
    display: block;
    margin-left: 1rem;
    width: 22%;
    flex-direction: column;
    position: sticky;
    top: 110px; /* ヘッダーなどに合わせて調整可 */
    align-self: start; /* グリッドやflexレイアウトを使っている場合に必要なケースもあり */
    transition: opacity 0.3s ease;
    z-index: 99;
    padding: 0 0 0 9px;
}

#favorite .button-area.hidden {
    opacity: 0;
    pointer-events: none;
}

#favorite .favorite-action-button {
    flex-direction: column;
    width: auto;
    gap: 24px!important;
    display: flex!important;
}

#favorite a.request-button ,
#favorite a.download-button ,
#favorite a.print-button ,
#favorite a.showroom-button ,
#favorite a.contact-button {
    background-color: #426599;
    display: block;
    color: #fff;
    width: 100%;
    height: auto;
    border-radius: 8px;
    text-align: center;
    font-size: 0.8rem;
    padding: 1rem 0;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

#favorite .request-button:hover ,
#favorite .download-button:hover ,
#favorite .print-button:hover ,
#favorite .showroom-button:hover ,
#favorite .contact-button:hover {
    background-color: #668ABE;
}

#favorite a.request-button{
    margin-top: 0rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#favorite .request-button:hover {
    background-color: #668ABE;
}

#favorite .download-button-detail {
    font-size: 12px!important;
    text-decoration: underline!important;
}

/* ページネーション */
#favorite .pagination {
    width: 100%;
}

#favorite p {
    font-size: 1rem;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

#favorite ul.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
}

#favorite ul.pagination a {
    text-decoration: none;
    list-style: none;
    color: #222;
    font-weight: 500;
}

#favorite ul.pagination .back {
    background-color: #E9E9E9;
}

#favorite .pagination li {
    text-decoration: none;
    list-style: none;
    background-color: #fff;
    border: 1px solid #D6D3D0;
    border-radius: 6px;
    margin: 0 8px;
    display: block;
    padding: 9px;
}

#favorite .pagination li.active {
    text-decoration: none;
    list-style: none;
    background-color: #426599;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 6px;
    margin: 0 8px;
    display: block;
    padding: 9px;
}

#favorite .pagination li.active a {
    color: #fff;
}

#favorite ul.pagination p {
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;   
}

#favorite .download-button-detail img {
    margin-left: 0.2rem;
}


/*  ▼ Uikit対策 ▼ */
.search-box input {
    font-weight: 400!important;
}

.search-box input button {
    font-weight: 400!important;
}

.search-box input button img {
    font-weight: 400!important;
    margin-left: 0!important;
    display: flex!important;
    align-items: center!important;
    justify-content: center!important;
}

header .header-search-box input {
    font-size: 0.7rem!important;
    font-weight: 400!important;
}

header .first-row a {
    font-weight: 400!important;
}

header .custom-button {
    font-weight: 400!important;
    display: flex!important;
    align-items: center!important;
    justify-content: center!important;
}

/* megamenuの中 */
header .megaMenu .catalog-box-wrapper {
    padding: 20px 0!important;
    margin: 0!important;
}

header .megaMenu .catalog-box-wrapper img {
    padding: 0!important;
    margin: 0!important;
}

.menu .catalog-box-wrapper, 
.menu .showroom-box-wrapper, 
.menu .useful-info-wrapper {
    margin: 0!important;
    padding: 0!important;
}

.menu .catalog-box-wrapper a#text , 
.menu .showroom-box-wrapper a#text , 
.menu .useful-info-wrapper a#text {
    margin: 3px 0!important;
}

.menu .catalog-box-wrapper img ,
.menu .showroom-box-wrapper img, 
.menu .useful-info-wrapper img {
        margin: 0!important;
        padding: 0 0 0.1rem!important;
        width: 211px!important;
        height: 128px!important;
    }

header .megaMenu .catalog-box-wrapper a ,
header .megaMenu .showroom-box-wrapper a ,
header .megaMenu .useful-info-wrapper a {
    line-height: 1.4!important;
}

header .catalog-box {
    padding: 0;
}

footer a {
    font-weight: 400!important;
    text-decoration: underline!important;
    font-family: none;
}

footer li {
    font-weight: 400!important;
}

footer .copyright {
    font-weight: 400!important;
}

/* uikit対策 sp版　hammenu  */
.details-summary {
    padding: 20px!important;
    font-size: 14.4px!important;
    font-weight: bold!important;
}

.hammenu.open a {
    font-size: 12.8px!important;
    line-height: 1.7!important;
}

.hammenu input.search-input {
    font-weight: 400!important;
}

.search-menu-sp.open input {
    font-weight: 400!important;
}

#SP--footnav .main li {
    border-right: none!important;
}
/* ▲Uikit対策 以上 ▲ */

@media screen and (min-width: 1024px) {

    .logo-and-icons {
        display: flex;
    }
    .icon-left, .icon-left2, .icon-right {
        display: none;
    }
    .hamburger {
        display: none;
    }
    .menu {
        display: flex;
    }
}

@keyframes fade {
    0%, 7.5%, 25%, 32.5%, 100% {
        opacity: 0;
    }
    7.5%, 25% {
        opacity: 1;
    }
}

/* SP digital-catalog =========== */

@media screen and (max-width: 1024px) {
/* 以下追加 */
main {
    margin: 4rem auto 3rem;
}

/* ぱんくずリスト */
.pankuzu {
    width: 100%;
    margin-bottom: 0rem;
}

.pankuzu ul {
    display: flex;
    list-style: none;
    margin: auto 1rem;
    padding: 0;
}

/* favorite-page */
#favorite {
    width: 100%;
    max-width: 1064px;
    height: auto;
    margin: 0 auto;
    padding: 0;
}

#favorite h1 {
    font-size: 16px;
}


#favorite .modal-fav-detail .hawto .js-modal-open {
    font-size: 16px;
}

#favorite .modal-fav-detail {
    margin: 1rem;
}

#favorite .modal-fav-detail .hawto img {
    width: 20px;
}

#favorite .modal-fav-detail .hawto a {
    text-decoration: underline;
    font-size: 1.1rem;
    cursor: pointer;
}

#favorite .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#favorite .modal-content {
    background: #fff;
    max-height: 90vh;
    height: auto;
    overflow-y: auto;
    padding: 2rem;
    max-width: 90%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    text-align: left;
}

#favorite .modal-content h2{
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700!important;
}

#favorite .modal-content h3{
    margin-top: 1.5rem;
    margin-bottom: 0;
}

#favorite .modal-content p{
    text-align: left;
    font-size: 0.9rem;
    margin-top: 0;
}

#favorite .modal-content a{
    text-align: left;
    color: #426599;
    text-decoration: underline;
}

#favorite .modal-content .js-modal-close{
    background-color: #fff;
    width: 146px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px auto 32px;
}

#favorite .modal-content .js-modal-close:hover {
    border: 2px solid #868686;
    color: #868686;
    cursor: pointer;
}

/* お気に入り一覧リスト */
#favorite .list-base {
    display: flex;
}

#favorite .list-button-all {
    display: flex;
}

#favorite .list-area {
    grid-template-columns: repeat(1,5fr);
    width: 100%;
}

#favorite .fav-list-title-header {
    background-color: #E6EDF5;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid #222;
}

#favorite .fav-list-title {
    background-color: #ffffff;
    border-bottom: 1px solid #222;
    padding: 0.5rem 1rem;
}

#favorite .category {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    margin-bottom: 4px;
}

#favorite .product-number-name {
    grid-column: 3;
    grid-row: 1;
    margin-top: 1rem;
    /* align-self: end; */
    white-space: pre-wrap;
}

#favorite .fav-list-title-header ,
#favorite .fav-list-title {
    display: grid;
    grid-template-columns: 30px 1.3fr 2fr 78px;
    gap: 26px;
    align-items: center;
    min-height: 52px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    font-size: 0.9rem;
    padding-bottom: 0.2rem;
}

#favorite .fav-list-title {
    align-items: center;
    min-height: 82px;
}

#favorite .fav-list-title img {
    width: 80px;
    height: auto;
}

#favorite .fav-list-title .delete-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    background-color: #D9D9D9;
    height: 40px;
    width: 88px;
    border-radius: 8px;
    cursor: pointer;
}

#favorite #favorite-checkbox{
    justify-content: center;
    transform: scale(1.5);
    margin: auto;
}

#favorite #selectAll {
    justify-content: center;
    transform: scale(1.5);
    margin: auto;
}

#favorite p.all-check-text {
    font-size: 0.8rem;
    text-align: left;
    width: 100%;
    margin: 0.3rem;
}

input[type="checkbox"] {
    width: 14px;
    height: 14px;
    border: 1px solid #A3A3A3;
    border-radius: 4px;
    background-color: #EFEFEF;
    cursor: pointer;
    position: relative;
}
/* お気に入りボタンエリア */
#favorite .button-area{
    display: block;
    position: fixed;
    margin-left: 0;
    width: 100%;
    margin: 0 auto;
    padding: 24px 12px;
    background-color: #fff;
    z-index: 112;
    bottom: 0rem;
    transition: opacity 0.3s ease;
    z-index: 99;
    top:auto;
}

#favorite .button-area.hidden {
    opacity: 0;
    pointer-events: none;
}

#favorite .favorite-action-button {
    flex-direction: column;
    width: auto;
    display: grid!important;
    gap: 16px 11px!important;
    grid-template-columns: 1fr 1fr;
}

#favorite a.request-button ,
#favorite a.download-button ,
#favorite a.print-button ,
#favorite a.showroom-button ,
#favorite a.contact-button {
    display: flex;
    background-color: #426599;
    color: #fff;
    width: 100%;
    height: auto;
    border-radius: 8px;
    text-align: center;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    padding: 12px 0;
    margin-top: 0;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#favorite .dl-check-img{ 
    display: flex;
    flex-direction: column;
}

#favorite .request-button:hover ,
#favorite .download-button:hover ,
#favorite .print-button:hover ,
#favorite .showroom-button:hover ,
#favorite .contact-button:hover {
    background-color: #668ABE;
}

#favorite .request-button{
    margin: 0;
    /* height: 60px; */
    transition: background-color 0.3s ease, color 0.3s ease;
}

#favorite .request-button:hover {
    background-color: #668ABE;
}

#favorite .download-button-detail {
    font-size: 0.9rem;
    display: none;
}

/* ページネーション */
#favorite .pagination {
    width: 100%;
}

#favorite p {
    font-size: 1rem;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

#favorite ul.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
}

#favorite ul.pagination .back {
    background-color: #E9E9E9;
}

#favorite .pagination li {
    text-decoration: none;
    list-style: none;
    background-color: #fff;
    border: 1px solid #D6D3D0;
    border-radius: 6px;
    margin: 0 8px;
    display: block;
    padding: 9px;
}

#favorite .pagination li.active {
    text-decoration: none;
    list-style: none;
    background-color: #426599;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 6px;
    margin: 0 8px;
    display: block;
    padding: 9px;
}

#favorite .pagination li.active a {
    color: #fff;
}

#favorite ul.pagination p {
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#favorite ul.pagination a {
    text-decoration: none;
    list-style: none;
    color: #222;
    font-weight: 500;
}

#favorite .download-button-detail img {
    margin-left: 0.2rem;
    width: 12px;
    vertical-align: middle;
}

/* uikit対策 sp版　hammenu  */
.details-summary {
    padding: 20px!important;
    font-size: 14.4px!important;
    font-weight: bold!important;
}

.hammenu.open {
    height: calc(100vh - 4rem)!important; /* ← これが一番大事 */
    overflow-y: auto!important;
    padding-bottom: 32px!important; /* ← 明示的に余白を追加するのが安全 */
    display: block!important;
    background-color: #f5f5f5!important;
    overflow-y: auto!important;
}

.hammenu.open .hammenu-column a {
    font-size: 14.4px!important;
}

.hammenu.open a {
    font-size: 12.8px!important;
    line-height: 1.7!important;
    font-weight: 400!important;
}

.hammenu input.search-input {
    font-weight: 400!important;
}

.search-menu-sp.open input {
    font-weight: 400!important;
}

#SP--footnav .main li {
    border-right: none!important;
}

footer .main {
    margin-bottom: 24px!important;
    overflow-x: 0;
}
}
/* ▲Uikit対策 以上 ▲ */

@media screen and (max-width: 640px) {
main {
    margin: 4rem auto 3rem;
}
}

/* プリント用 */
@media print {
header, footer, nav, .pankuzu, .button-area, #backToTop {
    display: none !important;
}

main {
    margin-top: 0;
}

html, body {
    width: 1024px !important; /* 任意のPC想定幅 */
    zoom: 1; /* 縮小してページ幅に収める調整（任意） */
}
}