/* ============================================================
   SHIVRAJ AGRO TECH — GALLERY PAGE
   Scoped to .shb-gallery-* only. Global style.css untouched.
   ============================================================ */

.shb-gallery-page {
  --ga-deep: #075B3A;
  --ga-green: #138A4B;
  --ga-fresh: #43A047;
  --ga-light: #EAF5EE;
  --ga-bg: #F7FAF8;
  --ga-dark: #17211B;
  --ga-orange: #F28C28;
  --ga-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reveal */
.shb-gallery-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s var(--ga-ease), transform 0.65s var(--ga-ease); }
.shb-gallery-reveal.shb-gallery-visible { opacity: 1; transform: translateY(0); }
.shb-gallery-d1 { transition-delay: 0.08s; } .shb-gallery-d2 { transition-delay: 0.18s; }

/* ---------- Hero ---------- */
.shb-gallery-hero {
  position: relative; background: linear-gradient(135deg, #075B3A 0%, #0d7548 55%, #138A4B 100%);
  padding: 150px 0 110px; overflow: hidden;
}
.shb-gallery-hero-blob, .shb-gallery-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.shb-gallery-hb-1 { width: 480px; height: 480px; top: -180px; right: -140px; background: radial-gradient(circle, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0) 70%); }
.shb-gallery-hb-2 { width: 380px; height: 380px; bottom: -170px; left: -120px; background: radial-gradient(circle, rgba(67,160,71,0.35) 0%, rgba(67,160,71,0) 70%); }
.shb-gallery-leaf { position: absolute; color: rgba(255,255,255,0.08); animation: shbGaFloat 7s ease-in-out infinite; pointer-events: none; }
.shb-gallery-fl-1 { top: 16%; right: 14%; font-size: 96px; }
.shb-gallery-fl-2 { bottom: 14%; left: 8%; font-size: 64px; animation-delay: 2.4s; }
@keyframes shbGaFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(5deg); } }

