/* AgriMag Search – overlay & launcher */
:root{
	--agms-primary:#3a7d34;
	--agms-accent:#8bc34a;
	--agms-ink:#1e2418;
	--agms-muted:#6b7360;
	--agms-line:#e6e8e0;
	--agms-bg:#ffffff;
	--agms-soft:#f5f7f1;
	--agms-radius:14px;
	--agms-shadow:0 18px 60px rgba(20,40,15,.22);
}

/* ---- launcher ---- */
.agms-launch{cursor:pointer;display:inline-flex;align-items:center;gap:.5rem;color:var(--agms-ink)}
.agms-launch--bar{
	border:1px solid var(--agms-line);background:var(--agms-soft);
	border-radius:999px;padding:.55rem 1rem;min-width:220px;
	transition:border-color .15s,box-shadow .15s;
}
.agms-launch--bar:hover{border-color:var(--agms-accent);box-shadow:0 2px 10px rgba(58,125,52,.10)}
.agms-launch__ph{color:var(--agms-muted);font-size:.95rem}
.agms-launch--btn{
	border:0;background:var(--agms-primary);color:#fff;border-radius:999px;
	padding:.6rem 1.1rem;font-weight:600;
}
.agms-launch--btn:hover{background:#2f6a2a}
.agms-header-launch{
	cursor:pointer;display:inline-flex;align-items:center;gap:.4rem;
	color:var(--agms-primary);font-weight:600;padding:.4rem .7rem;
}
.agms-ico{flex:0 0 auto}

/* ---- overlay ---- */
.agms-overlay{
	position:fixed;inset:0;z-index:100000;
	background:rgba(18,28,12,.5);backdrop-filter:blur(3px);
	display:flex;justify-content:center;align-items:flex-start;
	padding:8vh 16px 16px;opacity:0;visibility:hidden;
	transition:opacity .18s ease,visibility .18s ease;
}
.agms-overlay[aria-hidden="false"]{opacity:1;visibility:visible}
body.agms-lock{overflow:hidden}

.agms-panel{
	width:100%;max-width:680px;background:var(--agms-bg);
	border-radius:var(--agms-radius);box-shadow:var(--agms-shadow);
	overflow:hidden;transform:translateY(-8px);transition:transform .18s ease;
	display:flex;flex-direction:column;max-height:82vh;
}
.agms-overlay[aria-hidden="false"] .agms-panel{transform:translateY(0)}

.agms-bar{
	display:flex;align-items:center;gap:.6rem;padding:1rem 1.1rem;
	border-bottom:1px solid var(--agms-line);color:var(--agms-primary);
}
.agms-input{
	flex:1;border:0;outline:0;font-size:1.15rem;color:var(--agms-ink);
	background:transparent;padding:.2rem 0;
}
.agms-input::placeholder{color:var(--agms-muted)}
.agms-close{
	border:0;background:var(--agms-soft);color:var(--agms-muted);
	width:34px;height:34px;border-radius:50%;font-size:1.3rem;line-height:1;
	cursor:pointer;flex:0 0 auto;
}
.agms-close:hover{background:#ececec;color:var(--agms-ink)}

.agms-status{padding:0 1.1rem;color:var(--agms-muted);font-size:.85rem;min-height:0}
.agms-status:not(:empty){padding:.5rem 1.1rem 0}

.agms-results{overflow-y:auto;padding:.4rem .6rem 1rem}

/* ---- suggestions ---- */
.agms-suggest{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem;padding:.6rem .6rem .2rem}
.agms-suggest__l{color:var(--agms-muted);font-size:.85rem}
.agms-chips{display:flex;flex-wrap:wrap;gap:.4rem}
.agms-sugg,.agms-catchip{
	border:1px solid var(--agms-line);background:var(--agms-soft);
	color:var(--agms-primary);border-radius:999px;padding:.3rem .7rem;
	font-size:.85rem;cursor:pointer;text-decoration:none;line-height:1.2;
}
.agms-sugg:hover,.agms-catchip:hover{border-color:var(--agms-accent);background:#eef5e6}

/* ---- groups ---- */
.agms-group__h{
	font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
	color:var(--agms-muted);padding:.8rem .8rem .3rem;
}
.agms-quicklinks{padding:.2rem .6rem}
.agms-quicklinks .agms-chips{padding:0 .2rem .4rem}

/* ---- product rows ---- */
.agms-plist{display:flex;flex-direction:column}
.agms-product{
	display:flex;align-items:center;gap:.8rem;padding:.55rem .8rem;
	border-radius:10px;text-decoration:none;color:var(--agms-ink);
	position:relative;
}
.agms-product:hover,.agms-product.is-active{background:var(--agms-soft)}
.agms-product__thumb{
	flex:0 0 48px;width:48px;height:48px;border-radius:8px;overflow:hidden;
	background:var(--agms-soft);display:flex;align-items:center;justify-content:center;
}
.agms-product__thumb img{width:100%;height:100%;object-fit:cover}
.agms-product__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem}
.agms-product__title{font-weight:600;font-size:.98rem;line-height:1.25;
	overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agms-product__meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.agms-product__cat{font-size:.8rem;color:var(--agms-muted)}
.agms-product__price{font-size:.88rem;color:var(--agms-primary);font-weight:600}
.agms-product__price del{color:var(--agms-muted);font-weight:400;margin-right:.25rem}
.agms-product__oos{font-size:.72rem;color:#b23b3b;font-weight:600}

.agms-badge{display:inline-block;font-size:.62rem;font-weight:700;letter-spacing:.04em;
	padding:.08rem .34rem;border-radius:4px;vertical-align:middle}
.agms-badge--bio{background:#e5f3d8;color:#3a7d34}

.agms-add{
	flex:0 0 auto;width:34px;height:34px;border-radius:50%;border:0;cursor:pointer;
	background:var(--agms-primary);color:#fff;font-size:1.25rem;line-height:1;
	display:flex;align-items:center;justify-content:center;transition:background .15s,transform .1s;
}
.agms-add:hover{background:#2f6a2a}
.agms-add:active{transform:scale(.92)}
.agms-add.is-loading{background:var(--agms-muted)}
.agms-add.is-added{background:var(--agms-accent)}
.agms-add--opts{background:transparent;color:var(--agms-muted);border:1px solid var(--agms-line);font-size:1.35rem;pointer-events:none}
.agms-product:hover .agms-add--opts{border-color:var(--agms-accent);color:var(--agms-primary)}

.agms-viewall{
	display:block;text-align:center;margin:.6rem .8rem 0;padding:.7rem;
	background:var(--agms-soft);border-radius:10px;color:var(--agms-primary);
	font-weight:600;text-decoration:none;
}
.agms-viewall:hover{background:#eef5e6}

/* ---- empty state ---- */
.agms-empty{padding:1.4rem 1rem;text-align:center}
.agms-empty__t{font-weight:600;font-size:1.05rem;margin:0 0 .3rem;color:var(--agms-ink)}
.agms-empty__h{color:var(--agms-muted);font-size:.9rem;margin:0 0 .8rem}
.agms-empty .agms-chips{justify-content:center}

@media (max-width:600px){
	.agms-overlay{padding:0}
	.agms-panel{max-width:100%;height:100%;max-height:100%;border-radius:0}
	.agms-results{flex:1}
}

/* ---- crop recommendations block ---- */
.agms-reco{margin:2.5rem 0 1rem;clear:both}
.agms-reco__title{
	display:flex;align-items:center;gap:.5rem;
	font-size:1.4rem;line-height:1.2;margin:0 0 1.1rem;
	padding-bottom:.6rem;border-bottom:2px solid var(--agms-accent);
	color:var(--agms-ink);
}
.agms-reco__leaf{font-size:1.15rem}
.agms-reco .products{margin:0}

