/* ============================================================
   Instruction Manuals Page Styles  (p-instruction-*)
   ============================================================ */

/* ---- Page Head ---- */
.p-instruction-head {
  padding-block: 4.5rem 3rem;
}

/* ---- Search Results Head (JS挿入) ---- */
.p-instruction-results-head {
  padding-block: 4.5rem 3rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-results-head {
    padding-block: 2.5rem 1.5rem;
  }
}

.p-instruction-results-head__title {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700;
  font-size: 3.625rem;
  color: var(--color-primary);
  line-height: 1;
  margin-block-end: 0.75rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-results-head__title {
    font-size: 2.625rem;
  }
}

.p-instruction-results-head__term {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 400;
  font-size: 4.375rem;
  line-height: 1.1;
  color: var(--color-text);
  margin-block: 2rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-results-head__term {
    font-size: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .p-instruction-head {
    padding-block: 2.5rem 1.5rem;
  }
}

.p-instruction-head__title {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-weight: 700;
  font-size: 3.625rem;
  color: var(--color-primary);
  line-height: 1;
  margin-block-end: 1.25rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-head__title {
    font-size: 2.625rem;
    text-align: center;
  }
}

@media screen and (max-width: 768px) {
  .p-instruction-results-head__term {
    text-align: center;
  }
}

.p-instruction-head__desc {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--color-text);
  max-width: 78.75rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-head__desc {
    font-size: 1rem;
  }
}

/* ---- Search ---- */
.p-instruction-search {
  margin-block-end: 3rem;
}

.p-instruction-search__label {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 1.375rem;
  margin-block-end: 0.625rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-search__label {
    font-size: 1rem;
  }
}

.p-instruction-search__field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 47.25rem;
  height: 4.5rem;
  padding-inline: 1.25rem;
  border: 1px solid var(--color-text);
}

@media screen and (max-width: 768px) {
  .p-instruction-search__field {
    height: 3.3125rem;
    max-width: 100%;
  }
}

.p-instruction-search__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.p-instruction-search__icon img {
  width: 1.5rem;
  height: 1.5rem;
}

.p-instruction-search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 1.375rem;
  color: var(--color-text);
  appearance: none;
}

.p-instruction-search__input::placeholder {
  color: #b9b9b9;
}

@media screen and (max-width: 768px) {
  .p-instruction-search__input {
    font-size: 1rem;
  }
}

/* hide browser default search clear button */
.p-instruction-search__input::-webkit-search-cancel-button {
  display: none;
}

/* ---- Section Bar (shared with parts-list, re-declared here) ---- */
.p-parts-list-section-bar {
  display: flex;
  align-items: stretch;
  height: 3.9375rem;
  margin-block-end: 2rem;
  background: rgba(217, 217, 217, 0.5);
}

@media screen and (max-width: 768px) {
  .p-parts-list-section-bar {
    height: 3.25rem;
    margin-block-end: 1.5rem;
  }
}

.p-parts-list-section-bar__primary {
  display: flex;
  align-items: center;
  padding-inline: 2.1875rem;
  background: #d71819;
  color: #fff;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1;
  white-space: nowrap;
}

@media screen and (max-width: 768px) {
  .p-parts-list-section-bar__primary {
    font-size: 1.125rem;
    padding-inline: 0.9375rem;
  }
}

/* ---- Panel (section bar + table wrapper) ---- */
.p-instruction-panel {
  margin-block-end: 9.5rem;
}

.p-instruction-panel:last-of-type {
  margin-block-end: 2.5rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-panel {
    margin-block-end: 3rem;
  }
}

/* ---- Table ---- */
.p-instruction-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #c3c3c3;
}

/* header/row を透過させ全セルをグリッド直下に */
.p-instruction-table__header,
.p-instruction-table__row {
  display: contents;
}

/* ヘッダーセル */
.p-instruction-table__header .p-instruction-table__col-title,
.p-instruction-table__header .p-instruction-table__col-products {
  background: #ececec;
  padding: 1.125rem 1.5rem;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.44;
  letter-spacing: 0.0625rem;
  border-block-end: 1px solid #c3c3c3;
}

/* データセル */
.p-instruction-table__row .p-instruction-table__col-title,
.p-instruction-table__row .p-instruction-table__col-products {
  padding: 1.5rem;
}

/* 縦区切り（左列の右ボーダー） */
.p-instruction-table__header .p-instruction-table__col-title,
.p-instruction-table__row .p-instruction-table__col-title {
  border-inline-end: 1px solid #c3c3c3;
}

/* 取説名セル内リンクを縦中央揃え */
.p-instruction-table__row .p-instruction-table__col-title {
  display: flex;
  align-items: center;
}

/* ---- SP: 1列 + 並び替え ---- */
@media screen and (max-width: 768px) {
  .p-instruction-table {
    grid-template-columns: 1fr;
  }

  /* 取説名ヘッダー → 取説リンク → 該当商品ヘッダー → 該当商品 */
  .p-instruction-table__header .p-instruction-table__col-title   { order: 1; }
  .p-instruction-table__row    .p-instruction-table__col-title   { order: 2; }
  .p-instruction-table__header .p-instruction-table__col-products { order: 3; }
  .p-instruction-table__row    .p-instruction-table__col-products { order: 4; }

  /* 縦区切り解除 */
  .p-instruction-table__header .p-instruction-table__col-title,
  .p-instruction-table__row    .p-instruction-table__col-title {
    border-inline-end: none;
  }

  /* col-title の下に境界線（該当商品ヘッダーとの区切り） */
  .p-instruction-table__row .p-instruction-table__col-title {
    border-block-end: 1px solid #c3c3c3;
  }

  /* ヘッダーセルのSP調整 */
  .p-instruction-table__header .p-instruction-table__col-title,
  .p-instruction-table__header .p-instruction-table__col-products {
    font-size: 1rem;
    padding: 0.875rem 1rem;
    text-align: center;
  }

  /* データセルのSP調整 */
  .p-instruction-table__row .p-instruction-table__col-title,
  .p-instruction-table__row .p-instruction-table__col-products {
    padding: 1rem;
  }
}

/* ---- Manual link ---- */
.p-instruction-manual-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.44;
  letter-spacing: 0.0625rem;
  color: #da1b1c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.p-instruction-manual-link:hover {
  opacity: 0.75;
}

.p-instruction-manual-link img {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  position: relative;
  top: 0.125rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-manual-link {
    font-size: 1rem;
    text-align: center;
    justify-content: center;
  }
}

/* ---- Model list ---- */
.p-instruction-models {
  list-style: disc;
  padding-inline-start: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
}

.p-instruction-models__item {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.44;
  letter-spacing: 0.0625rem;
}

@media screen and (max-width: 768px) {
  .p-instruction-models__item {
    font-size: 1rem;
  }
}
