/* ============================================================
   FARMA OGŁOSZEŃ — Homepage Redesign
   Scoped to body#home; other pages are unaffected.
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
  --fg-green:        #2a7d1f;
  --fg-green-hover:  #1e5c15;
  --fg-green-dark:   #1c3a0c;
  --fg-border:       #e5e7eb;
  --fg-muted:        #6b7280;
  --fg-bg:           #f9fafb;
  --fg-white:        #ffffff;
  --fg-radius:       12px;
  --fg-shadow:       0 1px 4px rgba(0,0,0,.08);
  --fg-shadow-hover: 0 4px 16px rgba(0,0,0,.12);
}

/* ── Shared utilities ────────────────────────────────────── */
body#home .fg-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
body#home .fg-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
body#home .fg-section-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0;
}
body#home .fg-see-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-green);
  text-decoration: none;
  white-space: nowrap;
}
body#home .fg-see-all:hover { text-decoration: underline; }

/* ── Remove .content wrapper spacing on homepage ─────────── */
body#home > .content {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* ── Hide old sections we replace ───────────────────────── */
body#home .home-action,
body#home .home-about,
body#home .home-usp,
body#home .home-premium { display: none !important; }

/* ── HEADER — hide Zeta's, show our custom #fg-nav ──────── */
body#home header {
  display: none !important;
}
/* Body padding: 48px (Zeta default) → 64px (our taller header) */
body#home {
  padding-top: 64px !important;
}

/* ── #fg-nav (new homepage navbar) ─────────────────────── */
#fg-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--fg-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}
#fg-nav .fg-container {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}
#fg-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 8px;
}
#fg-logo img {
  height: 36px;
  width: auto;
}
#fg-nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex: 1;
}
#fg-nav-links li a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
#fg-nav-links li a:hover {
  background: #f3f4f6;
  color: var(--fg-green);
  text-decoration: none;
}
#fg-nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.fg-nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #555;
  font-size: 17px;
  text-decoration: none;
  transition: background .15s;
}
.fg-nav-icon:hover { background: #f3f4f6; color: var(--fg-green); }
.fg-nav-login {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background .15s;
  white-space: nowrap;
}
.fg-nav-login:hover { background: #f3f4f6; text-decoration: none; color: #111; }
.fg-nav-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 40px;
  background: var(--fg-green);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}
.fg-nav-add-btn:hover { background: var(--fg-green-hover); color: #fff; text-decoration: none; }

/* Mobile: hide nav links, keep just logo + add button */
@media (max-width: 768px) {
  #fg-nav-links { display: none; }
  .fg-nav-login span { display: none; }
}

/* ── HERO ─────────────────────────────────────────────────
   body { padding-top:48px } already clears the fixed header,
   so the hero starts right below the navbar.
   ─────────────────────────────────────────────────────── */
body#home #home-search-box {
  position: relative;
  min-height: 460px;
  /* Explicit individual properties so nothing can silently override */
  background-color: #0f2408 !important;
  background-image: url('../images/hero-tractor.jpg') !important;
  background-position: right center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: visible;
}
body#home #home-search-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    rgba(10,28,6,.88) 0%,
    rgba(10,28,6,.72) 40%,
    rgba(10,28,6,.38) 70%,
    rgba(10,28,6,.08) 100%);
  z-index: 1;
}

/* hero main content area */
body#home #home-search-box > .container {
  position: relative;
  z-index: 10;
  width: 100% !important;
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 20px 56px;
  text-align: left !important;
}

/* heading */
body#home .fg-hero-heading {
  color: #fff;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 12px;
  max-width: 560px;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  text-align: left;
}
body#home .fg-hero-sub {
  color: rgba(255,255,255,.88);
  font-size: 17px;
  margin: 0 0 32px;
  max-width: 480px;
  text-align: left;
}

/* search card */
body#home .fg-search-card {
  background: #fff;
  border-radius: var(--fg-radius);
  padding: 16px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 1050px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
