/* =========================================================
   HEARTWOOD — THEME CSS
   Tokens, layout, animations, components
   ========================================================= */

/* =========================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================= */
:root {
  /* Colors — overridden by inline Customizer output */
  --color-background:         #f4f0eb;
  --color-foreground:         #25160e;
  --color-primary:            #603a20;
  --color-primary-foreground: #f6f2ed;
  --color-secondary:          #e4ddd4;
  --color-accent:             #8c5a35;
  --color-muted:              #d9d0c4;
  --color-muted-foreground:   #6b5a4a;
  --color-border:             #c9bfaf;
  --color-card:               #ede7de;

  /* Derived tokens (computed from brand tokens) */
  --color-wood:   hsl(30, 40%, 56%);
  --color-rust:   hsl(30, 45%, 44%);
  --shadow-soft:  0 4px 20px -4px rgba(37, 22, 14, 0.08);
  --shadow-elevated: 0 8px 40px -8px rgba(37, 22, 14, 0.18);

  /* Typography */
  --font-display: 'rl-folklor', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --header-height:    80px;
  --section-padding:  5rem;
  --container-max:    80rem;
  --container-px:     1.5rem;

  /* Button */
  --btn-radius:         calc(var(--radius) - 2px);
  --btn-height:         2.75rem;
  --btn-padding:        0.75rem 2rem;
  --btn-font-size:      0.875rem;
  --btn-font-weight:    500;
  --btn-letter-spacing: 0;
  --btn-text-transform: none;

  /* Border radius */
  --radius: 0.5rem;

  /* Logo */
  --logo-height: 64px;

  /* Transitions */
  --ease-smooth:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --transition-std: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Prevent global img rule from breaking cover images */
img:not(.cover-img):not(.hero-bg-img):not(.product-card-img):not(.about-img):not(.contact-img):not(.product-main-img):not(.cart-item-thumb img):not(.site-logo-img):not(.footer-logo) {
  max-width: 100%;
  height: auto;
}
.cover-img, .hero-bg-img, .product-card-img, .about-img, .contact-img, .product-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* =========================================================
   3. LAYOUT UTILITIES
   ========================================================= */
.container-wide {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

@media (min-width: 1024px) {
  .container-wide { padding-left: 2rem; padding-right: 2rem; }
}

.text-center { text-align: center; }
.font-display { font-family: var(--font-display); }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.mb-12 { margin-bottom: 3rem; }

/* =========================================================
   4. SCROLL PROGRESS BAR
   ========================================================= */
#theme-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* =========================================================
   5. HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-solid {
  background-color: rgba(244, 240, 235, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo-img {
  height: var(--logo-height) !important;
  width: auto !important;
  display: block;
  object-fit: contain;
  transition: filter 0.3s ease;
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  line-height: var(--logo-height);
}

/* Transparent header: logo becomes white */
.site-header:not(.is-solid) .site-logo-img {
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.site-header:not(.is-solid) .site-logo-text { color: #fff; }

.theme-nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.theme-nav-list li { display: flex; }

.theme-nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: var(--color-foreground);
  position: relative;
  transition: color 0.3s ease;
}

.site-header:not(.is-solid) .theme-nav-link { color: rgba(255,255,255,0.9); }

.theme-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}
.theme-nav-link:hover::after { transform: scaleX(1); }

.site-nav-links { display: none; }
@media (min-width: 768px) { .site-nav-links { display: flex; } }

.site-nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Cart button */
.cart-btn {
  position: relative;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground);
  transition: opacity 0.2s ease;
}
.site-header:not(.is-solid) .cart-btn { color: #fff; }
.cart-btn:hover { opacity: 0.6; }

.theme-cart-count {
  position: absolute;
  top: -2px; right: -2px;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-body);
}
.theme-cart-count:empty { display: none; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: flex;
  padding: 0.5rem;
  color: var(--color-foreground);
  transition: opacity 0.2s ease;
}
.site-header:not(.is-solid) .mobile-menu-toggle { color: #fff; }
.mobile-menu-toggle:hover { opacity: 0.6; }
@media (min-width: 768px) { .mobile-menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: 1rem 0 1.5rem;
  animation: fadeIn 0.2s ease;
}
.mobile-menu.is-open { display: block; }

.mobile-nav-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: var(--color-foreground);
  display: block;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--color-muted-foreground); }

/* =========================================================
   6. ANIMATIONS & KEYFRAMES
   ========================================================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wordReveal {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0%);   opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0px); }
}

@keyframes bounceFade {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

@keyframes lineExpand {
  from { width: 0; opacity: 0; }
  to   { width: 32px; opacity: 1; }
}

@keyframes heroSubtitleIn {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

/* Reveal animation base state */
.reveal-item {
  opacity: 0;
  transform: translateY(48px);
  filter: blur(8px);
  transition: opacity 1s var(--ease-smooth),
              transform 1s var(--ease-smooth),
              filter 1s var(--ease-smooth);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.reveal-item--slide-left {
  opacity: 0;
  transform: translateX(-70px);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease-smooth),
              transform 1.1s var(--ease-smooth),
              filter 1.1s var(--ease-smooth);
}
.reveal-item--slide-left.is-visible { opacity: 1; transform: translateX(0); filter: blur(0px); }

.reveal-item--slide-right {
  opacity: 0;
  transform: translateX(70px);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease-smooth),
              transform 1.1s var(--ease-smooth),
              filter 1.1s var(--ease-smooth);
}
.reveal-item--slide-right.is-visible { opacity: 1; transform: translateX(0); filter: blur(0px); }

.reveal-item--delay-1 { transition-delay: 0.1s; }
.reveal-item--delay-2 { transition-delay: 0.2s; }
.reveal-item--delay-3 { transition-delay: 0.3s; }

/* Scale in */
.scale-in-item {
  opacity: 0;
  transform: scale(0.94);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease-smooth),
              transform 1.1s var(--ease-smooth),
              filter 1.1s var(--ease-smooth);
}
.scale-in-item.is-visible { opacity: 1; transform: scale(1); filter: blur(0px); }

