@charset "UTF-8";

/* ========================================================================== */
/* SUB_PAGE_HEADER (下層ヘッダー背景) */
/* ========================================================================== */
.sub_page_header { background-image: url("../images/products/sub_header_bg.jpg"); }


/* ========================================================================== */
/* PRODUCTS LAYOUT (製品案内セクション) */
/* ========================================================================== */
main .main_container section.products_section {
   padding: 0 80px;
}

/* 上部タイトルと説明文の左右レイアウト（worksの2カラム挙動を移植） */
.products_intro_flex {
   display: flex;
   align-items: flex-end;
   gap: 60px; /* タイトルと説明文の間のすき間 */
   margin-bottom: 60px;
}

/* 左側：セクションタイトル（装飾は common.css に任せ、幅の配置のみ指定） */
.products_intro_flex .section_title {
   flex-shrink: 0;
   margin: 0;
}

/* 右側：リードテキスト（worksの綺麗な行間と幅計算を移植） */
.products_intro_flex .intro_description {
   flex: 1;
   max-width: 640px; /* テキストが横に広がりすぎないように制限 */
   font-size: 16px;
   line-height: 2.125;
   color: #2B2B2B;
}



/* ========================================================================== */
/* PRODUCTS GRID (製品カード一覧) */
/* ========================================================================== */
/* 3カラムのグリッド配置 */
main .main_container section.products_section .points_grid {
   display: flex;
   flex-wrap: wrap;
   gap: 40px 3.134%;
   width: 100%;
   max-width: 1340px;
}

main .main_container section.products_section li {
   width: 31.244%;
   max-width: 418px; 
   aspect-ratio: 5 / 4;
   box-sizing: border-box;
}

/* カードの基本スタイル（比率保持と中央揃えに最適化） */
main .main_container section.products_section .points_card {
   position: relative; 
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;

   width: 100%;
   height: 100%;
   padding: 5.5% 3.95%;
   box-sizing: border-box;
   text-decoration: none; 

   overflow: hidden;
}

main .main_container section.products_section .points_card::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 1; /* 文字の後ろ */
   
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
   
   /* 各カードで指定したbackground-imageを引き継ぐ */
   background-image: inherit; 
   
   /* アニメーションの速度（0.6秒かけて滑らかに変化） */
   transition: transform 0.6s ease; 
}

/* 中のコンテンツ（文字やアイコンなど）を画像より前に出す */
main .main_container section.products_section .points_card > * {
   position: relative;
   z-index: 2; /* 画像（z-index: 1）より上に重ねる */
}

/* hover時に背景画像だけを拡大 */
main .main_container section.products_section .points_card:hover::before {
   transform: scale(1.05); /* 1.05倍の大きさに拡大 */
}

/* 各カードの背景画像指定 */
.extinguisher .points_card { background-image: url("../images/products/prod_extinguisher.jpg"); }
.porchpanel   .points_card { background-image: url("../images/products/prod_porchpanel.jpg"); }
.aed          .points_card { background-image: url("../images/products/prod_aed.jpg"); }
.guardpipe    .points_card { background-image: url("../images/products/prod_guardpipe.jpg"); }
.sanitizer    .points_card { background-image: url("../images/products/prod_sanitizer.jpg"); }
.stockpile    .points_card { background-image: url("../images/products/prod_stockpile.jpg"); }
.firehydrant  .points_card { background-image: url("../images/products/prod_firehydrant.jpg"); }
.custom       .points_card { background-image: url("../images/products/prod_custom.jpg"); }

/* カード内のコンテンツ全体の枠 */
main .main_container section.products_section .points_card .card_content {
   position: relative;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   height: 100%;
   text-align: center;
   z-index: 2;
   gap: clamp(10px, 1.5vw, 20px); 
}

/* --- ボタン全体のレスポンシブ化（最大幅281px、最大高さ55pxに調整） --- */
main .main_container section.products_section .points_card .custom-button {
   display: flex;
   align-items: center;
   flex-shrink: 0; /* 周りから圧迫されてもボタン自体が絶対に潰れないようにする */

   /* 【修正】border込みで最大幅281px、最大高さ55pxに制限し、画面幅に合わせて可変 */
   width: clamp(180px, 20vw, 281px);
   height: clamp(48px, 4.5vw, 55px);

   background-color: rgba(3, 2, 0, 0.55);
   border: 1px solid #FFF;
   box-sizing: border-box;
}

main .main_container section.products_section .points_card .custom-button .button-text {
   position: relative;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   height: 100%;
   
   /* 【修正】右側のボックス（最大55px）と同期した余白を確保 */
   padding-right: clamp(48px, 4.5vw, 55px);
   
   color: #FFF;
   font-size: clamp(14px, 1.8vw + 4px, 28px);
   font-weight: 700;
   box-sizing: border-box;
}

/* 矢印ボックスの「左側の縦線」を正方形にする設定 */
main .main_container section.products_section .points_card .custom-button .button-text::before {
   content: "";
   position: absolute;
   top: 0;
   right: 0;
   display: block;
   
   /* 【修正】横幅を「ボタンの高さ」と同じ最大55pxにすることで完全な正方形を作る */
   width: clamp(48px, 4.5vw, 55px);
   height: 100%;
   border-left: 1px solid #FFF;
}

