/*
Theme Name: Precious Native Farms
Theme URI: https://preciousnativefarms.in
Author: BoldMark
Author URI: https://boldmark.ae
Description: Custom farm-to-home e-commerce theme for Precious Native Farms, Udaipur. Elementor-compatible with full WooCommerce support and cash-on-delivery checkout. Every section of the homepage is editable in Elementor.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: precious-native-farms
Tags: e-commerce, food-and-drink, custom-menu, featured-images, full-width-template
*/

/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  --pnf-green-deep: #1B3C2D;
  --pnf-green: #2A5A3F;
  --pnf-green-soft: #3D7857;
  --pnf-green-pale: #E8F0EB;
  --pnf-cream: #FBF6EB;
  --pnf-cream-dark: #F0E8D5;
  --pnf-gold: #C4A35A;
  --pnf-ink: #2B2B2B;
  --pnf-ink-light: #5A5A5A;
  --pnf-border: #E2D9C8;
  --pnf-white: #FFFFFF;

  --ff-serif: "Playfair Display", Georgia, serif;
  --ff-sans: "DM Sans", "Segoe UI", sans-serif;
  --container: 1140px;
  --container-narrow: 780px;
  --gap: 24px;
}

/* ============================================================
   RESET + BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--pnf-cream);
  color: var(--pnf-ink);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

h1, h2, h3 {
  font-family: var(--ff-serif);
  color: var(--pnf-green-deep);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--pnf-gold); outline-offset: 2px; }

/* ============================================================
   HEADER
============================================================ */
.pnf-header {
  background: var(--pnf-cream);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--pnf-border);
}
.pnf-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pnf-logo { display: flex; align-items: center; gap: 10px; }
.pnf-logo img { height: 52px; width: auto; }
.pnf-logo-text {
  font-family: var(--ff-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pnf-green-deep);
  line-height: 1.15;
}
.pnf-logo-text small {
  display: block;
  font-family: var(--ff-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--pnf-ink-light);
}
.pnf-header-right { display: flex; align-items: center; gap: 16px; }
.pnf-cart-link {
  position: relative;
  font-size: 1.4rem;
  color: var(--pnf-green-deep);
}
.pnf-cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--pnf-green);
  color: var(--pnf-white);
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pnf-menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--pnf-green-deep);
  display: none;
}
/* Desktop nav */
.pnf-nav { display: flex; gap: 28px; align-items: center; }
.pnf-nav a { font-weight: 500; font-size: 0.95rem; padding: 4px 0; }
.pnf-nav a:hover { color: var(--pnf-green); }
.pnf-nav .current-menu-item > a { border-bottom: 2px solid var(--pnf-gold); }

/* ============================================================
   HERO BANNER
============================================================ */
.pnf-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.pnf-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pnf-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.pnf-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(27,60,45,0.55) 0%, rgba(27,60,45,0.15) 60%, transparent 100%);
  z-index: 1;
}
.pnf-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0;
  max-width: 520px;
}
.pnf-hero-content h1 {
  color: var(--pnf-white);
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 16px;
}
.pnf-hero-content p {
  color: var(--pnf-cream);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 42ch;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pnf-green-deep);
  color: var(--pnf-white);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  transition: background 0.2s;
}
.btn-hero:hover { background: var(--pnf-green); }

/* ============================================================
   SECTION DIVIDER (leaf ornament)
============================================================ */
.pnf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 0 8px;
}
.pnf-divider::before,
.pnf-divider::after {
  content: "";
  width: 80px;
  height: 1px;
  background: var(--pnf-border);
}
.pnf-divider svg { flex-shrink: 0; }

/* ============================================================
   SECTION HEADING
============================================================ */
.pnf-section-title {
  text-align: center;
  padding: 8px 0 36px;
}
.pnf-section-title h2 { margin-bottom: 4px; }
.pnf-section-title p {
  color: var(--pnf-ink-light);
  font-size: 1rem;
  margin: 0 auto;
}

/* ============================================================
   PRODUCT CARDS (horizontal layout matching Figma)
============================================================ */
.pnf-products { padding: 0 0 48px; }
.pnf-product-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--pnf-white);
  border: 1px solid var(--pnf-border);
  border-radius: 12px;
}
.pnf-product-row:last-child { margin-bottom: 0; }
.pnf-product-img {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
}
.pnf-product-img img { width: 100%; height: 100%; object-fit: cover; }
.pnf-product-info { flex: 1; }
.pnf-product-info h3 {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pnf-ink);
  margin-bottom: 4px;
}
.pnf-product-info .desc {
  font-size: 0.88rem;
  color: var(--pnf-ink-light);
  margin-bottom: 10px;
  line-height: 1.4;
}
.pnf-price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.pnf-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pnf-ink);
}
.pnf-unit {
  font-size: 0.82rem;
  color: var(--pnf-ink-light);
}
.pnf-cart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pnf-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--pnf-border);
  border-radius: 6px;
  overflow: hidden;
}
.pnf-qty button {
  background: var(--pnf-cream);
  border: none;
  width: 34px; height: 34px;
  font-size: 1.1rem;
  color: var(--pnf-ink);
  display: flex; align-items: center; justify-content: center;
}
.pnf-qty button:hover { background: var(--pnf-cream-dark); }
.pnf-qty input {
  width: 36px; height: 34px;
  border: none;
  border-left: 1px solid var(--pnf-border);
  border-right: 1px solid var(--pnf-border);
  text-align: center;
  font-weight: 600;
  background: var(--pnf-white);
}
.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pnf-green-deep);
  color: var(--pnf-white);
  padding: 9px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  transition: background 0.2s;
}
.btn-add-cart:hover { background: var(--pnf-green); }
.btn-add-cart svg { width: 16px; height: 16px; fill: currentColor; }

