/*
Theme Name: FarmWise
Theme URI: https://farmwise.com
Author: FarmWise Team
Author URI: https://farmwise.com
Description: A premium WordPress theme for farming blogs, product shops, and agricultural guides. Built with rich earth tones, SEO-first architecture, and full structured data support for AI agents and search engines.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: farmwise
Tags: blog, e-commerce, agriculture, farming, woocommerce, seo, schema, one-column, two-columns, custom-colors, custom-header, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, sticky-post, threaded-comments, translation-ready
WooCommerce: 7.0
*/

/* ============================================================
   FARMWISE DESIGN SYSTEM — EARTH PALETTE
   ============================================================ */
:root {
  /* Core Earth Palette */
  --soil:        #2C1A0E;
  --bark:        #4A2C1A;
  --earth:       #7C4A2D;
  --clay:        #A0522D;
  --harvest:     #C8860A;
  --wheat:       #E8C56A;
  --straw:       #F5E6B2;
  --cream:       #FAF6EC;

  /* Green Spectrum */
  --forest:      #1A3D2B;
  --leaf:        #2D6A4F;
  --moss:        #4A7C59;
  --sage:        #6B9E78;
  --mint:        #95C4A1;
  --sprout:      #C8E6D0;

  /* Sky & Water */
  --sky:         #4A7FA5;
  --dew:         #A8D4E6;

  /* Neutrals */
  --ink:         #1C1409;
  --charcoal:    #3D2B1A;
  --pebble:      #8A7060;
  --sand:        #C4A882;
  --linen:       #EDE0CC;
  --white:       #FDFAF5;

  /* UI Tokens */
  --primary:     var(--leaf);
  --primary-dark:var(--forest);
  --accent:      var(--harvest);
  --accent-light:var(--wheat);
  --danger:      #C0392B;
  --success:     var(--leaf);

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Lora', 'Times New Roman', serif;
  --font-ui:      'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing Scale */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  4rem;
  --space-2xl: 8rem;

  /* Layout */
  --max-w:     1280px;
  --content-w: 780px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44,26,14,.12), 0 1px 2px rgba(44,26,14,.08);
  --shadow-md: 0 4px 16px rgba(44,26,14,.14), 0 2px 6px rgba(44,26,14,.10);
  --shadow-lg: 0 10px 40px rgba(44,26,14,.16), 0 4px 12px rgba(44,26,14,.12);
  --shadow-xl: 0 20px 64px rgba(44,26,14,.20);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration: 200ms;
  --duration-slow: 400ms;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--white);
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(200,134,10,.04) 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(45,106,79,.04) 0%, transparent 60%);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--forest); }
ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--soil);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.5rem; max-width: 70ch; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 4px solid var(--harvest);
  padding: var(--space-md) var(--space-lg);
  background: var(--straw);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--bark);
  margin: var(--space-lg) 0;
}

code {
  font-family: var(--font-mono);
  background: var(--linen);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  color: var(--earth);
}

pre {
  background: var(--soil);
  color: var(--straw);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

pre code { background: none; color: inherit; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--linen);
  margin: var(--space-xl) 0;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn--primary {
  background: var(--leaf);
  color: var(--white);
  border-color: var(--leaf);
}
.btn--primary:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--harvest);
  color: var(--soil);
  border-color: var(--harvest);
}
.btn--accent:hover {
  background: var(--wheat);
  border-color: var(--wheat);
  color: var(--soil);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--leaf);
  border-color: var(--leaf);
}
.btn--outline:hover {
  background: var(--leaf);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-color: rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.25);
  color: var(--white);
}

.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn--lg { padding: 1rem 2.5rem; font-size: 1.0625rem; }
.btn--full { width: 100%; justify-content: center; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-xl);
}
.badge--leaf  { background: var(--sprout); color: var(--forest); }
.badge--earth { background: var(--straw); color: var(--bark); }
.badge--sky   { background: var(--dew); color: var(--sky); }
.badge--harvest { background: var(--wheat); color: var(--bark); }

/* ============================================================
   HEADER
   ============================================================ */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,246,236,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linen);
  box-shadow: 0 1px 0 var(--linen);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img { height: 44px; width: auto; }

.site-logo__text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: var(--forest); line-height: 1; }
.site-logo__text span { color: var(--harvest); }

/* Primary Navigation */
.primary-nav { display: flex; align-items: center; gap: 0; }

.primary-nav > li { position: relative; }

