/*
Theme Name:   Pane e Caffè (Blocksy Child)
Theme URI:    https://paneecaffe.tw
Description:  Brand styling for 胖尼咖啡 / Pane e Caffè. Tokens + component overrides on top of Blocksy.
Author:       Pane e Caffè
Template:     blocksy
Version:      0.1.0
Text Domain:  pane-caffe
*/

/* ---------- Tokens (mirror docs/STYLE-GUIDE.md §3) ---------- */
:root {
  /* Brand */
  --pc-orange-50:  #FCEFE7;
  --pc-orange-100: #F8D7C5;
  --pc-orange-300: #F09269;
  --pc-orange-500: #E85A2D;
  --pc-orange-700: #B8431E;
  --pc-orange-900: #8A2F12;

  --pc-navy-50:  #EAEEF4;
  --pc-navy-100: #C9D2E0;
  --pc-navy-300: #7A8DA9;
  --pc-navy-500: #3D5B82;
  --pc-navy-700: #1E3A5F;
  --pc-navy-900: #11243E;

  --pc-cream-50:  #F5EFE5;
  --pc-cream-100: #ECE2D0;
  --pc-cream-300: #D8C5A6;

  /* Mid-Autumn gold accent (used sparingly: eyebrows, dividers, badges) */
  --pc-gold-300: #E5B85F;
  --pc-gold-500: #CA8A04;
  --pc-gold-700: #92660A;

  --pc-ink-900:  #1A1A1A;
  --pc-paper-0:  #FFFFFF;

  /* Semantic */
  --pc-success: #2E7D32;
  --pc-warning: #ED6C02;
  --pc-error:   #C62828;
  --pc-info:    #0277BD;

  /* Radii */
  --pc-radius-sm:   6px;
  --pc-radius-md:   10px;
  --pc-radius-lg:   12px;
  --pc-radius-xl:   16px;
  --pc-radius-pill: 999px;

  /* Shadows */
  --pc-shadow-sm: 0 1px 3px rgba(30, 58, 95, 0.06);
  --pc-shadow-md: 0 4px 12px rgba(30, 58, 95, 0.08);
  --pc-shadow-lg: 0 8px 24px rgba(30, 58, 95, 0.10);
}

/* ---------- Base ---------- */
body {
  background: var(--pc-cream-50);
  color: var(--pc-ink-900);
  font-family: 'Noto Sans TC', 'Inter', system-ui, sans-serif;
  line-height: 1.6;
}
h1, h2, h3, h4 { color: var(--pc-navy-700); font-weight: 700; letter-spacing: -0.01em; }
.brand-italian { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500; }

/* ---------- Buttons ---------- */
.pc-btn-primary {
  background: var(--pc-orange-500);
  color: var(--pc-paper-0);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--pc-radius-lg);
  border: none;
  transition: background 150ms ease, transform 150ms ease;
}
.pc-btn-primary:hover  { background: var(--pc-orange-700); transform: translateY(-1px); }
.pc-btn-primary:active { transform: translateY(0); }
.pc-btn-primary:focus-visible { outline: 3px solid var(--pc-orange-300); outline-offset: 2px; }

.pc-btn-secondary {
  background: transparent;
  color: var(--pc-navy-700);
  border: 1.5px solid var(--pc-navy-700);
  padding: 12px 26px;
  border-radius: var(--pc-radius-lg);
  font-weight: 600;
}
.pc-btn-secondary:hover { background: var(--pc-navy-700); color: var(--pc-paper-0); }

