/*
Theme Name: 北投之家肉品買賣平台
Theme URI: https://meat.beitouhome.com/
Author: 北投之家
Description: 北投之家肉品買賣平台專用佈景主題。HTML 為主、無外掛依賴，頁首／頁尾／首頁／SEO／CSS 分離管理。
Version: 1.0.0
Text Domain: beitouhome-meat
*/

/* =========================================================
       北投之家肉品買賣平台｜首頁 UI System v1
       ---------------------------------------------------------
       目的：
       1. 先以首頁確認全站視覺語言
       2. Mobile First
       3. 所有元件 class 可日後抽成全站共用
       4. 不依賴框架，新手可讀
       ========================================================= */

    :root {
      /* 品牌色 */
      --brand: #7a2e24;
      --brand-dark: #5b2019;
      --brand-soft: #f8efeb;
      --accent: #a76535;

      /* 中性色 */
      --bg: #ffffff;
      --surface: #fbf9f6;
      --surface-2: #f4eee7;
      --text: #211e1b;
      --muted: #6a625b;
      --line: #e8dfd7;

      /* 狀態 */
      --shadow-sm: 0 4px 18px rgba(51, 35, 24, .055);
      --shadow-md: 0 14px 38px rgba(51, 35, 24, .085);

      /* 圓角 */
      --radius-sm: 12px;
      --radius-md: 18px;
      --radius-lg: 26px;

      /* 版面 */
      --container: 1180px;
      --reading: 820px;
      --gutter: 20px;

      /* 字體 */
      --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
              "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
    }

    * { box-sizing: border-box; }

    html {
      scroll-behavior: smooth;
      -webkit-text-size-adjust: 100%;
    }

    body {
      margin: 0;
      color: var(--text);
      background: var(--bg);
      font-family: var(--font);
      font-size: 17px;
      line-height: 1.75;
      -webkit-font-smoothing: antialiased;
    }

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

    a {
      color: inherit;
      text-underline-offset: 3px;
    }

    button, input, textarea, select {
      font: inherit;
    }

    :focus-visible {
      outline: 3px solid rgba(167, 101, 53, .4);
      outline-offset: 3px;
    }

    .container {
      width: min(calc(100% - (var(--gutter) * 2)), var(--container));
      margin-inline: auto;
    }

    .reading {
      width: min(100%, var(--reading));
      margin-inline: auto;
    }

    .skip-link {
      position: fixed;
      left: 12px;
      top: -80px;
      z-index: 9999;
      padding: 10px 14px;
      color: #fff;
      background: var(--brand-dark);
      border-radius: 10px;
      text-decoration: none;
    }

    .skip-link:focus { top: 12px; }

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

    .site-header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(255, 255, 255, .96);
      border-bottom: 1px solid var(--line);
      backdrop-filter: blur(12px);
    }

    .header-inner {
      min-height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .brand {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 11px;
      text-decoration: none;
    }

    .brand-mark {
      width: 46px;
      height: 46px;
      flex: 0 0 46px;
      display: grid;
      place-items: center;
      overflow: hidden;
      color: #fff;
      background:
        radial-gradient(circle at 35% 28%, #a65a4a 0, transparent 30%),
        linear-gradient(145deg, var(--brand), var(--brand-dark));
      border-radius: 13px;
      font-size: .9rem;
      font-weight: 900;
      box-shadow: var(--shadow-sm);
    }

    .brand-copy {
      min-width: 0;
      line-height: 1.2;
    }

    .brand-name {
      display: block;
      overflow: hidden;
      font-size: .99rem;
      font-weight: 900;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .brand-tagline {
      display: none;
      margin-top: 4px;
      color: var(--muted);
      font-size: .74rem;
    }

    .menu-toggle {
      min-width: 46px;
      min-height: 46px;
      padding: 8px 12px;
      color: var(--text);
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 12px;
      font-weight: 850;
      cursor: pointer;
    }

    .main-nav {
      display: none;
      position: absolute;
      left: var(--gutter);
      right: var(--gutter);
      top: calc(100% + 8px);
      padding: 12px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 16px;
      box-shadow: var(--shadow-md);
    }

    .main-nav.is-open { display: block; }

    .main-nav ul,
    .footer-links {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .main-nav a {
      min-height: 48px;
      display: flex;
      align-items: center;
      padding: 8px 12px;
      border-radius: 10px;
      text-decoration: none;
      font-size: .94rem;
      font-weight: 800;
    }

    .main-nav a:hover {
      color: var(--brand);
      background: var(--surface);
    }

    /* =========================================================
       02 Hero
       ========================================================= */

    .hero {
      padding: 46px 0 34px;
      background:
        radial-gradient(circle at 80% 12%, rgba(122, 46, 36, .07), transparent 30%),
        linear-gradient(180deg, #fff 0%, #fff 60%, #fdfbf9 100%);
    }

    .hero-grid {
      display: grid;
      gap: 28px;
      align-items: center;
    }

    .eyebrow {
      width: fit-content;
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      padding: 5px 11px;
      color: var(--brand-dark);
      background: var(--brand-soft);
      border: 1px solid #ead6d0;
      border-radius: 999px;
      font-size: .84rem;
      font-weight: 850;
    }

    .hero h1 {
      margin: 14px 0 14px;
      max-width: 780px;
      font-size: clamp(2.15rem, 8vw, 4.15rem);
      line-height: 1.08;
      letter-spacing: -.045em;
    }

    .hero h1 span {
      display: block;
      color: var(--brand);
    }

    .hero-lead {
      margin: 0;
      max-width: 780px;
      color: var(--muted);
      font-size: clamp(1rem, 2.5vw, 1.16rem);
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 22px;
    }

    .btn {
      min-height: 48px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 18px;
      border: 1px solid transparent;
      border-radius: 12px;
      text-decoration: none;
      font-weight: 850;
    }

    .btn-primary {
      color: #fff;
      background: var(--brand);
    }

    .btn-primary:hover { background: var(--brand-dark); }

    .btn-secondary {
      color: var(--text);
      background: #fff;
      border-color: var(--line);
    }

    .btn-secondary:hover { background: var(--surface); }

    .hero-note {
      margin: 14px 0 0;
      color: var(--muted);
      font-size: .88rem;
    }

    .hero-visual {
      position: relative;
      overflow: hidden;
      aspect-ratio: 1 / 1;
      display: grid;
      place-items: center;
      min-height: 280px;
      padding: 28px;
      background:
        radial-gradient(circle at 22% 25%, rgba(167, 101, 53, .17), transparent 28%),
        radial-gradient(circle at 76% 70%, rgba(122, 46, 36, .18), transparent 32%),
        linear-gradient(145deg, #f9f4ee, #eee5dc);
      border: 1px solid var(--line);
      border-radius: 28px;
      box-shadow: var(--shadow-md);
    }

    .hero-visual::before,
    .hero-visual::after {
      content: "";
      position: absolute;
      border-radius: 999px;
      background: rgba(255,255,255,.62);
      filter: blur(1px);
    }

    .hero-visual::before {
      width: 240px;
      height: 86px;
      left: -48px;
      top: 32px;
      transform: rotate(-18deg);
    }

    .hero-visual::after {
      width: 210px;
      height: 75px;
      right: -44px;
      bottom: 35px;
      transform: rotate(12deg);
    }

    .visual-content {
      position: relative;
      z-index: 2;
      max-width: 480px;
      text-align: center;
    }

    .visual-content strong {
      display: block;
      font-size: clamp(1.35rem, 4vw, 2rem);
    }

    .visual-content span {
      display: block;
      margin-top: 8px;
      color: var(--muted);
    }

    /* =========================================================
       03 Common Sections
       ========================================================= */

    .section {
      padding: 58px 0;
    }

    .section-soft {
      background: var(--surface);
      border-block: 1px solid #f1ebe5;
    }

    .section-head {
      max-width: 790px;
      margin-bottom: 24px;
    }

    .section-kicker {
      display: block;
      margin-bottom: 7px;
      color: var(--brand);
      font-size: .86rem;
      font-weight: 900;
      letter-spacing: .03em;
    }

    .section-head h2 {
      margin: 0 0 9px;
      font-size: clamp(1.65rem, 5vw, 2.55rem);
      line-height: 1.2;
      letter-spacing: -.035em;
    }

    .section-head p {
      margin: 0;
      color: var(--muted);
    }

    .section-more {
      margin-top: 20px;
    }

    /* =========================================================
       04 Quick Find
       ========================================================= */

    .quick-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .quick-link {
      min-height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 12px 15px;
      color: var(--text);
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      text-decoration: none;
      font-weight: 850;
      box-shadow: 0 2px 10px rgba(50, 33, 23, .025);
    }

    .quick-link::after {
      content: "→";
      flex: 0 0 auto;
      color: var(--brand);
      font-size: 1.12rem;
    }

    .quick-link:hover {
      border-color: #d6bdb4;
      box-shadow: var(--shadow-sm);
      transform: translateY(-1px);
    }

    /* =========================================================
       05 Category Cards
       ========================================================= */

    .card-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
    }

    .category-card {
      min-height: 100%;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }

    .category-card:hover {
      transform: translateY(-3px);
      border-color: #dac6bb;
      box-shadow: var(--shadow-md);
    }

    .card-media {
      position: relative;
      aspect-ratio: 1 / 1;
      display: grid;
      place-items: center;
      overflow: hidden;
      padding: 20px;
      background:
        radial-gradient(circle at 35% 32%, rgba(255,255,255,.8), transparent 22%),
        linear-gradient(145deg, #f8f3ed, #efe5dc);
    }

    .card-media-label {
      padding: 8px 12px;
      color: #76685e;
      background: rgba(255,255,255,.75);
      border: 1px solid rgba(255,255,255,.92);
      border-radius: 999px;
      font-size: .82rem;
      font-weight: 850;
      backdrop-filter: blur(6px);
    }

    .card-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 19px;
    }

    .card-number {
      display: inline-block;
      margin-bottom: 8px;
      color: var(--accent);
      font-size: .78rem;
      font-weight: 900;
      letter-spacing: .08em;
    }

    .card-body h3 {
      margin: 0 0 8px;
      font-size: 1.22rem;
      line-height: 1.35;
    }

    .card-body p {
      margin: 0;
      color: var(--muted);
      font-size: .94rem;
    }

    .card-sub {
      margin-top: 12px !important;
      color: var(--brand-dark) !important;
      font-size: .85rem !important;
      font-weight: 800;
    }

    .card-link {
      min-height: 46px;
      display: inline-flex;
      align-items: center;
      margin-top: 18px;
      color: var(--brand);
      text-decoration: none;
      font-size: .9rem;
      font-weight: 900;
    }

    .card-link::after {
      content: " →";
      margin-left: 4px;
    }

    /* =========================================================
       06 Cut Cards
       ========================================================= */

    .cut-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .cut-card {
      min-height: 128px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 17px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 15px;
      text-decoration: none;
    }

    .cut-card:hover {
      border-color: #d5bdb2;
      box-shadow: var(--shadow-sm);
    }

    .cut-card strong {
      font-size: 1rem;
      line-height: 1.35;
    }

    .cut-card span {
      margin-top: 8px;
      color: var(--muted);
      font-size: .8rem;
    }

    /* =========================================================
       07 Buying Guide
       ========================================================= */

    .guide-grid {
      display: grid;
      gap: 14px;
    }

    .guide-card {
      padding: 21px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
    }

    .guide-index {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      margin-bottom: 14px;
      color: #fff;
      background: var(--brand);
      border-radius: 11px;
      font-size: .82rem;
      font-weight: 900;
    }

    .guide-card h3 {
      margin: 0 0 7px;
      font-size: 1.12rem;
    }

    .guide-card p {
      margin: 0;
      color: var(--muted);
      font-size: .93rem;
    }

    /* =========================================================
       08 Popular Cuts
       ========================================================= */

    .popular-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
    }

    .popular-card {
      display: grid;
      grid-template-columns: 92px 1fr;
      gap: 14px;
      align-items: center;
      padding: 12px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 15px;
    }

    .popular-thumb {
      aspect-ratio: 1 / 1;
      display: grid;
      place-items: center;
      color: #827369;
      background: var(--surface-2);
      border-radius: 11px;
      font-size: .72rem;
      font-weight: 800;
      text-align: center;
    }

    .popular-card h3 {
      margin: 0 0 5px;
      font-size: 1.04rem;
    }

    .popular-card p {
      margin: 0;
      color: var(--muted);
      font-size: .86rem;
    }

    .popular-type {
      display: inline-block;
      margin-bottom: 5px;
      color: var(--brand);
      font-size: .72rem;
      font-weight: 900;
    }

    /* =========================================================
       09 Local Intent
       ========================================================= */

    .local-wrap {
      display: grid;
      gap: 18px;
    }

    .local-intro {
      padding: 26px;
      color: #fff;
      background:
        radial-gradient(circle at 90% 20%, rgba(255,255,255,.12), transparent 30%),
        linear-gradient(145deg, var(--brand-dark), var(--brand));
      border-radius: var(--radius-lg);
    }

    .local-intro h2 {
      margin: 0 0 10px;
      font-size: clamp(1.6rem, 5vw, 2.3rem);
      line-height: 1.2;
    }

    .local-intro p {
      margin: 0;
      color: rgba(255,255,255,.84);
    }

    .local-links {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .local-link {
      min-height: 96px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 16px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      text-decoration: none;
    }

    .local-link strong {
      line-height: 1.35;
    }

    .local-link span {
      margin-top: 8px;
      color: var(--muted);
      font-size: .78rem;
    }

    /* =========================================================
       10 FAQ
       ========================================================= */

    .faq-list {
      display: grid;
      gap: 10px;
    }

    .faq-item {
      overflow: hidden;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
    }

    .faq-item summary {
      min-height: 58px;
      display: flex;
      align-items: center;
      padding: 14px 17px;
      cursor: pointer;
      list-style: none;
      font-weight: 850;
    }

    .faq-item summary::-webkit-details-marker { display: none; }

    .faq-item summary::after {
      content: "+";
      margin-left: auto;
      color: var(--brand);
      font-size: 1.4rem;
      font-weight: 500;
    }

    .faq-item[open] summary::after { content: "−"; }

    .faq-item p {
      margin: 0;
      padding: 0 17px 18px;
      color: var(--muted);
    }

    /* =========================================================
       11 Cooperation CTA
       ========================================================= */

    .cta {
      padding: 30px;
      background: linear-gradient(145deg, #f8f2ec, #f1e5db);
      border: 1px solid #e6d8cc;
      border-radius: var(--radius-lg);
    }

    .cta h2 {
      margin: 0 0 9px;
      font-size: clamp(1.55rem, 5vw, 2.3rem);
      line-height: 1.2;
    }

    .cta p {
      margin: 0;
      max-width: 800px;
      color: var(--muted);
    }

    .cta-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 19px;
    }

    /* =========================================================
       12 Footer
       ========================================================= */

    .site-footer {
      margin-top: 56px;
      padding: 42px 0 26px;
      background: #211d1a;
      color: rgba(255,255,255,.82);
    }

    .footer-grid {
      display: grid;
      gap: 28px;
    }

    .footer-brand h2 {
      margin: 0 0 8px;
      color: #fff;
      font-size: 1.08rem;
    }

    .footer-brand p {
      margin: 0;
      max-width: 650px;
      color: rgba(255,255,255,.65);
      font-size: .9rem;
    }

    .footer-col h3 {
      margin: 0 0 10px;
      color: #fff;
      font-size: .93rem;
    }

    .footer-links {
      display: grid;
      gap: 7px;
    }

    .footer-links a {
      color: rgba(255,255,255,.68);
      text-decoration: none;
      font-size: .88rem;
    }

    .footer-links a:hover { color: #fff; }

    .copyright {
      margin-top: 28px;
      padding-top: 18px;
      color: rgba(255,255,255,.5);
      border-top: 1px solid rgba(255,255,255,.1);
      font-size: .8rem;
    }

/* 手機版 Footer 置中 */
@media (max-width: 639px) {

  .site-footer {
    text-align: center;
  }

  .footer-grid {
    justify-items: center;
    text-align: center;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand p {
    margin-inline: auto;
  }

  .footer-col {
    width: 100%;
    text-align: center;
  }

  .footer-links {
    justify-items: center;
    text-align: center;
  }

  .footer-links li {
    width: 100%;
    text-align: center;
  }

  .footer-links a {
    display: inline-block;
    text-align: center;
  }

  .copyright {
    text-align: center;
  }

}

    /* =========================================================
       Breakpoints
       ========================================================= */

    @media (min-width: 640px) {
      :root { --gutter: 28px; }

      .brand-tagline { display: block; }

      .quick-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .card-grid {
        grid-template-columns: repeat(2, 1fr);
      }

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

      .guide-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .popular-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .local-links {
        grid-template-columns: repeat(3, 1fr);
      }

      .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
      }
    }

    @media (min-width: 960px) {
      :root { --gutter: 32px; }

      .menu-toggle { display: none; }

      .main-nav {
        display: block;
        position: static;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
      }

      .main-nav ul {
        display: flex;
        align-items: center;
        gap: 2px;
      }

      .main-nav a {
        min-height: 44px;
        padding: 7px 10px;
      }

      .hero {
        padding: 72px 0 54px;
      }

      .hero-grid {
        grid-template-columns: 1.08fr .92fr;
        gap: 48px;
      }

      .section {
        padding: 76px 0;
      }

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

      .card-grid {
        grid-template-columns: repeat(3, 1fr);
      }

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

      .popular-grid {
        grid-template-columns: repeat(3, 1fr);
      }

      .local-wrap {
        grid-template-columns: .95fr 1.05fr;
        align-items: stretch;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      *, *::before, *::after {
        transition: none !important;
        animation: none !important;
      }
    }