.primary-nav > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--ease);
}
.primary-nav > li > a:hover,
.primary-nav > li.current-menu-item > a {
  color: var(--leaf);
  background: var(--sprout);
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--duration) var(--ease);
  padding: var(--space-sm);
}
.primary-nav > li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu li a {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--ease);
}
.primary-nav .sub-menu li a:hover { background: var(--sprout); color: var(--leaf); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-search-btn, .header-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--charcoal);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  position: relative;
}
.header-search-btn:hover, .header-cart-btn:hover {
  background: var(--sprout);
  color: var(--leaf);
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--harvest);
  color: var(--soil);
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-sm);
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,26,14,.7);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.search-overlay.active { display: flex; }
.search-overlay__box {
  width: 100%;
  max-width: 640px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
}
.search-overlay__form { display: flex; gap: var(--space-sm); }
.search-overlay input[type="search"] {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1.125rem;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--linen);
  border-radius: var(--radius-xl);
  outline: none;
  background: var(--cream);
  color: var(--ink);
  transition: border-color var(--duration) var(--ease);
}
.search-overlay input[type="search"]:focus { border-color: var(--leaf); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(26,61,43,.85) 0%, rgba(44,26,14,.7) 100%);
  z-index: 1;
}

.hero__bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-image: url('assets/images/hero-farm.jpg');
  z-index: 0;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 3;
  color: var(--white);
  max-width: 760px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wheat);
  margin-bottom: var(--space-md);
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--harvest);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}
.hero__title .accent { color: var(--wheat); }

.hero__description {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 56ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.hero__stats {
  position: absolute;
  bottom: var(--space-xl);
  right: 0;
  z-index: 3;
  display: flex;
  gap: var(--space-lg);
}

.hero__stat {
  text-align: center;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  color: var(--white);
}
.hero__stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--wheat);
  line-height: 1;
}
.hero__stat-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  margin-bottom: var(--space-xl);
}
.section-header--center { text-align: center; }
.section-header--center p { margin-left: auto; margin-right: auto; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--leaf);
  margin-bottom: var(--space-sm);
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  margin-bottom: var(--space-md);
}

.section-description {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--pebble);
  max-width: 60ch;
}

/* ============================================================
   CARD COMPONENTS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--linen);
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--mint);
}

.card__image-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}
.card:hover .card__image-wrap img { transform: scale(1.06); }

.card__category {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
}

.card__body { padding: var(--space-lg); }

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--pebble);
  margin-bottom: var(--space-sm);
}
.card__meta-dot::before { content: '·'; }

.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: var(--space-sm);
  line-height: 1.35;
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--leaf); }

.card__excerpt {
  font-size: 0.9375rem;
  color: var(--pebble);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--linen);
  background: var(--cream);
}

.card__author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
}
.card__author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--linen);
}

/* ============================================================
   BLOG SECTION
   ============================================================ */
.section { padding: var(--space-2xl) 0; }
.section--alt { background: var(--cream); }
.section--dark {
  background: var(--forest);
  color: var(--white);
}
.section--dark .section-title { color: var(--white); }
.section--dark .section-label { color: var(--mint); }
.section--dark .section-description { color: var(--sprout); }

/* Featured post */
.post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--linen);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
}
.post-featured:hover { box-shadow: var(--shadow-lg); }
.post-featured__image {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}
.post-featured__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}
.post-featured:hover .post-featured__image img { transform: scale(1.04); }

.post-featured__content {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}
.post-featured__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--harvest);
  margin-bottom: var(--space-md);
}
.post-featured__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-md);
}
.post-featured__excerpt {
  color: var(--pebble);
  margin-bottom: var(--space-lg);
}

/* Blog grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }

/* ============================================================
   SHOP / PRODUCT CARDS
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--linen);
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 2;
}

.product-card__wishlist {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--linen);
  transition: all var(--duration) var(--ease);
  color: var(--pebble);
}
.product-card__wishlist:hover { background: var(--white); color: var(--danger); }

.product-card__image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream);
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}
.product-card:hover .product-card__image img { transform: scale(1.08); }

.product-card__body { padding: var(--space-md) var(--space-lg); }

.product-card__category {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: 0.25rem;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}
.product-card__name a { color: inherit; }
.product-card__name a:hover { color: var(--leaf); }

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--space-sm);
}
.product-card__stars { color: var(--harvest); font-size: 0.875rem; }
.product-card__count { font-family: var(--font-ui); font-size: 0.75rem; color: var(--pebble); }

.product-card__price {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--bark);
}
.product-card__price del {
  color: var(--sand);
  font-weight: 400;
  font-size: 0.9rem;
  margin-right: var(--space-xs);
}
.product-card__price .sale { color: var(--danger); }

.product-card__footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--linen);
}

/* WooCommerce overrides */
.woocommerce .products { margin: 0 !important; padding: 0 !important; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); list-style: none; }
.woocommerce ul.products li.product { margin: 0 !important; }