body#home .fg-search-card .fg-sf-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

/* ── Zeta picker inside hero search card ─────────────────── */
body#home .fg-search-card .fg-hero-picker {
  flex: 1;
  position: relative;
  min-width: 0;
  margin: 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* style the visible text input like our other fields */
body#home .fg-search-card .fg-hero-picker input[type=text] {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--fg-border) !important;
  border-radius: 8px !important;
  font-size: 14px;
  color: #333;
  background: #fff !important;
  box-sizing: border-box;
  outline: none;
  padding: 0 32px 0 38px !important;
  transition: border-color .15s;
  box-shadow: none !important;
}
body#home .fg-search-card .fg-hero-picker input[type=text]:focus {
  border-color: var(--fg-green) !important;
}
/* position Zeta's .icon SVG like our .fg-sf-icon */
body#home .fg-search-card .fg-hero-picker svg.icon {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  fill: #9ca3af !important;
  pointer-events: none !important;
  z-index: 1 !important;
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
}
/* hide Zeta's clean (×) button */
body#home .fg-search-card .fg-hero-picker i.clean { display: none !important; }
/* dropdown results panel */
body#home .fg-search-card .fg-hero-picker .results {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--fg-border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  z-index: 9999 !important;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
}
body#home .fg-search-card .fg-hero-picker .results .row { padding: 4px 0; }
body#home .fg-search-card .fg-hero-picker .results .lead {
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: .04em;
}
body#home .fg-search-card .fg-hero-picker .results a.option,
body#home .fg-search-card .fg-hero-picker .results div.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background .12s;
  cursor: pointer;
}
body#home .fg-search-card .fg-hero-picker .results a.option:hover,
body#home .fg-search-card .fg-hero-picker .results div.option:hover { background: #f3f4f6; }
body#home .fg-search-card .fg-hero-picker .results .row.minlength em {
  display: block;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--fg-green);
  font-style: italic;
}
/* remove FA ::after icons in hero pickers (font renders as broken boxes) */
body#home .fg-hero-picker .results a:after,
body#home .fg-hero-picker .results div:after { content: none !important; }
/* regular options (categories, search results) — block, no flex, normal padding */
body#home .fg-hero-picker .results a.option,
body#home .fg-hero-picker .results div.option { padding-left: 16px !important; display: block !important; }
/* hide all SVG icons inside location dropdown options */
body#home .fg-hero-picker .results .option svg,
body#home .fg-hero-picker .results a svg { display: none !important; }

/* active picker floats above sibling inputs (fixes mobile overlap) */
body#home .fg-hero-picker:focus-within { z-index: 200 !important; }
body#home .fg-search-card .fg-sf-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  z-index: 1;
}
body#home .fg-search-card input[type=text],
body#home .fg-search-card select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--fg-border);
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
body#home .fg-search-card input[type=text] {
  padding: 0 12px 0 38px;
}
body#home .fg-search-card select {
  padding: 0 30px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
body#home .fg-search-card input[type=text]:focus,
body#home .fg-search-card select:focus {
  border-color: var(--fg-green);
}
body#home .fg-search-card .fg-search-btn {
  height: 48px;
  padding: 0 26px;
  background: var(--fg-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
  flex-shrink: 0;
}
body#home .fg-search-card .fg-search-btn:hover { background: var(--fg-green-hover); }

/* hero stats bar — outside the container, at the bottom of the hero */
body#home .fg-hero-stats {
  position: relative;
  z-index: 1;
  background: rgba(10,28,6,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px 0;
  margin-top: auto; /* push to bottom if content is shorter */
}
body#home .fg-hero-stats .fg-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
}
body#home .fg-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
body#home .fg-stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
body#home .fg-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
body#home .fg-stat span {
  display: block;
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
}

