/* =====================================================
   果果家 KOKOYA · 台灣果市 C v2（2026-07-19）
   單一視覺層：桌機／平板／手機共用同一色票與插畫系統。
   所有斷點只調整尺寸、排列與圖片位置，不重新定義主題色。
   ===================================================== */

:root {
  --c-bg: #fff6e8;
  --c-paper: #fffcf4;
  --c-paper-warm: #f3e4c4;
  --c-ink: #3b2a22;
  --c-ink-soft: #6b5647;
  --c-orange: #f36b32;
  --c-orange-hover: #e84a16;
  --c-green: #1e7568;
  --c-green-hover: #07533e;
  --c-yellow: #f4b340;
  --c-olive: #667a3c;
  --c-line: #e7c989;
  --c-disabled: #a99f8e;
  --c-white: #ffffff;
  --c-shadow-rgb: 72, 43, 18;

  --font-display: "Noto Serif TC", "Songti TC", serif;
  --font-ui: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --radius-button: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;
  --border-card: 1px solid var(--c-line);
  --shadow-card: 0 8px 22px rgba(var(--c-shadow-rgb), .08);
  --shadow-raised: 0 16px 38px rgba(var(--c-shadow-rgb), .13);
  --focus-ring: 0 0 0 3px rgba(243, 107, 50, .28);

  /* 舊元件相容別名：值全部指向同一份 C v2 tokens。 */
  --cream: var(--c-bg);
  --cream-strong: var(--c-paper-warm);
  --paper: var(--c-paper);
  --paper-2: var(--c-paper-warm);
  --ink: var(--c-ink);
  --ink-soft: var(--c-ink-soft);
  --ink-3: var(--c-ink-soft);
  --muted: var(--c-disabled);
  --orange: var(--c-orange);
  --orange-deep: var(--c-orange-hover);
  --orange-soft: var(--c-paper-warm);
  --leaf: var(--c-green);
  --leaf-deep: var(--c-green-hover);
  --tomato: var(--c-orange-hover);
  --line: var(--c-line);
  --serif: var(--font-display);
  --rounded: var(--font-ui);
  --shadow: var(--shadow-raised);
  --soft-shadow: var(--shadow-card);
  --shadow-sm: var(--shadow-card);
  --fruit-enhance: none;
}

html { background-color: var(--c-bg); }

body {
  min-width: 0;
  color: var(--c-ink);
  background-color: var(--c-bg);
  background-image: url("../assets/c-market-v2/paper-grain-tile-v2.png");
  background-repeat: repeat;
  background-size: 512px 512px;
  font-family: var(--font-ui);
  overflow-x: clip;
}

body::before { display: none; }