.pc-btn-ghost {
  background: transparent;
  color: var(--pc-ink-900);
  padding: 12px 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Badges ---------- */
.pc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--pc-radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pc-badge--mid-autumn { background: var(--pc-orange-500); color: white; }
.pc-badge--limited    { background: var(--pc-navy-700); color: white; }
.pc-badge--new        { background: var(--pc-cream-100); color: var(--pc-navy-700); }
.pc-badge--low-stock  { background: #FFF3E0; color: var(--pc-orange-700); }

/* ---------- Product card override (brand-aligned) ---------- */
.woocommerce ul.products li.product {
  background: var(--pc-paper-0);
  border-radius: var(--pc-radius-xl);
  padding: 20px;
  box-shadow: var(--pc-shadow-sm);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: var(--pc-shadow-lg);
}
.woocommerce ul.products li.product img {
  border-radius: var(--pc-radius-lg);
  margin-bottom: 16px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--pc-navy-700) !important;
  font-weight: 700 !important;
  font-size: 17px !important;
  margin-bottom: 8px !important;
}
.woocommerce ul.products li.product .price {
  font-family: 'Inter', 'Noto Sans TC', system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  color: var(--pc-ink-900) !important;
  font-size: 22px !important;
  margin-bottom: 12px !important;
}
.woocommerce ul.products li.product .price ins,
.woocommerce ul.products li.product .price bdi { color: var(--pc-ink-900) !important; }

/* Add to cart button — brand orange, full-width on cards */
.woocommerce ul.products li.product .button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
  background: var(--pc-orange-500) !important;
  color: var(--pc-paper-0) !important;
  font-weight: 600 !important;
  padding: 12px 20px !important;
  border-radius: var(--pc-radius-lg) !important;
  border: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 14px !important;
  width: 100% !important;
  text-align: center !important;
  transition: background 150ms ease, transform 150ms ease !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background: var(--pc-orange-700) !important;
  transform: translateY(-1px);
}
.woocommerce ul.products li.product .added_to_cart {
  display: inline-block;
  margin-top: 8px;
  color: var(--pc-orange-700);
  font-size: 13px;
}

/* ---------- Forms (checkout) ---------- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  height: 48px;
  border: 1.5px solid var(--pc-navy-100);
  border-radius: var(--pc-radius-md);
  padding: 0 14px;
}
.woocommerce form .form-row input.input-text:focus {
  border-color: var(--pc-orange-500);
  box-shadow: 0 0 0 3px rgba(232, 90, 45, 0.20);
  outline: none;
}

/* ---------- Layout ---------- */
.pc-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px)  { .pc-container { padding: 0 24px; } }
@media (min-width: 1024px) { .pc-container { padding: 0 32px; } }

/* ============================================================
   Homepage redesign — Mid-Autumn 2026
   ============================================================ */

.pc-home section { padding: 64px 0; position: relative; }
@media (min-width: 1024px) { .pc-home section { padding: 96px 0; } }

/* Eyebrow labels */
.pc-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pc-orange-700);
  margin-bottom: 16px;
}
.pc-eyebrow--gold  { color: var(--pc-gold-700); }
.pc-eyebrow--light { color: var(--pc-gold-300); }

.pc-section-title {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--pc-navy-700);
  font-weight: 700;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) { .pc-section-title { font-size: 40px; line-height: 1.2; } }
.pc-section-title--light { color: var(--pc-paper-0); }

.pc-section-lede {
  max-width: 560px;
  font-size: 16px;
  color: var(--pc-navy-500);
  margin: 0 0 40px;
}

/* ---------- 1. HERO — Pierre Hermé style ---------- */
/* Full-bleed photo, blur + dark opacity layer = atmospheric backdrop, sparse centered typography. */
.pc-hero {
  position: relative;
  min-height: 100vh;
  padding: 0 !important;
  background-color: var(--pc-ink-900);
  color: var(--pc-paper-0);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) { .pc-hero { min-height: 100vh; max-height: 880px; } }

/* Background layer — blurred + dimmed photo */
.pc-hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(6px) saturate(0.55) brightness(0.45);
  transform: scale(1.06); /* prevents blur edge artifacts */
  z-index: 0;
}

/* Opacity layer over the blurred photo */
.pc-hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(6, 8, 14, 0.55) 0%,
      rgba(6, 8, 14, 0.38) 50%,
      rgba(6, 8, 14, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.pc-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  padding: 0 24px;
}

.pc-hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--pc-gold-300);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(229, 184, 95, 0.35);
}

.pc-hero__title {
  color: var(--pc-paper-0);
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
}
@media (min-width: 768px) { .pc-hero__title { font-size: 96px; } }

.pc-hero__subtitle {
  display: block;
  margin: 0 0 40px;
  font-size: 22px;
  color: var(--pc-gold-300);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
}
@media (min-width: 768px) { .pc-hero__subtitle { font-size: 32px; } }

