/* Mobile adaptation for homepage (CMS mirror) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe,
.bannerPic,
.slider img {
  max-width: 100%;
  height: auto;
}

.main.pagebox,
.pagebox,
.w_grid,
.p_gridbox,
.p_gridCell {
  max-width: 100%;
  box-sizing: border-box;
}

.main.pagebox {
  padding-top: 80px;
}

/* New self-built mobile menu (works without CDN/jQuery) */
.jike-mnav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000000;
  background: rgba(15, 23, 42, 0.48);
}
.jike-mnav-backdrop.is-on {
  display: block;
}
.jike-mnav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 340px);
  z-index: 2000001;
  background: #fff;
  transform: translateX(105%);
  transition: transform 0.28s ease;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
.jike-mnav.is-open {
  transform: translateX(0);
}
.jike-mnav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf5;
}
.jike-mnav__title {
  font-size: 15px;
  font-weight: 800;
  color: #0f2d5c;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.jike-mnav__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jike-mnav__list {
  display: flex;
  flex-direction: column;
  padding: 8px 0 24px;
  overflow-y: auto;
}
.jike-mnav__link {
  display: block;
  padding: 18px 20px;
  color: #0f2d5c;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  -webkit-tap-highlight-color: rgba(28, 73, 158, 0.12);
}
.jike-mnav__link:active {
  background: #eef3fb;
}
body.jike-nav-open {
  overflow: hidden !important;
}

@media (min-width: 769px) {
  .jike-mnav,
  .jike-mnav-backdrop,
  #navToggle {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .main.pagebox {
    padding-top: 64px;
  }

  #w_grid-1561342751720 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 100000 !important;
    background: #fff !important;
  }

  #w_grid-1561342751720 > div > .p_gridbox {
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    gap: 8px !important;
    position: relative !important;
  }

  #w_grid-1561342751720 > .w_grid,
  #w_grid-1561342751720 > div.w_grid {
    width: 100% !important;
  }

  #content_box-1561342751720-0 {
    width: auto !important;
    max-width: calc(100% - 56px) !important;
    height: auto !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    z-index: 1 !important;
  }

  #content_box-1561342751720-1 {
    width: auto !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    position: relative !important;
    z-index: 100001 !important;
    pointer-events: auto !important;
  }

  #content_box-1561342751720-2,
  #c_portalResSearch_total-16508699644553654 {
    display: none !important;
  }

  #w_fimg-1561342751732 {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .jike-brand-pair {
    height: 40px !important;
    gap: 6px !important;
  }

  .jike-brand-pair img,
  .jike-brand-jp,
  .jike-brand-jk {
    height: 40px !important;
    max-height: 40px !important;
  }

  .jike-brand-and {
    font-size: 18px !important;
  }

  header.header .nav,
  header.header .navbar_nav {
    display: none !important;
  }

  header.header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    min-width: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Hide broken CMS drawer */
  .m_nav {
    display: none !important;
  }

  #navToggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #1c499e !important;
    text-decoration: none !important;
    position: relative !important;
    z-index: 100002 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(28, 73, 158, 0.15);
    touch-action: manipulation;
    cursor: pointer !important;
    background: #eef3fb !important;
    border: 1px solid #c7d7f0 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  #navToggle .iconfont {
    display: none !important;
  }
  #navToggle::before {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    background: #1c499e;
    border-radius: 2px;
    box-shadow: 0 -6px 0 #1c499e, 0 6px 0 #1c499e;
  }

  .slider,
  .slider ul,
  .slider li,
  .slider a {
    max-width: 100% !important;
  }

  .bannerPic.bigpic {
    display: none !important;
  }

  .bannerPic.smallpic {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }

  .jike-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 8px 12px 28px !important;
  }

  .jike-product-card__body {
    padding: 12px !important;
  }

  .jike-product-card__name {
    font-size: 15px !important;
  }

  .jike-why {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .jike-why__inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .reset_style,
  .reset_style p,
  .reset_style span {
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
  }

  [style*="width:1200"],
  [style*="width: 1200"],
  [style*="width:1440"],
  [style*="width: 1440"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 420px) {
  .jike-product-grid {
    grid-template-columns: 1fr !important;
  }

  .jike-brand-pair img,
  .jike-brand-jp,
  .jike-brand-jk {
    height: 34px !important;
    max-height: 34px !important;
  }
}
