:root {
  --c: #0b6be6;
  --text: #111;
  --muted: #6b7280;
  --bg: #fff;
  --gap: 24px;
}

/* ==============================
   ベース設定
============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fafafa;
  line-height: 1.65;
}

html,
body {
  height: 100%;
  overscroll-behavior: none;
  touch-action: pan-y;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ==============================
   Header
============================== */

.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 9999;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

/* 左側：ロゴ + 社名 */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  height: 62px;
  width: auto;
}

.logo a {
  display: inline-block;
  line-height: 1;
}

/* --- 社名を横並びにして改行しない --- */
.header-company {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* メイン社名（エンリス商事） */
.company-name-main {
  font-size: 26px;
  font-weight: 700;
  font-family: 'Shippori Mincho', serif;
}

/* 株式会社 は小さめ */
.company-name-sub {
  font-size: 14px;
  color: #444;
  margin-top: 2px;
}

/* PC ナビゲーション */
.desktop-nav .menu {
  display: flex;
  gap: 42px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav .menu > li {
  position: relative;
}

.desktop-nav .menu > li > a {
  display: inline-block;
  font-size: 22px;
  font-weight: 600;
  color: #1f2937;
  transition: opacity 0.3s ease;
}

.desktop-nav .menu > li > a:hover {
  opacity: 0.7;
}

/* PC お問い合わせボタン */
.cta,
.desktop-cta,
.mobile-cta {
  background: #1f3349;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.desktop-cta {
  padding: 12px 28px;
  font-size: 24px;
  font-weight: 700;
}

.cta:hover,
.desktop-cta:hover,
.mobile-cta:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* サブメニュー（PC） */
.desktop-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  min-width: 180px;
  z-index: 100;
}

.desktop-nav .menu > li:hover > .sub-menu {
  display: block;
}

.desktop-nav .sub-menu li {
  padding: 6px 18px;
}

.desktop-nav .sub-menu a {
  display: block;
  color: #333;
  font-size: 14px;
  transition: background 0.3s, color 0.3s;
}

.desktop-nav .sub-menu a:hover {
  background: #f2f5fb;
  color: #0b6be6;
}

/* ハンバーガー（PCでは非表示） */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  width: 34px;
  height: 30px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #111;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ハンバーガー開閉アニメーション */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* モバイルナビ（共通） */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  text-align: center;
  padding: 80px 0 40px;
  z-index: 1000;
  overflow-y: auto;
}

.mobile-nav.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

.mobile-menu,
.mobile-menu ul,
.mobile-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu > li {
  margin: 6px 0;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #111;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.mobile-menu a:hover {
  background: #f2f5fb;
  color: var(--c);
}

/* モバイル第二階層 */
.mobile-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0 6px;
}

.mobile-menu .sub-menu li {
  margin: 4px 0;
}

.mobile-menu .sub-menu a {
  font-size: 0.9rem;
  font-weight: 400;
  color: #444;
  padding: 6px 0;
}

.mobile-menu .sub-menu a:hover {
  color: var(--c);
  opacity: 0.8;
}

/* モバイル閉じるボタン */
.mobile-close {
  position: fixed;
  top: 18px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #111;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1003;
}

.mobile-cta {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
}

/* ============================================
   タブレット最適化（781px〜1024px）
   PCレイアウト維持 + 文字縮小 + ロゴ比率維持
============================================ */
@media (min-width: 781px) and (max-width: 1180px) {

  /* ---- ロゴ（比率維持で小さく） ---- */
  .site-logo {
    max-height: 46px;      /* ここ！縦長を防ぐ */
    height: auto;          /* 自然比率 */
    width: auto;           /* 横方向自由に */
  }

  /* ---- 社名 ---- */
  .company-name-main {
    font-size: 18px;        /* もっと小さく */
  }
  .company-name-sub {
    font-size: 11px;
  }

  /* ---- メニュー ---- */
  .desktop-nav .menu {
    gap: 18px !important;   /* もっと狭く */
  }

  .desktop-nav .menu > li > a {
    font-size: 16px !important; /* ← これで改行しない */
    font-weight: 600;
  }

  /* ---- お問い合わせ ---- */
  .desktop-cta {
    font-size: 18px !important;
    padding: 8px 18px !important;
    border-radius: 8px;
  }

  /* ---- header 全体の圧縮 ---- */
  .header-inner {
    padding: 4px 0 !important;
    gap: 6px;
  }
}

