/* =========================
   FULL HEIGHT WRAPPER
========================= */

.blinkit-wrapper {
    display: flex;
    height: 100vh;              /* full screen */
    overflow: hidden;           /* prevent page scroll */
}


/* =========================
   LEFT SIDEBAR (SCROLL)
========================= */

.blinkit-sidebar {
    width: 90px;
    background: #f7f7f7;
    padding: 8px;

    height: 100%;
    overflow-y: auto;           /* independent scroll */

    flex-shrink: 0;

    scrollbar-width: none;
}

.blinkit-sidebar::-webkit-scrollbar {
    display: none;
}


/* =========================
   CATEGORY ITEM
========================= */

.blinkit-cat {
    text-align: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.blinkit-cat-img {
    background: #fff;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.blinkit-cat-img img {
    width: 100%;
    height: 50px;
    object-fit: contain;
}

.blinkit-cat-name {
    font-size: 11px;
    margin-top: 5px;
    line-height: 1.2;
}

.blinkit-cat.active .blinkit-cat-img {
    border: 1px solid #2ecc71;
    background: #eafaf1;
}


/* =========================
   RIGHT PANEL (SCROLL)
========================= */

.blinkit-products {
    flex: 1;

    height: 100%;
    overflow-y: auto;           /* independent scroll */

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    padding: 10px;
}


/* =========================
   PRODUCT CARD
========================= */

.blinkit-card {
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.blinkit-card:hover {
    transform: translateY(-2px);
}

.blinkit-img-wrap {
    position: relative;
}

.blinkit-img-wrap img {
    width: 100%;
    border-radius: 12px;
}

.blinkit-add {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 30px;
    height: 30px;

    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;

    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.blinkit-add:active {
    transform: scale(0.9);
}


/* META */
.blinkit-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #555;
    margin-top: 4px;
}

/* TITLE */
.blinkit-title {
    font-size: 13px;
    margin: 5px 0;
}

/* TAG */
.blinkit-tag {
    font-size: 11px;
    color: #e53935;
}

/* PRICE */
.blinkit-price {
    font-weight: bold;
}

.cut {
    text-decoration: line-through;
    color: #888;
    font-size: 12px;
    margin-left: 4px;
}


/* =========================
   LOADER
========================= */

.blinkit-loader {
    text-align: center;
    padding: 40px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
    .blinkit-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {

    .blinkit-wrapper {
        height: calc(100vh - 60px); /* adjust if header */
    }

    .blinkit-sidebar {
        width: 80px;
    }

    .blinkit-products {
        grid-template-columns: repeat(2, 1fr);
        padding: 8px;
    }

    .blinkit-cat-img img {
        height: 40px;
    }
}

/* =========================
   RIGHT PANEL WRAPPER
========================= */

.blinkit-products-wrap {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =========================
   TOP BAR
========================= */

.blinkit-topbar {
    flex-shrink: 0;
    background: #fff;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* FILTER BUTTONS */
.blinkit-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    font-size: 12px;
    padding: 5px 10px;
    background: #f1f1f1;
    border-radius: 20px;
    cursor: pointer;
}

.filter-btn.active {
    background: #2ecc71;
    color: #fff;
}

/* SORT */
.blinkit-sort select {
    padding: 5px;
    font-size: 12px;
}

/* =========================
   PRODUCT GRID (SCROLL)
========================= */

.blinkit-products {
    flex: 1;
    overflow-y: auto;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px;
}

/* FILTER BUTTON */
.blinkit-filter-btn {
    background: #2ecc71;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

/* DRAWER */
.blinkit-filter-drawer {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.drawer-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 15px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.drawer-body {
    max-height: 300px;
    overflow-y: auto;
}

.drawer-section {
    margin-top: 10px;
}

.drawer-section label {
    display: block;
    margin-bottom: 5px;
}

.drawer-footer {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.drawer-footer button {
    flex: 1;
    padding: 8px;
}

.filter-apply {
    background: #2ecc71;
    color: #fff;
}

/* BRAND SEARCH */
#brand-search {
    width: 100%;
    padding: 6px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
}

/* DRAWER LAYOUT */
.drawer-layout {
    display: flex;
    height: 300px;
}

/* LEFT TABS */
.drawer-tabs {
    width: 30%;
    border-right: 1px solid #eee;
}

.drawer-tabs .tab {
    padding: 10px;
    cursor: pointer;
    font-size: 13px;
}

.drawer-tabs .tab.active {
    background: #f5f5f5;
    font-weight: bold;
}

/* RIGHT CONTENT */
.drawer-content-area {
    width: 70%;
    padding: 10px;
    overflow-y: auto;
}

/* TAB CONTENT */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* =========================
   DRAWER BASE
========================= */

.blinkit-filter-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

/* OVERLAY */
.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

/* =========================
   SLIDE PANEL
========================= */

.drawer-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    padding: 15px;

    border-radius: 16px 16px 0 0;

    transform: translateY(100%);
    transition: transform 0.35s ease;
}

/* ACTIVE STATE (SLIDE UP) */
.blinkit-filter-drawer.show .drawer-content {
    transform: translateY(0);
}

/* OPTIONAL SMOOTH CLOSE */
.blinkit-filter-drawer.hide .drawer-content {
    transform: translateY(100%);
}

/* =========================
   FILTER LIST (VERTICAL)
========================= */

#price-options,
#brand-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* EACH OPTION */
#price-options label,
#brand-options label {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    cursor: pointer;

    padding: 6px 4px;
    border-radius: 6px;
}

/* HOVER EFFECT */
#price-options label:hover,
#brand-options label:hover {
    background: #f5f5f5;
}

/* CHECKBOX ALIGN */
#price-options input,
#brand-options input {
    margin: 0;
}

/* SORT WRAPPER = BUTTON LOOK */
.blinkit-sort-wrap {
    display: flex;
    align-items: center;
    gap: 6px;

    background: #2ecc71;
    color: #fff;

    padding: 6px 12px;
    border-radius: 6px;

    cursor: pointer;
    position: relative;
}

/* ICON */
.blinkit-sort-wrap i {
    font-size: 14px;
}

/* SELECT RESET */
#blinkit-sort {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    border: none;
    background: transparent;
    color: #fff;

    font-size: 13px;
    cursor: pointer;

    outline: none;
}

/* REMOVE DEFAULT ARROW (EDGE FIX) */
#blinkit-sort::-ms-expand {
    display: none;
}

