/* =========================
   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;
}


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

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

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


/* 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;
}


/* =========================
   PREMIUM TOPBAR
========================= */

.blinkit-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 12px;
    background: #ffffff;

    border-bottom: 1px solid #eee;

    position: sticky;
    top: 0;
    z-index: 10;

    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}


/* =========================
   ACTION BUTTON WRAPPER
========================= */

.blinkit-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* =========================
   COMMON BUTTON STYLE
========================= */

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

    background: #f8f8f8;
    color: #333;

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

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    border: 1px solid #e5e5e5;

    transition: all 0.2s ease;
}


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


/* HOVER EFFECT */
.blinkit-filter-btn:hover,
.blinkit-sort-wrap:hover {
    background: #f1fdf5;
    border-color: #2ecc71;
}


/* ACTIVE (WHEN FILTER APPLIED) */
.blinkit-filter-btn.active {
    background: #eafaf1;
    border-color: #2ecc71;
}


/* =========================
   SORT SELECT FIX
========================= */

#blinkit-sort {
    appearance: none;
    border: none;
    background: transparent;

    font-size: 13px;
    color: #333;

    outline: none;
    cursor: pointer;

    padding-right: 10px;
}


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


/* =========================
   BUTTON HEIGHT CONSISTENCY
========================= */

.blinkit-filter-btn,
.blinkit-sort-wrap {
    height: 36px;
}


/* =========================
   MOBILE OPTIMIZATION
========================= */

@media (max-width: 767px) {

    .blinkit-topbar {
        padding: 8px;
    }

    .blinkit-actions {
        width: 100%;
        justify-content: space-between;
    }

    .blinkit-filter-btn,
    .blinkit-sort-wrap {
        flex: 1;
        justify-content: center;
        font-size: 12px;
        padding: 6px;
    }

    /* ICON ONLY OPTION (optional) */
    /*
    .blinkit-filter-btn span,
    .blinkit-sort-wrap select {
        display: none;
    }
    */
}


/* =========================
   SMOOTH UI TOUCH
========================= */

.blinkit-filter-btn,
.blinkit-sort-wrap {
    -webkit-tap-highlight-color: transparent;
}


/* =========================
   SUBTLE ANIMATION
========================= */

.blinkit-filter-btn:active,
.blinkit-sort-wrap:active {
    transform: scale(0.96);
}