/*
Theme Name: Iizuka AGG Marché
Theme URI: https://example.com/iizuka-agg
Author: KEN
Author URI: https://example.com
Description: 筑豊インフォ — 飯塚AGGマルシェ向け WordPress + WooCommerce テーマ。CHIKUHO INFO のロゴカラーを軸に、ローカル情報サイトらしい清潔感と視認性を重視したデザイン。
Version: 0.6.28
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iizuka-agg
Tags: e-commerce, woocommerce, japanese, mobile-first, custom-colors, custom-logo, custom-menu, featured-images, translation-ready
WC requires at least: 8.0
WC tested up to: 9.5
*/

/* ============================================================
 * 設計トークン (Design Tokens)
 * CHIKUHO INFO カラーパレット — ロゴのシアン / 黒 / 白を基準
 * ============================================================ */
:root {
  /* 色 — Colors */
  --primary: #60C8E8;          /* ロゴシアン */
  --primary-light: #DDF7FD;    /* 淡シアン */
  --primary-dark: #138BB0;     /* 濃シアン */
  --accent: #05070A;           /* ロゴブラック */

  --ink: #05070A;              /* ロゴブラック */
  --ink-soft: #101820;         /* チャコール */
  --ink-mute: #55616B;         /* ニュートラルグレー */

  --paper: #F6FAFC;            /* クールホワイト */
  --paper-alt: #EAF3F6;        /* 淡グレーシアン */
  --paper-dark: #05070A;       /* ロゴブラック */
  --gold: #60C8E8;             /* 旧金アクセント枠をロゴ色へ */

  /* カテゴリ色 (ページ側で上書き可) */
  --cat: var(--primary);
  --cat-dark: var(--primary-dark);

  /* フォント */
  --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-mono: 'Inter', sans-serif;

  /* 寸法 */
  --frame-max: 480px;          /* モバイル基本幅 */
  --radius: 2px;               /* 角丸は極小 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 80px rgba(0,0,0,.40);

  --nav-height: 52px;
  --tab-height: 48px;
}

/* ============================================================
 * リセット (最小限)
 * 各テンプレートパーツ/モックに準拠。base.css の代わり。
 * ============================================================ */
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }

.serif { font-family: var(--font-serif); }
.mono  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(96,200,232,.45); border-radius: 3px; }

/* ============================================================
 * モバイルフレーム — 480px固定幅の中央寄せ
 * ============================================================ */
.frame {
  max-width: var(--frame-max);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 40px rgba(0,0,0,.06);
  min-height: 100vh;
}

/* ============================================================
 * 和紙テクスチャ
 * ============================================================ */
.washi {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(96,200,232,.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(  5,  7,10,.025) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(  0, 0, 0,.015) 0%, transparent 35%);
}

/* ============================================================
 * 暖簾 (noren) ストライプ
 * ============================================================ */
.noren-top {
  height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--primary)      0 18%, transparent 18% 20%,
    var(--ink)         20% 38%, transparent 38% 40%,
    var(--primary-light) 40% 58%, transparent 58% 60%,
    var(--primary)     60% 78%, transparent 78% 80%,
    var(--ink)         80% 98%, transparent 98% 100%);
}

/* ============================================================
 * 縦書き漢字ルール
 * ============================================================ */
.kanji-rule {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  letter-spacing: 12px;
}

/* ============================================================
 * ナビゲーション — 2パターン (front / sub)
 * ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.nav-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
.nav-row .back,
.nav-row .icon-btn,
.nav-row .menu-btn,
.nav-row .search-btn-icon,
.nav-row .cart-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
  flex-shrink: 0; position: relative;
}
.nav-row .back { background: var(--paper); }
.nav--sub .nav-row .title {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600;
  color: var(--ink); letter-spacing: 2px;
}
.nav--sub .nav-row .title .en {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600;
  letter-spacing: 3px;
  color: var(--primary);
  margin-top: 1px;
}
.nav--front .brand-link {
  flex: 1;
  text-align: center;
  color: var(--ink);
}
.nav--front .brand-logo,
.site-footer .brand-logo {
  width: min(210px, 54vw);
  height: auto;
  margin: 0 auto;
}
.nav--front .brand-logo {
  max-height: 44px;
  object-fit: contain;
}
.nav--front .brand {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600; letter-spacing: 3px;
  display: block;
}
.nav--front .brand-en {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: 3px;
  color: var(--primary);
  display: block; margin-top: 1px;
}
.desktop-nav {
  display: none;
}
.desktop-nav a {
  color: var(--ink-soft);
}
.desktop-nav a span {
  display: block;
}
.nav .badge,
.nav-row .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--primary); color: #fff;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
 * フッター
 * ============================================================ */
