@charset "UTF-8";

/* ---- サブページ共通（カタログ・動画など） ---- */

#catalog,
#video,
#discontinued {
  --section-color: var(--medix-blue-deep);
  --line-color: var(--medix-blue-deep);
}

#catalog .text_box,
#video .text_box,
#discontinued .text_box {
  position: relative;
  z-index: 2;
  max-width: 40em;
  margin: 0 auto 3em;
  padding: 0.5em 1em 0;
  text-align: center;
  line-height: 1.8;
}

#catalog .catalog_search {
  max-width: 36em;
  margin: 0 auto 2.5em;
}

#catalog .catalog_search_field {
  display: block;
}

#catalog .catalog_search_field input {
  display: block;
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid #ccc;
  border-radius: 0;
  font-size: 1em;
  line-height: 1.5;
}

#catalog .catalog_list_empty {
  padding: 3em 1.5em;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  text-align: center;
  color: #888;
  font-size: 0.95em;
  line-height: 1.8;
}

#catalog .catalog_list_empty[hidden],
#catalog .catalog_item[hidden] {
  display: none;
}

/* ---- カタログ一覧 ---- */

#catalog .catalog_list {
  --num: 4;
  --gap: 2em;
  gap: var(--gap);
}

#catalog .catalog_item {
  width: calc((100% - var(--gap) * (var(--num) - 1)) / var(--num));
  min-width: 0;
}

#catalog .catalog_link {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

#catalog .catalog_link .img_box {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #d8e4f2;
  box-shadow: 0 0.35em 1.2em rgba(0, 40, 100, 0.12);
  -webkit-transition: -webkit-transform 0.25s ease, box-shadow 0.25s ease;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#catalog .catalog_link .img_box img,
#catalog .catalog_link .img_box .img_placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#catalog .catalog_link .img_box .img_placeholder {
  background: -webkit-linear-gradient(135deg, #c8d8eb 0%, #e8eef5 100%);
  background: linear-gradient(135deg, #c8d8eb 0%, #e8eef5 100%);
}

#catalog .catalog_link .catalog_genre {
  position: absolute;
  left: 0;
  bottom: 0.75em;
  z-index: 1;
  padding: 0.45em 1em 0.45em 0.75em;
  border-radius: 0 99px 99px 0;
  color: #fff;
  font-size: 0.72em;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--medix-footer-accent);
}

#catalog .catalog_link:hover .img_box,
#catalog .catalog_link:focus-visible .img_box {
  -webkit-transform: translateY(-0.35em);
  transform: translateY(-0.35em);
  box-shadow: 0 0.65em 1.6em rgba(0, 40, 100, 0.18);
}

#catalog .catalog_title {
  display: block;
  margin: 1em 0 0;
  font-weight: 600;
  line-height: 1.6;
}

#catalog .catalog_mail_hint {
  display: block;
  margin: 0.35em 0 0;
  color: var(--theme-color, #1a5a9a);
  font-size: 0.82em;
  font-weight: 600;
}

#catalog .catalog_feedback {
  margin: 0 0 1.5em;
  padding: 0.85em 1em;
  border-radius: 4px;
  background: #e8f4ea;
  color: #1d5c2a;
}

#catalog .catalog_feedback.is_error {
  background: #fdecea;
  color: #a12622;
}

#catalog .catalog_feedback[hidden] {
  display: none;
}

/* ---- 医療従事者ゲート ---- */

/* sessionStorage トークンで再取得中は確認ダイアログを出さない */
html.medix_gate_hydrating .medix_gate {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.medix_gate_open {
  overflow: hidden;
}

/* 未認証のページゲート：背面のヘッダー／本文／フッターを見せない */
body.medix_page_gate_locked {
  background: #e8eef5;
}

/* opacity は使わない（親が 0 だと子のゲートも消える） */
body.medix_page_gate_locked > *:not(.medix_gate):not(script):not(style) {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.medix_page_gate_locked .medix_gate,
body.medix_page_gate_locked .medix_gate * {
  visibility: visible !important;
  pointer-events: auto !important;
}

body.medix_page_gate_locked .medix_gate {
  z-index: 10000;
}

.medix_gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
}

.medix_gate_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 70, 0.55);
}

