/* ================================================================
   SHOP FILTER — SIDE SLIDE DRAWER + FIXES
   Cache bust: 20260530-shop-v4
================================================================ */

/* ================================================================
   FIX 1: IMAGE ZOOM EFFECT HATAO
================================================================ */
.prod-card:hover .prod-img img,
.cat-card:hover .cat-img,
.cat-mini:hover .cat-img,
.coll-card:hover .coll-card-bg {
  transform: none !important;
}
/* Prod card hover lift bhi nahi chahiye mobile pe */
@media (max-width: 900px) {
  .prod-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border) !important;
  }
}

/* ================================================================
   FIX 2: FOOTER KE UPAR POPUP/FLOATING HATAO
================================================================ */
.hfs-kpis {
  position: static !important;
  display: none !important;
}
@media (max-width: 900px) {
  .hfs-kpis { display: none !important; }
  /* Koi bhi fixed bottom element jo footer ke upar float kare */
  .bulk-banner,
  .bulk-banner-inner,
  [style*="position:fixed"][style*="bottom"],
  [style*="position: fixed"][style*="bottom"] {
    /*position: static !important;*/
  }
}

/* ================================================================
   FIX 3: SHOP FILTER — SIDE SLIDE DRAWER
================================================================ */

/* Desktop sidebar unchanged */
@media (min-width: 901px) {
  .shop-sidebar { display: block !important; }
  .mob-filter-bar { display: none !important; }
  .filter-side-drawer { display: none !important; }
  .filter-side-backdrop { display: none !important; }
  .shop-topbar { display: flex !important; }
}

@media (max-width: 900px) {

  /* Sidebar completely hide */
  .shop-sidebar { display: none !important; }

  /* Shop main full width */
  .shop-main { padding: 0 14px 24px !important; }
  .shop-layout { flex-direction: column !important; }

  /* Desktop topbar hide */
  .shop-topbar { display: none !important; }

  /* ── Mobile filter trigger bar ── */
  .mob-filter-bar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 56px;
    z-index: 90;
    margin: 0 -14px 14px;
  }

  .mob-filter-trigger {
    display: flex !important;
    align-items: center;
    gap: 7px;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 9px 16px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    flex: 1;
    justify-content: center;
  }
  .mob-filter-trigger.has-filters {
    background: var(--emerald);
    color: #fff;
    border-color: var(--emerald);
  }
  .mob-filter-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }

  .mob-filter-badge {
    background: rgba(255,255,255,.25);
    color: #fff;
    border-radius: 99px;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
  }

  .mob-sort-sel {
    display: block !important;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 9px 10px;
    font-size: .8rem;
    color: var(--navy);
    font-family: inherit;
    outline: none;
    cursor: pointer;
    flex: 1;
    max-width: 150px;
  }

  /* Active filter chips */
  .active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }
  .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(45,139,111,.1);
    border: 1px solid rgba(45,139,111,.25);
    color: var(--emerald);
    border-radius: 99px;
    padding: 5px 10px;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
  }
  .filter-chip svg { width: 12px; height: 12px; }

  /* Mobile result count */
  .mob-result-count {
    display: block !important;
    font-size: .78rem;
    color: var(--text-soft);
    margin-bottom: 12px;
  }
  .mob-result-count strong { color: var(--navy); }

  /* ── BACKDROP ── */
  .filter-side-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,25,35,.5);
    z-index: 998;
    opacity: 0;
    transition: opacity .3s ease;
  }
  .filter-side-backdrop.open {
    display: block;
    opacity: 1;
  }

  /* ── SIDE DRAWER — slides in from LEFT ── */
  .filter-side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    /* Full device width */
    width: 100vw;
    max-width: 100vw;
    z-index: 999;
    background: var(--warm-white);
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.25,1,.3,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .filter-side-drawer.open {
    transform: translateX(0);
  }

  /* Drawer header */
  .fsd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--cream);
    flex-shrink: 0;
    /* Safe area top for notch phones */
    padding-top: calc(16px + env(safe-area-inset-top));
  }
  .fsd-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .fsd-title svg { width: 18px; height: 18px; color: var(--emerald); }
  .fsd-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--ice);
    border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--navy);
    font-size: 1.1rem;
    line-height: 1;
    transition: all .2s;
    font-family: inherit;
  }
  .fsd-close:hover { background: var(--border); }

  /* Drawer scrollable body */
  .fsd-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px 8px;
  }
  .fsd-body::-webkit-scrollbar { display: none; }

  /* Filter groups */
  .fsd-body .f-group { margin-bottom: 24px; }
  .fsd-body .f-title {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--emerald);
  }

  /* Filter items — large tap targets */
  .fsd-body .f-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    margin-bottom: 7px;
    cursor: pointer;
    background: var(--cream);
    transition: all .18s;
  }
  .fsd-body .f-item:active { background: var(--ice); }
  .fsd-body .f-item.active {
    background: rgba(45,139,111,.07);
    border-color: var(--emerald);
  }
  .fsd-body .f-check {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .18s;
    font-size: .7rem;
    font-weight: 700;
  }
  .fsd-body .f-item.active .f-check {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
  }
  .fsd-body .f-item.active .f-check::after { content: '✓'; }
  .fsd-body .f-lbl {
    font-size: .88rem;
    color: var(--text-mid);
    line-height: 1.3;
  }
  .fsd-body .f-item.active .f-lbl {
    color: var(--navy);
    font-weight: 600;
  }
  .fsd-body .f-clear {
    font-size: .72rem;
    color: var(--emerald);
    display: inline-block;
    margin-top: 4px;
    text-decoration: none;
    padding: 2px 0;
  }

  /* Drawer footer */
  .fsd-footer {
    padding: 14px 18px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    background: var(--warm-white);
  }
  .fsd-btn-clear {
    flex: 1;
    padding: 13px;
    border-radius: 11px;
    border: 1.5px solid var(--border);
    background: transparent;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
  }
  .fsd-btn-clear:hover { border-color: var(--navy); color: var(--navy); }
  .fsd-btn-apply {
    flex: 2;
    padding: 13px;
    border-radius: 11px;
    border: none;
    background: var(--emerald);
    color: #fff;
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
  }
  .fsd-btn-apply:active { background: var(--emerald-dk); }
}