/* Word reveal */
.word-reveal-container {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.25em;
}
.word-reveal-container .word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.05em;
}
.word-reveal-container .word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1.1s var(--ease-smooth), opacity 1.1s var(--ease-smooth);
}
.word-reveal-container .word.is-visible { transform: translateY(0%); opacity: 1; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-item, .reveal-item--slide-left, .reveal-item--slide-right,
  .scale-in-item, .word-reveal-container .word {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* Fallback: ensure content visible if IntersectionObserver doesn't fire */
.no-js .reveal-item,
.no-js .reveal-item--slide-left,
.no-js .reveal-item--slide-right,
.no-js .scale-in-item {
  opacity: 1;
  transform: none;
  filter: none;
}

/* =========================================================
   7. HERO SECTION
   ========================================================= */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--color-foreground);
}

.hero-media {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-foreground);
  opacity: 0.55;
  will-change: opacity;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
  will-change: transform;
}

/* Hero eyebrow */
.hero-eyebrow-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 1s var(--ease-smooth) 0.3s forwards;
  opacity: 0;
}

.hero-eyebrow-line {
  height: 1px;
  background: rgba(255,255,255,0.7);
  display: block;
  animation: lineExpand 1.1s var(--ease-smooth) 0.6s forwards;
  width: 0;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
}

/* Hero title */
.hero-title {
  color: #fff;
  font-size: 3rem;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title { font-size: 4.5rem; }
}
@media (min-width: 1024px) {
  .hero-title { font-size: 7.5rem; }
}

.hero-title-line {
  display: block;
}
.hero-title-line--2 { font-style: italic; }

.hero-subtitle {
  color: rgba(255,255,255,0.75);
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  font-size: 1.125rem;
  font-family: var(--font-body);
  animation: heroSubtitleIn 1.1s var(--ease-smooth) 1.2s forwards;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(30px);
}
.hero-subtitle.anim-done {
  filter: none;
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1s var(--ease-smooth) 1.4s forwards;
  opacity: 0;
}
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 0.5rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
  animation: bounceFade 2s ease-in-out infinite, fadeIn 0.5s ease 1.6s forwards;
  opacity: 0;
}
.hero-scroll-indicator:hover { color: #fff; }

/* =========================================================
   8. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: var(--btn-text-transform);
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  min-height: var(--btn-height);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
  border: none;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
}
.btn-primary:hover {
  opacity: 0.85;
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
}

.btn-outline {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
}
.btn-outline:hover {
  background-color: var(--color-accent);
  color: var(--color-accent-foreground);
  opacity: 1;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-foreground);
}

.btn-load-more {
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); opacity: 1; }

/* Hero CTA: no uppercase */
.btn-hero-primary,
.btn-hero-outline {
  text-transform: none;
  font-size: 1rem;
  padding: 0.875rem 2.5rem;
}

.btn.disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.4;
  pointer-events: none;
}

