/*
Theme Name: ZOWU 佐物
Theme URI: https://example.com
Author: 小包
Description: ZOWU 佐物 — 極簡黑白電影感包袋電商主題。移動端優先、漢堡滑出選單、黑白大圖區塊、WooCommerce 支援。繁體中文。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: zowu
*/

/* ==========================================================================
   1. 設計系統:純白 × 純黑 × 灰階(照影片)
   ========================================================================== */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F5F5F5;
  --bg-deep: #EBEBEB;
  --ink: #0A0A0A;
  --muted: #666666;
  --line: #E5E5E5;
  --white: #FFFFFF;
  --mask: rgba(0, 0, 0, .5);
  --footer-bg: #0A0A0A;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --maxw: 1200px;
  --pad: clamp(18px, 4vw, 44px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: clamp(28px, 6vw, 52px); }
h2 { font-size: clamp(22px, 4vw, 36px); }
h3 { font-size: 17px; }

p { margin: 0 0 1em; }

/* ==========================================================================
   2. 頁首(移動優先:漢堡 + 搜尋 + 置中 Logo + 圖標)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 14px;
}
.site-header__side { display: flex; align-items: center; gap: 16px; }
.site-header__side--left { flex: 1; }
.site-header__side--right { flex: 1; justify-content: flex-end; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.icon-btn svg { width: 22px; height: 22px; }

.site-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .22em;
  white-space: nowrap;
}
.site-brand small { font-weight: 400; letter-spacing: .08em; font-size: 11px; color: var(--muted); display: block; text-align: center; }

.cart-count {
  position: relative;
}
.cart-count b {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 400;
}

/* 搜尋條 */
.search-bar {
  display: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 14px;
}
.search-bar.is-open { display: block; }
.search-bar form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.search-bar input {
  flex: 1;
  border: 1px solid var(--ink);
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
}
.search-bar button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  padding: 0 22px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .2em;
  cursor: pointer;
}

/* ==========================================================================
   3. Off-canvas 滑出選單
   ========================================================================== */
.offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--bg);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform .35s var(--ease);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.offcanvas.is-open { transform: translateX(0); }

