/* =============================================================
   AGGRESSIVE WIGGLING SUPPLY CO. -- THEME STYLES
   ============================================================= */

/* 1. Design Tokens */
:root {
  --bg:             #0d0b0e;
  --surface:        #1c1610;
  --surface-raised: #261e14;
  --accent:         #c05050;
  --accent-hover:   #d46464;
  --primary:        #e8e0d0;
  --muted:          #8a7e6e;
  --border:         #2e2416;
  --error:          #f87171;

  --font-display: 'Cinzel', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;

  --max-w:    72rem;
  --px:       1.5rem;
  --py:       5rem;
  --radius:   0.25rem;
  --ease:     150ms ease;
}

/* 2. Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }

/* 3. Base */
html {
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
  line-height: 1.15;
}

/* 4. Layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}

.section-wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--py) var(--px);
}

.section-divider { max-width: var(--max-w); margin-inline: auto; padding-inline: var(--px); }
.section-divider hr { border: none; border-top: 1px solid var(--border); }

/* 5. Atoms */
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}

.accent-line {
  display: block;
  width: 12rem;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.55;
  margin-inline: auto;
}

/* 6. Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent); color: var(--bg); }

.btn-ghost {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color var(--ease);
}
.btn-ghost:hover { color: var(--accent-hover); }

/* 7. Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(13,11,14,0.95);
  backdrop-filter: blur(4px);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem var(--px);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color var(--ease);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.site-logo:hover { color: var(--accent-hover); }
.site-logo-img { height: 2.75rem; width: auto; display: block; }

/* Desktop nav -- WP menu output: ul.nav-menu > li > a */
.desktop-nav { display: flex; align-items: center; gap: 1rem; }

.desktop-nav .nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.desktop-nav .nav-menu li a {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color var(--ease);
}
.desktop-nav .nav-menu li a:hover { color: var(--primary); }

.nav-etsy { margin-left: 1.5rem; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem var(--px) 1.5rem;
}
.mobile-menu.is-open { display: block; }
.mobile-menu .nav-menu { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.mobile-menu .nav-menu li a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--muted);
  transition: color var(--ease);
}
.mobile-menu .nav-menu li a:hover { color: var(--primary); }
.mobile-menu .btn { display: block; width: 100%; }

/* 8. Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88vh;
  text-align: center;
  overflow: hidden;
  padding: 6rem var(--px);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, #261e14 0%, #0d0b0e 65%);
  pointer-events: none;
}
.hero-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--primary);
}
.hero-title .accent { color: var(--accent); }
.hero-body {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 36rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* 9. Page header (interior) */
.page-header {
  position: relative;
  text-align: center;
  padding: 5rem var(--px) 4rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 80% at 50% 0%, #261e14 0%, #0d0b0e 70%);
  overflow: hidden;
}
.page-header .accent-line { margin-bottom: 1.5rem; }
.page-header-inner { max-width: 40rem; margin-inline: auto; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}
.page-header-desc {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 1.25rem;
}

/* 10. Section variants */
.section-surface {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.section-raised { background: var(--surface-raised); }

/* 11. Section header row */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

/* 12. Product grid + card */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--ease);
}
.product-card:hover { border-color: rgba(192,80,80,0.4); }

.product-card-img {
  aspect-ratio: 4/3;
  background: radial-gradient(ellipse at 50% 30%, #261e14 0%, #1c1610 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-ornament { font-size: 2.5rem; color: rgba(192,80,80,0.2); user-select: none; }

.product-card-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem; flex: 1; }
.product-card-category {
  font-family: var(--font-display);
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-card-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
}
.product-card-tagline {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--accent);
}
.product-card-desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
  flex: 1;
}
.product-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color var(--ease);
  margin-top: 0.5rem;
}
.product-card-link:hover { color: var(--accent-hover); }
.product-card:hover .product-card-link .arr { transform: translateX(4px); }
.product-card-link .arr { transition: transform var(--ease); }

/* 13. Feature / value cards (3-col) */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feature-label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.feature-body { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

/* 14. Philosophy blockquote */
.philosophy-block { max-width: 40rem; margin-inline: auto; text-align: center; }
.philosophy-quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin: 1.5rem 0;
}

/* 15. CTA banner */
.cta-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cta-banner h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); letter-spacing: 0.04em; margin-top: 0.5rem; }

