/* ── Mobile only ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hide Astra's sidebar on mobile (drawer handles filters) */
  .sidebar-main,
  #secondary,
  .ast-woocommerce-sidebar,
  [class*="woocommerce-sidebar"] {
    display: none !important;
  }

  /* Hide "Showing all X results" */
  .woocommerce-result-count {
    display: none !important;
  }

  /* ── Filter + Sort bar ───────────────────────────────────── */
  .mobile-filter-sort-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
    clear: both;
  }

  /* Filter button */
  .mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  /* Sort dropdown fills the rest of the row */
  .mobile-filter-sort-bar .woocommerce-ordering {
    flex: 1 !important;
    float: none !important;
    margin: 0 !important;
  }

  .mobile-filter-sort-bar .woocommerce-ordering select {
    width: 100% !important;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    appearance: auto;
  }

  /* ── Overlay backdrop ────────────────────────────────────── */
  .filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .filter-overlay.open {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Drawer panel ────────────────────────────────────────── */
  .filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 82%;
    max-width: 320px;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
  }
  .filter-drawer.open {
    transform: translateX(0);
  }

  /* Drawer header */
  .filter-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .filter-drawer-close {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
  }

  /* Drawer scrollable body */
  .filter-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    -webkit-overflow-scrolling: touch;
  }

  /* Widgets inside drawer */
  .filter-drawer-body .widget,
  .filter-drawer-body .ast-woo-sidebar-widget {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
  }
  .filter-drawer-body .widget:last-child,
  .filter-drawer-body .ast-woo-sidebar-widget:last-child {
    border-bottom: none;
  }
  .filter-drawer-body .widget-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 12px;
  }
}

/* ── Desktop: restore everything normal ─────────────────────── */
@media (min-width: 769px) {
  .mobile-filter-sort-bar,
  .mobile-filter-btn,
  .filter-drawer,
  .filter-overlay {
    display: none !important;
  }
}

/* ── Hide "Hottest Deals" widget everywhere (mobile + desktop) ── */
#block-9,
.wp-widget-group__inner-blocks {
  display: none !important;
}