h1,
h2,
h3,
.product-info h3,
.catalog-page-title,
.catalog-card h2 {
  color: var(--c-ink);
  font-family: var(--font-display);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.site-canvas {
  width: min(100%, 1440px);
  max-width: 1440px;
  padding-top: 84px;
  background-color: color-mix(in srgb, var(--c-paper) 92%, transparent);
  box-shadow: 0 0 70px rgba(var(--c-shadow-rgb), .05);
}

/* Header 與果市棚架 */
.site-header {
  min-height: 84px;
  padding-inline: max(32px, calc((100% - 1280px) / 2));
  gap: 24px;
  background-color: color-mix(in srgb, var(--c-paper) 97%, transparent);
  border-bottom: 0;
  box-shadow: 0 4px 18px rgba(var(--c-shadow-rgb), .07);
  overflow: visible;
}

.site-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: -24px;
  height: 25px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--c-green-hover) 0 40px,
    var(--c-paper-warm) 40px 80px,
    var(--c-yellow) 80px 120px,
    var(--c-orange-hover) 120px 160px
  );
  -webkit-mask: radial-gradient(circle at 50% 0, #000 70%, transparent 72%) 0 0 / 40px 25px repeat-x;
  mask: radial-gradient(circle at 50% 0, #000 70%, transparent 72%) 0 0 / 40px 25px repeat-x;
  filter: drop-shadow(0 2px 1px rgba(var(--c-shadow-rgb), .12));
}

.brand,
.brand .name { color: var(--c-green-hover); }

.brand img {
  width: 58px;
  height: 58px;
  mix-blend-mode: normal;
}

.brand .en {
  color: var(--c-green);
  font-weight: 800;
}

.nav-links {
  color: var(--c-ink);
  font-family: var(--font-ui);
  font-size: .92rem;
  letter-spacing: .06em;
}

.nav-links a.active,
.nav-links a:hover { color: var(--c-orange-hover); }

.nav-links a::after { background-color: var(--c-orange); }

.auth-slot .login-btn,
.auth-slot .user-chip {
  min-height: 44px;
  color: var(--c-ink);
  background-color: transparent;
  border-color: transparent;
}

.auth-slot .login-btn:hover,
.auth-slot .user-chip:hover {
  color: var(--c-orange-hover);
  background-color: var(--c-paper-warm);
}

.auth-slot .user-menu {
  border: var(--border-card);
  border-radius: var(--radius-card);
  background-color: var(--c-paper);
  box-shadow: var(--shadow-raised);
}

.auth-slot .user-menu[hidden] { display: none !important; }

.auth-slot .user-menu a:hover,
.auth-slot .user-menu button:hover {
  color: var(--c-orange-hover);
  background-color: var(--c-paper-warm);
}

.header-cta,
.btn.primary,
.btn-primary,
.cart-button,
.catalog-add {
  min-height: 44px;
  border: 1px solid var(--c-orange-hover);
  border-radius: var(--radius-button);
  color: var(--c-white);
  background-color: var(--c-orange);
  background-image: none;
  box-shadow: 0 9px 20px rgba(232, 74, 22, .2);
}

.header-cta:hover,
.btn.primary:hover,
.btn-primary:hover,
.cart-button:hover,
.cart-button.is-added,
.catalog-add:hover {
  color: var(--c-white);
  background-color: var(--c-orange-hover);
}

.header-cta .badge-cnt { background-color: var(--c-green-hover); }

.btn.outline,
.btn-ghost {
  min-height: 44px;
  border-color: var(--c-green);
  border-radius: var(--radius-button);
  color: var(--c-green-hover);
  background-color: transparent;
}

.btn.plain {
  min-height: 44px;
  border-color: var(--c-line);
  border-radius: var(--radius-button);
  color: var(--c-ink);
  background-color: var(--c-paper);
}

.menu-toggle {
  width: 46px;
  height: 46px;
  border-color: var(--c-line);
  border-radius: var(--radius-button);
  color: var(--c-green-hover);
  background-color: var(--c-paper);
  box-shadow: none;
}

/* 首頁 Hero */
.hero {
  position: relative;
  min-height: 620px;
  margin: 0;
  overflow: hidden;
  border: 0;
  background-color: var(--c-bg);
  background-image: none;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 26px 0 0 auto;
  width: 58%;
  background-color: transparent;
  background-image: url("../assets/c-market-v2/hero-fruit-basket-v2.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.hero::after { display: none; }

.hero-copy {
  position: relative;
  z-index: 2;
  width: 42%;
  max-width: 540px;
  margin-left: max(48px, calc((100% - 1280px) / 2));
  padding: 104px 0 94px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 4px 11px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-green-hover);
  background-color: color-mix(in srgb, var(--c-paper) 78%, transparent);
  font-family: var(--font-ui);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.hero h1 {
  max-width: 10em;
  margin: 0;
  color: var(--c-ink);
  font-family: var(--font-display);
  font-size: clamp(3.45rem, 4.8vw, 4.4rem);
  font-weight: 900;
  line-height: 1.34;
  letter-spacing: .055em;
  text-shadow: none;
}

.hero-accent { color: var(--c-orange-hover); }

.hero-text {
  max-width: 430px;
  margin-top: 20px;
  color: var(--c-ink-soft);
  font-family: var(--font-ui);
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: .045em;
}

.hero-actions { margin-top: 26px; }

.hero-actions .btn.primary {
  min-width: 154px;
  justify-content: center;
}

/* 服務承諾 */
.trust-panel {
  position: relative;
  z-index: 4;
  width: min(calc(100% - 64px), 1280px);
  margin: -8px auto 58px;
  gap: 18px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.trust-panel article {
  min-height: 148px;
  padding: 22px 24px;
  gap: 18px;
  border: var(--border-card);
  border-radius: var(--radius-card);
  background-color: var(--c-paper);
  box-shadow: var(--shadow-card);
}

.trust-panel article + article::before { display: none; }

.trust-icon {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  overflow: visible;
}

.trust-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.trust-panel h2 {
  margin-bottom: 5px;
  color: var(--c-green-hover);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.trust-panel p {
  color: var(--c-ink-soft);
  font-size: .8rem;
  line-height: 1.75;
}

/* 商品 */
.section {
  width: min(calc(100% - 64px), 1280px);
  margin-top: 56px;
}

.section-title {
  gap: 14px;
  margin-bottom: 28px;
}

.section-title::before,
.section-title::after {
  width: 58px;
  height: 22px;
  background-color: transparent;
  background-image: url("../assets/c-market-v2/leaf-ornament-v2.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.section-title::before { transform: scaleX(-1); }

.section-title h2 {
  color: var(--c-ink);
  font-size: clamp(1.8rem, 2.8vw, 2.45rem);
  font-weight: 900;
  letter-spacing: .14em;
}

.product-grid { gap: 22px; }

.product-card,
.catalog-card,
.panel,
.order-card,
.about-story,
.about-values article,
.about-promise {
  border: var(--border-card);
  border-radius: var(--radius-card);
  background-color: var(--c-paper);
  box-shadow: var(--shadow-card);
}

.product-card,
.catalog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-color: rgba(232, 126, 48, .28);
  border-radius: 20px;
  background-color: rgba(255, 253, 248, .96);
  box-shadow: 0 12px 28px rgba(var(--c-shadow-rgb), .08);
}

.product-card:hover {
  border-color: var(--c-orange);
  transform: translateY(-5px);
  box-shadow: var(--shadow-raised);
}

.product-image,
.catalog-image {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background-color: var(--c-paper-warm);
  overflow: hidden;
}

.blog-preview-card .product-image { aspect-ratio: 16 / 9; }

.product-image,
.catalog-image {
  width: calc(100% - 20px);
  margin: 10px 10px 0;
}

.product-image img,
.product-image .product-bg,
.catalog-photo {
  filter: none;
  background-size: contain;
}

.product-card:hover .product-image img,
.product-card:hover .product-image .product-bg,
.catalog-card:hover .catalog-photo { filter: none; }

.product-image .badge,
.catalog-badge {
  border-radius: 999px;
  color: var(--c-white);
  background-color: var(--c-green-hover);
}

.product-image .badge.low { background-color: var(--c-orange); }

.product-info,
.catalog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 16px;
}

.product-info h3,
.catalog-card h2 {
  margin: 0 0 7px;
  color: var(--c-ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .035em;
}

.product-info p,
.catalog-card p {
  display: -webkit-box;
  min-height: 3.15em;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--c-ink-soft);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-bottom,
.catalog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-top: auto;
  gap: 10px;
}

.product-bottom .from,
.catalog-price-display .from {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--c-ink-soft);
  background-color: var(--c-paper-warm);
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.product-bottom strong,
.product-bottom .price-amount,
.catalog-price,
.catalog-tier-total {
  color: var(--c-orange-hover);
  font-family: var(--font-ui);
  font-weight: 900;
}

.catalog-price-display {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--c-orange-hover);
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1.2;
}

.catalog-price { font-size: 1.06rem; }

.catalog-unit {
  margin-left: 4px;
  color: var(--c-ink-soft);
  font-size: .72rem;
  font-weight: 700;
}

.product-card .cart-button,
.catalog-card .catalog-add {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border: 1.5px solid var(--c-orange-hover);
  border-radius: 999px;
  color: var(--c-orange-hover);
  background-color: var(--c-paper);
  box-shadow: none;
}

.product-card .cart-button svg,
.catalog-card .catalog-add svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.product-card .cart-button:hover,
.product-card .cart-button.is-added,
.catalog-card .catalog-add:hover {
  color: var(--c-white);
  background-color: var(--c-orange-hover);
  transform: translateY(-1px);
}

/* 水果日誌故事橫幅 */
.story-banner {
  position: relative;
  display: block;
  width: min(calc(100% - 64px), 1280px);
  min-height: 390px;
  margin: 76px auto 74px;
  padding: 0;
  border: var(--border-card);
  border-radius: var(--radius-panel);
  color: var(--c-ink);
  background-color: var(--c-paper-warm);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.story-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 0;
  background-color: transparent;
  background-image: url("../assets/c-market-v2/orchard-journal-desktop-v2.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.story-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, var(--c-paper-warm) 0%, var(--c-paper-warm) 34%, transparent 58%);
}

.story-banner > div {
  position: relative;
  z-index: 2;
  width: min(43%, 540px);
  padding: 64px 56px;
}

.story-kicker {
  color: var(--c-orange-hover) !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
}

.story-banner h2 {
  color: var(--c-ink);
  font-size: clamp(1.8rem, 2.55vw, 2.4rem);
  font-weight: 900;
  white-space: nowrap;
}

.story-banner p {
  color: var(--c-ink-soft);
  font-size: .92rem;
}

.story-banner .story-link {
  min-height: 44px;
  border-color: var(--c-green-hover);
  border-radius: var(--radius-button);
  color: var(--c-white);
  background-color: var(--c-green-hover);
}

.story-banner .story-link:hover { background-color: var(--c-green); }

/* 內頁共用插畫 Hero */
.page-visual {
  position: relative;
  display: grid;
  align-items: center;
  width: min(calc(100% - 64px), 1280px);
  min-height: 260px;
  margin: 52px auto 24px;
  padding: 38px 48px;
  border: var(--border-card);
  border-radius: var(--radius-panel);
  background-color: var(--c-paper-warm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.page-visual::after,
.page-header::after,
.about-hero::after,
.not-found-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  width: 58%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.page-visual > div,
.page-header > *,
.about-hero > *,
.not-found-card > * {
  position: relative;
  z-index: 2;
}

.page-visual h1 {
  max-width: 42%;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.35;
}

.page-visual p {
  max-width: 39%;
  margin: 12px 0 0;
  color: var(--c-ink-soft);
}

.page-visual-products::after { background-image: url("../assets/c-market-v2/page-products-market-v2.webp"); }
.page-visual-seasonal::after { background-image: url("../assets/c-market-v2/page-seasonal-v2.webp"); }
.page-visual-gift::after { background-image: url("../assets/c-market-v2/page-giftbox-v2.webp"); }
.page-visual-group::after { background-image: url("../assets/c-market-v2/page-groupbuy-v2.webp"); }

.page-header {
  position: relative;
  min-height: 280px;
  display: grid;
  align-content: center;
  padding: 56px max(48px, calc((100% - 1180px) / 2));
  border: 0;
  background-color: var(--c-paper-warm);
  overflow: hidden;
}

.page-header::before {
  display: none;
}

.page-header h1,
.page-header .lead {
  width: 42%;
  max-width: 540px;
  text-align: left;
}

.page-header h1 {
  color: var(--c-green-hover);
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 900;
}

.page-blog .page-header::after { background-image: url("../assets/c-market-v2/page-blog-v2.webp"); }
.page-faq .page-header::after { background-image: url("../assets/c-market-v2/page-faq-v2.webp"); }
.page-orders .page-header::after { background-image: url("../assets/c-market-v2/page-orders-v2.webp"); }

.catalog-shell {
  width: min(calc(100% - 64px), 1280px);
  margin-top: 42px;
}

.catalog-sidebar,
.catalog-topbar,
.catalog-controls select,
.catalog-search {
  border-color: var(--c-line);
}

.catalog-cats button.active span,
.catalog-cats button:hover span { color: var(--c-orange-hover); }

.catalog-card {
  padding: 0;
  text-align: left;
}

.catalog-image { border: 0; }

.catalog-card-body { padding: 16px 18px 16px; }

.catalog-add {
  opacity: 1;
  transform: none;
}

.catalog-pager button {
  min-height: 44px;
  border-color: var(--c-line);
  border-radius: var(--radius-button);
  color: var(--c-ink);
  background-color: var(--c-paper);
}

.catalog-empty,
.catalog-loading { color: var(--c-ink-soft); }

.catalog-empty,
.market-empty,
.cart-empty {
  display: grid;
  grid-column: 1 / -1;
  align-content: end;
  justify-items: center;
  min-height: 300px;
  padding: 210px 24px 28px;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius-card);
  color: var(--c-ink-soft);
  background-color: var(--c-paper);
  background-repeat: no-repeat;
  background-position: center 24px;
  background-size: 190px auto;
  text-align: center;
}

.catalog-empty { background-image: url("../assets/c-market-v2/empty-search-v2.webp"); }
.market-empty-orders { background-image: url("../assets/c-market-v2/empty-orders-v2.webp"); }
.market-empty-blog { background-image: url("../assets/c-market-v2/empty-blog-v2.webp"); }
.market-empty-faq { background-image: url("../assets/c-market-v2/empty-search-v2.webp"); }
.cart-empty { background-image: url("../assets/c-market-v2/empty-products-v2.webp"); }

.market-empty a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--c-orange-hover);
  font-weight: 800;
}

.about-shell { width: min(calc(100% - 64px), 1180px); }

.about-hero {
  position: relative;
  min-height: 470px;
  padding: 64px 48% 64px 56px;
  border: var(--border-card);
  border-radius: var(--radius-panel);
  background-color: var(--c-paper-warm);
  background-image: none;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.about-hero::after {
  background-image: url("../assets/c-market-v2/page-about-v2.webp");
}

.about-hero h1 {
  max-width: none;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
}

.about-story,
.about-values article,
.about-promise { border-radius: var(--radius-card); }

/* Footer */
.site-footer {
  position: relative;
  margin-top: 84px;
  padding: 70px 40px 46px;
  border: 0;
  background-color: var(--c-bg);
  background-image: url("../assets/c-market-v2/footer-leaves-v2.webp");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 190px auto;
}

.site-footer::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 25px;
  background-image: repeating-linear-gradient(90deg, var(--c-green-hover) 0 40px, var(--c-paper-warm) 40px 80px, var(--c-yellow) 80px 120px, var(--c-orange-hover) 120px 160px);
  -webkit-mask: radial-gradient(circle at 50% 0, #000 70%, transparent 72%) 0 0 / 40px 25px repeat-x;
  mask: radial-gradient(circle at 50% 0, #000 70%, transparent 72%) 0 0 / 40px 25px repeat-x;
  filter: drop-shadow(0 2px 1px rgba(var(--c-shadow-rgb), .12));
}

.footer-brand,
.footer-links,
.footer-social { position: relative; z-index: 2; }

.site-footer h3 { color: var(--c-ink); font-weight: 900; }

.site-footer a:not(.brand):not(.social-icons a):hover { color: var(--c-orange-hover); }

.social-icons a {
  border-color: var(--c-ink-soft);
  color: var(--c-white);
  background-color: var(--c-ink-soft);
}

.back-top { background-color: var(--c-green-hover); }

/* 購物車、表單與彈窗沿用同一色票 */
.modal,
.cart-drawer,
.cart-foot,
.tier-options button,
details.faq {
  border-color: var(--c-line);
  background-color: var(--c-paper);
}

.field input,
.field select,
.field textarea,
.qty-step,
.catalog-search input,
.catalog-controls select {
  min-height: 44px;
  border-color: var(--c-line);
  color: var(--c-ink);
  background-color: var(--c-paper);
}

.qty-step {
  border-radius: var(--radius-button);
  color: var(--c-green-hover);
}

.order-card.new { border-left-color: var(--c-orange); }
.order-card.processing { border-left-color: var(--c-green); }
.order-card.completed { border-left-color: var(--c-green-hover); }
.order-card.cancelled { border-left-color: var(--c-disabled); }

.auth-market-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background-color: rgba(59, 42, 34, .58);
  backdrop-filter: blur(5px);
}

.auth-market-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(260px, 1fr);
  width: min(680px, 100%);
  min-height: 360px;
  border: var(--border-card);
  border-radius: var(--radius-panel);
  background-color: var(--c-paper);
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}

.auth-market-art {
  background-color: var(--c-paper-warm);
  background-image: url("../assets/c-market-v2/auth-market-v2.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.auth-market-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 34px 26px;
  text-align: center;
}

.auth-market-copy h2 { margin: 0 0 8px; }
.auth-market-copy p { margin: 0 0 20px; color: var(--c-ink-soft); }

.auth-google-button {
  display: flex;
  min-height: 44px;
  justify-content: center;
}

.auth-market-cancel {
  min-width: 88px;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius-button);
  color: var(--c-ink-soft);
  background-color: transparent;
}

.auth-market-cancel:hover { color: var(--c-orange-hover); background-color: var(--c-paper-warm); }

/* 收合導覽：只改布局，不另造手機色票 */
@media (max-width: 1100px) {
  .site-header { padding-inline: 20px; }

  .site-header.header-collapsed .nav-links {
    border-color: var(--c-line);
    border-radius: var(--radius-card);
    background-color: var(--c-paper);
  }

  .site-header.header-collapsed .nav-links a.active,
  .site-header.header-collapsed .nav-links a:hover {
    color: var(--c-orange-hover);
    background-color: var(--c-paper-warm);
  }

  .hero h1 { font-size: clamp(2.7rem, 5.4vw, 3.75rem); }
  .trust-panel article { padding: 18px; }
  .trust-icon { width: 92px; height: 92px; flex-basis: 92px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 820px) {
  .hero-copy {
    width: 48%;
    max-width: 380px;
    margin-left: 32px;
  }

  .hero::before { width: 54%; }

  .hero h1 {
    max-width: 11em;
    font-size: 2.55rem;
    letter-spacing: .03em;
  }
}

@media (max-width: 767px) {
  .site-canvas { padding-top: 74px; }
  .site-header { min-height: 74px; }

  .hero {
    min-height: 740px;
  }

  .hero::before {
    inset: auto 0 0;
    width: 100%;
    height: 48%;
    background-position: center bottom;
    background-size: contain;
  }

  .hero-copy {
    width: min(calc(100% - 48px), 640px);
    max-width: none;
    margin-inline: auto;
    padding: 58px 0 360px;
  }

  .hero h1 {
    max-width: 11em;
    font-size: clamp(2.35rem, 7.8vw, 3.25rem);
  }

  .trust-panel {
    grid-template-columns: 1fr;
    width: min(calc(100% - 48px), 640px);
    margin-top: 18px;
  }

  .trust-panel article { justify-content: flex-start; }

  .section,
  .story-banner,
  .about-shell,
  .catalog-shell,
  .page-visual { width: calc(100% - 28px); }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }

  .story-banner {
    min-height: 580px;
    background-color: var(--c-paper-warm);
  }

  .story-banner::before {
    inset: auto 0 0;
    height: 52%;
    background-image: url("../assets/c-market-v2/orchard-journal-mobile-v2.webp");
    background-position: center bottom;
    background-size: cover;
  }

  .story-banner::after {
    background-image: linear-gradient(180deg, var(--c-paper-warm) 0%, var(--c-paper-warm) 43%, transparent 69%);
  }

  .story-banner > div {
    width: 100%;
    padding: 42px 34px 330px;
  }

  .story-banner h2 { white-space: normal; }

  .page-visual {
    min-height: 470px;
    margin-top: 36px;
    padding: 36px 28px 280px;
    align-content: start;
  }

  .page-visual::after {
    inset: auto 0 0;
    width: 100%;
    height: 60%;
    background-position: center bottom;
  }

  .page-visual h1,
  .page-visual p { max-width: none; }

  .page-header {
    min-height: 470px;
    align-content: start;
    padding: 52px 24px 270px;
  }

  .page-header::after {
    inset: auto 0 0;
    width: 100%;
    height: 58%;
    background-position: center bottom;
  }

  .page-header h1,
  .page-header .lead { width: 100%; max-width: none; }

  .about-hero {
    min-height: 650px;
    padding: 46px 28px 350px;
  }

  .about-hero::after {
    inset: auto 0 0;
    width: 100%;
    height: 56%;
    background-position: center bottom;
  }

  .catalog-shell { grid-template-columns: 1fr; gap: 34px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .catalog-controls { gap: 12px; flex-wrap: wrap; }
  .catalog-controls label { min-width: 0; flex: 1 1 140px; }

  .site-footer { background-size: 130px auto; }

  .auth-market-card {
    grid-template-columns: 1fr;
    width: min(390px, 100%);
  }

  .auth-market-art { min-height: 180px; }

  .auth-market-copy { padding: 26px 20px; }

  .footer-links > div,
  .site-footer a:not(.brand):not(.social-icons a) {
    border-radius: 0;
    background-color: transparent;
  }
}

@media (max-width: 559px) {
  .site-canvas { padding-top: 66px; }
  .site-header,
  .site-header.header-collapsed { min-height: 66px; padding-inline: 12px; }

  .site-header::after {
    bottom: -17px;
    height: 18px;
    background-size: 120px 18px;
    -webkit-mask-size: 30px 18px;
    mask-size: 30px 18px;
  }

  .site-footer::before {
    height: 18px;
    background-size: 120px 18px;
    -webkit-mask-size: 30px 18px;
    mask-size: 30px 18px;
  }

  .brand img,
  .site-header.header-collapsed .brand img { width: 44px; height: 44px; }

  .product-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-info,
  .catalog-card-body { padding: 16px 18px 17px; }

  .product-info h3,
  .catalog-card h2 { font-size: 1.05rem; }

  .header-cta,
  .menu-toggle,
  .site-header.header-collapsed .header-cta {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .hero { min-height: 700px; }

  .hero-copy {
    width: calc(100% - 32px);
    padding: 48px 0 320px;
  }

  .eyebrow { font-size: .66rem; }

  .hero h1 {
    max-width: 10.5em;
    font-size: clamp(2.15rem, 10.4vw, 2.85rem);
    line-height: 1.4;
  }

  .hero-text { font-size: .88rem; }

  .trust-panel article { min-height: 124px; padding: 14px; gap: 14px; }
  .trust-icon { width: 88px; height: 88px; flex-basis: 88px; }
  .trust-panel h2 { font-size: 1rem; }
  .trust-panel p { font-size: .72rem; }

  .product-info { padding: 13px 10px 14px; }
  .product-info h3 { font-size: .92rem; }
  .cart-button { width: 44px; min-width: 44px; padding-inline: 0; }

  .story-banner { min-height: 560px; margin-top: 58px; }
  .story-banner > div { padding: 34px 22px 310px; }
  .story-banner h2 { font-size: 1.7rem; }
  .story-banner p { font-size: .84rem; }

  .page-visual { min-height: 430px; padding: 32px 22px 260px; }
  .page-header { min-height: 430px; padding: 44px 18px 250px; }
  .about-hero { min-height: 590px; padding: 38px 22px 330px; }

  .site-footer { padding: 58px 18px 42px; background-size: 100px auto; }
}

@media (max-width: 359px) {
  .product-grid,
  .catalog-grid { grid-template-columns: 1fr; }

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

/* 手機商店專用布局：桌面版（768px 以上）維持原設計 */
@media (max-width: 767px) {
  /* 左側固定入口，選單由左往下展開 */
  .site-header.header-collapsed {
    grid-template-columns: 44px minmax(0, 1fr) auto 44px;
    grid-template-areas: "menu brand auth cart";
    gap: 8px;
    padding-inline: 12px;
  }

  .site-header.header-collapsed .menu-toggle {
    grid-area: menu;
    order: 0;
    justify-self: start;
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .site-header.header-collapsed .brand {
    grid-area: brand;
    order: 1;
    width: auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .site-header.header-collapsed .auth-slot {
    grid-area: auth;
    order: 2;
  }

  .site-header.header-collapsed .header-cta {
    grid-area: cart;
    order: 3;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    overflow: visible;
    font-size: 0;
  }

  .site-header.header-collapsed .nav-links {
    top: calc(100% + 18px);
    right: auto;
    left: 12px;
    display: none;
    grid-template-columns: 1fr;
    width: min(280px, calc(100vw - 24px));
    max-height: calc(100vh - 104px);
    gap: 2px;
    padding: 8px;
    overflow-y: auto;
    transform-origin: top left;
  }

  .site-header.header-collapsed.is-open .nav-links,
  .site-header.header-collapsed .nav-links.open {
    display: grid;
  }

  .site-header.header-collapsed .nav-links a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 12px;
    text-align: left;
  }

  /* 商品頁首圖縮短，讓搜尋與分類在第一屏更快出現 */
  .catalog-page .page-visual-products {
    width: calc(100% - 20px);
    min-height: 300px;
    margin: 30px auto 14px;
    padding: 22px 18px 158px;
    align-content: start;
  }

  .catalog-page .page-visual-products::after {
    inset: auto 0 0;
    width: 100%;
    height: 54%;
    background-position: center bottom;
    background-size: contain;
  }

  .catalog-page .page-visual-products h1 {
    margin-bottom: 10px;
    font-size: clamp(1.55rem, 7.2vw, 2rem);
    line-height: 1.3;
  }

  .catalog-page .page-visual-products p:not(.eyebrow) {
    display: -webkit-box;
    max-width: 28em;
    overflow: hidden;
    font-size: .82rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  /* 搜尋、分類與排序改為手機可快速掃讀的橫向工具列 */
  .catalog-page .catalog-shell {
    width: calc(100% - 20px);
    margin: 14px auto 60px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .catalog-page .catalog-sidebar {
    position: static;
    min-width: 0;
  }

  .catalog-page .catalog-search {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 6px;
    margin-bottom: 10px;
  }

  .catalog-page .catalog-search input,
  .catalog-page .catalog-search button {
    height: 44px;
  }

  .catalog-page .catalog-search input {
    padding-inline: 12px;
    font-size: 16px;
  }

  .catalog-page .catalog-search button {
    width: 44px;
  }

  .catalog-page .catalog-sidebar h2 {
    margin: 10px 0 8px;
    font-size: 1rem;
    line-height: 1.4;
  }

  .catalog-page .catalog-cats {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .catalog-page .catalog-cats::-webkit-scrollbar { display: none; }

  .catalog-page .catalog-cats button {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    color: var(--c-ink-soft);
    background-color: var(--c-paper);
    font-size: .82rem;
    line-height: 1;
    white-space: nowrap;
  }

  .catalog-page .catalog-cats button.active {
    border-color: var(--c-orange-hover);
    color: var(--c-white);
    background-color: var(--c-orange);
  }

  .catalog-page .catalog-cats button.active span,
  .catalog-page .catalog-cats button.active b { color: inherit; }

  .catalog-page .catalog-main { min-width: 0; }

  .catalog-page .catalog-page-title {
    margin: 0 0 10px;
    font-size: 1.45rem;
    line-height: 1.3;
  }

  .catalog-page .catalog-topbar {
    min-height: 0;
    margin-bottom: 12px;
  }

  .catalog-page .catalog-breadcrumb { display: none; }

  .catalog-page .catalog-controls {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .catalog-page .catalog-controls label {
    min-width: 0;
    width: auto;
    flex: 1 1 0;
  }

  .catalog-page .catalog-controls select {
    width: 100%;
    height: 42px;
    padding-inline: 8px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background-color: var(--c-paper);
    font-size: 16px;
  }

  /* 商品卡固定兩欄，縮短圖片與文案但保留清楚的價格和觸控區 */
  .product-grid,
  .catalog-page .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .product-card,
  .catalog-page .catalog-card {
    min-width: 0;
    border-radius: 14px;
  }

  .product-image,
  .catalog-page .catalog-image {
    width: calc(100% - 12px);
    aspect-ratio: 4 / 3;
    margin: 6px 6px 0;
    border-radius: 10px;
  }

  .product-info,
  .catalog-page .catalog-card-body {
    padding: 10px 8px 12px;
  }

  .product-info h3,
  .catalog-page .catalog-card h2 {
    display: -webkit-box;
    min-height: 2.7em;
    margin-bottom: 6px;
    overflow: hidden;
    font-size: .84rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-info p,
  .catalog-page .catalog-card p { display: none; }

  .product-bottom,
  .catalog-page .catalog-card-foot {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .product-bottom .from,
  .catalog-page .catalog-price-display .from {
    margin-right: 3px;
    padding: 2px 4px;
    font-size: .6rem;
  }

  .product-bottom strong,
  .product-bottom .price-amount,
  .catalog-page .catalog-price { font-size: .88rem; }

  .catalog-page .catalog-unit {
    margin-left: 2px;
    font-size: .66rem;
  }

  .product-card .cart-button,
  .catalog-page .catalog-card .catalog-add {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .catalog-page .catalog-card .catalog-add:disabled {
    width: 44px;
    min-width: 44px;
    padding: 0 4px;
    font-size: .68rem;
  }

  .catalog-page .catalog-badge {
    top: 6px;
    left: 6px;
    padding: 4px 7px;
    font-size: .68rem;
  }
}

@media (max-width: 359px) {
  .site-header.header-collapsed {
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    gap: 6px;
  }

  .site-header.header-collapsed .auth-slot .login-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .site-header.header-collapsed .auth-slot .login-btn::before {
    content: "🔐";
    font-size: 17px;
  }

  .product-grid,
  .catalog-page .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap-inline: 6px;
  }

  .product-info,
  .catalog-page .catalog-card-body { padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
