/**
 * Listing page (listing.php) — mobile filter drawer & product grid.
 */

@media only screen and (max-width: 991px) {
  .shop-main-area .container {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .shop-main-area .page.section-header .page-width,
  .shop-main-area .page-title h1 {
    font-size: 1.25rem;
    word-break: break-word;
  }

  /* Filter sidebar: slide-in drawer (theme filterbar pattern) */
  .shop-main-area .listing-filterbar {
    display: block !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: min(300px, 90vw);
    max-width: 90vw;
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 16px 14px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transform: translateX(-105%);
    transition: transform 0.35s ease;
    pointer-events: none;
  }

  .shop-main-area .listing-filterbar.active {
    transform: translateX(0);
    pointer-events: auto;
  }

  .shop-main-area .listing-filterbar .closeFilter {
    display: block;
    float: right;
    padding: 6px 8px;
    margin: -4px -4px 12px 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }

  body.listingFiltersOn {
    overflow: hidden;
  }

  body.listingFiltersOn::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1001;
    pointer-events: auto;
  }

  .shop-main-area .btn-filter {
    display: block;
    width: 100%;
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .shop-main-area .listing-products-col {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .shop-main-area .shop-left-area {
    padding: 0;
  }

  .shop-main-area .single-shop-left {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
  }

  .shop-main-area .single-shop-left:last-child {
    border-bottom: 0;
  }

  .shop-main-area .shop-left-title h3 {
    font-size: 15px;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .shop-main-area .shop-left-menu-2 .list-group-item,
  .shop-main-area .shop-left-menu-2 li {
    font-size: 14px;
    line-height: 1.4;
  }

  .shop-main-area .shop-left-menu-2 .list-group-item {
    padding: 8px 0;
    border: 0;
    background: transparent;
  }

  .shop-main-area .shop-left-menu-2 input[type="checkbox"] {
    min-width: 18px;
    min-height: 18px;
    margin-right: 10px !important;
    vertical-align: middle;
  }

  .shop-main-area #price_show {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .shop-main-area #slider-range {
    margin: 8px 4px 4px;
    max-width: 100%;
  }

  /* Product grid */
  .shop-main-area .grid-products .row {
    margin-left: -6px;
    margin-right: -6px;
  }

  .shop-main-area .grid-products .item {
    padding: 6px;
  }

  .shop-main-area .grid-products .item .product-image img,
  .shop-main-area .grid-products .item .product-image .primary,
  .shop-main-area .grid-products .item .product-image .hover {
    height: auto !important;
    max-height: 200px;
    width: 100%;
    object-fit: contain;
  }

  .shop-main-area .grid-products .product-name h6,
  .shop-main-area .grid-products .product-name .pname {
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
  }

  .shop-main-area .grid-products .item .btn {
    width: 100%;
    font-size: 12px;
    padding: 8px 10px;
  }

  .shop-main-area #loader {
    max-width: 80px !important;
  }
}

@media only screen and (min-width: 992px) {
  .shop-main-area .listing-filterbar {
    position: static;
    left: auto;
    width: auto;
    height: auto;
    opacity: 1;
    visibility: visible;
    padding: 0;
    box-shadow: none;
    overflow: visible;
  }

  .shop-main-area .listing-filterbar .closeFilter {
    display: none !important;
  }

  .shop-main-area .btn-filter {
    display: none !important;
  }
}