/* ページ入場ゲートは背面透過なし（コンテンツ不可視） */
body.medix_page_gate_locked .medix_gate_overlay,
.medix_gate_page .medix_gate_overlay {
  background: #e8eef5;
  cursor: default;
}

.medix_gate_panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  margin: 4vh auto;
  padding: 2.5em 2em 2em;
  background: #fff;
  border-radius: 0.35em;
  box-shadow: 0 1em 3em rgba(0, 0, 0, 0.2);
}

.medix_gate_close {
  position: absolute;
  top: 0.5em;
  right: 0.65em;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.medix_gate_title {
  margin: 0 0 0.75em;
  font-size: 1.35em;
  text-align: center;
  color: var(--medix-blue-deep);
}

.medix_gate_text {
  margin: 0 0 1.5em;
  line-height: 1.8;
  text-align: center;
}

.medix_gate_field {
  margin: 0 0 0.9em;
}

.medix_gate_label {
  display: block;
  margin: 0 0 0.35em;
  font-weight: 600;
}

.medix_gate_label .req {
  color: #c0392b;
  font-size: 0.8em;
  font-weight: 400;
  margin-left: 0.35em;
}

.medix_gate_input {
  display: block;
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid #ccc;
  border-radius: 0.25em;
  box-sizing: border-box;
}

.medix_gate_textarea {
  min-height: 4.5em;
  resize: vertical;
  line-height: 1.6;
  font: inherit;
}

.medix_gate_error {
  margin: 0.75em 0 0;
  color: #c0392b;
  font-size: 0.9em;
}

.medix_gate_ok {
  margin: 0.75em 0 0;
  color: #1a7a4c;
  font-size: 0.9em;
}

.medix_gate_hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.medix_gate_actions {
  margin: 1.5em 0 0;
  text-align: center;
}

.medix_gate_btn {
  display: inline-block;
  min-width: 8em;
  padding: 0.75em 1.5em;
  border: 1px solid var(--medix-blue-deep);
  border-radius: 99px;
  background: #fff;
  color: var(--medix-blue-deep);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.medix_gate_btn_primary {
  background: var(--medix-blue-deep);
  color: #fff;
}

/* ---- 製品動画 ---- */

#video .video_genre {
  margin: 0 0 4.5em;
}

#video .video_genre_title {
  position: relative;
  display: inline-block;
  margin: 0 0 1.75em;
  padding: 0.5em 1.25em 0.5em 0.85em;
  border-bottom: none;
  border-radius: 0 99px 99px 0;
  background: var(--medix-blue-deep);
  color: #fff;
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.4;
}

#video .video_list {
  --num: 3;
  --gap: 2em;
  gap: var(--gap);
}

#video .video_item {
  width: calc((100% - var(--gap) * (var(--num) - 1)) / var(--num));
  min-width: 0;
}

#video .video_card {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 0.35em;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  box-shadow: 0 0.2em 1em rgba(0, 40, 100, 0.1);
  -webkit-transition: -webkit-transform 0.25s ease, box-shadow 0.25s ease;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#video .video_card:hover,
#video .video_card:focus-visible {
  -webkit-transform: translateY(-0.35em);
  transform: translateY(-0.35em);
  box-shadow: 0 0.55em 1.5em rgba(0, 40, 100, 0.16);
}

#video .video_card .img_box {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #d8e4f2;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

#video .video_card .img_box img,
#video .video_card .img_box .img_placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-transition: -webkit-transform 0.35s ease;
  transition: transform 0.35s ease;
}

