/* ============================================================
   SaktiSeva Quick — Blinkit-style 30-minute delivery storefront
   White base · Yellow #F8CB46 · Green #0C831F
   ============================================================ */
:root {
    --qk-green: #0C831F;
    --qk-green-dark: #096819;
    --qk-green-bg: #E8F5EA;
    --qk-yellow: #F8CB46;
    --qk-yellow-dark: #EEB600;
    --qk-dark: #1F1F1F;
    --qk-gray: #666;
    --qk-gray-light: #999;
    --qk-line: #EEEEEE;
    --qk-bg: #FFFFFF;
    --qk-chip: #F5F7FD;
    --qk-red: #E23744;
    --qk-radius: 12px;
    --qk-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
    font-family: var(--qk-font);
    background: var(--qk-bg);
    color: var(--qk-dark);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 90px; /* room for sticky cart bar */
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--qk-font); cursor: pointer; }

/* ---------- header ---------- */
.qk-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--qk-yellow);
    padding: 10px 14px 12px;
}
.qk-header-inner { max-width: 1000px; margin: 0 auto; }
.qk-topline { display: flex; align-items: center; gap: 10px; }
.qk-back {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.55); border: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; color: var(--qk-dark);
}
.qk-brand { flex: 1; min-width: 0; }
.qk-brand .t1 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }
.qk-brand .t2 {
    font-size: 11.5px; font-weight: 700; color: var(--qk-dark);
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qk-mins {
    background: var(--qk-dark); color: #fff;
    font-size: 11px; font-weight: 800;
    padding: 3px 9px; border-radius: 20px; flex-shrink: 0;
}
.qk-search {
    margin-top: 10px;
    background: #fff; border-radius: 10px;
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px; height: 42px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.qk-search input {
    flex: 1; border: none; outline: none; font-size: 14px;
    font-family: var(--qk-font); background: transparent; min-width: 0;
}

/* ---------- category chips ---------- */
.qk-chips {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 12px 14px 4px; scrollbar-width: none;
    max-width: 1000px; margin: 0 auto;
}
.qk-chips::-webkit-scrollbar { display: none; }
.qk-chip {
    flex-shrink: 0; padding: 7px 14px;
    border-radius: 18px; border: 1px solid var(--qk-line);
    background: var(--qk-chip); font-size: 12.5px; font-weight: 600;
    color: var(--qk-dark); white-space: nowrap;
}
.qk-chip.active { background: var(--qk-green); border-color: var(--qk-green); color: #fff; }

/* ---------- product grid ---------- */
.qk-section { max-width: 1000px; margin: 0 auto; padding: 6px 14px 18px; }
.qk-sec-title { font-size: 16px; font-weight: 800; margin: 14px 0 10px; }
.qk-grid {
    display: grid; gap: 10px;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 520px) { .qk-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .qk-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 980px) { .qk-grid { grid-template-columns: repeat(5, 1fr); } }

.qk-card {
    border: 1px solid var(--qk-line); border-radius: var(--qk-radius);
    padding: 10px; display: flex; flex-direction: column;
    background: #fff; position: relative; min-width: 0;
}
.qk-card .img {
    width: 100%; aspect-ratio: 1; border-radius: 8px;
    background: #F8F8F8; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 8px;
}
.qk-card .img img { width: 100%; height: 100%; object-fit: contain; }
.qk-card .img .ph { font-size: 40px; opacity: .35; }
.qk-card .nm {
    font-size: 12.5px; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 33px;
}
.qk-card .unit { font-size: 11px; color: var(--qk-gray-light); margin: 2px 0 8px; }
.qk-card .rowb { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.qk-card .pr { font-size: 13.5px; font-weight: 800; }
.qk-card .mrp { font-size: 11px; color: var(--qk-gray-light); text-decoration: line-through; margin-left: 4px; font-weight: 500; }
.qk-card .off {
    position: absolute; top: 8px; left: 8px;
    background: var(--qk-green); color: #fff;
    font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px;
}

/* ADD button + stepper */
.qk-add {
    min-width: 66px; height: 32px;
    border: 1px solid var(--qk-green); border-radius: 8px;
    background: #fff; color: var(--qk-green);
    font-size: 13px; font-weight: 800; letter-spacing: .3px;
}
.qk-add:active { background: var(--qk-green-bg); }
.qk-step {
    min-width: 66px; height: 32px;
    background: var(--qk-green); border-radius: 8px;
    display: flex; align-items: center; justify-content: space-between;
    color: #fff; font-weight: 800;
}
.qk-step button {
    width: 24px; height: 32px; background: none; border: none;
    color: #fff; font-size: 16px; font-weight: 800;
}
.qk-step .q { font-size: 13px; min-width: 16px; text-align: center; }

/* ---------- sticky cart bar ---------- */
.qk-cartbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: transparent; pointer-events: none;
    display: none;
}
.qk-cartbar.show { display: block; }
.qk-cartbar .inner {
    max-width: 1000px; margin: 0 auto; pointer-events: auto;
    background: var(--qk-green); color: #fff;
    border-radius: 12px; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 6px 20px rgba(12,131,31,.4);
}
.qk-cartbar .l1 { font-size: 12px; opacity: .9; }
.qk-cartbar .l2 { font-size: 15px; font-weight: 800; }
.qk-cartbar .go { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }

/* ---------- cart / checkout page ---------- */
.qk-page { max-width: 640px; margin: 0 auto; padding: 14px; }
.qk-h1 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.qk-box {
    border: 1px solid var(--qk-line); border-radius: var(--qk-radius);
    padding: 14px; margin-bottom: 14px; background: #fff;
}
.qk-box .bx-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; color: var(--qk-gray); text-transform: uppercase; letter-spacing: .5px; }
.qk-line-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--qk-line); }
.qk-line-item:last-child { border-bottom: none; }
.qk-line-item .thumb {
    width: 48px; height: 48px; border-radius: 8px; background: #F8F8F8;
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.qk-line-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.qk-line-item .info { flex: 1; min-width: 0; }
.qk-line-item .info .n { font-size: 13px; font-weight: 600; }
.qk-line-item .info .u { font-size: 11px; color: var(--qk-gray-light); }
.qk-line-item .amt { font-weight: 800; font-size: 13px; white-space: nowrap; }

.qk-bill-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--qk-gray); }
.qk-bill-row.total { font-size: 15px; font-weight: 800; color: var(--qk-dark); border-top: 1px dashed var(--qk-line); margin-top: 6px; padding-top: 10px; }

