/* ==========================================================================
   共通設定 & リセット
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "MS P明朝", serif;
  color: #333;
  background-color: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  /* 💡 ヘッダーが浮いた分、コンテンツが上にめり込まないように高さを確保 */
  padding-top: 70px;
}

/* ==========================================================================
   グローバルヘッダー（スクロール追従版）
   ========================================================================== */
.global-header {
  width: 100%;
  border-bottom: 1px solid #eee;
  background-color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 0 20px;
  height: 70px;
}

.header-logo {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #333;
}

.header-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-nav a {
  font-size: 14px; /* 💡 注釈サイズ */
  text-decoration: none;
  color: #444;
  margin-right: 35px;
  letter-spacing: 0.05em;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: #b59a6d;
}

/* 右端の黒い「お問合せ」ボタン */
.header-nav .nav-contact-btn {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111;
  color: #fff;
  margin-right: 0;
  padding: 0 45px;
  height: 70px;
  transition: background-color 0.2s;
}

.header-nav .nav-contact-btn:hover {
  background-color: #333;
  color: #fff;
}

/* ==========================================================================
   メインレイアウト（コンテナ）
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* LUPICIA TRADINGロゴ ＆ 横長バナーエリア */
.brand-top-area {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  padding-bottom: 15px;
}

.brand-logo-text {
  font-family: "EB Garamond", serif;
  font-size: 30px;
  color: #222;
  font-weight: 500;
  line-height: 1;
}

.top-banner-image {
  width: 550px;
  height: 55px;
  background-color: #d1dfb9;
  overflow: hidden;
}

.top-banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* パンくずリスト */
.breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 50px;
  letter-spacing: 0.05em;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
}

/* ==========================================================================
   ページヘッダー（タイトル＆ソート）
   ========================================================================== */
.page-header {
  margin-bottom: 40px;
  position: relative;
  border-bottom: none;
}

.title-wrap {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 15px;
}

.main-title {
  font-family: "Bentham", serif;
  font-size: 79px;
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 1;
  /* 上から下へと美しく抜ける縦グラデーション */
  background: linear-gradient(to bottom, #3a3e42 0%, #5d636a 45%, #767d84 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.subtitle {
  font-size: 15px;
  color: #555;
  letter-spacing: 0.05em;
}

.lead-text {
  font-size: 16px; /* 地の文（本文）サイズ */
  color: #555;
  letter-spacing: 0.05em;
}

/* 右寄せにするカスタムセレクトの親位置 */
.filter-container {
  position: absolute;
  right: 0;
  bottom: 0;
  margin-top: 0;
}

/* ==========================================================================
   📦 カスタムセレクトボックス（プルダウンの完全制御）
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  width: 240px;
  font-family: "Zen Old Mincho", serif;
  user-select: none;
}

.custom-select-trigger {
  font-size: 14px;
  color: #333;
  padding: 10px 40px 10px 20px;
  background-color: #f7f7f7;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.05em;
  transition: background-color 0.2s;
  border: none !important;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #333;
  transition: transform 0.3s;
}

.custom-select-wrapper.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-options {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #f7f7f7;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: all 0.2s ease-in-out;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-option {
  font-size: 14px;
  color: #444;
  padding: 10px 20px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  list-style: none !important;
}

.custom-option:hover {
  background-color: #eaeaea;
  color: #111;
}

.custom-option.selected {
  background-color: #e2dcd3;
  color: #333;
  font-weight: bold;
}

/* ==========================================================================
   3列タイルグリッド & カード（一覧ページ用）
   ========================================================================== */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
  margin-top: 50px;
}

.case-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: opacity 0.3s ease;
}

.case-card:hover {
  opacity: 0.8;
}

.card-image {
  width: 100%;
  max-width: 400px;
  height: 290px; /* 💡 400x290pxに固定 */
  margin: 0 auto 15px;
  overflow: hidden;
  background-color: #f7f7f7;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 0 5px;
}

/* --- カテゴリタグ共通設定 --- */
.category-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 12px;
  margin-bottom: 10px;
  color: #fff;
  letter-spacing: 0.05em;
  /* 💡 すべてのカテゴリ背景色をハリー・ポッターの上品なゴールドベージュに統一 */
  background-color: #bfa47e !important;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
  color: #222;
}