/* ==============================
   Header：レスポンシブ
============================== */
@media (max-width: 768px) {
  .desktop-nav,
  .desktop-cta {
    display: none !important;
  }

  .site-logo {
    height: 50px;
  }
  .company-name-main {
    font-size: 19px;
  }
  .company-name-sub {
    font-size: 12px;
  }

  .hamburger {
    display: flex;
  }

  .header-inner {
    padding: 6px 0;
  }
}



/* ==============================
   Hero（トップスライダー）
============================== */
.hero {
  background: #000;
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
}

.hero .swiper {
  width: 100%;
  height: auto;
  aspect-ratio: 2200 / 900;
}

.hero-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hero-caption {
  position: absolute;
  left: 5%;
  bottom: 8%;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-size: clamp(18px, 2.2vw, 32px);
}

@media (max-width: 768px) {
  .hero {
    width: 100%;
  }
}

/* ==============================
   Sections 共通
============================== */
.section {
  padding: 48px 0;
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sec-head h3 {
  font-size: 22px;
  margin: 0;
}

.sec-head .more {
  color: var(--c);
  text-decoration: none;
  transition: color 0.3s;
}

.sec-head .more:hover {
  color: #0844b2;
}

/* トップでは見出し中央寄せ */
body.home .sec-head,
body.front-page .sec-head {
  display: block !important;
  text-align: center !important;
  position: relative;
  margin-bottom: 24px;
}

body.home .sec-head .more,
body.front-page .sec-head .more {
  position: absolute !important;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.section-title {
  display: inline-block;
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: 0.02em;
  text-align: center;
}

.section-title span {
  display: block;
  margin-top: 0.25em;
  font-size: 0.62em;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* 下線アクセント */
body.home .sec-head::after,
body.front-page .sec-head::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--c);
  border-radius: 2px;
  margin: 10px auto 0;
}

/* ==============================
   カテゴリカード（帯付き）
============================== */
.cat-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  text-align: center;
}

/* 背景画像は inline style の background-image を利用 */
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(60%);
  transition: all 0.4s ease;
}

/* 中央の帯 */
.cat-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 50%;
  transform: translateY(50%);
  width: 100%;
  height: 26%;
  background: rgba(0,0,0,0.4);
  z-index: 1;
  transition: background 0.3s ease;
}

/* 文字 */
.cat-card .cat-name {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* hover */
.cat-card:hover::before {
  filter: brightness(40%) scale(1.05);
}
.cat-card:hover::after {
  background: rgba(0,0,0,0.55);
}

/* ==============================
   グリッド
============================== */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid.products {
  grid-template-columns: repeat(4, 1fr);
}

.grid.cats {
  grid-template-columns: repeat(4, 1fr);
}

/* ==============================
   商品カード
============================== */
/* ========================
   商品カード hover アニメーション
======================== */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}