.qk-input {
    width: 100%; min-width: 0; max-width: 100%;
    padding: 11px 12px; border: 1.5px solid #ddd; border-radius: 9px;
    font-size: 14px; font-family: var(--qk-font); outline: none;
}
.qk-input:focus { border-color: var(--qk-green); }
.qk-label { display: block; font-size: 12px; font-weight: 700; margin: 10px 0 5px; }

.qk-btn {
    width: 100%; padding: 14px; border: none; border-radius: 11px;
    background: var(--qk-green); color: #fff;
    font-size: 15px; font-weight: 800; letter-spacing: .2px;
}
.qk-btn:active { background: var(--qk-green-dark); }
.qk-btn.secondary { background: #fff; color: var(--qk-green); border: 1.5px solid var(--qk-green); }
.qk-btn[disabled] { opacity: .55; }

.qk-pay-opt {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid var(--qk-line); border-radius: 10px;
    padding: 12px; margin-bottom: 8px; cursor: pointer;
}
.qk-pay-opt.sel { border-color: var(--qk-green); background: var(--qk-green-bg); }

/* ---------- tracking ---------- */
.qk-countdown {
    text-align: center; padding: 18px 14px;
    background: var(--qk-green-bg); border-radius: var(--qk-radius); margin-bottom: 14px;
}
.qk-countdown .big { font-size: 34px; font-weight: 800; color: var(--qk-green); line-height: 1.1; }
.qk-countdown .sub { font-size: 12px; color: var(--qk-gray); }
.qk-otp {
    text-align: center; background: #FFF9E3; border: 1.5px dashed var(--qk-yellow-dark);
    border-radius: var(--qk-radius); padding: 12px; margin-bottom: 14px;
}
.qk-otp .code { font-size: 26px; font-weight: 800; letter-spacing: 8px; color: var(--qk-dark); }
.qk-otp .lbl { font-size: 11px; color: var(--qk-gray); }

.qk-steps { list-style: none; }
.qk-steps li {
    position: relative; padding: 0 0 22px 30px; font-size: 13.5px; font-weight: 600; color: var(--qk-gray-light);
}
.qk-steps li::before {
    content: ''; position: absolute; left: 7px; top: 18px; bottom: 0;
    width: 2px; background: var(--qk-line);
}
.qk-steps li:last-child::before { display: none; }
.qk-steps li::after {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid #ccc;
}
.qk-steps li.done { color: var(--qk-dark); }
.qk-steps li.done::after { background: var(--qk-green); border-color: var(--qk-green); }
.qk-steps li.done::before { background: var(--qk-green); }
.qk-steps li.now { color: var(--qk-green); }
.qk-steps li.now::after { background: #fff; border-color: var(--qk-green); box-shadow: 0 0 0 4px rgba(12,131,31,.15); }
.qk-steps li .ts { display: block; font-size: 11px; font-weight: 500; color: var(--qk-gray-light); }

.qk-status-pill {
    display: inline-block; font-size: 11px; font-weight: 800;
    padding: 3px 10px; border-radius: 12px;
}
.qk-status-pill.placed            { background: #FFF3CD; color: #8a6d00; }
.qk-status-pill.accepted,
.qk-status-pill.packed,
.qk-status-pill.out_for_delivery  { background: var(--qk-green-bg); color: var(--qk-green); }
.qk-status-pill.delivered         { background: var(--qk-green); color: #fff; }
.qk-status-pill.cancelled,
.qk-status-pill.expired           { background: #FDE8E8; color: var(--qk-red); }

/* ---------- misc ---------- */
.qk-flash {
    max-width: 640px; margin: 10px auto 0; padding: 11px 14px;
    border-radius: 10px; font-size: 13px; font-weight: 600;
}
.qk-flash.danger  { background: #FDE8E8; color: var(--qk-red); }
.qk-flash.success { background: var(--qk-green-bg); color: var(--qk-green); }
.qk-flash.warning { background: #FFF3CD; color: #8a6d00; }
.qk-empty { text-align: center; padding: 50px 20px; color: var(--qk-gray-light); }
.qk-empty .ic { font-size: 52px; margin-bottom: 8px; }
