@import "./reset.css";

/* ===================================
   Variables
=================================== */
:root {
  --color-text: #333333;
  --color-bg: #ffffff;
  --font-family-base: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;

  --pc-width: 1200px;
  --sp-width: 780px;
}

/* ===================================
   Base
=================================== */
html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 1.6rem;
  line-height: 1.6;
}

a {
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* ===================================
   PC / SP 出し分け
   781px以上 = PC / 780px以下 = SP
=================================== */
.pc-only {
  display: block;
}
.sp-only {
  display: none;
}

img.pc-only {
  display: block !important;
}
img.sp-only {
  display: none !important;
}

@media screen and (max-width: 780px) {
  .pc-only {
    display: none !important;
  }
  .sp-only {
    display: block !important;
  }
  img.pc-only {
    display: none !important;
  }
  img.sp-only {
    display: block !important;
  }
}

/* ===================================
   Layout
=================================== */
.l-wrap {
  width: 100%;
  overflow: hidden;
}

.l-inner {
  max-width: var(--pc-width);
  margin: 0 auto;
}

@media screen and (max-width: 780px) {
  .l-inner {
    max-width: 100%;
    width: 100%;
  }
}

.l-section {
  position: relative;
  width: 100%;
}

.l-section + .l-section {
  margin-top: 40px;
}

.sec-voice + .sec-problem {
  margin-top: 0;
}

@media screen and (max-width: 780px) {
  .l-section + .l-section {
    margin-top: 24px;
  }

  .sec-voice + .sec-problem {
    margin-top: 0;
  }
}

.l-section img {
  display: block;
  width: 100%;
  height: auto;
}

/* 画像がキャンバス幅(780/1200)に満たない場合、中央揃え＋左右余白にする */
.l-section img.inset {
  width: var(--img-w, 100%);
  margin: 0 auto;
}

/* ===================================
   画像上のリンクオーバーレイ
=================================== */
.img-link-wrap {
  position: relative;
}

.img-link-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.img-link-wrap.inset {
  width: var(--img-w, 100%);
  margin: 0 auto;
}

/* PCラッパーは上限幅(1200pxまたは個別指定幅)で等倍固定。780〜上限幅の間は見切れる */
.img-link-wrap.pc-only {
  width: var(--img-w, 1200px);
  margin: 0 auto;
}

.img-link {
  position: absolute;
  display: block;
  cursor: pointer;
}

@media screen and (min-width: 781px) {
  .img-link {
    transition: background-color 0.2s ease;
  }

  .img-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }
}

/* タブレット幅(601〜780px)では電話タップを無効化。600px以下のスマホのみ有効 */
@media screen and (min-width: 601px) and (max-width: 780px) {
  .img-link--tel {
    pointer-events: none;
  }
}

/* PCは1200px(または個別指定幅)で等倍固定・中央揃え。
   画面が上限より大きい場合は左右が余白になり、780〜上限幅の間は見切れる */
.l-section img.pc-only {
  width: var(--img-w, 1200px);
  max-width: none;
  margin: 0 auto;
}

/* ===================================
   FAQ Accordion
=================================== */
:root {
  --faq-green: #426f0d;
}

.faq {
  max-width: var(--pc-width);
  margin: 0 auto;
  padding: 0 20px;
}

.faq__title {
  text-align: center;
  font-size: 4.8rem;
  font-weight: bold;
  color: var(--faq-green);
  margin-bottom: 40px;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.faq__item {
  border: 1px solid var(--faq-green);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.faq__question {
  position: relative;
  display: block;
  width: 100%;
  padding: 20px 56px 20px 24px;
  text-align: left;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.5;
  background: var(--faq-green);
  color: #ffffff;
}

.faq__question::before {
  content: "Q";
  margin-right: 12px;
  font-weight: 900;
}

.faq__question::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s ease;
}

.faq__question[aria-expanded="true"]::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  background: #ffffff;
}

.faq__answer[data-open="true"] {
  grid-template-rows: 1fr;
}

.faq__answer-inner {
  overflow: hidden;
}

.faq__answer-text {
  padding: 20px 24px 24px;
  font-size: 1.6rem;
  line-height: 1.8;
  color: #333333;
}

.faq__answer-text::before {
  content: "A";
  margin-right: 12px;
  font-weight: 900;
  color: var(--faq-green);
}

@media screen and (max-width: 780px) {
  .faq {
    padding: 0 16px;
  }

  .faq__title {
    font-size: 2.4rem;
    margin-bottom: 24px;
  }

  .faq__list {
    gap: 16px;
  }

  .faq__question {
    padding: 16px 44px 16px 16px;
    font-size: 1.5rem;
  }

  .faq__question::after {
    right: 16px;
  }

  .faq__answer-text {
    padding: 16px 16px 20px;
    font-size: 1.4rem;
  }
}

/* ===================================
   商品詳細
=================================== */
.product-detail {
  max-width: var(--pc-width);
  margin: 0 auto;
  padding: 0 20px;
}

.product-detail__title {
  text-align: center;
  font-size: 4.8rem;
  font-weight: bold;
  color: #111111;
  margin-bottom: 40px;
}

.product-detail__table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dddddd;
  font-size: 1.6rem;
  color: #111111;
}

.product-detail__table th,
.product-detail__table td {
  border: 1px solid #dddddd;
  padding: 20px 24px;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
  font-size: 1.6rem;
  color: #111111;
}

.product-detail__table th {
  width: 260px;
  background: #f5f5f5;
  font-weight: bold;
  white-space: nowrap;
}

.product-detail__table td {
  white-space: pre-line;
  background: #ffffff;
}

@media screen and (max-width: 780px) {
  .product-detail {
    padding: 0 16px;
  }

  .product-detail__title {
    font-size: 2.4rem;
    margin-bottom: 24px;
  }

  .product-detail__table,
  .product-detail__table tbody,
  .product-detail__table tr,
  .product-detail__table th,
  .product-detail__table td {
    display: block;
    width: 100%;
  }

  .product-detail__table {
    border: 0;
  }

  .product-detail__table th {
    white-space: normal;
    border-bottom: 0;
  }

  .product-detail__table td {
    border-top: 0;
  }

  .product-detail__table tr {
    margin-bottom: 16px;
  }

  .product-detail__table th,
  .product-detail__table td {
    padding: 14px 16px;
    font-size: 1.4rem;
  }
}
