/* =====================================================
   エクセルーラ 共通スタイル（2026年2月版）
   新グロナビ・ドロワーメニュー・モーダル
   ===================================================== */

/* ----- CSS Variables ----- */
:root {
  --color-primary: #f18d4c;
  --color-primary-hover: #d47a45;
  --color-bg-pink: #ffd9c4;
  --color-bg-pink-light: #fce5dd;
  --color-cosme-mint: #DDEFEA;
  --color-cosme-mint-dark: #49B5A9;
  --color-text: #333;
  --color-text-light: #666;
  --color-border: #eaeaea;
  --font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --container-width: 1100px;
  --spacing-section: 80px;
  --spacing-section-sp: 50px;
}

/* ----- Reset & Base ----- */
/* box-sizingは新コンポーネント内のみに限定（既存CSSとの競合回避） */
.header *,
.header *::before,
.header *::after,
.drawer *,
.drawer *::before,
.drawer *::after,
.modal *,
.modal *::before,
.modal *::after {
  box-sizing: border-box;
}

/* 新コンポーネント内のみにスタイル適用（既存CSSとの競合を回避） */
.header,
.drawer,
.modal {
  font-family: var(--font-family);
  color: var(--color-text);
  line-height: 1.6;
}

.header img,
.drawer img,
.modal img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

.header a,
.drawer a,
.modal a {
  color: inherit;
  text-decoration: none;
}

/* ----- Container ----- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ----- Section Common ----- */
.section {
  padding: var(--spacing-section) 0;
}

.section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

/* ----- Utility ----- */
.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

@media (max-width: 768px) {
  .pc-only {
    display: none !important;
  }

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

/* =====================================================
   Header（2段構成）
   ===================================================== */

.header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  /* common_header.css の header タグスタイルを上書き */
  height: auto;
  border-bottom: none;
  margin: 0;
}

/* 下層ページではstickyを無効化し、通常のドキュメントフローで高さを確保 */
body.contents .header {
  position: relative;
}

/* 上段：ロゴ + CTAボタン */
.header__top {
  padding: 15px 0;
}

.header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.header__logo {
  flex-shrink: 0;
}

.header__logo img {
  display: block;
  width: 225px; /* 150px × 150% */
  height: auto;
}

.header__cta {
  flex-shrink: 0;
}

/* ヘッダーCTA: テキスト左寄せ+矢印右端固定 */
.header__cta .btn-primary {
  position: relative;
  padding-right: 40px; /* 矢印のスペース確保 */
}

.header__cta .btn-primary::after {
  position: absolute;
  right: 16px; /* 右端に固定 */
}

/* 下段：グロナビ */
.header__bottom {
  border-top: 1px solid var(--color-border);
  padding: 12px 0;
}

.header__nav {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.header__nav-item {
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
  color: var(--color-text);
}

.header__nav-item:hover {
  color: var(--color-primary); /* オレンジ #f18d4c */
}

/* SP: ハンバーガーメニューボタン */
.header__menu-btn {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header__menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  left: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.header__menu-btn span:nth-child(1) { top: 0; }
.header__menu-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.header__menu-btn span:nth-child(3) { bottom: 0; }

/* =====================================================
   Drawer Menu（SP専用）
   ===================================================== */

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}

.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.drawer__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s;
}

.drawer.is-open .drawer__overlay {
  opacity: 1;
}

.drawer__content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drawer.is-open .drawer__content {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.drawer__logo img {
  display: block;
}

.drawer__close {
  width: 24px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.drawer__close span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  left: 0;
  top: 50%;
}

.drawer__close span:nth-child(1) {
  transform: rotate(45deg);
}

.drawer__close span:nth-child(2) {
  transform: rotate(-45deg);
}

.drawer__nav {
  flex: 1;
  padding: 20px 0;
}

.drawer__nav-item {
  display: block;
  padding: 15px 25px;
  font-size: 15px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.drawer__nav-item:hover {
  background: #f5f5f5;
}

.drawer__cta {
  padding: 20px;
  border-top: 1px solid var(--color-border);
}

.drawer__cta .btn-primary {
  display: flex; /* flexboxを維持 */
  width: 100%; /* ボタン幅を100%に */
  position: relative;
  padding-right: 40px; /* 矢印のスペース確保 */
}

/* ドロワーCTA: 矢印右端固定 */
.drawer__cta .btn-primary::after {
  position: absolute;
  right: 16px; /* 右端に固定 */
}

/* Body scroll lock when drawer is open */
body.is-drawer-open {
  overflow: hidden;
}

/* =====================================================
   Button
   ===================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between; /* テキスト左・矢印右 */
  min-width: 200px; /* 矢印を右端に寄せるため最小幅を設定 */
  background: var(--color-primary);
  color: #fff !important; /* .header a の color: inherit を上書き */
  padding: 12px 24px;
  border-radius: 0 !important; /* 角丸なし・四角 */
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

/* 全てのCTAに矢印を追加（右端に配置） */
.btn-primary::after {
  content: ">";
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff !important;
}

.btn-primary--large {
  padding: 16px 40px;
  font-size: 16px;
}

/* --arrow は後方互換のため残す（追加スタイルなし） */
.btn-primary--arrow {
  /* 基本スタイルで矢印が表示されるため追加指定不要 */
}

/* =====================================================
   Modal（オンラインショップ）
   ===================================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.is-open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1;
}

.modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

.modal__close:hover {
  color: #333;
}

.modal__title {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 30px;
}

.modal__shop-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.modal__shop-list li a {
  display: block;
  padding: 12px 20px;
  background: #f5f5f5;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  transition: background 0.3s;
}

.modal__shop-list li a:hover {
  background: #eaeaea;
}

.modal__shop-list li a img {
  display: block;
  width: 100%;
  height: auto;
}

.modal__shop-list .sp_only {
  display: none;
}

.modal__note {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-light);
  margin: 0;
}

/* Body scroll lock when modal is open */
body.is-modal-open {
  overflow: hidden;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1024px) {
  .header__nav {
    gap: 15px;
  }

  .header__nav-item {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-section: var(--spacing-section-sp);
  }

  .header__top {
    padding: 10px 0;
  }

  .header__top-inner {
    gap: 12px;
  }

  .header__logo {
    margin-right: auto; /* ロゴより右の要素（CTA）を右端に押し出す */
  }

  .header__logo img {
    width: 100px;
    height: auto;
  }

  .header__menu-btn {
    display: block;
    flex-shrink: 0;
  }

  .header__cta .btn-primary {
    padding: 8px 32px 8px 12px;
    font-size: 11px;
    min-width: auto;
  }

  .header__cta .btn-primary::after {
    right: 10px;
    font-size: 11px;
  }

  .header__bottom {
    display: none;
  }

  .section-title {
    font-size: 20px;
  }

  .modal__shop-list {
    grid-template-columns: 1fr;
  }

  .modal__shop-list .pc_only {
    display: none;
  }

  .modal__shop-list .sp_only {
    display: block;
  }
}

@media (max-width: 480px) {
  .btn-primary {
    padding: 10px 20px;
    font-size: 13px;
  }

  .btn-primary--large {
    padding: 14px 30px;
    font-size: 14px;
  }
}