/* ============================================================
   FROM OUR FARMS (split section)
============================================================ */
.pnf-farms-section {
  padding: 56px 0;
  background: var(--pnf-cream);
}
.pnf-farms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.pnf-farms-content h2 { margin-bottom: 4px; }
.pnf-farms-content > p {
  color: var(--pnf-ink-light);
  margin-bottom: 28px;
}
.pnf-farm-feature {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.pnf-farm-feature:last-child { margin-bottom: 0; }
.pnf-farm-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--pnf-green-pale);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pnf-farm-icon svg { width: 24px; height: 24px; fill: var(--pnf-green-deep); }
.pnf-farm-feature h3 {
  font-family: var(--ff-sans);
  font-weight: 700;
  margin-bottom: 2px;
}
.pnf-farm-feature p {
  font-size: 0.88rem;
  color: var(--pnf-ink-light);
  line-height: 1.5;
}
.pnf-farms-image { border-radius: 12px; overflow: hidden; }
.pnf-farms-image img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }

/* ============================================================
   TRUST STRIP
============================================================ */
.pnf-trust {
  padding: 28px 0;
  border-top: 1px solid var(--pnf-border);
  border-bottom: 1px solid var(--pnf-border);
}
.pnf-trust-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.pnf-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  flex: 1;
  min-width: 120px;
  position: relative;
}
.pnf-trust-item + .pnf-trust-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--pnf-border);
}
.pnf-trust-item svg { width: 28px; height: 28px; fill: var(--pnf-green-deep); }
.pnf-trust-item span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pnf-green-deep);
  line-height: 1.3;
}

/* ============================================================
   PRE-FOOTER (delivery + whatsapp)
============================================================ */
.pnf-prefooter {
  background: var(--pnf-green-deep);
  color: var(--pnf-cream);
  padding: 28px 0;
}
.pnf-prefooter .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.pnf-prefooter-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pnf-prefooter-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
}
.pnf-prefooter-icon svg { width: 22px; height: 22px; fill: var(--pnf-cream); }
.pnf-prefooter-item strong { display: block; font-size: 0.95rem; }
.pnf-prefooter-item small { font-size: 0.8rem; color: rgba(251,246,235,0.7); }

/* ============================================================
   BOTTOM BAR
============================================================ */
.pnf-bottombar {
  background: var(--pnf-green);
  text-align: center;
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--pnf-cream);
  letter-spacing: 0.03em;
}

/* ============================================================
   MOBILE NAV
============================================================ */
.pnf-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--pnf-cream);
  z-index: 200;
  padding: 24px;
  flex-direction: column;
}
.pnf-mobile-nav.is-open { display: flex; }
.pnf-mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.pnf-mobile-nav-close { background: none; border: none; font-size: 1.8rem; color: var(--pnf-green-deep); }
.pnf-mobile-nav ul { display: grid; gap: 20px; }
.pnf-mobile-nav a { font-size: 1.15rem; font-weight: 600; color: var(--pnf-green-deep); }

/* ============================================================
   GENERIC PAGES
============================================================ */
.pnf-page-header {
  background: var(--pnf-cream-dark);
  padding: 48px 0;
  text-align: center;
}
.pnf-page-body { padding: 48px 0; max-width: var(--container-narrow); margin: 0 auto; }
.pnf-page-body p { margin-bottom: 1em; max-width: 70ch; }

/* ============================================================
   WOOCOMMERCE OVERRIDES
============================================================ */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 20px !important;
  list-style: none !important;
  padding: 0 !important;
}
ul.products li.product {
  background: var(--pnf-white);
  border: 1px solid var(--pnf-border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
}
ul.products li.product:hover { border-color: var(--pnf-gold); }
ul.products li.product img { border-radius: 8px; margin-bottom: 10px; }
ul.products li.product .price { color: var(--pnf-green-deep) !important; font-weight: 700; }
ul.products li.product .button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: var(--pnf-green-deep);
  color: var(--pnf-white) !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
}
ul.products li.product .button:hover { background: var(--pnf-green); }
.woocommerce-error, .woocommerce-info, .woocommerce-message { border-top-color: var(--pnf-green) !important; }

/* ============================================================
   ELEMENTOR COMPATIBILITY
============================================================ */
.elementor-page .pnf-header,
.elementor-page .pnf-prefooter,
.elementor-page .pnf-bottombar { /* keep these even on Elementor pages */ }
body.elementor-template-canvas .pnf-header,
body.elementor-template-canvas .pnf-prefooter,
body.elementor-template-canvas .pnf-bottombar { display: none; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 960px) {
  .pnf-nav { display: none; }
  .pnf-menu-toggle { display: block; }
  .pnf-farms-grid { grid-template-columns: 1fr; }
  .pnf-farms-image { order: -1; }
  .pnf-farms-image img { min-height: 240px; }
}
@media (max-width: 680px) {
  .pnf-hero { min-height: 380px; }
  .pnf-hero-content { padding: 40px 0; }
  .pnf-product-row { flex-direction: row; gap: 14px; padding: 14px; }
  .pnf-product-img { width: 130px; height: 130px; }
  .pnf-cart-row { gap: 8px; }
  .pnf-prefooter .container { flex-direction: column; text-align: center; }
  .pnf-prefooter-item { flex-direction: column; }
  .pnf-trust-item + .pnf-trust-item::before { display: none; }
  .pnf-trust-row { gap: 18px; }
}
@media (max-width: 480px) {
  .pnf-product-img { width: 110px; height: 110px; }
  .pnf-qty button { width: 30px; height: 30px; font-size: 0.95rem; }
  .pnf-qty input { width: 30px; height: 30px; }
  .btn-add-cart { padding: 8px 14px; font-size: 0.8rem; }
}