/* =========================================================
   9. SECTION HEADERS
   ========================================================= */
.section-header {
  margin-bottom: 3.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  display: block;
  margin-bottom: 0.5rem;
}

.section-subtext {
  color: var(--color-muted-foreground);
  font-family: var(--font-body);
  margin-top: 1rem;
}

/* Per-section heading scales */
.craft-section__heading {
  font-size: 1.875rem;
  margin-top: 0.5rem;
}
@media (min-width: 768px) { .craft-section__heading { font-size: 3rem; } }

.about-section__heading {
  font-size: 1.875rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}
@media (min-width: 768px) { .about-section__heading { font-size: 2.5rem; } }
@media (min-width: 1024px) { .about-section__heading { font-size: 3rem; } }

.shop-heading {
  font-size: 1.875rem;
  margin-top: 0.5rem;
}
@media (min-width: 768px) { .shop-heading { font-size: 3rem; } }

.contact-title {
  font-size: 1.875rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .contact-title { font-size: 3rem; } }

/* =========================================================
   10. CRAFT SECTION
   ========================================================= */
.craft-section {
  padding: 4rem 0;
}
@media (min-width: 768px) { .craft-section { padding: 6rem 0; } }

.craft-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .craft-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.craft-card {
  text-align: center;
  padding: 2rem;
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid rgba(201, 191, 175, 0.4);
  transition: transform 0.5s cubic-bezier(0.24, 0.86, 0.28, 1), box-shadow 0.5s var(--ease-smooth);
}
.craft-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevated);
}

.craft-card__icon {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto 1.25rem;
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.craft-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.craft-card__desc {
  color: var(--color-muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* =========================================================
   11. ABOUT SECTION
   ========================================================= */
.about-section {
  background-color: var(--color-secondary);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .about-section { padding: 6rem 0; } }

.about-grain-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    var(--color-primary) 0px, transparent 1px,
    transparent 3px, var(--color-primary) 4px
  );
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) { .about-layout { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.about-image-col { position: relative; }

.about-image-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-elevated);
  position: relative;
}

.about-img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  margin-top: -6%;
  transition: transform 0.9s var(--ease-smooth);
}
.about-image-wrap:hover .about-img { transform: scale(1.04); }

.about-badge {
  display: none;
}
@media (min-width: 768px) {
  .about-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    bottom: 1.5rem; right: 1.5rem;
    width: 10rem; height: 10rem;
    background: rgba(244, 240, 235, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevated);
    padding: 1.25rem;
    border: 1px solid rgba(201, 191, 175, 0.5);
  }
}

.about-badge__city {
  font-size: 1.875rem;
  color: var(--color-primary);
  line-height: 1;
}
.about-badge__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  margin-top: 0.5rem;
}
.about-badge__text {
  font-size: 0.875rem;
  color: rgba(37, 22, 14, 0.8);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.about-text-col { display: flex; flex-direction: column; justify-content: center; }

.about-heading-em {
  font-style: italic;
  color: var(--color-primary);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--color-muted-foreground);
}
.about-body p:first-child { font-size: 1.125rem; line-height: 1.7; }
.about-body p { line-height: 1.7; }

/* =========================================================
   12. SHOP SECTION
   ========================================================= */
.shop-section { padding: 4rem 0; }
@media (min-width: 768px) { .shop-section { padding: 6rem 0; } }

/* Category filter */
.shop-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.shop-filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  background: var(--color-card);
  border: 1px solid rgba(201, 191, 175, 0.4);
  color: var(--color-muted-foreground);
  cursor: pointer;
}
.shop-filter-btn:hover { color: var(--color-foreground); border-color: rgba(37, 22, 14, 0.3); }
.shop-filter-btn.is-active { background: var(--color-foreground); color: var(--color-background); border-color: var(--color-foreground); }

