/* ===============================
取扱機器ページ
=============================== */
.products__contents {
  margin-top: 6rem;

  @media screen and (min-width: 960px) {
    display: grid;
    grid-template-columns: calc(30rem / 115.2rem * 100%) 1fr;
    gap: calc(4rem / 115.2rem * 100%);
  }
}

.products .mainView__heading__eg {
  width: 26.423rem;

  @media screen and (min-width: 960px) {
    width: 30.337rem;
  }
}

/* ===============================
サイドバー
=============================== */
.sidebar {
  border-radius: 1rem;
  border: 0.1rem solid #dfdfdf;
  overflow: hidden;

  @media screen and (min-width: 960px) {
    align-self: start;
  }
}

.sidebar__title {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--color-secondary);
  position: relative;
}

.sidebar__title__buttonWrap {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);

  @media screen and (min-width: 960px) {
    display: none;
  }
}

.sidebar__title__button {
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--color-primary);
  border-radius: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.sidebar__title__button span {
  width: 2.227rem;
  height: 0.2rem;
  background-color: var(--color-secondary);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s;
}

.sidebar__title__buttonWrap.is-open
  .sidebar__title__button
  span:nth-of-type(1) {
  transform: translate(-50%, -50%) rotate(-90deg);
}

.sidebar__nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.sidebar__nav.is-open {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

@media screen and (min-width: 960px) {
  .sidebar__nav {
    max-height: none !important;
    overflow: visible !important;
  }
}

.sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar__item {
  border: 0.1rem solid #d9d9d9;
}

.sidebar__button {
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  height: 7rem;
}

.sidebar__button__image {
  width: calc(11rem / 34.1rem * 100%);
  height: 7rem;
  padding: 0.5rem 1.5rem 0.5rem 0;
  position: relative;
  z-index: 1;
}

.sidebar__button__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar__button__text {
  width: calc(26.5rem / 33rem * 100%);
  height: 7rem;
  padding-right: 5rem;
  padding-left: 9.09%;
  margin-left: -9.09%;
  background-color: #f7f7f7;
  text-align: right;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  clip-path: polygon(13% 0, 100% 0%, 100% 100%, 0% 100%);

  @media screen and (min-width: 960px) {
    padding-right: 17%;
  }

  @media screen and (min-width: 1200px) {
    padding-right: 15.15%;
  }
}

.sidebar__button__text::after {
  width: 2.6rem;
  height: 2.6rem;
  position: absolute;
  top: 50%;
  right: 1.6rem;
  transform: translateY(-50%);
  content: "";
  background-image: url(../../images/common/round-arrow-black.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  @media screen and (min-width: 960px) {
    right: 6.04%;
  }
}

.sidebar__button__text::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  transform: translateX(101%);
  background-color: var(--color-secondary);
  transition: all 0.3s ease;
}

.sidebar__button.is-active .sidebar__button__text::before {
  transform: translateX(0);
}

.sidebar__button.is-active .sidebar__button__text::after {
  transform: translateY(-50%) rotate(180deg);
  background-image: url(../../images/common/round-arrow-white.svg);
}

@media (hover: hover) {
  .sidebar__button:hover {
    opacity: 1;
  }

  .sidebar__button:hover .sidebar__button__text::before {
    transform: translateX(0);
  }

  .sidebar__button:hover .sidebar__button__text::after {
    transform: translateY(-50%) rotate(180deg);
    background-image: url(../../images/common/round-arrow-white.svg);
  }

  .sidebar__button:hover .sidebar__button__text {
    background-color: #f0f0f0;
    border-color: #999;
  }
}

/* ===============================
メインエリア
=============================== */
.items {
  margin-top: 6rem;

  @media screen and (min-width: 960px) {
    margin-top: initial;
  }
}

.items__main {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;

  @media screen and (min-width: 960px) {
    flex-direction: row;
    gap: 2.2rem;
  }
}

.items__main__content {
  @media screen and (min-width: 960px) {
    width: calc(39.2rem / 81rem * 100%);
  }
}

.items__main__image {
  width: 100%;
  aspect-ratio: 343 / 203;
  border-radius: 2rem;
  border: 0.1rem solid #dfdfdf;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 23.5rem;

  @media screen and (min-width: 960px) {
    width: calc(39.7rem / 81rem * 100%);
    aspect-ratio: 397 / 235;
  }
}

.items__onImage {
  background-color: #9d9797;
}

.items__main__image img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

.items__main__description {
  margin-top: 2.4rem;

  @media screen and (min-width: 960px) {
    margin-top: 1.6rem;
  }
}

.items__main__button {
  margin-top: 4rem;

  @media screen and (min-width: 960px) {
    max-width: 18rem;
    margin-top: 3.2rem;
  }
}

.products .baseButton__blue--right:after {
  width: 1.5rem;
  height: 2rem;
  transform: translateY(-50%) rotate(0);
  content: url(../../images/common/icon-pdf.svg);
}

.items__list {
  margin-top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 5rem;

  @media screen and (min-width: 960px) {
    margin-top: 8rem;
    gap: 8rem;
  }
}

.products-main__category:last-child {
  margin-bottom: 0;
}

.item__category__title {
  margin-bottom: 2.4rem;
}

.item__card__list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;

  @media screen and (min-width: 960px) {
    display: grid;
    grid-template-columns: repeat(3, calc(25.4rem / 81rem * 100%));
    gap: 2.4rem;
  }
}

