/* Atchayam Agro shop – Blinkit-style layout in the brand's yellow & black */
body.bk {
  --bk-green: #0c831f;
  --bk-green-dark: #0a6c19;
  --bk-green-soft: #e8f5ea;
  --bk-blue: #256fef;
  --bk-line: #e8e8e8;
  --bk-bg: #f4f6fb;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: #1f1f1f;
}
.bk h1, .bk h2, .bk h3 { font-family: 'Inter', system-ui, sans-serif; }

/* ---------- header ---------- */
.bk-header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--bk-line); }
.bk-header-row { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 84px; }
.bk-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; padding-right: 18px; border-right: 1px solid var(--bk-line); height: 100%; }
.bk-logo img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 2px #f8cb46; }
.bk-logo-text { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 20px; color: #141414; letter-spacing: -0.02em; }
.bk-where { display: flex; flex-direction: column; min-width: 0; max-width: 240px; flex: none; }
.bk-where b { font-size: 17px; font-weight: 800; white-space: nowrap; }
.bk-where span { font-size: 13px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-search { flex: 1; display: flex; align-items: center; gap: 10px; background: #f8f8f8; border: 1px solid #efefef; border-radius: 12px; padding: 0 14px; height: 48px; color: #777; margin: 0; font-weight: 400; cursor: text; }
.bk-search input { border: 0; background: transparent; padding: 0; height: 100%; font-size: 15px; outline: none; }
.bk-search input:focus { outline: none; }
.bk-search:focus-within { border-color: #c9c9c9; background: #fff; }
.bk-admin { display: flex; align-items: center; gap: 6px; color: #333; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: 10px; flex: none; }
.bk-admin:hover { background: #f4f4f4; }
.bk-cart-btn { flex: none; display: flex; align-items: center; gap: 10px; background: var(--bk-green); border: 0; color: #fff; border-radius: 10px; height: 52px; padding: 0 18px; font-weight: 700; font-size: 15px; min-width: 120px; justify-content: center; }
.bk-cart-btn:hover { background: var(--bk-green-dark); }
.bk-cart-btn #cartBtnText { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.bk-cart-btn small { font-weight: 600; font-size: 13px; }

.bk-main { max-width: 1280px; margin: 0 auto; padding: 16px 20px 110px; min-height: 60vh; }
.bk-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 80px 0; color: #666; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #f3e3a0; border-top-color: #141414; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bk-closed { background: var(--amber-soft); border: 1px solid #f3c27a; color: var(--amber); padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; }

/* ---------- banner carousel ---------- */
.bk-hero { position: relative; margin-bottom: 18px; }
.bk-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 18px; scrollbar-width: none; }
.bk-slides::-webkit-scrollbar { display: none; }
.bk-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; height: 240px; border-radius: 18px; overflow: hidden; text-decoration: none; color: #141414; display: flex; align-items: center; }
.bk-slide.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bk-slide-text { position: relative; z-index: 1; padding: 26px 34px; max-width: 62%; }
.bk-slide-text.over { color: #fff; max-width: 70%; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.bk-slide.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.05) 70%); }
.bk-slide-tag { display: inline-block; background: #141414; color: #f8cb46; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.bk-slide-text h3 { font-family: 'Poppins', sans-serif; font-size: clamp(22px, 3vw, 34px); line-height: 1.15; margin: 0 0 6px; }
.bk-slide-text p { margin: 0 0 10px; font-size: 16px; font-weight: 500; opacity: 0.9; }
.bk-slide-price { font-size: 22px; } .bk-slide-price s { opacity: 0.6; font-size: 16px; }
.bk-slide-cta { display: inline-block; margin-top: 6px; background: #141414; color: #fff; font-weight: 700; padding: 9px 18px; border-radius: 10px; font-size: 14px; }
.bk-slide.gen.deal { background: linear-gradient(110deg, #ffe27a, #f8cb46 50%, #f0a500); }
.bk-slide.gen.combo { background: linear-gradient(110deg, #141414, #2b2b2b 60%, #3a3000); color: #fff; }
.bk-slide.gen.combo .bk-slide-tag { background: #f8cb46; color: #141414; }
.bk-slide.gen.combo .bk-slide-cta { background: #f8cb46; color: #141414; }
.bk-slide.gen.banner { background: linear-gradient(110deg, #d8f3dc, #95d5b2 60%, #52b788); }
.bk-slide-prod { position: absolute; right: 30px; bottom: 0; height: 92%; max-width: 38%; object-fit: contain; border-radius: 14px; }
.bk-slide-emoji { position: absolute; right: 50px; font-size: 120px; opacity: 0.9; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15)); }
.ph-banner { background: #f8cb46; }
.ph-banner .ph-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.bk-hero { padding-bottom: 16px; }
.bk-dots { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.bk-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(20, 20, 20, 0.3); transition: width 0.2s; }
.bk-dots button.on { width: 22px; background: #141414; }

/* ---------- category tiles ---------- */
.bk-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px 12px; margin: 6px 0 26px; }
.bk-cat { text-decoration: none; color: #1f1f1f; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.bk-cat-img { width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; background: #eaf6fb; display: grid; place-items: center; overflow: hidden; transition: transform 0.15s; }
.bk-cat:nth-child(4n + 2) .bk-cat-img { background: #fff4d6; }
.bk-cat:nth-child(4n + 3) .bk-cat-img { background: #eef7e9; }
.bk-cat:nth-child(4n + 4) .bk-cat-img { background: #fbeef2; }
.bk-cat-img img { width: 82%; height: 82%; object-fit: contain; }
.bk-cat-img span { font-size: 44px; }
.bk-cat:hover .bk-cat-img { transform: translateY(-2px); }
.bk-cat-name { font-size: 13px; font-weight: 600; line-height: 1.25; }

/* ---------- rails ---------- */
.bk-rail { margin: 0 0 26px; }
.bk-rail-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.bk-rail-head h2 { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.bk-rail-head p { margin: 2px 0 0; color: #666; font-size: 13px; }
.bk-rail-head a { color: var(--bk-green); font-weight: 700; text-decoration: none; font-size: 16px; }
.bk-rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 14px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.bk-rail-track > * { scroll-snap-align: start; }
.bk-nodeal { display: flex; align-items: center; gap: 14px; background: linear-gradient(110deg, #fff8dc, #fff); border: 1px dashed #f0c95a; border-radius: 16px; padding: 16px 18px; }
.bk-nodeal > span { font-size: 34px; }
.bk-nodeal p { margin: 2px 0 0; color: #666; }

/* ---------- product card ---------- */
.bk-card { position: relative; background: #fff; border: 1px solid var(--bk-line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; box-shadow: 0 0 10px rgba(0, 0, 0, 0.04); min-width: 0; }
.bk-card-img { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #fafafa; margin-bottom: 8px; }
.bk-card-img > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bk-card-img .ph { font-size: 11px; }
.bk-off { position: absolute; top: 0; left: 8px; background: var(--bk-blue); color: #fff; font-size: 10px; font-weight: 800; line-height: 1.1; text-align: center; padding: 6px 5px 8px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%); }
.bk-off.combo { background: #141414; color: #f8cb46; padding: 6px 7px 9px; }
.bk-chip { align-self: flex-start; background: #f6f6f6; color: #444; font-size: 10px; font-weight: 800; letter-spacing: 0.02em; padding: 3px 6px; border-radius: 6px; margin-bottom: 6px; text-transform: uppercase; }
.bk-chip.deal { background: #fff3cd; color: #8a5a00; }
.bk-chip.low { background: #fdecea; color: var(--red); }
.bk-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin: 0 0 4px; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-unit { font-size: 12px; color: #666; margin-bottom: 10px; min-height: 16px; }
.bk-combo-items { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.bk-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bk-price { display: flex; flex-direction: column; line-height: 1.15; }
.bk-price b { font-size: 14px; font-weight: 700; }
.bk-price s { font-size: 12px; color: #888; }
.bk-price.small { flex-direction: row; gap: 6px; align-items: baseline; margin-top: 4px; }
.bk-ctl { flex: none; }
.bk-add { min-width: 66px; height: 34px; justify-content: center; background: var(--bk-green-soft); color: var(--bk-green); border: 1px solid var(--bk-green); border-radius: 8px; font-weight: 800; font-size: 13px; padding: 0 12px; }
.bk-add:hover { background: #d7efdb; border-color: var(--bk-green); }
.bk-step { display: flex; align-items: center; height: 34px; min-width: 66px; background: var(--bk-green); color: #fff; border-radius: 8px; overflow: hidden; }
.bk-step button { background: transparent; border: 0; color: #fff; height: 100%; padding: 0 9px; font-size: 18px; font-weight: 700; border-radius: 0; }
.bk-step button:hover { background: var(--bk-green-dark); }
.bk-step span { min-width: 18px; text-align: center; font-weight: 800; font-size: 14px; }
.bk-collage { width: 100%; height: 100%; display: grid; gap: 2px; background: #fff; }
.bk-collage.n2 { grid-template-columns: 1fr 1fr; }
.bk-collage.n3, .bk-collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.bk-collage.n3 img:first-child { grid-row: span 2; }
.bk-collage img { width: 100%; height: 100%; object-fit: cover; }
.bk-combo-art { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(135deg, #141414, #3a3000); color: #f8cb46; }
.bk-combo-art span { font-size: 54px; }

/* ---------- grids / category page ---------- */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.bk-catpage { display: grid; grid-template-columns: 220px 1fr; gap: 0; border: 1px solid var(--bk-line); border-radius: 14px; overflow: hidden; min-height: 70vh; }
.bk-side { background: #fff; border-right: 1px solid var(--bk-line); overflow-y: auto; max-height: calc(100vh - 110px); position: sticky; top: 90px; }
.bk-side-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: #333; font-size: 14px; font-weight: 500; border-left: 4px solid transparent; }
.bk-side-item:hover { background: #fafafa; }
.bk-side-item.on { background: var(--bk-green-soft); border-left-color: var(--bk-green); font-weight: 700; color: #111; }
.bk-side-img { width: 44px; height: 44px; border-radius: 10px; background: #f3f6fa; display: grid; place-items: center; font-size: 24px; flex: none; overflow: hidden; }
.bk-side-img img { width: 100%; height: 100%; object-fit: contain; }
.bk-catmain { background: var(--bk-bg); padding: 14px; }
.bk-cathead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bk-cathead h2 { margin: 0; font-size: 20px; font-weight: 800; }
.bk-back { display: none; text-decoration: none; color: #111; font-size: 28px; line-height: 1; }
.bk-searchhead { margin: 4px 0 14px; color: #444; }
.bk-grid.wide { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.bk-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 50px 16px; color: #555; }
.bk-empty > span { font-size: 54px; }
.bk-empty p { margin: 0 0 10px; }

/* ---------- cart bar + drawer ---------- */
.bk-cartbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 25; display: none; justify-content: space-between; align-items: center; padding: 10px 16px; border-radius: 12px; background: var(--bk-green); border: 0; color: #fff; box-shadow: 0 10px 30px rgba(12, 131, 31, 0.35); font-size: 15px; font-weight: 700; }
.bk-cartbar:hover { background: var(--bk-green-dark); }
.bk-cartbar-l { display: flex; align-items: center; gap: 10px; text-align: left; }
.bk-cartbar-l > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.bk-cartbar small { font-weight: 600; font-size: 12px; opacity: 0.95; }
.bk-cartbar-ico { background: rgba(255, 255, 255, 0.2); border-radius: 8px; padding: 6px 8px; }
.bk-drawer { width: min(430px, 100%); background: var(--bk-bg); }
.bk-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: #fff; border-bottom: 1px solid var(--bk-line); }
.bk-drawer-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.bk-drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 12px; align-content: start; }
.bk-drawer-foot { background: #fff; padding: 12px; border-top: 1px solid var(--bk-line); }
.bk-drawer-foot:empty { display: none; }
.bk-box { background: #fff; border-radius: 14px; padding: 12px 14px; }
.bk-box h4 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.bk-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f1f1; }
.bk-line:last-child { border-bottom: 0; }
.bk-line-img { width: 64px; height: 64px; border: 1px solid var(--bk-line); border-radius: 10px; overflow: hidden; background: #fafafa; }
.bk-line-img img { width: 100%; height: 100%; object-fit: contain; }
.bk-line-img .ph { font-size: 0; gap: 0; } .bk-line-img .ph img { width: 70%; }
.bk-line-img .bk-combo-art span { font-size: 26px; } .bk-line-img .bk-combo-art b { display: none; }
.bk-line-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.bk-line-sub { font-size: 12px; color: #777; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-ful { display: grid; gap: 8px; }
.bk-ful label { display: flex; align-items: center; gap: 10px; border: 2px solid #eee; border-radius: 12px; padding: 10px 12px; margin: 0; cursor: pointer; color: #1f1f1f; font-weight: 400; }
.bk-ful label.on { border-color: var(--bk-green); background: var(--bk-green-soft); }
.bk-ful input { width: 18px; height: 18px; accent-color: var(--bk-green); flex: none; }
.bk-ful-ico { font-size: 24px; }
.bk-ful b { display: block; font-size: 15px; }
.bk-ful small { color: #666; font-size: 12px; }
.bk-bill > div { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #333; }
.bk-bill s { color: #999; }
.bk-bill .free { color: var(--bk-green); }
.bk-bill .grand { font-size: 16px; font-weight: 800; color: #111; border-top: 1px solid #eee; margin-top: 6px; padding-top: 10px; }
.bk-saved { background: #eaf3ff; color: var(--bk-blue) !important; font-weight: 700; border-radius: 10px; padding: 8px 10px !important; margin-top: 8px; justify-content: center !important; }
.bk-hint { color: var(--bk-green) !important; font-weight: 700; font-size: 12px !important; }
.bk-proceed { width: 100%; display: flex; justify-content: space-between; align-items: center; background: var(--bk-green); border: 0; color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 16px; font-weight: 800; }
.bk-proceed:hover { background: var(--bk-green-dark); }
.bk-proceed:disabled { background: #9aa; }
.bk-proceed > span:first-child { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.bk-proceed small { font-size: 10px; letter-spacing: 0.1em; opacity: 0.85; }
.bk-proceed.solo { justify-content: center; margin-top: 12px; }

/* ---------- footer ---------- */
.bk-foot { background: #141414; color: #cfc8b0; padding: 26px 20px 100px; font-size: 14px; line-height: 1.8; }
.bk-foot-in { max-width: 1280px; margin: 0 auto; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.bk-foot-in img { width: 40px; height: 40px; border-radius: 10px; vertical-align: middle; margin-right: 8px; }
.bk-foot-in b { color: #f8cb46; font-family: 'Poppins', sans-serif; }
.bk-foot-in span { display: block; font-size: 12px; color: #999; }
.bk-foot a { color: #f8cb46; }

body.bk #toast { bottom: 90px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .bk-header-row { flex-wrap: wrap; height: auto; gap: 8px 10px; padding: 10px 12px; }
  .bk-logo { border: 0; padding: 0; height: auto; }
  .bk-logo img { width: 42px; height: 42px; }
  .bk-logo-text { display: none; }
  .bk-where { flex: 1; max-width: none; }
  .bk-where b { font-size: 15px; }
  .bk-where span { font-size: 12px; }
  .bk-admin span { display: none; }
  .bk-cart-btn { display: none; }
  .bk-search { order: 5; flex-basis: 100%; height: 44px; }
  .bk-main { padding: 12px 12px 100px; }
  .bk-slide { height: 170px; }
  .bk-slide-text { padding: 16px 18px; max-width: 70%; }
  .bk-slide-text p { font-size: 13px; }
  .bk-slide-emoji { font-size: 72px; right: 16px; }
  .bk-slide-prod { right: 10px; max-width: 34%; }
  .bk-cats { grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
  .bk-cat-name { font-size: 11px; }
  .bk-cat-img span { font-size: 32px; }
  .bk-rail-head h2 { font-size: 18px; }
  .bk-rail-track { grid-auto-columns: 148px; gap: 10px; }
  .bk-grid, .bk-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bk-card { padding: 8px; }
  .bk-add, .bk-step { min-width: 60px; height: 32px; }
  .bk-catpage { grid-template-columns: 84px 1fr; border-radius: 0; border-left: 0; border-right: 0; margin: 0 -12px; }
  .bk-side { top: 118px; max-height: calc(100vh - 118px); }
  .bk-side-item { flex-direction: column; text-align: center; font-size: 11px; gap: 4px; padding: 10px 4px; border-left: 0; border-right: 4px solid transparent; }
  .bk-side-item.on { border-right-color: var(--bk-green); }
  .bk-side-img { width: 50px; height: 50px; }
  .bk-catmain { padding: 10px 8px; }
  .bk-catmain .bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-back { display: inline; }
  .bk-cartbar:not(.hidden) { display: flex; }
}

.bk-err { color: var(--red); font-size: 12px; font-weight: 600; margin-top: 4px; min-height: 0; }
.bk input.bad { border-color: var(--red); outline: 2px solid #fdecea; }

/* real category photos fill the tile */
.bk-cat-img.photo { background: #f3f3f3; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04); }
.bk-cat-img.photo img { width: 100%; height: 100%; object-fit: cover; }
.bk-side-img.photo img { width: 100%; height: 100%; object-fit: cover; }