/* Product grid */
.shop-product-grid,
.archive-product-grid,
.related-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .shop-product-grid,
  .archive-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .shop-product-grid,
  .archive-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .related-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
}

/* Load more */
.shop-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* =========================================================
   13. PRODUCT CARDS
   ========================================================= */
.theme-product-card-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.theme-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.24, 0.86, 0.28, 1), box-shadow 0.5s var(--ease-smooth);
}

.theme-product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 50px -16px rgba(37, 22, 14, 0.22);
}

/* Pattern A hit-area overlay */
.theme-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}

.theme-product-card *:not(.theme-card-link) {
  pointer-events: none;
}

.theme-product-card .add_to_cart_button,
.theme-product-card .btn-card {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

/* Product image */
.theme-product-card__image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--color-secondary);
}

.theme-product-card__image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-smooth);
  display: block;
}
.theme-product-card:hover .theme-product-card__image-wrapper img {
  transform: scale(1.1);
}

.product-sold-out-badge {
  position: absolute;
  bottom: 0.75rem; right: 0.75rem;
  background: rgba(37, 22, 14, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-family: var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  z-index: 4;
  pointer-events: none;
}

/* Card info */
.theme-product-card__info {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theme-product-card__name {
  font-size: 1.125rem;
  line-height: 1.3;
  transition: color 0.3s;
}
.theme-product-card:hover .theme-product-card__name { color: var(--color-primary); }

.theme-product-card__desc {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-product-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theme-product-card__price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
}

.theme-product-card__btns {
  display: flex;
  gap: 0.5rem;
}

.btn-card {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  min-height: 2.25rem;
  border-radius: var(--radius);
  text-transform: none;
  letter-spacing: 0;
}

/* Sold out card button */
.btn-sold-out { opacity: 0.4; }

/* =========================================================
   14. CTA SECTION
   ========================================================= */
.cta-section { padding: 4rem 0; }
@media (min-width: 768px) { .cta-section { padding: 6rem 0; } }

.cta-band {
  background: linear-gradient(135deg, var(--color-wood, hsl(30, 40%, 56%)), var(--color-rust, hsl(30, 45%, 44%)));
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  transition: transform 0.4s var(--ease-smooth);
}
.cta-band:hover { transform: scale(1.005); }
@media (min-width: 768px) { .cta-band { flex-direction: row; justify-content: space-between; padding: 4rem; } }

.cta-band__grain {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.4) 0px, transparent 1px,
    transparent 4px, rgba(255,255,255,0.4) 5px
  );
}

.cta-band__content {
  position: relative;
  flex: 1;
  text-align: center;
}
@media (min-width: 768px) { .cta-band__content { text-align: left; } }

.cta-band__title {
  color: #fff;
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
@media (min-width: 768px) { .cta-band__title { font-size: 3rem; } }

.cta-band__btn {
  background: var(--color-background);
  color: var(--color-foreground);
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}
.cta-band__btn:hover { transform: scale(1.05); opacity: 1; }

.cta-band__icon {
  position: relative;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.95);
}
@media (min-width: 768px) { .cta-band__icon { display: flex; } }

/* =========================================================
   15. CONTACT SECTION
   ========================================================= */
.contact-section {
  background-color: var(--color-secondary);
  padding: 5rem 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) { .contact-layout { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.contact-image-col { }

.contact-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 4/3;
}
@media (min-width: 1024px) { .contact-image-wrap { aspect-ratio: 3/4; } }

.contact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  pointer-events: none;
}

.contact-header { margin-bottom: 2rem; }
.contact-subtext { color: var(--color-muted-foreground); max-width: 28rem; }

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
}

.contact-info-item a { transition: color 0.2s; }
.contact-info-item a:hover { color: var(--color-foreground); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) { .contact-form-row { grid-template-columns: 1fr 1fr; } }

.contact-form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-foreground);
  transition: box-shadow 0.3s, border-color 0.3s;
  font-family: var(--font-body);
}
.form-input::placeholder { color: var(--color-muted-foreground); }
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent); }

.form-textarea { resize: none; }

.contact-submit-btn {
  text-transform: uppercase;
  align-self: flex-start;
}

.contact-success {
  text-align: center;
  padding: 2.5rem 1rem;
}