#video .video_card:hover .img_box img,
#video .video_card:focus-visible .img_box img {
  -webkit-transform: scale(1.04);
  transform: scale(1.04);
}

#video .video_card .img_box .img_placeholder {
  background: -webkit-linear-gradient(135deg, #c8d8eb 0%, #e8eef5 100%);
  background: linear-gradient(135deg, #c8d8eb 0%, #e8eef5 100%);
}

#video .video_play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 3.5em;
  height: 3.5em;
  margin: -1.75em 0 0 -1.75em;
  border-radius: 50%;
  background: rgba(128, 148, 221, 0.88);
  box-shadow: 0 0.15em 0.65em rgba(0, 30, 70, 0.25);
  -webkit-transition: -webkit-transform 0.25s ease, background 0.25s ease;
  transition: transform 0.25s ease, background 0.25s ease;
}

#video .video_card:hover .video_play,
#video .video_card:focus-visible .video_play {
  -webkit-transform: scale(1.08);
  transform: scale(1.08);
  background: #e86162;
  background: var(--medix-footer-accent);
}

#video .video_play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.55em 0 0.55em 0.95em;
  border-color: transparent transparent transparent #fff;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#video .video_title {
  display: block;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  padding: 1em 1.1em 1.25em;
  line-height: 1.65;
  font-weight: 600;
  font-size: 0.95em;
  color: var(--medix-blue-deep);
}

/* ---- 生産終了製品 ---- */

#discontinued .discontinued_search {
  max-width: 36em;
  margin: 0 auto 2.5em;
}

#discontinued .discontinued_search_field {
  display: block;
}

#discontinued .discontinued_search_field input {
  display: block;
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid #ccc;
  border-radius: 0;
  font-size: 1em;
  line-height: 1.5;
}

#discontinued .discontinued_list_empty {
  padding: 3em 1.5em;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  text-align: center;
  color: #888;
  font-size: 0.95em;
  line-height: 1.8;
}

#discontinued .discontinued_list_empty[hidden],
#discontinued .discontinued_item[hidden],
#discontinued .discontinued_genre[hidden] {
  display: none;
}

#discontinued .discontinued_genre {
  margin: 0 0 3em;
}

#discontinued .discontinued_genre:last-child {
  margin-bottom: 0;
}

#discontinued .discontinued_genre_title {
  margin: 0 0 0.85em;
  padding: 0 0 0.45em;
  border-bottom: 2px solid var(--medix-blue-deep, #8094dd);
  color: var(--medix-blue-deep, #8094dd);
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.4;
}

#discontinued .discontinued_list {
  margin: 0;
  padding: 0 0 0 1.35em;
  list-style: disc;
}

#discontinued .discontinued_item {
  margin: 0;
  padding: 0.35em 0;
  line-height: 1.7;
}

#discontinued .discontinued_title {
  font-weight: 600;
}

#discontinued .discontinued_code {
  margin-left: 0.6em;
  color: #666;
  font-size: 0.9em;
}

/* ---- 動画モーダル ---- */

body.medix_video_open {
  overflow: hidden;
}

.medix_video_modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.medix_video_overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 50, 0.7);
}

.medix_video_panel {
  position: relative;
  width: min(94vw, 960px);
  margin: 6vh auto 0;
  padding: 2em 1.5em 1.5em;
  background: #fff;
  border-radius: 0.35em;
}

.medix_video_close {
  position: absolute;
  top: 0.35em;
  right: 0.5em;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.medix_video_modal_title {
  margin: 0 0 1em;
  font-size: 1.1em;
  line-height: 1.5;
}

@media screen and (max-width: 768px) {

  #catalog .catalog_list,
  #video .video_list {
    --num: 2;
  }
}

@media screen and (max-width: 480px) {

  #catalog .catalog_list,
  #video .video_list {
    --num: 1;
  }

  .medix_gate_panel {
    margin-top: 3vh;
    padding: 2em 1.25em 1.5em;
  }
}
