/* ════════════════════════════════════════
   Sri Vinayaga Agro Agencies — style.css
   ════════════════════════════════════════ */

:root {
  --green-dark:  #1a5c2a;
  --green-med:   #2e8b3a;
  --green-light: #e8f5e9;
  --red-dark:    #8b0000;
  --blue-dark:   #1a3a6b;
  --text:        #1a1a1a;
  --muted:       #666;
  --border:      #e0e0e0;
  --radius:      12px;
  --shadow:      0 4px 20px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans Tamil', sans-serif;
  background: #f7f9f4;
  color: var(--text);
}

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-med) 100%);
  padding: 28px 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-right: 10px;
}
.logo h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.logo .tagline { font-size: 1rem; color: rgba(255,255,255,0.75); margin-top: 2px; }

.top-nav { display: flex; gap: 20px; }
.top-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 40px;
  transition: background 0.2s;
}
.top-nav a:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ── HERO ── */
.hero {
  position: relative;
  background: url('shop.png') center/cover no-repeat;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,40,15,0.2) 0%, rgba(10,40,15,0.55) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 40px 20px; }
.hero-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 6px;
}
.hero-content > p { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 24px; }

.hero-stats { display: flex; gap: 32px; justify-content: center; }
.stat {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 12px 24px;
  color: #fff;
  text-align: center;
}
.stat span { display: block; font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat small { font-size: 0.75rem; opacity: 0.8; }

/* ── FILTER BAR ── */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 70px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-wrap {
  display: flex;
  align-items: center;
  background: #f4f7f4;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 8px 16px;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}
.search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
  color: var(--text);
}
.search-icon { font-size: 1rem; }

.filter-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  border: 2px solid var(--border);
  background: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.filter-btn:hover { border-color: #999; }
.filter-btn.active, .filter-btn.active:hover {
  background: var(--green-dark); color: #fff; border-color: var(--green-dark);
}
.filter-btn.seeds.active   { background: var(--green-dark); border-color: var(--green-dark); }
.filter-btn.pesticide.active { background: var(--red-dark); border-color: var(--red-dark); }
.filter-btn.fertilizer.active { background: var(--blue-dark); border-color: var(--blue-dark); }
.badge {
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.78rem;
}
.filter-btn.active .badge { background: rgba(255,255,255,0.25); }

/* ── RESULTS BAR ── */
.results-bar {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── PRODUCT GRID ── */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

#product-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ── CARD ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--card-border, #e0e0e0);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
  animation: fadeInUp 0.4s ease both;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(0,0,0,0.14); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-img-wrap { position: relative; }
.card-img-wrap img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-body { padding: 14px; }
.card-company { font-size: 0.75rem; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.card-name { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.card-sub { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; font-style: italic; }
.card-details { font-size: 0.83rem; color: #444; line-height: 1.4; margin-bottom: 12px; min-height: 36px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-pack { font-size: 0.78rem; color: var(--muted); }
.card-btn {
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
}
.card-btn:hover { opacity: 0.88; transform: scale(1.04); }

/* ── NO RESULTS ── */
.no-results { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 1.1rem; }

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.close-btn {
  position: absolute;
  top: 12px; right: 14px;
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
  transition: background 0.2s;
}
.close-btn:hover { background: rgba(0,0,0,0.16); }

.modal-header {
  display: flex;
  gap: 16px;
  padding: 20px 20px 0;
  align-items: flex-start;
}
.modal-header img {
  width: 120px; height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-cat-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.modal-header h2 { font-size: 1.25rem; margin-bottom: 4px; }
.modal-company { font-size: 0.85rem; color: var(--muted); }

.modal-body { padding: 16px 20px 20px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.info-box {
  background: #f7f9f4;
  border-radius: 8px;
  padding: 10px 12px;
}
.info-box label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.info-box span { font-size: 0.9rem; font-weight: 600; }

.modal-details, .modal-tips {
  background: #f7f9f4;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.modal-details h4, .modal-tips h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.modal-details p, .modal-tips p { font-size: 0.9rem; line-height: 1.5; }

/* ── FOOTER ── */
footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 40px 24px 20px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  margin-bottom: 24px;
}
.footer-brand h3 { color: #fff; font-size: 1.1rem; margin-bottom: 6px; }
.footer-brand p  { font-size: 0.85rem; }
.footer-contact h4 { color: #fff; margin-bottom: 8px; }
.footer-contact p  { font-size: 0.9rem; margin-bottom: 4px; }
.footer-contact a  { color: #a5d6a7; text-decoration: none; }

.map-btn {
  display: inline-block;
  background: var(--green-med);
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s;
  margin-top: 8px;
}
.map-btn:hover { background: var(--green-dark); }

.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: #555;
  border-top: 1px solid #333;
  padding-top: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .logo h1 { font-size: 1rem; }
  .top-nav { display: none; }
  .hero-content h2 { font-size: 1.3rem; }
  .hero-stats { gap: 12px; }
  .stat { padding: 8px 14px; }
  .stat span { font-size: 1.4rem; }
  .filter-bar { top: 58px; padding: 10px 14px; gap: 10px; }
  .search-wrap { max-width: 100%; }
  #product-container { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-img-wrap img { height: 120px; }
  .modal-header { flex-direction: column; }
  .modal-header img { width: 100%; height: 160px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}