.contact-success__icon {
  width: 4rem; height: 4rem;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--color-primary-foreground);
  animation: scaleIn 0.5s var(--ease-smooth);
}

.contact-success__heading { font-size: 1.5rem; margin-bottom: 0.5rem; }
.contact-success__text { color: var(--color-muted-foreground); }

/* =========================================================
   16. FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: color-mix(in srgb, var(--color-secondary) 30%, var(--color-background));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; padding: 4rem 0; } }

.footer-logo-link { display: inline-flex; }

.footer-logo {
  height: 120px !important;
  width: auto !important;
}
@media (min-width: 1024px) { .footer-logo { height: 140px !important; } }

.footer-tagline {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  max-width: 22rem;
  line-height: 1.6;
}

.footer-col-heading {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-nav-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-nav-link {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  transition: color 0.2s;
}
.footer-nav-link:hover { color: var(--color-foreground); }

.footer-contact-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
}
.footer-contact-item svg { flex-shrink: 0; margin-top: 0.1rem; }
.footer-contact-link { transition: color 0.2s; }
.footer-contact-link:hover { color: var(--color-foreground); }

.footer-bottom {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }

.footer-copyright,
.footer-tagline-small { font-size: 0.75rem; color: var(--color-muted-foreground); }
.footer-built-link { font-size: 0.75rem; color: var(--color-muted-foreground); text-decoration: underline; transition: color 0.2s; }
.footer-built-link:hover { color: var(--color-foreground); }

/* =========================================================
   17. CART DRAWER
   ========================================================= */
#theme-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 22, 14, 0.2);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.cart-open #theme-cart-overlay {
  opacity: 1;
  pointer-events: auto;
}

#theme-cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 28rem;
  height: 100%;
  background: var(--color-background);
  z-index: 700;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-smooth);
  box-shadow: var(--shadow-elevated);
}
body.cart-open #theme-cart-drawer {
  transform: translateX(0);
}

#theme-cart-drawer.is-updating {
  opacity: 0.6;
  pointer-events: none;
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.cart-drawer-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.cart-drawer-close {
  padding: 0.25rem;
  display: flex;
  transition: opacity 0.2s;
}
.cart-drawer-close:hover { opacity: 0.6; }

.cart-drawer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  gap: 1rem;
}

.cart-empty-msg {
  color: var(--color-muted-foreground);
  font-family: var(--font-body);
  margin-bottom: 0.5rem;
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
}

.cart-item-thumb {
  width: 5rem;
  height: 6rem;
  background: var(--color-secondary);
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  border-radius: calc(var(--radius) - 2px);
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity 0.2s;
  font-family: var(--font-body);
}
.cart-item-name:hover { opacity: 0.7; }

.cart-item-variations { margin-top: 0.25rem; }
.cart-item-attr {
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
  display: block;
}

.cart-item-price {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  margin-top: 0.25rem;
  font-family: var(--font-body);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.cart-qty-btn {
  padding: 0.25rem;
  border-radius: var(--radius);
  display: flex;
  transition: background-color 0.2s;
}
.cart-qty-btn:hover { background-color: var(--color-secondary); }

.cart-qty-display {
  font-size: 0.875rem;
  width: 1.5rem;
  text-align: center;
  font-family: var(--font-body);
}

.cart-remove-btn {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
  transition: color 0.2s;
  font-family: var(--font-body);
}
.cart-remove-btn:hover { color: var(--color-foreground); }

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.cart-subtotal-label { color: var(--color-muted-foreground); }
.cart-subtotal-value { font-weight: 600; }
.cart-shipping-note { font-size: 0.75rem; color: var(--color-muted-foreground); }

.cart-checkout-btn {
  width: 100%;
  justify-content: center;
  text-transform: none;
  font-size: 1rem;
}

/* =========================================================
   18. WOOCOMMERCE: GLOBAL OVERRIDES
   ========================================================= */

/* Add to cart button override */
.single_add_to_cart_button.button,
.add_to_cart_button.button,
a.single_add_to_cart_button,
a.add_to_cart_button {
  background-color: var(--color-primary) !important;
  color: var(--color-primary-foreground) !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  min-height: var(--btn-height) !important;
  padding: var(--btn-padding) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-body) !important;
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  letter-spacing: var(--btn-letter-spacing) !important;
  text-transform: none !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease !important;
}
.single_add_to_cart_button.button:hover,
.add_to_cart_button.button:hover {
  opacity: 0.85 !important;
  background-color: var(--color-primary) !important;
  color: var(--color-primary-foreground) !important;
}

