@charset "utf-8";

/* =================================================================
   【伊藤農園 自社サイト ギフトカテゴリ専用 スタイルシート】
   他からのCSS干渉を受けず、他への影響も与えない完全カプセル化設計
   ================================================================= */

/* --- CSS変数定義（カラー・サイズ定義） --- */
#fs-gift-category-root.fs-gc-reset {
  --color-brand: #E2962D;
  /* ブランドカラー：落ち着いたオレンジ */
  --it-color-primary: var(--color-brand);
  --color-brand-dark: #C27E1D;
  --color-text: #4A4636;
  /* 深みのあるオリーブグレー */
  --color-text-light: #8C846F;
  /* 柔らかなサブテキスト */
  --color-bg-white: #FAF9F6;
  /* 暖かみのあるオフホワイト */
  --color-bg-gray: #F2F1EC;
  /* サンドベージュ */
  --color-border: #DDD9CE;
  /* ナチュラルな境界線 */
  --color-accent-green: #7A8D6E;
  /* セージグリーン（アクセント） */

  --font-family: 'Noto Sans JP', sans-serif;
  --max-width: 1200px;
}

/* --- 干渉防御用リセット --- */
#fs-gift-category-root.fs-gc-reset,
#fs-gift-category-root.fs-gc-reset * {
  all: revert;
  /* 親やグローバルCSSの不要なスタイル（余白、フォント等）の継承を完全リセット */
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', sans-serif;
}

/* --- セクション・基本定義 --- */
#fs-gift-category-root.fs-gc-reset .it-section {
  color: var(--color-text);
  background-color: var(--color-bg-white);
  line-height: 1.8;
  padding: 60px 0;
  -webkit-font-smoothing: antialiased;
  max-width: 1040px;
  margin: 0 auto;
}

#fs-gift-category-root.fs-gc-reset .it-section a {
  text-decoration: none;
  color: inherit;
}

#fs-gift-category-root.fs-gc-reset .it-section img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- コンテナ --- */
#fs-gift-category-root.fs-gc-reset .it-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
}

/* --- セクション共通タイトル --- */
#fs-gift-category-root.fs-gc-reset .it-section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 20px;
  letter-spacing: 0.05em;
  font-family: var(--font-family);
  line-height: 1.8;
}

#fs-gift-category-root.fs-gc-reset .it-section-title span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* --- ギフトグリッド（PC時は4カラム × 2列） --- */
#fs-gift-category-root.fs-gc-reset .it-gift__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

#fs-gift-category-root.fs-gc-reset .it-gift__wrap {
  width: 100%;
}

/* ===== 商品カード（カテゴリカード） ===== */
#fs-gift-category-root.fs-gc-reset .it-product-card {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.25s ease, background-color 0.25s ease;
  box-shadow: 0 4px 15px rgba(74, 70, 54, 0.04);
  border: 1px solid #eae7de;
  text-align: center;
}

#fs-gift-category-root.fs-gc-reset .it-product-card:hover {
  border-color: var(--color-brand);
  background-color: var(--color-bg-white);
  /* 上品な背景トーン変更のみ */
}

/* 画像枠（角丸） */
#fs-gift-category-root.fs-gc-reset .it-product-card__img-wrap {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
  aspect-ratio: 1 / 1;
  background: var(--color-bg-gray);
}

#fs-gift-category-root.fs-gc-reset .it-product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* カテゴリテキスト名 */
#fs-gift-category-root.fs-gc-reset .it-product-card__name {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  padding: 4px 0;
}

/* ===== 大ボタン「ギフトを詳しく調べる」 ===== */
#fs-gift-category-root.fs-gc-reset .fs-gc-main-btn {
  display: block;
  width: fit-content;
  margin: 30px auto 0;
  padding: 12px 48px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  text-align: center;
  text-decoration: none !important;
}

#fs-gift-category-root.fs-gc-reset .fs-gc-main-btn:hover {
  background: var(--color-bg-gray);
  border-color: var(--color-text-light);
}

/* ===== カルーセル制御ボタン（PCでは隠す） ===== */
#fs-gift-category-root.fs-gc-reset .gift-btn {
  display: none;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4a5568;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#fs-gift-category-root.fs-gc-reset .gift-btn:hover {
  background: var(--color-brand);
  color: #ffffff;
  border-color: var(--color-brand);
}

#fs-gift-category-root.fs-gc-reset .gift-btn--prev {
  left: -12px;
}

#fs-gift-category-root.fs-gc-reset .gift-btn--next {
  right: -12px;
}

/* =================================================================
   レスポンシブ（タブレット・スマホ表示）
   ================================================================= */

/* タブレット（992px以下）：3列グリッド */
@media (max-width: 992px) {
  #fs-gift-category-root.fs-gc-reset .it-gift__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* 小タブレット（768px以下）：2列グリッド */
@media (max-width: 768px) {
  #fs-gift-category-root.fs-gc-reset .it-section {
    padding: 40px 0;
  }

  #fs-gift-category-root.fs-gc-reset .it-section-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  #fs-gift-category-root.fs-gc-reset .it-gift__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* スマートフォン（500px以下）：横2行・3列（計6商品）のグリッド表示化 */
@media (max-width: 500px) {
  #fs-gift-category-root.fs-gc-reset .gift-btn {
    display: none !important;
    /* ナビ矢印を非表示 */
  }

  #fs-gift-category-root.fs-gc-reset .it-gift__grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 0 !important;
    margin-bottom: 20px !important;
  }

  #fs-gift-category-root.fs-gc-reset .it-product-card {
    flex: none !important;
    padding: 8px 4px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(74, 70, 54, 0.03) !important;
  }

  #fs-gift-category-root.fs-gc-reset .it-product-card__img-wrap {
    margin-bottom: 6px !important;
    border-radius: 6px !important;
  }

  #fs-gift-category-root.fs-gc-reset .it-product-card__name {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  /* 7番目以降の商品を非表示にして2行3列（合計6商品）に収める */
  #fs-gift-category-root.fs-gc-reset .it-product-card:nth-child(n+7) {
    display: none !important;
  }
}