/*
Theme Name: oopbuy canvas
Theme URI: https://sheetcn.com/
Author: oopbuy canvas Team
Description: A warm, atelier-canvas SEO WordPress theme for the oopbuy Canvas spreadsheet shopping guide. Warm terracotta + dusty sage + soft linen palette.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: oopbuy-canvas
*/

:root {
  --color-bg: #f6ede1;
  --color-surface: #ffffff;
  --color-accent: #b85c3d;
  --color-accent-dark: #8f4229;
  --color-accent-2: #87997a;
  --color-text: #2b1e14;
  --color-text-muted: #6c5c4c;
  --color-border: #e6d9c3;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-md: 0 10px 30px rgba(43,30,20,0.10);
  --shadow-sage: 0 10px 30px rgba(135,153,122,0.22);
  --ff-serif: 'Cormorant Garamond', Georgia, serif;
  --ff-sans: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  color: var(--color-text);
  margin: 0 0 14px;
  line-height: 1.2;
}
h1 { font-size: clamp(34px, 5vw, 56px); font-style: italic; font-weight: 600; }
h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; font-style: italic; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 14px; }

:focus-visible { outline: 3px solid var(--color-accent-2); outline-offset: 2px; border-radius: 4px; }

/* Announcement */
.announce {
  background: var(--color-accent);
  color: #f6ede1;
  font-size: 14px;
  text-align: center;
  padding: 10px 16px;
  letter-spacing: 0.02em;
}

