﻿/* ============================================
   姉川ブロック有限会社 - レスポンシブCSS
   対象: スマートフォン（?767px）/ タブレット（768px?1024px）
   ============================================ */

/* ---------- タブレット（768px?1024px） ---------- */

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .list-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    justify-content: space-between !important;
  }

  .list {
    width: calc(50% - 8px) !important;
    box-sizing: border-box !important;
  }

  /* ロゴを適度な大きさに */
  .home #logo {
    width: 180px !important;
  }

  /* お知らせバッジを表示 */
  #new dt {
    display: flex !important;
    width: 14em !important;
  }

  #new dt span {
    display: inline-block !important;
    width: 6em !important;
    background: #555 !important;
    color: #fff !important;
    font-size: 0.8em !important;
    text-align: center !important;
    margin-right: 1em !important;
    line-height: 1.8 !important;
  }

  #new dt span.icon-bg1 {
    background: #ff0000 !important;
  }

  #new dd {
    width: calc(100% - 14em) !important;
  }

  /* 両サイドに余白 */
  main {
    padding: 0 32px !important;
    box-sizing: border-box !important;
  }

  .bg1 {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 40px 32px !important;
    box-sizing: border-box !important;
  }

  /* ハンバーガーメニューを右に寄せる */
  #menubar_hdr {
    right: 10px !important;
  }

}










/* ---------- スマートフォン（?767px） ---------- */
@media screen and (max-width: 767px) {

  /* コンテナ */
  #container {
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  #contents {
    width: 100%;
    box-sizing: border-box;
  }

  /* ヘッダー・ロゴ（黒背景を正しくロゴに合わせる） */
  .home #logo {
    width: 140px !important;
    padding: 10px !important;
    background: rgba(0,0,0,0.5) !important;
    border-radius: 5px !important;
  }

  .home #logo img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* メインビジュアル */
  #mainimg-box,
  #mainimg {
    width: 100%;
    height: 220px;
  }

  /* セクション共通：左右均等な余白 */
  section {
    padding: 24px 16px;
    box-sizing: border-box;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* mainの余白をリセット */
  main {
    margin: 16px 0;
    padding: 0;
  }

  /* bg1（グレー背景セクション）の幅補正 */
  .bg1 {
    width: 100%;
    margin-left: 0;
    padding: 24px 16px;
    box-sizing: border-box;
  }

  /* h2 見出し */
  h2 {
    font-size: 20px;
    text-align: center;
  }

  h2 span {
    display: block;
    font-size: 12px;
    margin-top: 4px;
  }

  /* お知らせ */
  #new {
    padding: 0;
  }

  #new dt {
    font-size: 13px;
    flex-wrap: wrap;
    width: 100% !important;
    display: flex !important;
    align-items: flex-start;
    gap: 6px;
  }

  #new dd {
    font-size: 13px;
    margin-bottom: 12px;
    padding-left: 0;
    width: 100% !important;
  }

  /* お知らせ・新製品・重要バッジ */
  #new dt span {
    display: inline-block !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 3px !important;
    background: #555 !important;
    color: #fff !important;
    line-height: 1.6 !important;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  #new dt span.icon-bg1 {
    background: #ff0000 !important;
  }

  /* 販売製品 カードレイアウト → スマホは2列 */
  .list-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 0 !important;
    justify-content: space-between !important;
  }

  .list {
    width: calc(50% - 6px) !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .list figure {
    margin: 0;
  }

  .list figure img {
    width: 100%;
    height: auto;
    display: block;
  }

  .list .text {
    padding: 8px 4px;
  }

  .list .text h4 {
    font-size: 15px;
  }

  .list .text p {
    font-size: 13px;
  }

  .list .btn {
    text-align: center;
    margin: 8px 0;
  }

  .list .btn a {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
  }

  /* ご挨拶テキスト */
  section p {
    font-size: 14px;
    line-height: 1.8;
  }

  h3 {
    font-size: 16px;
  }

  /* 会社紹介画像 */
  .image-wrap {
    width: 100%;
    text-align: center;
  }

  .image-wrap img {
    max-width: 100%;
    height: auto;
  }

  .image-wrap .logo {
    max-width: 120px;
    margin-top: 10px;
  }

  /* フッター */
  footer {
    padding: 16px 10px;
  }

  #footermenu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 0 10px;
  }

  #footermenu li a {
    font-size: 14px;
  }

  .copy {
    text-align: center;
    font-size: 11px;
    line-height: 1.8;
  }

  .copy .pr {
    display: block;
    margin-top: 4px;
  }

  /* ハンバーガーメニュー位置調整 */
  #menubar_hdr {
    top: 10px;
    right: 5px !important;
    padding: 15px 5px !important;
    width: 60px !important;
  }

  /* メニュー内テキスト */
  #menubar nav ul li a {
    font-size: 15px;
    padding: 12px 16px;
  }

  /* テーブル横スクロール対応 */
  


.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

table {
    width: 100%;
}
}





/* ============================================
   PC表示：ヘッダー画像の両端余白を解消
   ============================================ */

/* トップページのヘッダーを画面幅いっぱいに */
.home header {
    width: 100%;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

.home #mainimg-box {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* mainの左右余白をヘッダー画像に影響させない */
.home main {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0;
    padding-right: 0;
}

/* product-name2 中央寄せ上書き */
.product-item2 .product-name2 {
    display: block !important;
    text-align: center !important;
    width: auto !important;
    min-height: auto !important;
    justify-content: unset !important;
    align-items: unset !important;
}

