.card-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
}

.card-date {
  font-family: "EB Garamond", serif; /* 💡 復活：一覧の英数字日付は EB Garamond */
  font-size: 15px;
  color: #caa867;
  letter-spacing: 0.05em;
  text-align: right;
}

.grid-footer-note {
  text-align: center;
  color: #aaa;
  font-size: 18px;
  letter-spacing: 0.1em;
  margin: 70px 0 30px;
}

.no-data {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  font-size: 16px;
  padding: 60px 0;
}

/* ==========================================================================
   📄 詳細ページ（ケーススタディ個別）専用スタイル
   ========================================================================== */
.detail-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 💡 詳細ヘッダー：シンプルなセンター揃えの明朝体 */
.detail-header {
  text-align: center;
  margin-bottom: 60px;
}

.detail-title {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", serif; /* 明朝体 */
  font-size: 32px; /* 💡 PCサイズ32px */
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: #333;
  display: block;
  margin-bottom: 15px;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}

.detail-subtitle {
  font-family: "Zen Old Mincho", serif;
  font-size: 24px; /* 地の文（本文）サイズ */
  color: #555;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

/* 💡 18px ＋ 指定のブランドカラー（#b07f31） */
.detail-header .card-date {
  font-family: "EB Garamond", serif; /* 💡 復活：詳細ヘッダーの日付英字は EB Garamond */
  font-size: 18px; /* 💡 日付18px */
  color: #b07f31; /* 💡 b07f31 に固定 */
  letter-spacing: 0.05em;
  text-align: center;
  margin-top: 0;
}

/* 💡 メインイントロ（写真 ＋ 右側テキストの2カラムレイアウト） */
.main-intro {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 100px;
}

.intro-image {
  flex: 1.1;
  overflow: hidden;
}

.intro-image img {
  width: 100%;
  height: auto;
  display: block;
}

.intro-text-box {
  flex: 1;
}

/* 右側：ゴールドのキャッチコピー */
.intro-text-box h2 {
  font-family: "Zen Old Mincho", serif;
  font-size: 25px;
  color: #b07f31; /* ブランドカラー */
  font-weight: 500;
  margin-bottom: 25px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

/* 右側：標準的な地の文の段落 */
.intro-text-box p {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", serif; /* 💡 復活：元の美しいデバイス明朝ブレンド */
  font-size: 16px;
  color: #333;
  line-height: 2.2; /* 贅沢な行間 */
  letter-spacing: 0.05em;
}

/* 丸いプロダクトエリア */
.product-section {
  margin-bottom: 100px;
}

.product-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 60px 8%;
  max-width: 1000px;
  margin: 0 auto;
}

.product-card {
  width: 42%;
  min-width: 280px;
  text-align: center;
  margin-bottom: 20px;
}

.product-circle-image {
  width: 320px;
  height: 320px;
  margin: 0 auto 30px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #f7e6e6;
}

.product-circle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card h3 {
  font-family: "Bentham", serif; /* 💡 復活：プロダクト名（MEGURI等）の英字は最高の Bentham */
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 15px;
  color: #222;
}

.product-card p {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  text-align: left;
}

/* 下部「お茶のお誘い」エリア */
.footer-intro {
  display: flex;
  align-items: center;
  gap: 8%;
  background-color: #fafafa;
  padding: 60px;
  margin-bottom: 80px;
}

.footer-intro-text {
  flex: 1;
}

.footer-intro-text p {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 25px;
}

.btn-label-black {
  display: inline-block;
  background-color: #111;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 20px;
  letter-spacing: 0.1em;
  margin-bottom: 25px;
  pointer-events: none;
}

.footer-intro-image {
  flex: 1.1;
}

.footer-intro-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 💡 一覧へ戻る黒い横長ボタン */
.back-to-list {
  text-align: center;
  margin: 60px 0 20px;
}

.btn-back-black {
  display: inline-block;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  padding: 15px 80px;
  letter-spacing: 0.15em;
  transition: background-color 0.2s;
}

.btn-back-black:hover {
  background-color: #333;
}

/* ==========================================================================
   下部「お取り扱い」エリア：左右完全分離 ＆ 背景ごと白グラデ完全版
   ========================================================================== */
/* 左右を並べる親コンテナ（ここには背景色をつけない！） */
.footer-split-container {
  display: flex;
  align-items: stretch; /* 💡 左右の箱の高さを自動で揃える */
  margin-bottom: 80px;
  width: 100%;
}

/* 👈 左側：テキストエリア（完全に独立したグレーの四角い箱） */
.footer-intro-left-box {
  flex: 1.2;
  background-color: #fafafa; /* 💡 グレー背景はこの左の箱だけに敷く！ */
  padding: 60px 40px 60px 60px; /* 画像側（右）の余白を少し詰める */
}

/* 上品な明朝体タイトル（お取り扱い） */
.footer-intro-left-box h2 {
  font-family: "Zen Old Mincho", serif;
  font-size: 24px;
  font-weight: 500;
  color: #333;
  margin-bottom: 25px;
  letter-spacing: 0.08em;
}

/* メインの説明文 */
.footer-intro-maintext {
  font-size: 15px;
  color: #333;
  line-height: 1.8;
  margin-bottom: 30px;
  letter-spacing: 0.05em;
}

/* 黒い長方形ボタン（公式ウェブサイトはこちら） */
.btn-intro-black {
  display: inline-block;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  padding: 12px 35px;
  letter-spacing: 0.1em;
  margin-bottom: 35px;
  transition: opacity 0.2s;
}

.btn-intro-black:hover {
  opacity: 0.8;
}

/* 下部の小さめのキャンペーン注釈テキスト */
.footer-intro-subtext {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* 👉 右側：画像エリア（背景は完全に真っ白。左のグレーの境界をグラデで消し去る） */
.footer-intro-right-image-wrap {
  flex: 1;
  background-color: #ffffff; /* 💡 背景は完全な白！ */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.footer-intro-right-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* 💡 ここが超重要：
   左のグレーの箱（#fafafa）から、右の白（#ffffff）へと自然につなぎ、
   かつ商品画像の下部をフワッと白く消し込むマルチベール */
.footer-intro-right-image-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  /* 💡 左端はグレーの箱（#fafafa）と同じ色からスタートして透明に抜け、
     下部は完全な白（#ffffff）でせり上がって画像を消し込む */
  background: 
    linear-gradient(to right, #fafafa 0%, rgba(250, 250, 250, 0) 20%),
    linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0) 35%);
    
  pointer-events: none;
  z-index: 1;
}

/* レスポンシブ対応（スマホの時は縦並び） */
@media (max-width: 850px) {
  .footer-split-container {
    flex-direction: column-reverse; /* スマホは画像が上、テキストが下 */
  }
  .footer-intro-left-box {
    padding: 40px 20px;
  }
  .footer-intro-right-image-wrap {
    background-color: #fafafa; /* スマホの時は繋ぎ目が不要なのでグレーに統一 */
  }
  .footer-intro-right-image-wrap::after {
    display: none;
  }
  .btn-intro-black {
    display: block;
    text-align: center;
  }
}

/* ==========================================================================
   下部案内（COMPANY / CONTACT）
   ========================================================================== */
.bottom-guide-section {
  background-color: #f9f9f9;
  padding: 60px 20px;
  border-top: 1px solid #eee;
}

.guide-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.guide-card {
  text-align: left;
}

.guide-card h2 {
  font-family: "EB Garamond", serif;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 5px;
}

.guide-sub {
  font-size: 14px;
  color: #222;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.btn-guide-black {
  display: block;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(to right, #000 0%, #222 100%);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  padding: 14px 20px;
  letter-spacing: 0.1em;
  font-weight: bold;
  transition: opacity 0.3s;
}

.btn-guide-black:hover {
  opacity: 0.8;
}

/* ==========================================================================
   共通フッター
   ========================================================================== */
.global-footer {
  background-color: #fff;
  padding: 60px 20px 40px;
  border-top: 1px solid #eee;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-info h3 {
  font-size: 18px;
}

.en-company {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.footer-info address {
  font-style: normal;
  font-size: 14px;
  color: #222;
  line-height: 1.8;
}

.footer-info address span {
  margin-right: 15px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-nav a {
  font-size: 14px;
  text-decoration: none;
  color: #444;
  letter-spacing: 0.05em;
}

.footer-nav a:hover {
  color: #caa867;
}

.copyright {
  max-width: 1200px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 12px;
  color: #999;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   📱 スマートフォン・タブレット向け レスポンシブ対応（お掃除完了版）
   ========================================================================== */
@media (max-width: 850px) {
  body {
    padding-top: 60px;
  }
  
  .header-inner {
    height: 60px;
  }
  
  .header-nav .nav-contact-btn {
    height: 60px;
    padding: 0 25px;
  }

  .container {
    padding: 30px 15px 40px;
  }

  /* 💡 解決：LUPICIA TRADINGロゴとバナーのギチギチを解消 */
  .brand-top-area {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .brand-logo-text {
    font-size: 24px; /* スマホ用にロゴを少しキュッと小さく */
  }
  
  .top-banner-image {
    width: 100%;
    height: 45px; /* スマホでも見やすい高さに */
  }

  /* 💡 解決：スマホの時は absolute（絶対配置）をやめて、
     タイトルと並んで自然に改行されるようにリセット（折れ曲がり防止！） */
  .page-header {
    padding-bottom: 0;
  }

  .title-wrap {
    display: flex;
    flex-direction: column; /* 💡 タイトルの下に「事例紹介」が自然にくる縦並びに */
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
  }

  /* 💡 解決：巨大なCASE STUDYをスマホサイズに最適化！ */
  .main-title {
    font-size: 3.5rem;
    letter-spacing: 0.05em;
    line-height: 1.2;
    display: block;
  }

  /* 💡 解決：縦に潰れていた「事例紹介」をリセット */
  .subtitle {
    font-size: 1.5rem;
    color: #666;
    display: block;
    letter-spacing: 0.05em;
  }

  /* リード文（プロジェクトの事例の〜） */
  .lead-text {
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
  }

  .filter-container {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 25px;
    width: 100%;
  }
  
  .custom-select-wrapper {
    width: 100%;
  }

  /* 一覧ページ：タイルグリッド */
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 20px;
    margin-top: 30px;
  }
  
  .card-image {
    height: 220px;
  }

  /* 詳細ページ用レイアウト */
  .main-intro {
    flex-direction: column;
    gap: 30px;
    margin-bottom: 60px;
  }

  .product-grid {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }

  .footer-split-container {
    flex-direction: column-reverse;
    margin-bottom: 50px;
  }
  
  .footer-intro-left-box {
    padding: 40px 25px;
  }
  
  .footer-intro-right-image-wrap {
    background-color: #fafafa;
    justify-content: center;
    padding: 30px 25px 0;
  }
  
  .footer-intro-right-image-wrap img {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .footer-intro-right-image-wrap::after {
    display: none;
  }

  .btn-intro-black {
    display: block;
    text-align: center;
    margin-bottom: 25px;
  }

  .guide-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-nav {
    align-items: flex-start;
  }
}

/* スマートフォン（画面幅600px以下）の微調整 */
@media (max-width: 600px) {
  .case-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .card-image {
    max-width: 100%;
    height: 240px;
  }

  .header-nav a:not(.nav-contact-btn) {
    display: none;
  }
  
  .header-logo {
    font-size: 13px;
  }

  /* 詳細ページ用 */
  .detail-title {
    font-size: 24px;
    line-height: 1.5;
  }
  
  .detail-subtitle {
    font-size: 14px;
  }
  
  .detail-header .card-date {
    font-size: 16px;
  }

  .intro-text-box h2 {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 15px;
  }
  
  .intro-text-box p {
    font-size: 14px;
    line-height: 2.0;
  }

  .product-circle-image {
    width: 220px;
    height: 220px;
    margin-bottom: 20px;
  }
  
  .product-card h3 {
    font-size: 22px;
  }

  .btn-back-black {
    display: block;
    width: 100%;
    padding: 15px 0;
  }
}