/* Header */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 16px 0;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  color: var(--color-accent);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1.1;
}
.brand .tag {
  font-family: var(--ff-sans);
  font-style: normal;
  font-size: 11px;
  color: var(--color-accent-2);
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: flex-end;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  align-items: center;
}
.nav-item { position: relative; }
.nav-item > a,
.nav-item > details > summary {
  color: var(--color-text);
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  user-select: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-item > details > summary::-webkit-details-marker { display: none; }
.nav-item > details > summary::marker { content: ""; }
.nav-item > a:hover,
.nav-item > details > summary:hover,
.nav-item > details[open] > summary {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.nav-item .arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  line-height: 1;
}
.nav-item > details[open] > summary .arrow { transform: rotate(180deg); }
.nav-details { position: static; }
.nav-sub {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(43,30,20,0.14);
  min-width: 260px;
  padding: 10px;
  list-style: none;
  margin: 0;
  z-index: 60;
}
.nav-sub li { list-style: none; margin: 0; }
.nav-sub a {
  display: block;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-text);
  font-family: var(--ff-sans);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-sub a:hover {
  background: rgba(184,92,61,0.08);
  color: var(--color-accent);
}
.cta-group {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn-primary { background: var(--color-accent-2); color: #ffffff; border-color: var(--color-accent-2); }
.btn-primary:hover { background: #6f8565; border-color: #6f8565; transform: translateY(-1px); box-shadow: var(--shadow-sage); }
.btn-secondary { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }
.btn-secondary:hover { background: var(--color-accent); color: #ffffff; }
.btn-ghost { background: transparent; color: #ffffff; border-color: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

.menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.menu-toggle-label {
  display: none;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 14px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.menu-toggle-label .hamburger-icon { font-size: 18px; line-height: 1; }

@media (max-width: 960px) {
  .masthead { flex-wrap: wrap; gap: 16px; padding: 14px 0; }
  .menu-toggle-label { display: inline-flex; }
  .nav-primary {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
  }
  .menu-toggle:checked ~ .nav-primary { display: flex; }
  .nav-list { flex-direction: column; width: 100%; gap: 2px; align-items: stretch; }
  .nav-item { width: 100%; }
  .nav-item > a,
  .nav-item > details > summary {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    justify-content: space-between;
    background: var(--color-surface);
  }
  .nav-item > a:hover,
  .nav-item > details > summary:hover,
  .nav-item > details[open] > summary {
    border-color: var(--color-accent);
    background: rgba(184,92,61,0.06);
  }
  .nav-sub {
    position: static;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    margin: -2px 8px 6px 8px;
    min-width: 0;
    padding: 6px;
  }
  .cta-group { width: 100%; flex-wrap: wrap; }
  .cta-group .btn { flex: 1 1 48%; justify-content: center; }
}
@media (max-width: 480px) {
  .brand { font-size: 24px; }
  .brand .tag { display: none; }
  .cta-group .btn { flex: 1 1 100%; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(135,153,122,0.68) 0%, rgba(184,92,61,0.42) 45%, rgba(246,237,225,0.90) 100%);
  z-index: -1;
}
.hero-content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 100px 24px 70px;
  z-index: 1;
  text-align: center;
}
.hero-content .eyebrow {
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--color-accent);
  font-size: 17px;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.hero-content h1 {
  color: var(--color-text);
  margin-bottom: 20px;
  font-size: clamp(36px, 5.6vw, 60px);
}
.hero-content .lede {
  color: var(--color-text);
  font-size: 18px;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero-content .cta-group { justify-content: center; }

/* Sections */
.section { padding: 72px 0; }
.section h2.section-title { text-align: center; margin-bottom: 10px; }
.section p.section-sub { text-align: center; color: var(--color-text-muted); margin-bottom: 36px; }

/* Category swatches */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-accent-2);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sage); }
.cat-card .sw {
  position: absolute;
  top: 12px;
  left: 16px;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}
.cat-card .emoji {
  font-size: 44px;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.cat-card .emoji::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 6px;
  background: var(--color-accent-2);
  border-radius: 999px;
  opacity: 0.6;
}
.cat-card .name {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 20px;
  text-align: center;
  margin-bottom: 10px;
  color: var(--color-text);
}
.cat-card .arrow {
  color: var(--color-accent);
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 600;
  align-self: flex-end;
}

/* Article (panel) cards */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .art-grid { grid-template-columns: 1fr; } }
.art-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.art-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.art-card .top-strip {
  position: relative;
  background: var(--color-accent);
  height: 12px;
}
.art-card .top-strip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--color-accent-2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--color-surface);
}
.art-card .body { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.art-card .eyebrow {
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--color-accent);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.art-card h3 {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--color-text);
  margin: 0;
}
.art-card .excerpt {
  color: var(--color-text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}
.art-card .read {
  color: var(--color-accent-2);
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 14px;
  margin-top: auto;
}

/* Homepage article */
.home-article {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px clamp(24px, 4vw, 60px);
}
.home-article h2 { margin-top: 36px; }
.home-article h2:first-of-type { margin-top: 10px; }
.home-article a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.home-article blockquote {
  border-left: 4px solid var(--color-accent-2);
  margin: 20px 0;
  padding: 10px 20px;
  color: var(--color-text);
  font-style: italic;
  background: rgba(135,153,122,0.08);
}
.home-article ul { padding-left: 22px; margin: 10px 0 18px; }

/* CTA strip */
.cta-strip {
  background: var(--color-accent);
  color: #f6ede1;
  padding: 60px 24px;
  text-align: center;
}
.cta-strip .eyebrow {
  font-family: var(--ff-serif);
  font-style: italic;
  color: #f6ede1;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.cta-strip h2 {
  color: #f6ede1;
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 22px;
  font-style: italic;
}
.cta-strip .cta-group { justify-content: center; }
.cta-strip .btn-secondary { color: #f6ede1; border-color: #f6ede1; }
.cta-strip .btn-secondary:hover { background: #f6ede1; color: var(--color-accent); }

/* Footer */
.site-footer {
  background: var(--color-text);
  color: rgba(246,237,225,0.88);
  padding: 60px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: #f6ede1;
  margin-bottom: 14px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--ff-sans);
  font-style: normal;
  font-weight: 700;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: rgba(246,237,225,0.85); font-size: 14px; text-decoration: none; }
.site-footer a:hover { color: var(--color-accent-2); }
.site-footer .brand-block p { color: rgba(246,237,225,0.72); font-size: 14.5px; margin-bottom: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(246,237,225,0.14);
  padding-top: 20px;
  margin-top: 36px;
  font-size: 13px;
  color: rgba(246,237,225,0.6);
  text-align: center;
}
.footer-bottom a { color: var(--color-accent-2); }

/* Breadcrumb */
.breadcrumb {
  padding: 24px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb .sep { margin: 0 8px; color: var(--color-accent); }

.guide-title-band {
  text-align: center;
  padding: 30px 0 24px;
  border-bottom: 2px solid var(--color-accent-2);
  margin-bottom: 36px;
}
.guide-title-band .eyebrow {
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--color-accent);
  font-size: 13px;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  text-transform: lowercase;
}

/* Guide layout */
.guide-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 44px;
  padding: 10px 0 60px;
}
@media (max-width: 960px) { .guide-wrap { grid-template-columns: 1fr; } }
.guide-main {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px clamp(20px, 3vw, 44px);
}
.guide-main a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.guide-main blockquote {
  border-left: 4px solid var(--color-accent-2);
  margin: 20px 0;
  padding: 10px 20px;
  color: var(--color-text);
  font-style: italic;
  background: rgba(135,153,122,0.08);
}
.guide-main h2 { margin-top: 28px; }
.guide-main h2:first-of-type { margin-top: 6px; }
.sidebar-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-box h3 {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--color-accent);
  margin-bottom: 10px;
}
.sidebar-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sidebar-box a { color: var(--color-text); font-size: 14px; text-decoration: none; }
.sidebar-box a:hover { color: var(--color-accent); }
.sidebar-cta { background: var(--color-accent); color: #f6ede1; }
.sidebar-cta h3 { color: #f6ede1; }
.sidebar-cta p { color: rgba(246,237,225,0.86); font-size: 14px; margin-bottom: 12px; }
.sidebar-cta .cta-group { flex-direction: column; align-items: stretch; width: 100%; }
.sidebar-cta .cta-group .btn { width: 100%; }
.sidebar-cta .btn-secondary { color: #f6ede1; border-color: #f6ede1; }
.sidebar-cta .btn-secondary:hover { background: #f6ede1; color: var(--color-accent); }

.related-section { padding: 10px 0 70px; }
.related-section h3 {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1510;
    --color-surface: #26201a;
    --color-accent: #d57b5c;
    --color-accent-dark: #b85c3d;
    --color-accent-2: #a4b599;
    --color-text: #f3e9d9;
    --color-text-muted: #baae9c;
    --color-border: #3a2e22;
  }
  .hero-content h1, .hero-content .lede { color: #f3e9d9; }
  .site-footer { background: #0f0b07; }
  .cta-strip { background: var(--color-accent-dark); }
}