/* 16. CTA section */
.cta-section { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* 17. Contact form */
.contact-wrap { max-width: 36rem; margin-inline: auto; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 2rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary);
  outline: none;
  transition: border-color var(--ease);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input.has-error, .form-textarea.has-error { border-color: #b91c1c; }
.form-textarea { resize: vertical; min-height: 10rem; }
.form-error { font-family: var(--font-body); font-size: 0.8125rem; color: var(--error); }
.notice {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
}
.notice-success { border: 1px solid rgba(192,80,80,0.3); background: rgba(192,80,80,0.08); color: var(--accent); }
.notice-error   { border: 1px solid rgba(153,27,27,0.4);  background: rgba(127,29,29,0.15);  color: var(--error); }
.form-hint { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.7; color: var(--muted); margin-bottom: 1.5rem; }
.etsy-note { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 2rem; }
.etsy-note .eyebrow { margin-bottom: 0.5rem; }
.etsy-note p { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.7; color: var(--muted); }
.etsy-note a { color: var(--accent); transition: color var(--ease); }
.etsy-note a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }

/* 18. Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 2rem; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table thead { border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.data-table th {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 1.25rem;
}
.data-table td {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--muted);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td:first-child { color: var(--primary); }

/* 19. Two-col grid */
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }

/* 20. Tip quick-start cards */
.tip-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
.tip-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1.5rem; }
.tip-number { font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: rgba(192,80,80,0.2); line-height: 1; margin-bottom: 0.75rem; }
.tip-heading { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; color: var(--primary); margin-bottom: 0.5rem; }
.tip-body { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

/* 21. Cutting / finishing cards */
.card-grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
.item-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1.5rem; }
.item-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.item-card-name { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; color: var(--primary); }
.verdict { font-family: var(--font-display); font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase; }
.verdict-good { color: var(--accent); }
.verdict-ok   { color: var(--muted); }
.item-card-body { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

/* 22. Settings grid */
.settings-col { display: flex; flex-direction: column; gap: 1.5rem; }
.setting-item { display: flex; flex-direction: column; gap: 0.375rem; }
.setting-label { font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.setting-body  { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

/* 23. About text */
.prose-block { display: flex; flex-direction: column; gap: 1.25rem; max-width: 65ch; }
.prose-block p { font-family: var(--font-body); font-size: 1.125rem; line-height: 1.75; color: var(--muted); }
.prose-block a { color: var(--accent); }
.prose-block a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }

/* 24. Section h2 helpers */
.h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: 0.04em; color: var(--primary); }
.body-lg { font-family: var(--font-body); font-size: 1.125rem; line-height: 1.7; color: var(--muted); }
.body-sm { font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

/* 25. Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 3rem var(--px);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}
.footer-brand-loc { font-family: var(--font-body); font-size: 0.9375rem; color: var(--muted); display: block; margin-top: 0.375rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { font-family: var(--font-body); font-size: 0.9375rem; color: var(--muted); transition: color var(--ease); }
.footer-nav a:hover { color: var(--primary); }
.footer-nav .etsy { color: var(--accent); }
.footer-nav .etsy:hover { color: var(--accent-hover); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.footer-copy { font-family: var(--font-body); font-size: 0.8125rem; color: var(--muted); }

/* 26. 404 */
.page-404 { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 60vh; padding: 6rem var(--px); gap: 1.5rem; }
.page-404-code { font-family: var(--font-display); font-size: 6rem; font-weight: 700; color: rgba(192,80,80,0.2); line-height: 1; }
.page-404-title { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--primary); }
.page-404-body { font-family: var(--font-body); font-size: 1.125rem; color: var(--muted); max-width: 30rem; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .tip-cards    { grid-template-columns: repeat(3, 1fr); }
  .card-grid-3  { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  :root { --px: 3rem; --py: 6rem; }

  .nav-toggle   { display: none !important; }
  .mobile-menu  { display: none !important; }

  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }

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

  .footer-inner      { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .cta-banner        { flex-direction: row; align-items: center; justify-content: space-between; padding: 3rem; }
  .settings-two-col  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .desktop-nav  { display: none; }
  .nav-etsy     { display: none; }
  .nav-toggle   { display: flex; }
}

/* =============================================================
   PRODUCT CARD -- updated for CPT
   ============================================================= */
.product-card-name a { color: inherit; }
.product-card-name a:hover { color: var(--accent); transition: color var(--ease); }

.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* =============================================================
   SINGLE PRODUCT PAGE
   ============================================================= */
.product-single-tagline {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--accent);
  margin-top: 0.5rem;
}

.product-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .product-single { grid-template-columns: 1fr 1fr; }
}

.product-single-img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.product-single-img img { width: 100%; height: auto; display: block; }

.product-single-body { display: flex; flex-direction: column; gap: 2rem; }

.product-single-cta { display: flex; flex-wrap: wrap; gap: 1rem; }

.product-single-back { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