/* 矢印アイコンの設定 */
main .main_container section.products_section .points_card .custom-button .button-text::after {
   content: "";
   position: absolute;
   top: 0;
   right: 0;
   display: block;
   
   /* 【修正】横幅を「ボタンの高さ」と同じ最大55pxに合わせる */
   width: clamp(48px, 4.5vw, 55px);
   height: 100%;

   mask-image: url("../images/icon_arrow_large.svg");
   mask-repeat: no-repeat;
   mask-position: center;
   mask-size: 46% 46%;
   background-color: #FFF;
   transition: mask-position 0.25s ease;
}

main .main_container section.products_section .points_card:hover .custom-button .button-text::after {
   mask-position: calc(50% + 18%) center;
}





/* ========================================================================== */
/* RESPONSIVE DESIGN (レスポンシブ対応) */
/* ========================================================================== */

/* タブレットサイズ用の調整（1024px以下） */
/* -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
   main .main_container section.products_section { padding: 0 20px; }
   
   /* worksの思想を移植：窮屈になる前に1024pxの時点で縦2段にゆったり配置 */
   .products_intro_flex {
      flex-direction: column;
      align-items: flex-start;
      gap: 20px;
      margin-bottom: 40px;
   }

   /* テキストが潰れないように最大幅の制限を解除 */
   .products_intro_flex .intro_description {
      max-width: 100%;
      font-size: 15px;
      line-height: 1.8;
   }

   /* 1024px〜769px まではご希望通り「3カラム」を綺麗に維持 */
}

/* スマートフォン・タブレット縦サイズ用の調整（768px以下） */
/* -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
   .pc_only { display: none !important; }
   
   main .main_container section.products_section { padding: 0 15px; }

   /* 見出しの直線を横幅100%に広げる設定 */
   .products_intro_flex .section_title {
      display: block; /* inline-blockを解除して横いっぱいに広げる */
      width: 100%;
   }
   .products_intro_flex .section_title .en {
      display: block; /* 100%幅で線を端まで伸ばす */
      width: 100%;
      box-sizing: border-box;
   }

   /* worksの思想を移植：左右余白を持たせて中央寄せ */
   main .main_container section.products_section .points_grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 15px;
      width: 100%;
      margin: 30px auto 0;
   }

   /* 【768pxで切り替え】3カラムから綺麗に揃う「2カラム（横2列）」に変更 */
   main .main_container section.products_section li {
      width: calc((100% - 15px) / 2); /* 隙間15pxを引いて半分に分ける */
      max-width: 100%; /* PC用の418px制限を確実に解除 */
      aspect-ratio: 5 / 4; /* きれいな比率を維持 */
   }
   
   /* 説明文の文字サイズや行間をスマホ向けに微調整 */
   .products_intro_flex .intro_description {
      font-size: 14px;
      line-height: 1.6;
   }

   /* 768px（2カラム）の時に、文字サイズに合わせてボタンの固定幅・高さを最適化 */
   main .main_container section.products_section .points_card .custom-button {
      width: clamp(160px, 40vw, 240px);
      height: 48px;
   }
   main .main_container section.products_section .points_card .custom-button .button-text {
      padding-right: 48px; /* 高さに合わせて右余白を48pxに固定 */
      font-size: clamp(13px, 3.5vw, 18px);
   }
   /* 右側のボックスの幅をすべて「48px」に上書きして正方形を維持 */
   main .main_container section.products_section .points_card .custom-button .button-text::before,
   main .main_container section.products_section .points_card .custom-button .button-text::after {
      width: 48px;
   }
}

/* 極小〜一般的なスマホサイズ用の調整（576px以下） */
/* -------------------------------------------------------------------------- */
@media screen and (max-width: 576px) {
   main .main_container section.products_section { padding: 0 15px; }

   /* worksの576pxの挙動に追随：確実に「1カラム（縦1列）」に切り替える */
   main .main_container section.products_section .points_grid {
      gap: 15px;
   }

   main .main_container section.products_section li {
      width: 100%; 
      max-width: 100%;
      aspect-ratio: 3 / 2; /* スマホ時は3:2のスタイリッシュな比率で自動可変にする */
   }

   main .main_container section.products_section .points_card {
      aspect-ratio: inherit; /* 親のliの3:2を引き継ぐ */
      padding: 5.5% 3.95%;   /* 綺麗な余白を維持 */
   }

   main .main_container section.products_section .points_card .card_content {
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
   }
   
   /* 1カラム（3:2）になった際、28pxのインパクトを残しつつ綺麗に収める調整 */
   main .main_container section.products_section .points_card .custom-button {
      width: min(80%, 240px); /* 画面の80%を超えない、かつ最大240px */
      height: 50px; /* スマホ向けに微調整 */
   }
   main .main_container section.products_section .points_card .custom-button .button-text {
      padding-right: 50px; /* 高さに合わせて右余白を50pxに固定 */
      font-size: clamp(15px, 5vw, 20px); /* 1行できれいに収まるサイズ感 */
   }
   /* 右側のボックスの幅をすべて「50px」に上書きして正方形を維持 */
   main .main_container section.products_section .points_card .custom-button .button-text::before,
   main .main_container section.products_section .points_card .custom-button .button-text::after {
      width: 50px;
   }

   /* 元からあったスタイル（維持） */
   main .main_container section.products_section li .prod_name {
      height: 48px;
      padding: 0 35px;
   }
   main .main_container section.products_section li .prod_name span {
      font-size: 14px;
   }
}