.woocommerce div.product .woocommerce-tabs ul.tabs {
  border-bottom: 2px solid var(--linen);
  margin-bottom: var(--space-lg);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--pebble);
  padding: 0.75rem 1.5rem;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--leaf); }

.woocommerce .button {
  background: var(--leaf) !important;
  color: var(--white) !important;
  border-radius: var(--radius-xl) !important;
  font-family: var(--font-ui) !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.75rem !important;
  transition: all var(--duration) var(--ease) !important;
}
.woocommerce .button:hover {
  background: var(--forest) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md) !important;
}

/* Cart */
.woocommerce-cart table.cart td, .woocommerce-cart table.cart th {
  padding: var(--space-md);
  border-bottom: 1px solid var(--linen);
}

/* ============================================================
   CATEGORIES SHOWCASE
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: var(--space-md);
}

.category-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  display: block;
  text-decoration: none;
}
.category-card--large {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.category-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--duration-slow) var(--ease);
}
.category-card:hover .category-card__bg { transform: scale(1.06); }

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,61,43,.85) 0%, rgba(26,61,43,.2) 60%, transparent 100%);
  transition: opacity var(--duration) var(--ease);
}
.category-card:hover .category-card__overlay { opacity: 0.9; }

.category-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  color: var(--white);
}
.category-card__name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}
.category-card__count {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--linen);
  padding: var(--space-xl);
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: var(--space-lg);
  right: var(--space-xl);
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: var(--linen);
  pointer-events: none;
}

.testimonial-card__text {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--charcoal);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sprout);
}
.testimonial-card__name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--soil);
}
.testimonial-card__role {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--sage);
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-section {
  background: linear-gradient(135deg, var(--forest) 0%, var(--soil) 100%);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.newsletter-section .section-title { color: var(--white); }

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 480px;
  margin: var(--space-lg) auto 0;
}
.newsletter-form input[type="email"] {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: var(--white);
  outline: none;
  border: 1px solid rgba(255,255,255,.2);
  transition: border-color var(--duration) var(--ease);
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form input[type="email"]:focus { border-color: var(--wheat); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-xl);
  align-items: start;
}

.widget {
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.widget:last-child { margin-bottom: 0; }

.widget-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--linen);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.widget-post {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--linen);
}
.widget-post:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.widget-post__image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--linen);
}
.widget-post__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--soil);
  line-height: 1.35;
  margin-bottom: 0.25rem;
}
.widget-post__title a { color: inherit; }
.widget-post__title a:hover { color: var(--leaf); }
.widget-post__meta { font-family: var(--font-ui); font-size: 0.75rem; color: var(--pebble); }

/* Tag Cloud Widget */
.tag-cloud-link {
  display: inline-flex;
  font-family: var(--font-ui) !important;
  font-size: 0.8125rem !important;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  background: var(--sprout);
  color: var(--forest) !important;
  border-radius: var(--radius-xl);
  margin: 0.2rem;
  transition: all var(--duration) var(--ease);
}
.tag-cloud-link:hover {
  background: var(--leaf);
  color: var(--white) !important;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post__header { padding: var(--space-xl) 0 var(--space-lg); }
.single-post__breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--pebble);
  margin-bottom: var(--space-md);
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}
.single-post__breadcrumb a { color: var(--leaf); }
.single-post__breadcrumb span::before { content: '/'; margin-right: var(--space-sm); }

.single-post__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-md);
}

.single-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--pebble);
  margin-bottom: var(--space-lg);
}

.post-author-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.post-author-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.post-author-card__name { font-weight: 600; color: var(--charcoal); }