.offcanvas__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--line);
}
.offcanvas__head .brand { font-size: 16px; font-weight: 700; letter-spacing: .22em; }
.offcanvas__nav { flex: 1; overflow-y: auto; padding: 14px 0; }
.offcanvas__nav a, .offcanvas__nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px var(--pad);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.offcanvas__nav .chev { font-size: 11px; color: var(--muted); transition: transform .25s; }
.offcanvas__nav li.has-sub.is-open > button .chev { transform: rotate(90deg); }
.offcanvas__nav .submenu { display: none; background: var(--bg-soft); }
.offcanvas__nav li.has-sub.is-open .submenu { display: block; }
.offcanvas__nav .submenu a { padding: 11px var(--pad) 11px calc(var(--pad) + 18px); font-size: 14px; color: #333; }
.offcanvas__foot { padding: 18px var(--pad); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; gap: 16px; }

.offcanvas-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.offcanvas-mask.is-open { opacity: 1; pointer-events: auto; }

@media (min-width: 960px) {
  .offcanvas { display: none; }
  .offcanvas-mask { display: none; }
}

/* 桌面導覽(大屏時顯示,漢堡隱藏) */
.desktop-nav { display: none; }
@media (min-width: 960px) {
  .desktop-nav { display: flex; align-items: center; gap: 34px; }
  .desktop-nav a { font-size: 14px; letter-spacing: .12em; }
  .hamburger { display: none; }
}

/* ==========================================================================
   4. Hero(黑白大圖 + 文案 + 服務標籤)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.62) 100%),
    linear-gradient(135deg, #3a3a3a 0%, #111 40%, #4a4a4a 100%);
  background-size: cover;
  background-position: center;
}
.hero__inner { padding: 70px var(--pad) 60px; }
.hero__eyebrow {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.75);
  padding: 6px 18px;
  font-size: 12px;
  letter-spacing: .4em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 { color: var(--white); margin-bottom: 12px; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.hero p { color: rgba(255,255,255,.9); max-width: 560px; margin: 0 auto; }

/* 服務標籤 */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  margin-top: -1px;
}
.service {
  padding: 18px 10px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.service:last-child { border-right: 0; }
.service .t { font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.service .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ==========================================================================
   5. 品牌故事區
   ========================================================================== */
.story-sec { padding: clamp(56px, 8vw, 90px) 0; text-align: center; }
.story-sec .eyebrow { font-size: 12px; letter-spacing: .42em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.story-sec p { max-width: 720px; margin: 0 auto 1.2em; color: #333; font-size: 15.5px; }

/* ==========================================================================
   6. 部落格 / 熱門推薦(深色遮罩卡片)
   ========================================================================== */
.feature-sec { padding: 0 0 clamp(40px, 6vw, 70px); }
.feature-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(280px, 40vw, 420px);
  color: var(--white);
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.68) 100%),
              linear-gradient(135deg, #3d3d3d 0%, #141414 45%, #4d4d4d 100%);
  margin-bottom: 22px;
}
.feature-card__body { position: relative; z-index: 1; }
.feature-card .eyebrow { font-size: 12px; letter-spacing: .42em; text-transform: uppercase; margin-bottom: 10px; }
.feature-card h3 { font-size: clamp(20px, 3vw, 28px); color: var(--white); margin-bottom: 16px; }
.btn-light {
  display: inline-block;
  border: 1px solid var(--white);
  color: var(--white);
  padding: 11px 30px;
  font-size: 13px;
  letter-spacing: .3em;
  transition: all .3s;
}
.btn-light:hover { background: var(--white); color: var(--ink); }

/* ==========================================================================
   7. 品牌分類網格
   ========================================================================== */
.brands-sec { padding: clamp(50px, 7vw, 80px) 0; }
.brands-sec .eyebrow { text-align: center; font-size: 12px; letter-spacing: .42em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.brands-sec h2 { text-align: center; margin-bottom: 38px; }
.brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 720px) { .brand-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.brand-card { display: block; }
.brand-card__img {
  aspect-ratio: 1;
  background: linear-gradient(160deg, #e8e8e8 0%, #cfcfcf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.brand-card__img svg { width: 44%; opacity: .55; }
.brand-card__name { font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.brand-card__price { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   8. WooCommerce 商品網格
   ========================================================================== */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
@media (min-width: 720px) { .woocommerce ul.products { grid-template-columns: repeat(4, 1fr); gap: 30px 20px; } }
.woocommerce ul.products li.product { width: 100% !important; margin: 0 !important; text-align: left; }
.woocommerce ul.products li.product a img { border: 1px solid var(--line); margin: 0 0 10px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; font-weight: 700; padding: 0; }
.woocommerce ul.products li.product .price { font-size: 13px; color: var(--muted); font-weight: 400; }
.woocommerce a.button, .woocommerce button.button {
  background: var(--ink) !important;
  color: var(--white) !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  letter-spacing: .2em;
  padding: 11px 24px !important;
}
.woocommerce span.onsale { background: var(--ink) !important; border-radius: 0 !important; }

/* ==========================================================================
   9. 頁尾(白底黑字,照影片極簡)
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 40px; }
.site-footer__brand { text-align: center; font-size: 18px; font-weight: 700; letter-spacing: .3em; margin-bottom: 20px; }
.site-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  margin-bottom: 22px;
}
.site-footer__links a { color: #333; }
.site-footer__social { display: flex; justify-content: center; gap: 22px; margin-bottom: 26px; }
.site-footer__social a { font-size: 13px; letter-spacing: .15em; }
.site-footer__copy {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* ==========================================================================
   10. 通用頁面
   ========================================================================== */
.page-head { padding: clamp(48px, 7vw, 80px) 0 36px; text-align: center; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.page-head h1 { margin-bottom: 6px; }
.page-head .sub { color: var(--muted); }
.page-content { padding-bottom: 80px; }
.entry { max-width: 760px; margin: 0 auto; }
.entry img { margin: 20px 0; }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 44px 0; }
.pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-size: 13px;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* 404 */
.error-404 { text-align: center; padding: 100px 0 130px; }