/* Disabled states */
.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled,
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
  cursor: not-allowed !important;
  opacity: 0.4 !important;
  pointer-events: none !important;
}
.single_add_to_cart_button.button:disabled:hover,
.single_add_to_cart_button.button.disabled:hover,
.add_to_cart_button.button:disabled:hover,
.add_to_cart_button.button.disabled:hover {
  opacity: 0.4 !important;
  background-color: var(--color-primary) !important;
}

/* Card-scoped button override */
.theme-product-card .add_to_cart_button.ajax_add_to_cart {
  min-height: 2.25rem !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.8125rem !important;
}

/* Hide "View cart" link after AJAX add */
.woocommerce-page a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
body a.added_to_cart.wc-forward {
  display: none !important;
}

/* Hidden attribute selects for variable products */
.theme-attr-select-hidden { display: none !important; }

.theme-attr-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.theme-attr-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--color-background);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.theme-attr-btn:hover { border-color: var(--color-primary); }

.theme-attr-btn.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

/* WooCommerce notices */
.single-product .woocommerce-message,
.single-product .woocommerce-info { display: none; }
#theme-cart-drawer .woocommerce-message { display: none; }
.woocommerce-error { display: block !important; }

/* Loading button state */
.ajax_add_to_cart.theme-btn-loading {
  opacity: 0.6 !important;
  pointer-events: none !important;
  cursor: wait !important;
}

/* =========================================================
   19. SINGLE PRODUCT PAGE
   ========================================================= */
.single-product-page {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
}

.back-to-shop-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-muted-foreground);
  font-size: 0.875rem;
  font-family: var(--font-body);
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-to-shop-link:hover { color: var(--color-foreground); }

.theme-product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  min-width: 0;
}
@media (min-width: 768px) { .theme-product-layout { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }

.theme-product-gallery,
.theme-product-info {
  min-width: 0;
  max-width: 100%;
}

/* Main image */
.theme-product-main-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  background: var(--color-secondary);
}

.theme-product-main-image-wrap > .product-main-img,
.theme-product-main-image-wrap > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Thumbnails */
.theme-product-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  max-width: 100%;
}

.product-thumb-btn {
  width: 4rem; height: 5rem;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  border: 2px solid transparent;
  transition: border-color 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.product-thumb-btn.is-active { border-color: var(--color-primary); }
.product-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product info column */
.product-categories {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  margin-bottom: 0.5rem;
}
.product-categories a { color: inherit; transition: color 0.2s; }
.product-categories a:hover { color: var(--color-foreground); }

.product-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.875rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}
@media (min-width: 768px) { .product-title { font-size: 2.25rem; } }
@media (min-width: 1024px) { .product-title { font-size: 3rem; } }

.product-price-wrap {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.product-sold-out-label {
  display: inline-block;
  background: rgba(37, 22, 14, 0.7);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.product-description {
  color: var(--color-muted-foreground);
  line-height: 1.7;
  margin-bottom: 2rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Quantity + button row */
.theme-add-to-cart-area {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.single-product .single_add_to_cart_button {
  flex: 1 1 auto;
  min-width: 160px;
  text-transform: none !important;
}

.theme-quantity-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.theme-qty-btn {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}
.theme-qty-btn:hover { background-color: var(--color-secondary); }

.theme-qty-input {
  width: 3rem;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: var(--font-body);
  -moz-appearance: textfield;
}
.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Details section */
.product-details-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.product-details-heading {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.product-details-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-details-body li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  line-height: 1.5;
}

.product-details-body li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 0.4rem;
  flex-shrink: 0;
}

/* Variable product variations table */
.single-product .variations.shop_attributes tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
  display: block;
  width: 100%;
}

.single-product .variations tbody td.label {
  padding-bottom: 0.25rem;
}
.single-product .variations tbody td.value {
  padding-top: 0;
  margin-bottom: 1rem;
}

.single-product .variations .label label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  font-style: normal;
}

.single-product .variations .value select {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* Related products */
.related-products-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

.related-products-heading {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* =========================================================
   20. INNER PAGES
   ========================================================= */
.inner-page { padding-top: var(--header-height); }

.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}
@media (min-width: 768px) { .page-title { font-size: 2.5rem; } }

/* =========================================================
   21. 404 PAGE
   ========================================================= */
.notfound-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
}

.notfound-inner { max-width: 32rem; }

.notfound-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 1rem;
}