/* ================================================================
   SHOP FILTER DRAWER — HEIGHT FIX
   Cache bust: 20260530-drawer-fix-v3
================================================================ */

@media (max-width: 900px) {

  /* Drawer full screen, proper flex layout */
  .filter-side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh; /* dynamic viewport height — handles address bar */
    z-index: 999;
    background: var(--warm-white);
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.25,1,.3,1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* children handle their own scroll */
  }
  .filter-side-drawer.open {
    transform: translateX(0);
  }

  /* Header — fixed height, no shrink */
  .fsd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    padding-top: calc(16px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--border);
    background: var(--cream);
    flex-shrink: 0;
    min-height: 56px;
  }

  /* Body — takes ALL remaining space between header and footer */
  .fsd-body {
    flex: 1 1 0;          /* grow to fill, shrink if needed */
    min-height: 0;        /* critical — lets flex child shrink below content size */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px 8px;
  }
  .fsd-body::-webkit-scrollbar { display: none; }

  /* Footer — fixed height, no shrink */
  .fsd-footer {
    flex-shrink: 0;
    padding: 14px 18px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: var(--warm-white);
  }

}
/* ================================================================
   SIDEBAR DESKTOP — FINAL FIX
   Cache bust: 20260531-sidebar-v5
================================================================ */

@media (min-width: 901px) {

  .shop-layout {
    display: flex !important;
    align-items: flex-start !important;
  }

  .shop-sidebar {
    width: 260px !important;
    flex-shrink: 0 !important;
    padding: 28px 22px 40px !important;
    background: var(--cream) !important;
    border-right: 1px solid var(--border) !important;

    /* Sticky — scroll ke saath upar rahe */
    position: sticky !important;
    top: 120px !important;        /* header (106px) + thoda gap */
    align-self: flex-start !important;

    /* NO fixed height — content jitna hai utna dikhao */
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

}
