/* 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;
}

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;
}

nav {
    height: 96px;/* 変更 */
}

header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    border-bottom: 1px solid #bfbfbf;
    z-index: 1000;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo img {
    width: 160px;
    height: 24px;
}

.logo-and-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
}

.menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    flex-grow: 1
}

.menu-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.first-row a {
    font-size: 12px;
    padding: 16px 8px 10px 8px;
}

.second-row a {
    font-size: 14px;
    font-weight: bold;
    padding: 15px 4px 10px 4px;
}

.menu ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    height: 48px;
}

.menu ul a{
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    height: 48px;
}

.menu li {
    margin: 0px 8px;
}

.menu li img {
    margin-left: 4px;
    width: 14px;
    height: auto;
}

.menu a {
    text-decoration: none;
    color: #222;
    display: flex;
    align-items: center;
}

.menu a:hover, .menu a:focus {
    text-decoration: underline;
    color: #bfbfbf;
    outline: none;
}

/* 以下追加 */
#backToTop {
    position: fixed;
    right: 80px;
    bottom: 80px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

#backToTop img {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.header-search-box form{
    align-items: center;
    width: 175px;
    height: 23px;
    display: flex;
    margin: 0.8rem 0;
}

.header-search-box input {
    padding: 0.5rem 1rem;
    margin: 0;
    width: 148px;
    height: 24px;
    margin-top: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border: 1px solid #E9E9E9;
    font-size: 0.7rem;
}

.header-search-box button {
    width: 27px;
    height: 23px;
    background-color: #426599;
    border: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.header-search-box button img{
    width: 11.5px;
    height: 10.4;
    padding: 0;
}

.menu-row .second-row li {
    display: inline-block;
    position: relative;
}

.megaMenu {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.megaMenu.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.menu .child_menu {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 2rem 0rem;
    background: #E6EDF5;
    display: grid;
    justify-content: center;
}

.menu .title {
    font-weight: 700;
    font-size: 20px;
}

.menu .search-category-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 0.5rem;
}

.menu .second-row a.triangle {
    position: relative;
}

.menu .second-row a.triangle::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    transition: opacity 0.2s ease;
}

.menu .second-row a.triangle:hover::after {
    opacity: 1;
}

.menu .product-search-first-row {
    display: flex;
    gap: 3rem;
}

.menu .product-search-second-row {
    margin-top: 1rem;
}

.menu .child_menu .search-methods{
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-decoration:underline;
}

.menu .child_menu .search-methods a {
    color: #426599;
    font-weight: 400;
    width: 100%;
    padding: 0 1rem 0.5rem;
    height: auto;
}

.search-box input {
    padding: 0.5rem 1rem;
    margin: 0;
    width: 306px;
    height: 47px;
    margin-top: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border: 1px solid #E9E9E9;
}

.search-box button {
    width: 55.3px;
    height: 47px;
    background-color: #426599;
    border: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.menu .search-box img {
    width: 20px;
}

.menu .search-category a {
    color: #426599;
    margin-right: 3rem;
    font-weight: 400;
    font-size: 14px;
    text-decoration:underline;
    display: inline-block;
}

.menu .catalog-box-wrapper ,
.menu .showroom-box-wrapper ,
.menu .useful-info-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2rem;
}

.menu .useful-info-wrapper {
    grid-template-columns: repeat(4, 1fr);
}

.menu .useful-info-wrapper .bottom-row-wrap {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: auto;
}

.menu .catalog-box-wrapper a ,
.menu .showroom-box-wrapper a ,
.menu .useful-info-wrapper a ,
.menu .bottom-row-wrap a {
    width: 100%;
    height: auto;
    padding: 0 0 0.1rem;
    margin-top: 0;
    font-weight: 400;
    color: #426599;
    background-color: #fff;
    text-align: center;
    text-decoration: underline;
}

.menu .catalog-box-wrapper img ,
.menu .showroom-box-wrapper img ,
.menu .useful-info-wrapper img ,
.menu .bottom-row-wrap img {
    display: block;
    margin: 0;
    width: 211px;
    height: 128px;
} 


.custom-button {
    width: 131px;
    height: 30px;
    background-color: #426599;
    color: #fff;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    line-height: 30px;
    padding: 0;
    margin-top: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-button:hover {
    background-color: #668ABE;
}

/* 以下追加 */
main {
    margin: 8rem auto 3rem;
}

/* ぱんくずリスト（仮作成） */
.pankuzu {
    width: 100%;
    margin-bottom: 1rem;
}

.pankuzu ul {
    display: flex;
    list-style: none;
}

.pankuzu li {
    margin-right: 0.5rem;
    font-size: 12px;
}

/* 画像の仕様について */
#image-detail {
    width:100%;
    max-width: 1064px;
    height: auto;
    margin: auto;
    padding: 0 20px;
}

#image-detail img {
    margin-bottom: 1rem;
    width: 100%;
    height: auto;
}

#image-detail .image-detail-text {
    display: grid;
    grid-template-columns:repeat(2, 1fr);
    gap: 1rem;
}

#image-detail h1 {
    font-size: 24px;
}

#image-detail h2 {
    margin-bottom: 0;
    font-size: 24px;
}

#image-detail .back-button {
    width: 298px;
    height: 56px;
    background-color: #fff;
    border-radius: 8px;
    color: #222;
    font-size: 1rem;
    margin: 2rem auto;
}

#image-detail .back-button a {
    text-decoration: none;
    color: #222;
    border: 2px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-detail .back-button a:hover {
    color: #868686;
    border: 2px solid #868686;
}

#image-detail .form-button .back-button a,
#image-detail .form-button .back-home-button a{
    color: #222;
    text-decoration: none;
}

@media (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 header footer================ */
@media (max-width:1024px) {
main {
    margin: 4rem auto 3rem;
}

/* ぱんくずリスト（仮作成） */
.pankuzu {
    width: 100%;
    margin-bottom: 1rem;
}

.pankuzu ul {
    display: flex;
    list-style: none;
}

.pankuzu li {
    margin-right: 0.5rem;
    font-size: 12px;
}

/* 画像の仕様について */
#image-detail {
    width:100%;
    padding: 1rem;
    height: auto;
    margin: auto;
    padding: 20px 20px;
}

#image-detail img {
    margin-bottom: 1rem;
    width: 100%;
    height: auto;
}

#image-detail .image-detail-text {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

#image-detail h1 {
    margin-bottom: 14px;
    font-size: 16px;
    color: #4D4D4D;
}

#image-detail h2 {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 700;
}

#image-detail p {
    font-size: 14px;
}

#image-detail .back-button {
    width: 298px;
    height: 56px;
    background-color: #fff;
    border-radius: 8px;
    color: #222;
    font-size: 1rem;
    margin: 2rem auto;
}

#image-detail .back-button a {
    text-decoration: none;
    color: #222;
    border: 2px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-detail .back-button a:hover {
    color: #868686;
    border: 2px solid #868686;
}

#image-detail .form-button .back-button a,
#image-detail .form-button .back-home-button a{
    color: #222;
    text-decoration: none;
}
}