.single-post__featured-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  aspect-ratio: 16/7;
}
.single-post__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-content { font-family: var(--font-body); }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 2rem; margin-bottom: 1rem; }
.entry-content ul, .entry-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* Share bar */
.post-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--cream);
  border-radius: var(--radius-xl);
  border: 1px solid var(--linen);
  margin: var(--space-xl) 0;
}
.post-share__label { font-family: var(--font-ui); font-weight: 600; color: var(--charcoal); }
.post-share__links { display: flex; gap: var(--space-sm); }
.post-share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--linen);
  color: var(--charcoal);
  transition: all var(--duration) var(--ease);
  font-size: 0.875rem;
}
.post-share__link:hover { background: var(--leaf); color: var(--white); }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section { padding: var(--space-2xl) 0; }
.about-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.about-image-stack {
  position: relative;
  height: 500px;
}
.about-image-stack__main {
  position: absolute;
  inset: 0 80px 80px 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.about-image-stack__main img { width: 100%; height: 100%; object-fit: cover; }
.about-image-stack__secondary {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 6px solid var(--white);
  box-shadow: var(--shadow-lg);
}
.about-image-stack__secondary img { width: 100%; height: 100%; object-fit: cover; }
.about-image-stack__badge {
  position: absolute;
  top: 20px;
  right: 60px;
  background: var(--harvest);
  color: var(--soil);
  border-radius: var(--radius-xl);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  background: var(--soil);
  color: rgba(255,255,255,.8);
}

.footer-top {
  padding: var(--space-2xl) 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand .site-logo__text { color: var(--straw); }
.footer-brand__description {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin: var(--space-md) 0 var(--space-lg);
  max-width: 30ch;
}

.footer-social { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: all var(--duration) var(--ease);
  font-size: 0.875rem;
}
.footer-social__link:hover { background: var(--leaf); color: var(--white); }

.footer-widget__title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--straw);
  margin-bottom: var(--space-md);
}

.footer-widget ul li { margin-bottom: var(--space-sm); }
.footer-widget ul li a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: rgba(255,255,255,.6);
  transition: color var(--duration) var(--ease);
}
.footer-widget ul li a:hover { color: var(--wheat); }

.footer-bottom {
  padding: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: rgba(255,255,255,.4);
}

.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--wheat); }

/* ============================================================
   PAGE BUILDER BLOCKS
   ============================================================ */
.seasonal-banner {
  background: linear-gradient(135deg, var(--harvest) 0%, var(--clay) 100%);
  color: var(--white);
  padding: var(--space-sm) 0;
  text-align: center;
}
.seasonal-banner p {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  max-width: none;
  color: var(--soil);
}
.seasonal-banner a { color: var(--soil); text-decoration: underline; }

/* Season Strips */
.season-strip {
  display: flex;
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 80px;
}
.season-strip__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: flex var(--duration-slow) var(--ease);
  gap: var(--space-sm);
}
.season-strip__item:hover { flex: 2; }
.season-strip__item--spring { background: var(--sprout); color: var(--forest); }
.season-strip__item--summer { background: var(--leaf); color: var(--white); }
.season-strip__item--autumn { background: var(--harvest); color: var(--soil); }
.season-strip__item--winter { background: var(--pebble); color: var(--white); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}
.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--linen);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
}
.page-numbers:hover, .page-numbers.current {
  background: var(--leaf);
  color: var(--white);
  border-color: var(--leaf);
}
.page-numbers.prev, .page-numbers.next { width: auto; padding: 0 var(--space-md); gap: var(--space-xs); }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--linen);
}
.comment-list { list-style: none; }
.comment { margin-bottom: var(--space-lg); }
.comment-body {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  border: 1px solid var(--linen);
}
.comment-author .fn { font-family: var(--font-ui); font-weight: 700; color: var(--soil); }
.comment-meta { font-family: var(--font-ui); font-size: 0.8125rem; color: var(--pebble); margin-bottom: var(--space-md); }
.comment-content p { margin-bottom: var(--space-sm); }
.children { padding-left: var(--space-xl); }

.comment-form label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--linen);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--duration) var(--ease);
  outline: none;
  margin-bottom: var(--space-md);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--leaf); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .blog-grid,
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured__image { min-height: 280px; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .about-section__inner { grid-template-columns: 1fr; }
  .hero__stats { position: static; margin-top: var(--space-xl); }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .category-card--large { grid-column: span 2; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  :root { --space-xl: 3rem; --space-2xl: 5rem; }
  .primary-nav, .header-actions .btn { display: none; }
  .menu-toggle { display: flex; }
  .blog-grid, .product-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .category-card--large { grid-column: span 1; }
  .hero__stats { flex-direction: column; gap: var(--space-sm); }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
  .newsletter-form { flex-direction: column; }
  .hero { min-height: 100svh; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #masthead, #colophon, .sidebar, .post-share, .newsletter-section { display: none !important; }
  body { font-size: 12pt; line-height: 1.5; }
  a[href]::after { content: ' (' attr(href) ')'; }
}
