/*
Theme Name: Ciwifarm
Theme URI: https://ciwifarm.com
Author: Ciwifarm
Author URI: https://ciwifarm.com
Description: Fresh & vibrant theme for Ciwifarm, a strawberry farm in Ciwidey, West Java. Pair with the "Ciwifarm Products & Partners" plugin to manage the product catalog, prices, photos, and wholesale partners from wp-admin. Logo, contact details, and social links are configurable in Customizer.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: ciwifarm
*/

/* ==========================================================================
   Ciwifarm — Fresh Strawberries from Ciwidey
   Fresh & vibrant visual system
   ========================================================================== */

:root {
  --strawberry: #e8384f;
  --strawberry-dark: #b81f35;
  --strawberry-light: #ff6b7a;
  --leaf: #3f8f5c;
  --leaf-dark: #276b40;
  --leaf-light: #dcf2e3;
  --gold: #f5a936;
  --cream: #fff8f0;
  --cream-dark: #fbecd9;
  --charcoal: #2c211d;
  --brown-soft: #6f5a4e;
  --white: #ffffff;
  --shadow: 0 20px 50px -20px rgba(44, 33, 29, 0.25);
  --shadow-soft: 0 10px 30px -12px rgba(44, 33, 29, 0.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; color: var(--brown-soft); }

a {
  color: inherit;
  text-decoration: none;
}

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

section { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--leaf-dark);
  background: var(--leaf-light);
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.eyebrow::before { content: "🍓"; font-size: 0.9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color .25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--strawberry);
  color: var(--white);
  box-shadow: 0 12px 24px -10px rgba(232, 56, 79, 0.55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -10px rgba(232, 56, 79, 0.6); background: var(--strawberry-dark); }

.btn-secondary {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}
.btn-secondary:hover { background: var(--charcoal); color: var(--white); transform: translateY(-3px); }

.btn-light {
  background: var(--white);
  color: var(--strawberry-dark);
}
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline-light:hover { background: var(--white); color: var(--strawberry-dark); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44,33,29,0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--strawberry-dark);
}

.logo svg { width: 40px; height: 40px; }
.logo img { max-height: 40px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--charcoal);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--strawberry);
  transition: width 0.25s ease;
}

.nav-links a:hover::after, .nav-links li.current-menu-item a::after, .nav-links a.active::after { width: 100%; }
.nav-links li.current-menu-item a, .nav-links a.active { color: var(--strawberry-dark); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn-primary { gap: 0.28em; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--charcoal);
  margin: 5px 0;
  border-radius: 3px;
  transition: 0.3s;
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    gap: 0;
    padding: 10px 28px 20px;
    box-shadow: var(--shadow-soft);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(44,33,29,0.06); }
  .nav-toggle { display: block; }
  .nav-cta .btn span.btn-text-full { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 60px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}

.hero-copy p.lead {
  font-size: 1.15rem;
  max-width: 480px;
}

.hero-stats {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  margin-top: 38px;
  flex-wrap: nowrap;
}

.hero-stats div {
  flex: 1 1 0;
  min-width: 0;
}

.hero-stats div strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 3.2vw, 1.9rem);
  color: var(--strawberry-dark);
  white-space: nowrap;
}
.hero-stats div span {
  display: block;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  color: var(--brown-soft);
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 400px) {
  .hero-stats { gap: 10px; }
}

.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.hero-art { position: relative; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  z-index: 0;
}

.decor-dot {
  position: absolute;
  border-radius: 50%;
}

/* ---------- Section utilities ---------- */
.section { padding: 90px 0; }
.section-tight { padding: 60px 0; }
.section-cream { background: var(--cream); }
.section-white { background: var(--white); }
.section-leaf { background: var(--leaf-light); }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head.left { text-align: left; margin: 0 0 50px; }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 30px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.card .icon-badge {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
}

/* ---------- Illustration frames ---------- */
.art-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-3-4 { aspect-ratio: 3 / 4; }

/* ---------- Product card ---------- */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.product-card .product-body { padding: 24px 24px 28px; }
.product-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--strawberry);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.price-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.price-table td { padding: 12px 0; border-bottom: 1px solid rgba(44,33,29,0.08); font-size: 0.95rem; }
.price-table td:first-child { color: var(--charcoal); font-weight: 600; }
.price-table td:last-child { color: var(--strawberry-dark); font-weight: 700; text-align: right; font-family: 'Fraunces', serif; }
.price-note { font-size: 0.85rem; color: var(--brown-soft); margin-top: 16px; }
.price-note a { color: var(--strawberry-dark); font-weight: 600; }

.ciwifarm-empty { text-align: center; padding: 40px 0; }

/* ---------- Testimonial / partner ---------- */
.partner-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--strawberry);
}
.partner-card .partner-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--strawberry-dark);
  margin-bottom: 4px;
  display: block;
}
.partner-card .partner-role {
  font-size: 0.85rem;
  color: var(--brown-soft);
  margin-bottom: 18px;
  display: block;
}
.partner-card .partner-logo { margin-bottom: 16px; }
.partner-card .partner-logo img { max-height: 48px; width: auto; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--strawberry) 0%, var(--strawberry-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 64px 50px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,0.9); }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Timeline (About) ---------- */
.timeline {
  position: relative;
  padding-left: 40px;
  border-left: 3px solid var(--leaf-light);
}
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -49px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--strawberry);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 3px var(--strawberry);
}
.timeline-item .year {
  font-family: 'Fraunces', serif;
  color: var(--strawberry-dark);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---------- Values grid ---------- */
.value-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.value-item .icon-badge {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 14px;
  background: var(--leaf-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--charcoal);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(44,33,29,0.15);
  font-family: inherit;
  font-size: 0.96rem;
  background: var(--cream);
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--strawberry);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- Contact info list ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(44,33,29,0.08);
}
.info-list li:last-child { border-bottom: none; }
.info-list .icon-badge {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--cream);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 50px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-logo svg { width: 34px; height: 34px; }
.footer-logo img { max-height: 34px; width: auto; }
.site-footer p { color: rgba(255,248,240,0.65); font-size: 0.92rem; }
.site-footer h4 { color: var(--white); font-size: 1rem; font-family: 'Poppins', sans-serif; font-weight: 600; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,248,240,0.75); font-size: 0.93rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,248,240,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--strawberry); }

.footer-bottom {
  border-top: 1px solid rgba(255,248,240,0.12);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,248,240,0.5);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 70px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero p.lead { max-width: 620px; margin: 0 auto; font-size: 1.1rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pill {
  background: var(--white);
  border: 1.5px solid rgba(44,33,29,0.12);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Real photo helpers ---------- */
.photo-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-photo {
  aspect-ratio: 4 / 5;
}

.product-photo {
  height: 260px;
  overflow: hidden;
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform 0.4s ease; }
.product-card:hover .product-photo img { transform: scale(1.05); }

@media (max-width: 640px) {
  .product-photo { height: 220px; }
}

.banner-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.banner-photo img { width: 100%; display: block; object-fit: cover; }
.banner-photo.tall { aspect-ratio: 16 / 7; }
.banner-photo.wide { aspect-ratio: 21 / 9; }

.banner-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 34px;
  background: linear-gradient(0deg, rgba(44,33,29,0.75) 0%, rgba(44,33,29,0) 100%);
  color: var(--white);
}
.banner-caption h3 { color: var(--white); margin: 0 0 4px; }
.banner-caption p { color: rgba(255,248,240,0.85); margin: 0; }

::selection { background: var(--strawberry-light); color: var(--white); }