/* ── CATEGORIES ──────────────────────────────────────────── */
body#home .fg-cats-section {
  padding: 56px 0 48px;
  background: #fff;
}
body#home .fg-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
body#home .fg-cat-card {
  background: #fff;
  border: 1.5px solid var(--fg-border);
  border-radius: var(--fg-radius);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  display: block;
}
body#home .fg-cat-card:hover {
  box-shadow: var(--fg-shadow-hover);
  transform: translateY(-2px);
  border-color: #d1d5db;
  text-decoration: none;
  color: inherit;
}
body#home .fg-cat-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  overflow: hidden;
}
body#home .fg-cat-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
body#home .fg-cat-name {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.3;
}
body#home .fg-cat-count {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ── CTA BANNER ──────────────────────────────────────────── */
body#home .fg-cta-banner {
  position: relative;
  overflow: hidden;
  padding: 48px 0 !important;
  background-color: var(--fg-green-dark) !important;
  background-image: url('../images/hero-tractor.jpg') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
body#home .fg-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15,40,8,.80);
}
body#home .fg-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
body#home .fg-cta-text h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
}
body#home .fg-cta-text p {
  color: rgba(255,255,255,.78);
  font-size: 14px;
  margin: 0;
  max-width: 440px;
}
body#home .fg-cta-btns {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
body#home .fg-btn-outline {
  height: 46px;
  padding: 0 22px;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, border-color .15s;
}
body#home .fg-btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  text-decoration: none;
  color: #fff;
}

/* ── HOW IT WORKS ────────────────────────────────────────── */
body#home .fg-how-section {
  padding: 64px 0;
  background: #fff;
  text-align: center;
}
body#home .fg-how-section h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 48px;
  color: #111;
}
body#home .fg-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 780px;
  margin: 0 auto;
}
body#home .fg-step {
  flex: 1;
  padding: 0 24px;
}
body#home .fg-step-num {
  width: 52px;
  height: 52px;
  background: var(--fg-green);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
body#home .fg-step h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #111;
}
body#home .fg-step p {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.5;
}
body#home .fg-step-arrow {
  font-size: 24px;
  color: #d1d5db;
  padding-top: 14px;
  flex-shrink: 0;
  align-self: flex-start;
}

/* ── LATEST LISTINGS — horizontal carousel ───────────────── */
body#home .fg-latest-section {
  padding: 56px 0;
  background: var(--fg-bg);
}

/* Carousel container */
body#home .fg-carousel-wrap {
  position: relative;
}
body#home .fg-carousel-wrap .nice-scroll-prev,
body#home .fg-carousel-wrap .nice-scroll-next {
  top: 38% !important;
}

/* nice-scroll mode: no wrap, horizontal scroll */
body#home #latest-items {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
body#home #latest-items::-webkit-scrollbar { display: none; }

body#home #latest-items .simple-prod {
  flex: 0 0 calc(20% - 4px) !important;
  width:  calc(20% - 4px) !important;
  min-width: 180px;
  border-radius: var(--fg-radius) !important;
  overflow: hidden;
}
body#home #latest-items .simple-prod:hover .simple-wrap {
  box-shadow: var(--fg-shadow-hover) !important;
}
body#home #latest-items .simple-prod .simple-wrap {
  background: #fff !important;
  border: 1.5px solid var(--fg-border) !important;
  border-radius: var(--fg-radius) !important;
  padding-bottom: 44px !important;
}

/* Un-hide location + favourite (style4 sets them to display:none) */
body#home #latest-items .simple-prod .location {
  display: flex !important;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  padding: 0 8px 8px;
}
body#home #latest-items .simple-prod .favorite-block1 {
  display: block !important;
}

/* Un-hide location + favourite for recently viewed too */
body#home #recent-items .simple-prod .location {
  display: flex !important;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  padding: 0 8px 8px;
}
body#home #recent-items .simple-prod .favorite-block1 {
  display: block !important;
}

