/* =====================================================
   greens-main.css — Shared styles for all pages
   Greens Egypt / Campos Agriculture and Trading
   ===================================================== */

/* ── Variables ───────────────────────────────────── */
:root {
  --gn-deep:    #0c1f07;
  --gn-dark:    #1a4d0a;
  --gn-mid:     #2e7d1f;
  --gn-light:   #4a9e2f;
  --gold:       #b8904a;
  --gold-lt:    #d4af6a;
  --cream:      #f7f3ec;
  --cream-dk:   #ede6d8;
  --white:      #ffffff;
  --txt-dark:   #181810;
  --txt-mid:    #4a4a3a;
  --txt-muted:  #888876;
  --ff-serif:   'Cormorant Garamond', Georgia, serif;
  --ff-sans:    'DM Sans', sans-serif;
}

/* ── Base reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img { display: block; max-width: 100%; }
a  { text-decoration: none; }

/* ── Constrained wrapper ─────────────────────────── */
.g-wrap {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
}
@media (max-width: 640px) {
  .g-wrap { padding-left: 22px; padding-right: 22px; }
}

/* ── Section labels ──────────────────────────────── */
.g-eyebrow {
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.g-h2 {
  font-family: var(--ff-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 300;
  color: var(--gn-deep);
  line-height: 1.15;
}
.g-rule {
  width: 40px;
  height: 1.5px;
  background: var(--gold);
  margin-top: 18px;
}

/* ── Buttons ─────────────────────────────────────── */
.g-btn {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 30px;
  border-radius: 2px;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.g-btn--solid {
  background: var(--gn-mid);
  color: var(--white);
  border-color: var(--gn-mid);
}
.g-btn--solid:hover {
  background: var(--gn-light);
  border-color: var(--gn-light);
  color: #fff;
}
.g-btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.g-btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.85);
}
.g-btn--outline {
  background: transparent;
  color: var(--gn-mid);
  border-color: var(--gn-mid);
}
.g-btn--outline:hover {
  background: var(--gn-mid);
  color: #fff;
}
.g-btn--cream {
  background: var(--cream);
  color: var(--gn-dark);
  border-color: var(--cream);
}
.g-btn--cream:hover { background: var(--cream-dk); }
.g-btn--wa {
  background: #25d366;
  color: var(--white);
  border-color: #25d366;
}
.g-btn--wa:hover { background: #1ebe5d; color: #fff; }

/* ── Page hero banner (category & product pages) ─── */
.g-page-hero {
  position: relative;
  padding: 80px 0 64px;
  background: var(--gn-deep);
  text-align: center;
  overflow: hidden;
}
.g-page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}
.g-page-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 32px;
}
.g-page-hero__eyebrow {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 14px;
}
.g-page-hero__h1 {
  font-family: var(--ff-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}
.g-page-hero__desc {
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
}
.g-page-hero__rule {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 20px auto 0;
}

/* ── Product grid (category pages) ──────────────── */
.g-prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 64px 0 80px;
}
@media (max-width: 860px) {
  .g-prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .g-prod-grid { grid-template-columns: 1fr; }
}