.pc-hero__lede {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 auto 48px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 300;
}
@media (min-width: 768px) { .pc-hero__lede { font-size: 17px; } }

/* Hero CTA — minimal, underline only, like Pierre Hermé "je découvre" */
.pc-hero__cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pc-paper-0);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--pc-gold-300);
  transition: color 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.pc-hero__cta:hover {
  color: var(--pc-gold-300);
  border-bottom-color: var(--pc-paper-0);
  transform: translateY(-1px);
}

/* ---------- 1b. KEY DATES STRIP ---------- */
/* Below the hero — replaces the old in-hero meta box */
.pc-keydates {
  background: var(--pc-ink-900);
  color: var(--pc-paper-0);
  padding: 32px 0 !important;
  border-bottom: 1px solid rgba(229, 184, 95, 0.15);
}
.pc-keydates__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
@media (min-width: 768px) {
  .pc-keydates__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
  }
}
.pc-keydates__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  flex: 1;
}
.pc-keydates__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.pc-keydates__value {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--pc-paper-0);
  letter-spacing: 0.02em;
}
.pc-keydates__divider {
  width: 1px;
  height: 32px;
  background: rgba(229, 184, 95, 0.2);
  display: none;
}
@media (min-width: 768px) { .pc-keydates__divider { display: block; } }

/* ============================================================
   Editorial language — Pierre Hermé / Yann Couvreur style
   ============================================================ */

/* Eyebrow label with vertical line — replaces "中秋節限定" pill */
.pc-eyebrow-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--pc-gold-700);
  margin: 0 0 32px;
  padding: 0;
}
.pc-eyebrow-line::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--pc-gold-500);
  flex-shrink: 0;
}
.pc-eyebrow-line--light { color: var(--pc-gold-300); }
.pc-eyebrow-line--light::before { background: var(--pc-gold-300); }

/* Editorial section title — large serif */
.pc-h-serif {
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--pc-ink-900);
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}
@media (min-width: 768px) { .pc-h-serif { font-size: 56px; } }
.pc-h-serif--light { color: var(--pc-paper-0); }

.pc-lede {
  font-size: 16px;
  line-height: 1.85;
  color: var(--pc-navy-500);
  font-weight: 300;
  margin: 0 0 32px;
  max-width: 580px;
}
@media (min-width: 768px) { .pc-lede { font-size: 17px; } }
.pc-lede--light { color: rgba(255, 255, 255, 0.78); }
.pc-lede--narrow { max-width: 480px; margin-bottom: 64px; }

.pc-cta-line {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid currentColor;
  transition: opacity 200ms ease, transform 200ms ease;
}
.pc-cta-line:hover { opacity: 0.7; transform: translateY(-1px); color: inherit; }

/* ---------- 2. CRAFT INTRO — split editorial spread ---------- */
.pc-craft-intro { background: var(--pc-cream-50); }
.pc-craft-intro__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) {
  .pc-craft-intro__inner { grid-template-columns: 1.05fr 1fr; gap: 96px; }
}
.pc-craft-intro__media img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.9) contrast(1.05);
}
.pc-craft-intro__copy { max-width: 520px; }

/* ---------- 3. CRAFT SHOT — full-bleed cross-section ---------- */
.pc-craft-shot {
  background-size: cover;
  background-position: center;
  background-color: var(--pc-ink-900);
  color: var(--pc-paper-0);
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 0 !important;
}
.pc-craft-shot__overlay {
  position: absolute; inset: 0;
  background: rgba(10, 14, 24, 0.55);
}
.pc-craft-shot__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

/* ---------- 4. PRODUCTS ---------- */
.pc-products {
  background: var(--pc-paper-0);
  text-align: center;
}
.pc-products .pc-eyebrow-line { justify-content: center; }
.pc-products .pc-h-serif,
.pc-products .pc-lede { margin-left: auto; margin-right: auto; }
.pc-products .pc-h-serif { text-align: center; }
.pc-products .pc-lede { text-align: center; }

