/* ==========================================================================
   GrowDeshi — Store chrome loaded SITE-WIDE (navbar cart/wishlist/search +
   slide-in cart & wishlist drawers). Pairs with assets/js/store.js.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navbar action cluster — search · wishlist · cart
   -------------------------------------------------------------------------- */
.site-nav__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #0F6E56;
	font-size: 19px;
	cursor: pointer;
	transition: background .18s, color .18s, transform .12s;
}
.site-nav__icon:hover { background: #F6F4EF; }
.site-nav__icon:active { transform: scale(.94); }
.site-nav__icon.gd-wish-open.has-items { color: #E63946; }

/* Account icon — sign-in / sign-out states */
.site-nav__account { text-decoration: none; }
.site-nav__account:not(.is-logged-in) { background: #2D6A4F; color: #fff; }
.site-nav__account:not(.is-logged-in):hover { background: #1F3528; color: #fff; }
.site-nav__account.is-logged-in { background: linear-gradient(135deg, #2D6A4F 0%, #52B788 100%); color: #fff; box-shadow: 0 2px 6px rgba(45,106,79,0.25); }
.site-nav__account.is-logged-in:hover { background: linear-gradient(135deg, #085041 0%, #2D6A4F 100%); color: #fff; }
.site-nav__account-initials { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: -0.3px; }
.site-nav__badge {
	position: absolute;
	top: 3px;
	right: 3px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #F4A261;
	color: #1A2E24;
	font-family: var(--font-ui);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 2px #fff;
}
.site-nav__badge[hidden] { display: none; }
.site-nav__divider { width: 1px; height: 24px; margin: 0 6px; background: var(--c-line); }
@media (max-width: 600px) { .site-nav__divider { display: none; } }

.site-nav__cart {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 14px 0 12px;
	border: none;
	border-radius: 999px;
	background: #2D6A4F;
	color: #D8F3DC;
	font-size: 18px;
	cursor: pointer;
	transition: background .18s, transform .12s;
}
.site-nav__cart:hover { background: #085041; }
.site-nav__cart:active { transform: scale(.97); }
.site-nav__cart-label { font-family: var(--font-bengali); font-size: 12.5px; font-weight: 600; }
@media (max-width: 600px) { .site-nav__cart-label { display: none; } }
.site-nav__cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(216,243,220,0.18);
	color: #D8F3DC;
	font-family: var(--font-ui);
	font-size: 11px;
	font-weight: 700;
}
.site-nav__cart-count.has-items { background: #F4A261; color: #1A2E24; }

/* Search panel dropdown */
.site-nav-search-panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: min(380px, calc(100vw - 32px));
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 8px 8px 14px;
	background: #fff;
	border: 1px solid var(--c-line);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(45,106,79,0.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .2s, transform .2s, visibility .2s;
	z-index: 70;
}
.site-nav-search-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.site-nav-search-panel > .ph { color: #0F6E56; font-size: 18px; }
.site-nav-search-panel input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-family: var(--font-bengali);
	font-size: 14px;
	color: var(--c-soil);
}
.site-nav-search-panel__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 10px;
	background: #2D6A4F;
	color: #D8F3DC;
	cursor: pointer;
	font-size: 16px;
}
.site-nav-search-panel__submit:hover { background: #085041; }

/* --------------------------------------------------------------------------
   Slide-in drawers (cart + wishlist)
   -------------------------------------------------------------------------- */
.gd-scrim {
	position: fixed;
	inset: 0;
	background: rgba(15,46,31,0.45);
	backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s, visibility .25s;
	z-index: 1190;
}
.gd-scrim.is-open { opacity: 1; visibility: visible; }
.gd-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100dvh;
	width: min(420px, 100vw);
	background: #FBFAF6;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s;
	box-shadow: -8px 0 32px rgba(15,46,31,0.18);
	z-index: 1200;
}
.gd-drawer.is-open { transform: translateX(0); visibility: visible; }

/* Start below the WP admin bar when logged in, so the dark drawer header isn't
   clipped behind it (admin bar is 32px ≥783px, 46px ≤782px). */
body.admin-bar .gd-drawer { top: 32px; height: calc(100dvh - 32px); }
@media screen and (max-width: 782px) {
	body.admin-bar .gd-drawer { top: 46px; height: calc(100dvh - 46px); }
}

.gd-drawer__panel { display: flex; flex-direction: column; height: 100%; }
.gd-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #1A2E24; color: #D8F3DC; }
.gd-drawer__head-title { display: flex; align-items: center; gap: 12px; }
.gd-drawer__head-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(82,183,136,0.18); color: #52B788; font-size: 18px; }
.gd-drawer__head-icon--amber { background: rgba(244,162,97,0.22); color: #F4A261; }
.gd-drawer__head-title strong { display: block; font-family: var(--font-bengali); font-size: 15px; font-weight: 700; }
.gd-drawer__head-title small { display: block; font-family: var(--font-ui); font-size: 11.5px; color: #9FE1CB; }
.gd-drawer__close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; border-radius: 999px; background: rgba(255,255,255,0.08); color: #D8F3DC; cursor: pointer; font-size: 16px; }
.gd-drawer__close:hover { background: rgba(255,255,255,0.16); }
.gd-drawer__body { flex: 1; overflow-y: auto; padding: 0 18px; }
.gd-drawer__continue { margin-top: 6px; border: none; background: none; color: #52B788; font-family: var(--font-bengali); font-size: 13px; cursor: pointer; }
.gd-drawer__continue:hover { text-decoration: underline; }

/* Empty states (rich: icon + copy + suggestions) */
.gd-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 8px 24px; color: #6B6960; }
.gd-empty[hidden] { display: none; }
.gd-empty__icon { position: relative; width: 112px; height: 112px; border-radius: 999px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.gd-empty__icon .ph { font-size: 44px; }
.gd-empty__icon--mint { background: #D8F3DC; color: #2D6A4F; }
.gd-empty__icon--amber { background: #FFF3E0; color: #F4A261; }
.gd-empty__sparkle { position: absolute; top: -8px; right: -8px; width: 40px; height: 40px; }
.gd-empty__heart { position: absolute; }
.gd-empty__heart--1 { top: -4px; right: -4px; width: 30px; height: 30px; }
.gd-empty__heart--2 { bottom: -2px; left: -2px; width: 20px; height: 20px; }
.gd-empty__title { font-family: var(--font-bengali); font-weight: 800; font-size: 19px; letter-spacing: -0.3px; color: #1A2E24; margin: 14px 0 0; }
.gd-empty__desc { font-family: var(--font-bengali); font-size: 13px; line-height: 1.65; color: #6B6960; max-width: 290px; margin: 6px 0 0; }
.gd-empty__inheart { color: #E63946; font-size: 12px; vertical-align: -1px; }
.gd-empty__btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; margin-top: 20px; padding: 0 16px; border: none; border-radius: 10px; background: #2D6A4F; color: #D8F3DC; font-family: var(--font-bengali); font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .18s; }
.gd-empty__btn:hover { background: #085041; }
.gd-empty__btn .ph { font-size: 15px; }
.gd-empty__suggest { width: 100%; max-width: 300px; margin-top: 28px; }
.gd-empty__suggest-label { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #52B788; text-align: left; margin-bottom: 10px; }
.gd-empty__suggest-label [lang="bn"] { text-transform: none; }
.gd-empty__cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-empty__cat { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: #F6F4EF; border: 0.5px solid var(--c-line); color: #0F6E56; font-family: var(--font-bengali); font-size: 12px; font-weight: 600; text-decoration: none; transition: background .15s; }
.gd-empty__cat:hover { background: #D8F3DC; }
.gd-empty__cat .ph { color: #52B788; font-size: 15px; }
.gd-empty__picks { display: flex; flex-direction: column; gap: 8px; }
.gd-empty__pick { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; background: #fff; border: 0.5px solid var(--c-line); text-decoration: none; transition: background .15s; }
.gd-empty__pick:hover { background: #F6F4EF; }
.gd-empty__pick-img { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; background: #D8F3DC; object-fit: contain; }
.gd-empty__pick-main { flex: 1; min-width: 0; text-align: left; }
.gd-empty__pick-title { display: block; font-family: var(--font-bengali); font-size: 12.5px; font-weight: 600; color: #1A2E24; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-empty__pick-cat { display: block; font-family: var(--font-bengali); font-size: 10px; color: #52B788; margin-top: 2px; }
.gd-empty__pick-price { flex-shrink: 0; font-family: var(--font-bengali); font-weight: 700; font-size: 13px; color: #2D6A4F; }

/* Line items (cart + wishlist share .gd-line) */
.gd-line { display: flex; gap: 12px; padding: 16px 0; border-bottom: 0.5px solid var(--c-line); }
.gd-line__img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; background: #D8F3DC; object-fit: contain; }
.gd-line__main { flex: 1; min-width: 0; }
.gd-line__title { font-family: var(--font-bengali); font-size: 13.5px; font-weight: 700; color: var(--c-soil); line-height: 1.35; }
.gd-line__price { font-family: var(--font-bengali); font-size: 13px; font-weight: 700; color: #2D6A4F; margin-top: 4px; }
.gd-line__row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.gd-qty { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; }
.gd-qty button { width: 28px; height: 28px; border: none; background: #fff; color: #2D6A4F; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.gd-qty button:hover { background: #F6F4EF; }
.gd-qty span { min-width: 28px; text-align: center; font-family: var(--font-ui); font-size: 13px; font-weight: 700; }
.gd-line__remove { border: none; background: none; color: #9C9A92; cursor: pointer; font-size: 16px; width: 28px; height: 28px; border-radius: 999px; }
.gd-line__remove:hover { background: #FCEBEB; color: #E63946; }
.gd-line__move { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: none; border-radius: 8px; background: #2D6A4F; color: #D8F3DC; font-family: var(--font-bengali); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.gd-line__move:hover { background: #085041; }
.gd-line__move[disabled] { background: #F6F4EF; color: #9C9A92; cursor: not-allowed; }

/* Cart free-delivery progress */
.gd-cart__progress { padding: 12px 18px; background: #fff; border-bottom: 0.5px solid var(--c-line); }
.gd-cart__progress-text { font-family: var(--font-bengali); font-size: 12px; color: #5C4033; margin-bottom: 6px; }
.gd-cart__progress-bar { height: 6px; border-radius: 999px; background: var(--c-line); overflow: hidden; }
.gd-cart__progress-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(to right, #52B788, #F4A261); transition: width .35s; }

/* Cart footer */
.gd-cart__foot, .gd-wish__foot { padding: 16px 18px; background: #fff; border-top: 1px solid var(--c-line); }
.gd-cart__row { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-bengali); font-size: 13px; color: #5C4033; padding: 3px 0; }
.gd-cart__row--total { margin-top: 6px; padding-top: 8px; border-top: 0.5px dashed var(--c-line); font-size: 16px; font-weight: 800; color: #2D6A4F; }
.gd-cart__checkout { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 12px; background: #2D6A4F; color: #D8F3DC; font-family: var(--font-bengali); font-weight: 700; font-size: 14px; text-decoration: none; transition: background .18s; }
.gd-cart__checkout:hover { background: #085041; }
.gd-cart__view { display: block; text-align: center; margin-top: 10px; color: #52B788; font-family: var(--font-bengali); font-size: 13px; text-decoration: none; }
.gd-cart__view:hover { text-decoration: underline; }
.gd-wish__moveall { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: none; border-radius: 12px; background: #2D6A4F; color: #D8F3DC; font-family: var(--font-bengali); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.gd-wish__moveall:hover { background: #085041; }

@media (prefers-reduced-motion: reduce) {
	.gd-drawer, .gd-scrim, .site-nav-search-panel { transition: none; }
}