/* HOVER SAME AS FILTER */
.blinkit-sort-wrap:hover {
    background: #27ae60;
}

/* ICON SIZE */
.blinkit-filter-btn i,
.blinkit-sort-wrap i {
    font-size: 13px;
	color: #fff;
}

/* ALIGN */
.blinkit-filter-btn,
.blinkit-sort-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* FORCE ICON VISIBILITY */
.blinkit-filter-btn i,
.blinkit-sort-wrap i {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
    display: inline-block;
}



/* =========================
   APP-LIKE SCROLL CORE
========================= */

.blinkit-products,
.blinkit-sidebar {
    overflow-y: auto;

    -webkit-overflow-scrolling: touch; /* iOS momentum */
    scroll-behavior: smooth;

    overscroll-behavior: contain; /* prevent bounce to body */
}

/* GPU ACCELERATION */
.blinkit-products {
    transform: translateZ(0);
    will-change: transform;
}

/* FIX LAG ON MOBILE */
.blinkit-wrapper {
    backface-visibility: hidden;
}

/* REMOVE TAP DELAY */
* {
    -webkit-tap-highlight-color: transparent;
}

/* BETTER TOUCH HANDLING */
.blinkit-products,
.blinkit-sidebar {
    touch-action: pan-y;
}

/* HIDE SCROLLBAR FOR APP LOOK */
.blinkit-products::-webkit-scrollbar,
.blinkit-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.blinkit-sidebar {
    scroll-snap-type: y proximity;
}

.blinkit-cat {
    scroll-snap-align: start;
}

.blinkit-products,
.blinkit-sidebar {
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}