/* WC products grid override — stripped, editorial */
.pc-products .woocommerce { margin-top: 24px; }
.pc-products .woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 64px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (max-width: 767px) {
  .pc-products .woocommerce ul.products { grid-template-columns: 1fr !important; gap: 48px !important; }
}
.pc-products .woocommerce ul.products li.product {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  width: auto !important;
  margin: 0 !important;
  text-align: center;
  transition: transform 300ms ease;
}
.pc-products .woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: none !important;
}
/* Product image — explicit square aspect frame, image cover-fits */
.pc-products .woocommerce ul.products li.product figure {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 0 28px 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--pc-cream-50);
  position: relative !important;
}
.pc-products .woocommerce ul.products li.product figure a,
.pc-products .woocommerce ul.products li.product .ct-media-container {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden;
  line-height: 0;
}
.pc-products .woocommerce ul.products li.product img.wp-post-image {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  border-radius: 0 !important;
  margin: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: saturate(0.95);
  transition: transform 600ms ease, filter 300ms ease;
  object-fit: cover !important;
  object-position: center !important;
  aspect-ratio: auto !important;
  max-width: none !important;
}
.pc-products .woocommerce ul.products li.product:hover img.wp-post-image {
  transform: scale(1.04);
  filter: saturate(1);
}
/* Force eager load on first 2 products (above the fold issues) */
.pc-products .woocommerce ul.products li.product img[loading="lazy"] {
  /* fallback: override loading attr is meta — visual ensures the slot is reserved */
}
.pc-products .woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  color: var(--pc-ink-900) !important;
  margin: 0 0 12px !important;
  letter-spacing: -0.005em !important;
}
.pc-products .woocommerce ul.products li.product .price {
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  color: var(--pc-gold-700) !important;
  margin-bottom: 28px !important;
  letter-spacing: 0.02em !important;
}
/* Replace clunky button with editorial line CTA */
.pc-products .woocommerce ul.products li.product .button,
.pc-products .woocommerce a.button.alt {
  display: inline-block !important;
  background: transparent !important;
  color: var(--pc-ink-900) !important;
  border: none !important;
  border-bottom: 1px solid var(--pc-ink-900) !important;
  border-radius: 0 !important;
  padding: 8px 0 !important;
  width: auto !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  transition: opacity 200ms ease !important;
}
.pc-products .woocommerce ul.products li.product .button:hover,
.pc-products .woocommerce a.button.alt:hover {
  background: transparent !important;
  opacity: 0.6;
  transform: none;
}

/* ---------- 5. PACKAGING SHOT — full-bleed festival image ---------- */
.pc-packaging-shot {
  background-size: cover;
  background-position: center;
  background-color: var(--pc-orange-900);
  color: var(--pc-paper-0);
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 0 !important;
}
.pc-packaging-shot__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 14, 24, 0.30) 0%,
    rgba(10, 14, 24, 0.55) 70%,
    rgba(10, 14, 24, 0.65) 100%);
}
.pc-packaging-shot__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

/* ---------- 6. FULFILLMENT — minimal editorial ---------- */
.pc-fulfillment {
  background: var(--pc-ink-900);
  color: var(--pc-paper-0);
  text-align: center;
}
.pc-fulfillment .pc-eyebrow-line { justify-content: center; }
.pc-fulfillment .pc-h-serif { text-align: center; margin-bottom: 80px; }

.pc-fulfillment__grid {
  display: grid;
  gap: 48px;
  margin-bottom: 80px;
  text-align: center;
}
@media (min-width: 768px) {
  .pc-fulfillment__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.pc-fulfillment__col { padding: 0 16px; }
.pc-fulfillment__date {
  font-family: 'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--pc-gold-300);
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.pc-fulfillment__caption {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 16px;
}
.pc-fulfillment__detail {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 300;
  max-width: 220px;
  margin: 0 auto;
}

.pc-fulfillment__cta-row {
  text-align: center;
}
.pc-fulfillment__cta-row .pc-cta-line {
  color: var(--pc-paper-0);
  border-bottom-color: var(--pc-gold-300);
}
.pc-fulfillment__cta-row .pc-cta-line:hover { color: var(--pc-gold-300); }