/* ── TRUST BADGES ────────────────────────────────────────── */
body#home .fg-trust-section {
  padding: 48px 0;
  background: #fff;
  border-top: 1px solid var(--fg-border);
  border-bottom: 1px solid var(--fg-border);
}
body#home .fg-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
body#home .fg-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
body#home .fg-trust-icon {
  width: 44px;
  height: 44px;
  background: var(--fg-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--fg-green);
  flex-shrink: 0;
}
body#home .fg-trust-item h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #111;
}
body#home .fg-trust-item p {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── RECENTLY VIEWED ─────────────────────────────────────── */
body#home .fg-recent-section {
  padding: 56px 0;
  background: #fff;
}
/* Force 5-column regardless of what theme param sets */
body#home #recent-items {
  display: flex !important;
  flex-wrap: wrap !important;
}
body#home #recent-items .simple-prod {
  width: calc(20% - 4px) !important;
  border-radius: var(--fg-radius) !important;
  overflow: hidden;
}
body#home #recent-items .simple-prod .simple-wrap {
  background: #fff !important;
  border: 1.5px solid var(--fg-border) !important;
  border-radius: var(--fg-radius) !important;
}

/* ── SEO TEXT ────────────────────────────────────────────── */
body#home #home-seo-text {
  padding: 48px 0;
  background: #fff;
  border-top: 1px solid var(--fg-border);
}
body#home #home-seo-text h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}
body#home #home-seo-text p {
  color: #444;
  font-size: 14px;
  line-height: 1.7;
  max-width: 860px;
  margin: 0 0 8px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1150px) {
  body#home #latest-items .simple-prod { width: calc(25% - 4px) !important; }
  body#home #recent-items .simple-prod { width: calc(25% - 4px) !important; }
}
@media (max-width: 1024px) {
  body#home .fg-cat-grid { grid-template-columns: repeat(4, 1fr); }
  body#home .fg-trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body#home .fg-hero-heading  { font-size: 26px; margin-bottom: 8px; }
  body#home .fg-hero-sub      { font-size: 14px; margin-bottom: 16px; }
  body#home #home-search-box > .container { padding: 28px 16px 24px; }
  body#home .fg-search-card   { flex-direction: column; gap: 8px; padding: 14px; }
  body#home .fg-search-card .fg-sf-wrap { width: 100%; }
  body#home .fg-search-card input[type=text],
  body#home .fg-search-card select { height: 44px; }
  body#home .fg-search-card .fg-search-btn { width: 100%; justify-content: center; height: 44px; }
  body#home .fg-cat-grid      { grid-template-columns: repeat(3, 1fr); }
  body#home .fg-trust-grid    { grid-template-columns: 1fr 1fr; }
  body#home .fg-steps         { flex-direction: column; align-items: center; gap: 36px; }
  body#home .fg-step          { width: 100%; max-width: 340px; }
  body#home .fg-step-arrow    { display: none; }
  body#home .fg-cta-inner     { flex-direction: column; text-align: center; }
  body#home .fg-cta-btns      { justify-content: center; }
  /* Stats: 2×2 grid on mobile — hide subtitle, keep icon + title */
  body#home .fg-hero-stats    { padding: 16px 0; }
  body#home .fg-hero-stats .fg-container { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; padding: 0 16px; }
  body#home .fg-stat          { gap: 8px; }
  body#home .fg-stat span     { display: none; }
  body#home .fg-stat strong   { font-size: 13px; font-weight: 600; white-space: normal; line-height: 1.3; }
  body#home .fg-stat-icon     { width: 30px; height: 30px; font-size: 13px; flex-shrink: 0; border-radius: 6px; }
  body#home #latest-items .simple-prod { width: calc(33.33% - 4px) !important; }
  body#home #recent-items .simple-prod { width: calc(33.33% - 4px) !important; }
}
@media (max-width: 480px) {
  body#home .fg-cat-grid { grid-template-columns: repeat(2, 1fr); }
  body#home #latest-items .simple-prod { width: calc(50% - 4px) !important; }
  body#home #recent-items .simple-prod { width: calc(50% - 4px) !important; }
}