.item__section {
  margin-top: 6rem;

  @media screen and (min-width: 960px) {
    margin-top: 8rem;
  }
}

.item__card {
  width: 100%;
  border: 1px solid #dfdfdf;
  border-radius: 1.355rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;

  @media screen and (min-width: 960px) {
    border-radius: 1rem;
    aspect-ratio: 254 / 244;
  }
}

@media (hover: hover) {
  .item__card:hover {
    box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.1);
    transform: translateY(-0.4rem);
  }
}

.item__card__image {
  width: 100%;
  aspect-ratio: 252 / 180;
  position: relative;
}

.item__card__image img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.item__card__head {
  background-color: var(--color-primary);
  padding: 2.7rem 7.55rem 2.7rem 2.4rem;
  position: relative;
  z-index: 1;

  @media screen and (min-width: 960px) {
    padding: 5.9% 22% 5.9% 7.1%;
  }
}

.item__card__head::after {
  width: 3.5rem;
  height: 3.5rem;
  position: absolute;
  top: 50%;
  right: 2.4rem;
  transform: translateY(-50%);
  content: "";
  background-image: url(../../images/common/round-arrow-black.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  @media screen and (min-width: 960px) {
    width: 2.6rem;
    height: 2.6rem;
  }
}

.product-card__no-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

/* ===============================
モーダル
=============================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 0;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(51, 51, 51, 0.7);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background-color: #fff;
  border-radius: 2rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 4rem 1.6rem;
  margin: 5vh auto;
  z-index: 102;

  @media screen and (min-width: 960px) {
    padding: 8rem;
    border-radius: 4rem;
  }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;

  @media screen and (min-width: 960px) {
    right: 4rem;
    width: 4rem;
    height: 4rem;
  }
}

.modal__title {
  margin-bottom: 3.2rem;
}

.modal__image {
  width: 100%;
  aspect-ratio: 311 / 184;
  object-fit: contain;
  border-radius: 2rem;
  margin-bottom: 4rem;
  border: 0.1rem solid rgba(223, 223, 223, 1);

  @media screen and (min-width: 960px) {
    width: calc(397 / 1120 * 100%);
    aspect-ratio: 397 / 235;
    margin-bottom: 6rem;
  }
}

.modal__section {
  margin-bottom: 3.2rem;
}

.modal__section__title {
  margin-bottom: 3.2rem;
}

.modal__table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal__table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.modal__table th,
.modal__table td {
  padding: 2rem 1.6rem;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  border-left: none;
  border-right: none;
}

.modal__table td {
  background-color: #fff;
  min-width: 120px;
}

.modal__table tbody tr:first-child th,
.modal__table tbody tr:first-child td {
  background-color: var(--color-secondary) !important;
}

.modal__table tbody tr th {
  background-color: #f7f7f7;
}

.modal__notes {
  margin-bottom: 4rem;
}

.modal__actions {
  margin-top: 3rem;
}

.modal__button {
  @media screen and (min-width: 960px) {
    width: 30.7rem;
    margin: 6rem auto 0;
  }
}

.modal__noData {
  text-align: center;
  padding: 2.5rem 0;

  @media screen and (min-width: 960px) {
    padding: 1.5rem 0;
  }
}

.item__card--no-modal {
  cursor: default;
  opacity: 0.6;
  pointer-events: none;
}

@media (hover: hover) {
  .item__card--no-modal:hover {
    transform: none;
    box-shadow: none;
  }
}