.shb-gallery-breadcrumb { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; font-family: 'Poppins', sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 2px; }
.shb-gallery-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.shb-gallery-breadcrumb a:hover { color: #fff; }
.shb-gallery-breadcrumb span { color: rgba(255,255,255,0.4); }
.shb-gallery-bc-now { color: rgba(255,255,255,0.55); }

.shb-gallery-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: 'Poppins', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 4px; color: rgba(255,255,255,0.65); margin-bottom: 16px; }
.shb-gallery-eyebrow-line { display: inline-block; width: 34px; height: 2px; background: #43A047; border-radius: 2px; }
.shb-gallery-title { font-family: 'Poppins', sans-serif; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; line-height: 1.12; color: #FFFFFF; margin: 0 0 16px; }
.shb-gallery-desc { font-size: 1.02rem; line-height: 1.8; color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto; }
@media (max-width: 767.98px) { .shb-gallery-hero { padding: 120px 0 84px; } .shb-gallery-fl-2 { display: none; } }

/* ---------- Filter ---------- */
.shb-gallery-filter-sec { position: relative; z-index: 5; margin-top: -32px; }
.shb-gallery-filter-bar {
  background: #FFFFFF; border: 1px solid rgba(7,91,58,0.07); border-radius: 14px;
  box-shadow: 0 12px 34px rgba(7,91,58,0.12); padding: 12px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.shb-gallery-filter-btn {
  font-family: 'Poppins', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 1.2px;
  color: #075B3A; background: #F7FAF8; border: 1.5px solid rgba(19,138,75,0.18); border-radius: 8px;
  padding: 10px 18px; cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}
.shb-gallery-filter-btn:hover { border-color: #138A4B; background: #EAF5EE; transform: translateY(-1px); }
.shb-gallery-filter-btn.shb-gallery-filter-active { background: #075B3A; border-color: #075B3A; color: #FFFFFF; }
.shb-gallery-filter-btn:focus-visible { outline: 3px solid rgba(19,138,75,0.35); outline-offset: 2px; }
@media (max-width: 575.98px) { .shb-gallery-filter-btn { font-size: 0.62rem; padding: 8px 12px; letter-spacing: 0.8px; } }

/* ---------- Grid ---------- */
.shb-gallery-grid-sec { background: #F7FAF8; padding: 64px 0 90px; }
.shb-gallery-count {
  font-family: 'Poppins', sans-serif; font-size: 0.74rem; font-weight: 600; letter-spacing: 2px;
  color: #7d8782; margin-bottom: 22px;
}
.shb-gallery-count b { color: #138A4B; }

.shb-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 230px;
  grid-auto-flow: dense; gap: 15px;
}
@media (max-width: 991.98px) { .shb-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } }
@media (max-width: 575.98px) { .shb-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; } }

.shb-gallery-item {
  position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in; border: none;
  background: #EAF5EE; padding: 0; display: block; box-shadow: 0 3px 14px rgba(7,91,58,0.08);
  transition: transform 0.35s var(--ga-ease), box-shadow 0.35s ease, opacity 0.3s ease;
}
.shb-gallery-item:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(7,91,58,0.14); }
.shb-gallery-item:focus-visible { outline: 3px solid rgba(19,138,75,0.4); outline-offset: 3px; }
.shb-gallery-item.shb-gallery-big { grid-row: span 2; }
.shb-gallery-item.shb-gallery-wide { grid-column: span 3; }
@media (max-width: 991.98px) { .shb-gallery-item.shb-gallery-wide { grid-column: span 2; } }
@media (max-width: 575.98px) {
  .shb-gallery-item.shb-gallery-big, .shb-gallery-item.shb-gallery-wide { grid-row: auto; grid-column: auto; }
}
.shb-gallery-item.shb-gallery-hide { opacity: 0; transform: scale(0.95); pointer-events: none; }

.shb-gallery-item-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.55s var(--ga-ease); }
.shb-gallery-item:hover .shb-gallery-item-img { transform: scale(1.07); }

.shb-gallery-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(7,91,58,0.85) 0%, rgba(7,91,58,0.25) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 18px 20px; opacity: 0; transition: opacity 0.35s ease;
}
.shb-gallery-item:hover .shb-gallery-overlay,
.shb-gallery-item:focus-visible .shb-gallery-overlay { opacity: 1; }
.shb-gallery-ov-cat {
  font-family: 'Poppins', sans-serif; font-size: 0.62rem; font-weight: 700; letter-spacing: 2.2px;
  color: #9ee2b4; margin-bottom: 5px; transform: translateY(8px); transition: transform 0.35s var(--ga-ease);
}
.shb-gallery-ov-title {
  font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; color: #FFFFFF;
  transform: translateY(8px); transition: transform 0.35s var(--ga-ease) 0.04s;
}
.shb-gallery-ov-sub {
  font-size: 0.72rem; color: rgba(255,255,255,0.75); letter-spacing: 0.6px;
  transform: translateY(8px); transition: transform 0.35s var(--ga-ease) 0.08s;
}
.shb-gallery-ov-icon {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: #075B3A; display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; transform: scale(0.6); transition: transform 0.35s var(--ga-ease);
}
.shb-gallery-item:hover .shb-gallery-ov-cat,
.shb-gallery-item:hover .shb-gallery-ov-title,
.shb-gallery-item:hover .shb-gallery-ov-sub { transform: translateY(0); }
.shb-gallery-item:hover .shb-gallery-ov-icon { transform: scale(1); }

/* category color hint bars */
.shb-gallery-item::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2;
  background: #138A4B; opacity: 0.9;
}
.shb-gallery-item[data-shb-gallery-cat="fodder-tray"]::after,
.shb-gallery-item[data-shb-gallery-cat="saffron"]::after { background: #F28C28; }

/* Empty state */
.shb-gallery-empty { text-align: center; padding: 60px 20px; color: #7d8782; }
.shb-gallery-empty i { font-size: 2.2rem; color: #43A047; display: block; margin-bottom: 12px; }
.shb-gallery-empty p { font-family: 'Poppins', sans-serif; font-size: 0.92rem; margin: 0; }

/* ---------- CTA ---------- */
.shb-gallery-cta { position: relative; background: linear-gradient(135deg, #075B3A 0%, #0d7548 60%, #138A4B 100%); padding: 92px 0; overflow: hidden; }
.shb-gallery-cta-leaf { position: absolute; color: rgba(255,255,255,0.07); animation: shbGaFloat 7s ease-in-out infinite; pointer-events: none; }
.shb-gallery-cl-1 { top: 14%; left: 7%; font-size: 92px; }
.shb-gallery-cl-2 { bottom: 12%; right: 6%; font-size: 112px; animation-delay: 2.5s; }
.shb-gallery-cta-title { font-family: 'Poppins', sans-serif; font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: 0.5px; color: #FFFFFF; margin: 0 0 16px; }
.shb-gallery-cta-desc { font-size: 1rem; line-height: 1.8; color: rgba(255,255,255,0.82); max-width: 600px; margin: 0 auto 32px; }
.shb-gallery-cta-btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.shb-gallery-cta-btn1, .shb-gallery-cta-btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Poppins', sans-serif; font-size: 0.88rem; font-weight: 600; letter-spacing: 1.2px;
  padding: 15px 34px; border-radius: 8px; text-decoration: none; cursor: pointer; border: 2px solid #FFFFFF;
  transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
}
.shb-gallery-cta-btn1 { background: #FFFFFF; color: #075B3A; }
.shb-gallery-cta-btn1:hover { background: #EAF5EE; border-color: #EAF5EE; color: #075B3A; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.18); }
.shb-gallery-cta-btn2 { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,0.5); }
.shb-gallery-cta-btn2:hover { background: #FFFFFF; border-color: #FFFFFF; color: #075B3A; transform: translateY(-2px); }
@media (max-width: 767.98px) { .shb-gallery-cta { padding: 70px 0; } .shb-gallery-cl-1, .shb-gallery-cl-2 { font-size: 60px; } }
@media (max-width: 420px) { .shb-gallery-cta-btns { flex-direction: column; } }

/* ---------- Lightbox ---------- */
.shb-gallery-lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.shb-gallery-lightbox[hidden] { display: none; }
.shb-gallery-lightbox.shb-gallery-lb-open { opacity: 1; }
.shb-gallery-lb-backdrop { position: absolute; inset: 0; background: rgba(10,20,14,0.9); backdrop-filter: blur(6px); }
.shb-gallery-lb-frame { position: relative; z-index: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(90vw, 960px); }
.shb-gallery-lb-img { max-width: 90vw; max-height: 74vh; object-fit: contain; background: #FFFFFF; border-radius: 12px; padding: 12px; box-shadow: 0 24px 70px rgba(0,0,0,0.45); transition: opacity 0.2s ease; }
.shb-gallery-lb-img.shb-gallery-lb-fading { opacity: 0; }
.shb-gallery-lb-cap { text-align: center; }
.shb-gallery-lb-title { display: block; font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 700; color: #FFFFFF; letter-spacing: 0.6px; }
.shb-gallery-lb-sub { display: block; font-size: 0.76rem; color: rgba(255,255,255,0.65); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; }
.shb-gallery-lb-count { display: block; font-family: 'Poppins', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 2px; color: #9ee2b4; margin-top: 6px; }
.shb-gallery-lb-btn {
  position: absolute; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: #FFFFFF; font-size: 1.05rem; display: flex; align-items: center;
  justify-content: center; cursor: pointer; backdrop-filter: blur(6px); transition: background 0.25s ease, transform 0.25s ease;
}
.shb-gallery-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.shb-gallery-lb-btn:hover { background: #138A4B; transform: scale(1.06); }
.shb-gallery-lb-close { top: 20px; right: 20px; }
.shb-gallery-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.shb-gallery-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
body.shb-gallery-lb-lock { overflow: hidden; }
@media (max-width: 575.98px) { .shb-gallery-lb-btn { width: 40px; height: 40px; } .shb-gallery-lb-prev { left: 8px; } .shb-gallery-lb-next { right: 8px; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .shb-gallery-reveal { opacity: 1; transform: none; transition: none; }
  .shb-gallery-leaf, .shb-gallery-cta-leaf { animation: none; }
  .shb-gallery-item:hover .shb-gallery-item-img { transform: none; }
}
