:root {
  --green: #3fa535;
  --green-dark: #1f5a28;
  --green-soft: #e8f3ea;
  --cream: #fdfce3;
  --cream-deep: #f3f6c9;
  --amber: #b26a00;
  --amber-soft: #fff3dc;
  --red: #b3261e;
  --red-soft: #fdeceb;
  --ink: #1d2b20;
  --muted: #5d6b60;
  --line: #d8e2da;
  --bg: #f6f9f6;
  --card: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--bg) 220px, var(--bg) 100%);
  color: var(--ink);
  font-family: "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

[hidden] { display: none !important; }

.top {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  color: var(--ink);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.header-icon-btn {
  border: 1.5px solid var(--green); background: #fff; color: var(--green-dark);
  border-radius: 50%; width: 40px; height: 40px; font-size: 18px; padding: 0;
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.header-icon-btn:active { background: var(--green-soft); }
.logo, .logo-img {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--green);
  display: grid; place-items: center; font-size: 26px;
  object-fit: contain; padding: 4px; flex: none;
}
.brand-name { font-weight: 800; letter-spacing: .03em; font-size: 21px; color: var(--green-dark); }
.tagline { font-size: 12.5px; color: var(--green); font-weight: 600; font-style: italic; }

.tabs {
  display: flex; max-width: 640px; margin: 0 auto; gap: 6px;
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; padding: 8px 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px; border: 0; border-radius: 14px; background: none;
  font: inherit; font-weight: 600; color: var(--muted); font-size: 12.5px;
  cursor: pointer; white-space: nowrap;
}
.tab .tab-ico { font-size: 19px; line-height: 1; }
.tab.active { color: #fff; background: var(--green); }
.tab.active .tab-ico { filter: brightness(1.2); }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px 8px; }

h1 { font-size: 22px; margin: 4px 0 16px; }
h2 { font-size: 19px; margin: 0 0 12px; }

.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }

input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
textarea { resize: vertical; }
select + input { margin-top: 8px; }