.site-footer {
  background: var(--paper-dark);
  color: rgba(255,255,255,.7);
  padding: 40px 20px 30px;
  text-align: center;
}
.site-footer .brand {
  font-size: 22px; color: #fff;
  margin-bottom: 6px; font-weight: 600; letter-spacing: 2px;
}
.site-footer .brand-logo {
  filter: drop-shadow(0 8px 22px rgba(96,200,232,.18));
  margin-bottom: 10px;
}
.site-footer .footer-brand img {
  width: min(210px, 54vw);
  max-height: 52px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 10px;
  filter: drop-shadow(0 8px 22px rgba(96,200,232,.18));
}
.site-footer .footer-brand p {
  max-width: 420px;
  margin: 0 auto;
  color: rgba(255,255,255,.64);
  font-size: 13px;
  line-height: 1.8;
}
.site-footer .en {
  font-size: 10px; letter-spacing: 4px;
  color: var(--primary-light);
  margin-bottom: 28px; font-weight: 600;
}
.site-footer .links {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 22px;
  font-size: 13px; margin: 0 0 22px;
  font-weight: 500;
}
.site-footer .links a { color: rgba(255,255,255,.7); }
.site-footer .copy {
  font-size: 10px; color: rgba(255,255,255,.4);
  letter-spacing: 1.5px;
}
.footer-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
}
.footer-links a {
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 600;
}
.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.42);
}

.m-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  body.is-sub {
    padding-bottom: 74px;
  }

  .m-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid #d9e4e8;
    background: rgba(255,255,255,.97);
    box-shadow: 0 -8px 24px rgba(18,55,72,.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .m-bottom-nav a {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 58px;
    border-radius: 6px;
    color: var(--ink-mute);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
  }

  .m-bottom-nav a.is-active {
    background: transparent;
    color: var(--primary-dark);
  }

  .m-bottom-nav a.is-active::before {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 30px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--primary);
    content: "";
    transform: translateX(-50%);
  }

  .m-bottom-nav a:active {
    background: var(--primary-light);
  }

  .m-bottom-nav svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (min-width: 901px) {
  .m-bottom-nav {
    display: none !important;
  }
}

/* ============================================================
 * フロートカート
 * ============================================================ */
.float-cart {
  position: fixed; bottom: 20px; right: 18px; z-index: 40;
  width: 56px; height: 56px; border-radius: 28px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(96,200,232,.36), 0 0 0 4px rgba(255,255,255,.9);
}
.float-cart .badge {
  position: absolute; top: -4px; right: -4px;
  background: #fff; color: var(--primary);
  width: 20px; height: 20px; border-radius: 10px;
  font-weight: 700; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--primary);
}

/* ============================================================
 * セクションタイトル
 * ============================================================ */
.section-title {
  text-align: center;
  padding: 64px 16px 40px;
}
.section-title .en {
  font-size: 11px; letter-spacing: 5px;
  color: var(--primary); font-weight: 600;
  margin-bottom: 14px;
}
.section-title .jp {
  font-size: 30px; font-weight: 600;
  color: var(--ink); letter-spacing: 3px;
}
.section-title .bar {
  width: 40px; height: 2px; background: var(--primary);
  margin: 18px auto 0;
}

/* ============================================================
 * 商品カード (.pcard) — 一覧/詳細/特集/TOPで共通
 * ============================================================ */
.products {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--paper);
}
.products[data-view="list"] { grid-template-columns: 1fr; }

.pcard {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  display: flex; flex-direction: column;
  position: relative;
}
.pcard .img {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .img .k {
  font-size: 82px; font-weight: 600;
  color: rgba(255,255,255,.88);
}
.pcard .img .texture {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,.15) 0%, transparent 50%);
  pointer-events: none;
}
.pcard .tag {
  position: absolute; top: 8px; left: 8px;
  background: var(--ink); color: #fff;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 7px; border-radius: 2px;
}
.pcard .tag.new { background: var(--primary); }
.pcard .tag.sale { background: #d64545; }
.pcard .tag.ltd { background: var(--accent); }
.pcard .heart {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  color: var(--ink-mute);
}
.pcard .heart.active { background: var(--primary); color: #fff; }
.pcard .info { padding: 11px 12px 44px; flex: 1; display: flex; flex-direction: column; }
.pcard .shop {
  font-size: 10px; color: var(--ink-mute);
  margin-bottom: 3px;
  display: flex; align-items: center; gap: 4px;
}
.pcard .shop .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.pcard .name {
  font-family: var(--font-serif);
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
  min-height: 39px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard .price-row { display: flex; align-items: baseline; gap: 6px; }
.pcard .price { font-family: var(--font-mono); font-size: 17px; font-weight: 700; color: var(--ink); }
.pcard del { color: var(--ink-mute); }
.pcard .add {
  position: absolute; right: 10px; bottom: 10px;
  width: 32px; height: 32px;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(96,200,232,.35);
}

/* ============================================================
 * ページごとのスタイルは assets/css/ または template-parts で
 * 個別に定義。ここには全ページ共通のものだけ。
 * ============================================================ */