/* ── Product card (category pages) ──────────────── */
.g-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}
.g-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.13);
}
.g-card__thumb {
  height: 200px;
  overflow: hidden;
}
.g-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.g-card:hover .g-card__thumb img { transform: scale(1.07); }
.g-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.g-card__title {
  font-family: var(--ff-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gn-deep);
  margin-bottom: 8px;
}
.g-card__text {
  font-family: var(--ff-sans);
  font-size: 0.84rem;
  color: var(--txt-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}
.g-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: auto;
}
.g-card__btn-detail,
.g-card__btn-enquiry {
  flex: 1;
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 8px;
  border-radius: 2px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.g-card__btn-detail {
  color: var(--gn-mid);
  border: 1.5px solid var(--gn-mid);
  background: transparent;
}
.g-card__btn-detail:hover { background: var(--gn-mid); color: #fff; }
.g-card__btn-enquiry {
  color: var(--txt-mid);
  border: 1.5px solid var(--cream-dk);
  background: var(--cream);
}
.g-card__btn-enquiry:hover,
.g-card__btn-enquiry.added {
  background: var(--gn-mid);
  color: #fff;
  border-color: var(--gn-mid);
}

/* ── Enquiry basket nav badge ────────────────────── */
.g-basket-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 2px;
  border: 1.5px solid var(--gn-mid);
  color: var(--gn-mid);
  background: transparent;
  transition: background 0.2s, color 0.2s;
  margin-left: 8px;
}
.g-basket-btn:hover { background: var(--gn-mid); color: #fff; }
.gn-nav.gn-transparent .g-basket-btn {
  border-color: rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.9);
}
.gn-nav.gn-transparent .g-basket-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.9);
  color: #fff;
}
.g-basket-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}
.gn-nav.gn-transparent .g-basket-count { background: var(--gold-lt); color: var(--gn-deep); }
.g-basket-btn[data-count="0"] { display: none; }

/* ── Shared footer ───────────────────────────────── */
.g-footer {
  background: var(--gn-deep);
  padding: 64px 0 0;
}
.g-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 52px;
  padding-bottom: 52px;
}
.g-footer__logo {
  height: 50px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.g-footer__about {
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.75;
  margin-bottom: 20px;
}
.g-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.g-footer__contact a {
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.52);
  display: flex;
  align-items: center;
  gap: 9px;
  transition: color 0.2s;
  text-decoration: none;
}
.g-footer__contact a:hover { color: var(--gold-lt); }
.g-footer__contact a i { color: var(--gold); font-size: 0.8rem; width: 14px; }
.g-footer__col-title {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.g-footer__links {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.g-footer__links a {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.48);
  text-decoration: none;
  transition: color 0.2s;
}
.g-footer__links a:hover { color: var(--white); }
.g-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.g-footer__copy {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.28);
}
.g-footer__credit {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.28);
}
.g-footer__credit a {
  color: rgba(212,175,106,0.7);
  transition: color .2s;
}
.g-footer__credit a:hover { color: var(--gold-lt); }
@media (max-width: 820px) {
  .g-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .g-footer__grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ── Floating WhatsApp ───────────────────────────── */
.g-wa-float {
  position: fixed;
  bottom: 28px; left: 28px;
  z-index: 9999;
  width: 52px; height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.g-wa-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(37,211,102,0.65);
}
.g-wa-float svg { width: 26px; height: 26px; fill: #fff; }

/* reCAPTCHA v3 badge hidden — notice shown under the Contact form instead */
.grecaptcha-badge { visibility: hidden; }

/* ── Back to top ─────────────────────────────────── */
.g-top {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9999;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,106,0.55);
  background: var(--gn-dark);
  color: var(--gold-lt);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(12,31,7,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, border-color .2s, background .2s;
}
.g-top.show { opacity: 1; visibility: visible; transform: none; }
.g-top:hover, .g-top:focus-visible {
  border-color: var(--gold-lt);
  background: var(--gn-deep);
  transform: translateY(-3px);
  outline: none;
}
.g-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .g-wa-float { bottom: 18px; left: 18px; }
  .g-top { bottom: 18px; right: 18px; }
}

/* ── Scroll reveal ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.18s; }
.reveal-d3 { transition-delay: 0.28s; }
.reveal-d4 { transition-delay: 0.38s; }
.reveal-d5 { transition-delay: 0.48s; }
.reveal-d6 { transition-delay: 0.58s; }

/* ── Keyframes ───────────────────────────────────── */
@keyframes aFadeUp {
  to   { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(22px); }
}
@keyframes aFadeIn {
  to   { opacity: 1; }
  from { opacity: 0; }
}
@keyframes aRiseUp {
  to   { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(36px); }
}