.product-card .thumb {
  padding-top: 66%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.product-card:hover .thumb img {
  transform: scale(1.07);
}


.product-card .title {
  font-size: 16px;
  margin: 12px 12px 4px;
}

.product-card .excerpt {
  color: var(--muted);
  font-size: 13px;
  margin: 0 12px 14px;
}

/* ==============================
   お知らせ（トップ）
============================== */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-list li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.news-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.news-list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.news-list a:hover .news-title {
  color: var(--c);
}

.news-list time {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
  min-width: 95px;
}

.news-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

/* 「もっと見る」 */
.news-more {
  text-align: center;
  margin-top: 32px;
}

.btn-more {
  display: inline-block;
  background: var(--c);
  color: #fff;
  padding: 11px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
}

.btn-more:hover {
  background: #094fb8;
  transform: translateY(-2px);
}

/* ==============================
   商品ギャラリー（単品ページ）
============================== */
.product-gallery {
  max-width: 800px;
  margin: 0 auto 40px;
}

.main-gallery {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.main-gallery img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  background: #fff;
}

.thumb-gallery {
  margin-top: 16px;
  padding: 6px 0;
}

.thumb-gallery .swiper-slide {
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.thumb-gallery .swiper-slide-thumb-active {
  opacity: 1;
  transform: scale(1.05);
  border: 2px solid var(--c);
  border-radius: 8px;
}

.thumb-gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* ナビゲーションボタン */
.main-gallery .swiper-button-prev,
.main-gallery .swiper-button-next {
  color: var(--c);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  transition: background 0.3s;
}

.main-gallery .swiper-button-prev:hover,
.main-gallery .swiper-button-next:hover {
  background: rgba(255, 255, 255, 1);
}

/* ==============================
   お知らせ一覧（カード 3→1 カラム）
============================== */
.grid.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.news-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  transition: all 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.news-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.news-card .thumb {
  width: 100%;
  padding-top: 56%;
  background-size: cover;
  background-position: center;
  background-color: #f7f7f7;
  transition: transform 0.4s ease;
}

.news-card:hover .thumb {
  transform: scale(1.04);
}

.news-card .info {
  padding: 16px 20px 20px;
}

.news-card time {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  margin-right: 6px;
}

.news-card .cat {
  display: inline-block;
  background: #eef4ff;
  color: var(--c);
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 8px;
}

.news-card .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  margin-top: 10px;
}

/* ページネーション */
.pagination {
  text-align: center;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: var(--c);
  color: #fff;
}

.pagination .current {
  background: var(--c);
  color: #fff;
  font-weight: 600;
}

/* ==============================
   Footer（階層ナビ付き）
============================== */
.site-footer {
  background: #1f3349;
  color: #fff;
  padding: 60px 0 40px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* ロゴ（白化） */
.footer-logo img {
  max-width: 120px;
  margin: 0 auto 24px;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}

/* 親 UL を横並び、子 UL は縦並びに */
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav > ul {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;          /* 1行に並べる */
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-nav > ul > li {
  text-align: left;
}

/* 親メニュー */
.footer-nav > ul > li > a {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
  transition: opacity 0.3s;
}

.footer-nav > ul > li > a:hover {
  opacity: 0.8;
}

/* 子メニュー */
.footer-nav .sub-nav {
  display: block;
}

.footer-nav .sub-nav li {
  margin: 4px 0;
}

.footer-nav .sub-nav a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-nav .sub-nav a:hover {
  opacity: 0.75;
  color: #fff;
}

/* ==============================
   Footer SNS Icons（安定版）
============================== */

.footer-sns {
  width: 100%;
  display: flex;
  justify-content: center;      /* 中央揃え */
  align-items: center;          /* 垂直位置合わせ */
  gap: 24px;                    /* アイコン間隔 */
  margin: 10px 0 25px;          /* フッターメニューとの距離を統一 */
  padding: 0;
}

.footer-sns .sns-icon {
  width: 34px;
  height: 34px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  transition: opacity 0.3s ease;
}

.footer-sns .sns-icon:hover {
  opacity: 0.7;
}

/* ==== 各SNSロゴ ==== */
.sns-youtube  { background-image: url('https://upload.wikimedia.org/wikipedia/commons/0/09/YouTube_full-color_icon_%282017%29.svg'); }
.sns-x        { background-image: url('https://upload.wikimedia.org/wikipedia/commons/c/ce/X_logo_2023.svg'); }
.sns-instagram{ background-image: url('https://upload.wikimedia.org/wikipedia/commons/e/e7/Instagram_logo_2016.svg'); }
.sns-facebook { background-image: url('https://upload.wikimedia.org/wikipedia/commons/1/1b/Facebook_icon.svg'); }

/* スマホ調整 */
@media (max-width:768px) {
  .footer-sns {
    gap: 20px;   /* 少し詰める */
    margin: 15px 0 20px;
  }
  .footer-sns .sns-icon {
    width: 30px;
    height: 30px;
  }
}
/* コピーライト */
.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* フッター：SP */
@media (max-width: 768px) {
  .footer-nav > ul {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  .footer-nav > ul > li {
    text-align: center;
  }

  .footer-nav > ul > li > a {
    font-size: 15px;
  }

  .footer-nav .sub-nav a {
    font-size: 13px;
  }

  .footer-logo img {
    max-width: 100px;
  }
}

/* ==============================
   レスポンシブ：グリッド類
============================== */
@media (max-width: 1024px) {
  .grid.products {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.cats {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.news-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 36px 0;
  }

  .grid.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .grid.cats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-card,
  .cat-card {
    border-radius: 12px;
  }

  .cat-card {
    height: 180px;
  }

  .grid.news-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-card {
    border-radius: 10px;
  }

  .news-card .title {
    font-size: 15px;
  }

  .news-list li {
    padding: 14px 16px;
  }

  .news-title {
    font-size: 15px;
  }

  .news-list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .news-list time {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .grid.products {
    grid-template-columns: 1fr;
  }
  .cat-card {
    height: 160px;
  }
}

/* ==============================
   Swiper タッチ挙動
============================== */
.swiper,
.swiper-wrapper,
.swiper-slide {
  touch-action: none;
}

/* ==============================
   汎用フェードイン
============================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