.notfound-heading { font-size: 2rem; margin-bottom: 1rem; }
.notfound-subtext { color: var(--color-muted-foreground); margin-bottom: 2rem; }

/* =========================================================
   22. CHECKOUT (WooCommerce Blocks)
   ========================================================= */
body.woocommerce-checkout .site-main {
  padding-top: var(--header-height);
  padding-bottom: 4rem;
}

body.woocommerce-checkout .entry-content { max-width: 100%; }

body.woocommerce-checkout .page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Two-column grid */
@media (min-width: 768px) {
  body.woocommerce-checkout .wc-block-checkout {
    display: block;
  }
  body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
  min-width: 0;
  width: 100%;
  max-width: none;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
  background-color: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-block-components-textarea textarea {
  width: 100% !important;
  max-width: none !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  color: var(--color-foreground) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  background-color: var(--color-background) !important;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-select select:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent) !important;
  outline: none !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
  background-color: var(--color-foreground) !important;
  color: var(--color-background) !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover { opacity: 0.85 !important; }

body.woocommerce-checkout .wc-block-components-notice-banner {
  border-radius: var(--radius);
  font-family: var(--font-body);
}

/* =========================================================
   23. THANK YOU PAGE
   ========================================================= */
body.theme-thankyou-page .site-main { padding-top: var(--header-height); padding-bottom: 4rem; }

body.theme-thankyou-page .woocommerce-order { font-family: var(--font-body); }

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

body.theme-thankyou-page .woocommerce-order-overview {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

body.theme-thankyou-page .woocommerce-order-overview li {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
}
body.theme-thankyou-page .woocommerce-order-overview li strong {
  color: var(--color-foreground);
  display: block;
}

body.theme-thankyou-page .woocommerce-order-details table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

body.theme-thankyou-page .woocommerce-order-details tfoot th { text-align: left; }
body.theme-thankyou-page .woocommerce-order-details tfoot td { text-align: right; }

body.theme-thankyou-page .woocommerce-customer-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
  max-width: 480px;
  overflow-wrap: break-word;
}

body.theme-thankyou-page { overflow-x: hidden; }

.thankyou-no-order {
  text-align: center;
  padding: 3rem 0;
}
.thankyou-no-order .btn { margin-top: 1rem; }

/* =========================================================
   24. ARCHIVE / SHOP PAGE
   ========================================================= */
.archive-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.woocommerce-pagination { display: flex; justify-content: center; gap: 0.5rem; }
.woocommerce-pagination .page-numbers {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: all 0.2s;
}
.woocommerce-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers:hover {
  background: var(--color-foreground);
  color: var(--color-background);
  border-color: var(--color-foreground);
}

/* =========================================================
   25. SCROLL REVEAL SECTIONS
   ========================================================= */
.scroll-reveal-section { }

/* =========================================================
   26. RESPONSIVE ADJUSTMENTS
   ========================================================= */
@media (max-width: 767px) {
  :root {
    --header-height: 72px;
    --container-px: 1rem;
  }

  .hero-title { font-size: 3rem; }
  .about-image-wrap { aspect-ratio: 4/3; }
  .theme-product-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   27. WOOCOMMERCE ACCOUNT / CART PAGES
   ========================================================= */
body.woocommerce-cart .site-main,
body.woocommerce-account .site-main {
  padding-top: var(--header-height);
  padding-bottom: 4rem;
}

body.woocommerce-cart .page-title,
body.woocommerce-account .page-title {
  margin-bottom: 1.5rem;
}

body.woocommerce-cart .wc-block-components-sidebar-layout,
body.woocommerce-account .woocommerce-MyAccount-content {
  min-width: 0;
  max-width: none;
}

/* =========================================================
   28. WOOCOMMERCE NOTICES
   ========================================================= */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  border-left: 4px solid var(--color-primary);
  margin-bottom: 1.5rem;
}
.woocommerce-error { border-left-color: #c0392b; }