input:focus, select:focus, textarea:focus, .btn:focus-visible, .tab:focus-visible {
  outline: 3px solid rgba(47, 125, 58, .35);
  outline-offset: 1px;
  border-color: var(--green);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-align: center;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:active { background: var(--green-dark); }
.btn.ghost { background: #fff; color: var(--green-dark); border-color: var(--green); }
.btn.link { background: none; color: var(--red); padding: 8px 4px; }
.btn.big { width: 100%; padding: 15px; font-size: 18px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.preview {
  display: block; margin-top: 10px; max-width: 100%; max-height: 260px;
  border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: #fff;
}

.error {
  background: var(--red-soft); color: var(--red);
  border: 1px solid #f0c4c1; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; font-weight: 600;
}
.ok {
  background: var(--green-soft); color: var(--green-dark);
  border: 1px solid #bfe0c6; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; font-weight: 600;
}

.auth-links { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; align-items: center; }

.card-form {
  margin-top: 18px; padding: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
}

.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  background: linear-gradient(180deg, #fff 0%, var(--green-soft) 100%);
  border: 1.5px solid #cfe8d2; border-radius: 16px;
  padding: 16px 10px; text-align: center; font-size: 14px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 28px; box-shadow: 0 2px 6px rgba(47,125,58,.08);
}
.tile > div:nth-child(2) { color: var(--green-dark); font-weight: 700; font-size: 14px; }
.tile .soon { font-size: 12px; color: var(--amber); }

.hero-banner {
  margin: 4px 0 18px; border-radius: 18px;
  background: linear-gradient(135deg, #e7f6d8 0%, var(--green-soft) 100%);
  border: 1px solid #cfe8d2; position: relative; overflow: hidden;
  display: flex; align-items: stretch; min-height: 130px;
}
.hero-text {
  flex: 1 1 auto; padding: 20px 14px; display: flex; flex-direction: column;
  justify-content: center; position: relative; z-index: 2;
}
.hero-photo {
  flex: 0 0 38%; width: 38%; object-fit: cover; object-position: top center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px);
  mask-image: linear-gradient(90deg, transparent 0, #000 28px);
}
.hero-line1 { color: var(--green-dark); font-weight: 600; font-size: 15px; }
.hero-line2 { color: var(--green-dark); font-weight: 800; font-size: 21px; margin-top: 2px; }

.foot-banner {
  margin-top: 28px; padding: 26px 18px; border-radius: 26px 26px 0 0;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; text-align: center; position: relative; overflow: hidden;
}
.foot-banner::before {
  content: "🌱"; position: absolute; font-size: 70px; opacity: .18; left: 8px; bottom: -14px;
}
.foot-banner-line1 { font-size: 16px; font-weight: 600; opacity: .95; }
.foot-banner-strong { font-size: 24px; font-weight: 800; color: #fff066; margin-top: 4px; }

.crop-sub { margin-top: 8px; }
.crop-row {
  font-size: 15px; color: var(--ink); padding: 6px 0; border-top: 1px dashed var(--line);
}
.crop-row:first-child { border-top: none; }

.result {
  margin-top: 28px; padding: 18px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.summary { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 600; margin-bottom: 12px;
}
.badge.high { background: var(--green-soft); color: var(--green-dark); }
.badge.medium { background: var(--amber-soft); color: var(--amber); }
.badge.low { background: var(--red-soft); color: var(--red); }

.alert {
  background: var(--amber-soft); border: 1px solid #f1d9a6; color: #6b4300;
  border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-weight: 600;
}

.block { margin: 16px 0; }
.block h3 { font-size: 17px; margin: 0 0 6px; color: var(--green-dark); }
.block ul { margin: 0; padding-left: 22px; }
.block li { margin-bottom: 4px; }

.follow { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.follow label { display: block; font-weight: 600; margin-bottom: 6px; }
.follow textarea { margin-bottom: 10px; }

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.saved-note { margin-top: 12px; color: var(--muted); font-size: 14px; }

.loading {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 4px; color: var(--muted); font-weight: 600;
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--green-soft); border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.filter { margin-bottom: 14px; }
.empty { text-align: center; color: var(--muted); padding: 36px 8px; }

.item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px;
}
.item-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 14px; }
.item-crop { font-weight: 700; color: var(--green-dark); }
.item-problem { margin: 8px 0; }
.item-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); float: right; margin: 0 0 8px 10px; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; clear: both; }
.item-actions .btn { padding: 9px 14px; font-size: 15px; }
.item-full { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

.admin-subtabs {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 0 16px; padding-bottom: 4px; border-bottom: 1px solid var(--line);
}
.subtab {
  flex: 0 0 auto; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted);
  cursor: pointer; white-space: nowrap;
}
.subtab.active { background: var(--green); border-color: var(--green); color: #fff; }
.admin-panel { margin-top: 4px; }

.foot { max-width: 640px; margin: 0 auto; padding: 8px 16px 40px; color: var(--muted); font-size: 13px; }

.modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  display: grid; place-items: center; padding: 16px; z-index: 20;
}
.modal-card { background: #fff; border-radius: var(--radius); padding: 20px; width: 100%; max-width: 360px; }
.modal-card p { color: var(--muted); margin: 0 0 12px; }
.modal-card .btn { width: 100%; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}

/* hero-cta (AI सल्ला घ्या / दुकान बघा) — फक्त Computer (desktop) वर दिसतं, मोबाईलवर लपलेलं */
.hero-cta { display: none; }

/* Computer (मोठ्या स्क्रीन) वर पूर्ण रुंदीची (edge-to-edge) खरी website सारखी मांडणी —
   navbar/sections स्क्रीनच्या रुंदीप्रमाणे ताणतात, मोठे hero/cards, hover प्रभाव.
   मोबाईलवर काहीही बदलत नाही (हे सगळं फक्त ≥860px रुंदीवर लागू होतं). */
@media (min-width: 860px) {
  body { background: linear-gradient(180deg, var(--cream) 0%, var(--bg) 420px, var(--bg) 100%); }

  .top .brand, .tabs, main, .foot { max-width: none; }
  .top, .tabs { padding-left: 4vw; padding-right: 4vw; }
  .top .brand, .tabs { padding-left: 0; padding-right: 0; }
  main { max-width: 1600px; margin: 0 auto; padding: 32px 4vw 20px; }
  .foot { max-width: 1600px; margin: 0 auto; padding: 10px 4vw 40px; }

  /* Tab बार — आडव्या navbar सारखी, icon + text शेजारी-शेजारी */
  .tabs { justify-content: flex-start; gap: 4px; }
  .tab { flex-direction: row; gap: 8px; padding: 11px 18px; font-size: 14.5px; }
  .tab .tab-ico { font-size: 17px; }

  /* Hero बॅनर मोठा, CTA बटणांसह */
  .hero-banner { min-height: 280px; border-radius: 26px; }
  .hero-text { padding: 20px 44px; }
  .hero-line1 { font-size: 18px; }
  .hero-line2 { font-size: 34px; margin-top: 4px; }
  .hero-cta { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
  .hero-cta .btn { padding: 14px 26px; font-size: 15.5px; }

  /* सेवांचे tile कार्ड — रुंद स्क्रीनवर आपोआप जास्त column, hover उचलतं */
  .tile-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
  .tile { padding: 26px 14px; transition: transform .15s, box-shadow .15s; }
  .tile:hover { transform: translateY(-4px); box-shadow: 0 14px 28px -14px rgba(47,125,58,.3); }

  /* दुकान उत्पादनं — auto-fit grid, मोठा फोटो, hover shadow */
  #shop-products {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; align-items: start;
  }
  #shop-products .item { margin-bottom: 0; transition: box-shadow .15s; }
  #shop-products .item:hover { box-shadow: 0 14px 28px -14px rgba(47,125,58,.25); }
  #shop-products .item-thumb {
    float: none; width: 100%; height: 190px; margin: 0 0 10px; object-fit: cover;
  }

  .foot-banner { padding: 48px 4vw; border-radius: 32px 32px 0 0; }
  .foot-banner-line1 { font-size: 18px; }
  .foot-banner-strong { font-size: 30px; }
}
