/**
 * Shop listing page — mobile-only layout (≤767px)
 * Scoped to .bn-shop-page — desktop unchanged.
 */

@media (max-width: 767px) {
  body:has(.bn-shop-page) {
    background: #f3f4f6;
    padding-bottom: 58px;
  }

  body:has(.bn-shop-page) .bn-m-search-bar,
  body:has(.bn-shop-page) .bn-m-sticky-icons {
    display: none !important;
  }

  body.bn-shop-filter-lock {
    overflow: hidden;
  }

  .bn-shop-page.shop-page-section {
    padding-top: 0 !important;
    padding-bottom: 24px !important;
    background: #f3f4f6;
  }

  .bn-shop-page.shop-page-section .large-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }

  /* Bootstrap row negative margins cancel container padding — reset for mobile shop */
  .bn-shop-page .row,
  .bn-shop-page .row.clearfix {
    --bs-gutter-x: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .bn-shop-page .row > [class*="col-"],
  .bn-shop-page .row.clearfix > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .bn-shop-page .content-side {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    float: none !important;
  }

  /* ----- Filter bottom sheet ----- */
  .bn-shop-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .bn-shop-page.is-filter-open .bn-shop-filter-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .bn-shop-page .sidebar-side {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 1080 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    transform: translateY(105%);
    transition: transform 0.28s ease;
    pointer-events: none;
  }

  .bn-shop-page.is-filter-open .sidebar-side {
    transform: translateY(0);
    pointer-events: auto;
  }

  .bn-shop-filter-sheet-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid #eef1f5;
  }

  .bn-shop-filter-sheet-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
  }

  .bn-shop-filter-close {
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .bn-shop-page .shop-sidebar {
    max-height: min(78vh, 620px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    padding: 8px 12px 24px !important;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
  }

  .bn-shop-page .shop-sidebar .search-widget {
    display: none !important;
  }

  .bn-shop-page .shop-sidebar .sidebar-widget {
    margin-bottom: 18px !important;
    padding-bottom: 0 !important;
    border: none !important;
  }

  .bn-shop-page .shop-sidebar .widget-title h3,
  .bn-shop-page .shop-sidebar .widget-title h4 {
    font-size: 14px !important;
    margin-bottom: 10px !important;
  }

  .bn-shop-page .shop-sidebar .filter-btn {
    width: 100% !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    background: var(--theme-color) !important;
    color: #fff !important;
  }

  .bn-shop-page .shop-sidebar .filter-btn span {
    display: none !important;
  }

  /* ----- Mobile header ----- */
  .bn-shop-m-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 0 10px;
  }

  .bn-shop-m-back,
  .bn-shop-m-filter-btn {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #111;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
  }

  .bn-shop-m-filter-btn {
    color: var(--theme-color);
    border-color: rgba(192, 35, 50, 0.18);
    background: #fff5f5;
  }

  .bn-shop-m-heading {
    flex: 1;
    min-width: 0;
  }

  .bn-shop-m-heading h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bn-shop-m-heading p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: #64748b;
  }

  /* ----- Subcategory pills ----- */
  .bn-shop-subcat-scroll {
    margin: 0 -14px 10px;
    padding: 0 14px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bn-shop-subcat-scroll::-webkit-scrollbar {
    display: none;
  }

  .bn-shop-subcat-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
    min-width: 100%;
  }

  .bn-shop-subcat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
  }

  .bn-shop-subcat-pill.is-active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192, 35, 50, 0.22);
  }

  /* ----- Search ----- */
  .bn-shop-m-search {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 12px;
    min-height: 42px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e8ecf1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  .bn-shop-m-search i {
    color: #94a3b8;
    font-size: 14px;
    flex: 0 0 auto;
  }

  .bn-shop-m-search-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    height: 40px;
    padding: 0 !important;
    font-size: 14px !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  .bn-shop-m-search-input:focus {
    outline: none !important;
  }

  .bn-shop-m-search-input::placeholder {
    color: #94a3b8;
  }

  /* ----- Results bar ----- */
  .bn-shop-page .bn-shop-item-shorting {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    padding: 8px 10px !important;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8ecf1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  .bn-shop-page .bn-shop-item-shorting .left-column {
    flex: 1;
    min-width: 0;
  }

  .bn-shop-page .bn-shop-item-shorting .left-column .text p {
    margin: 0 !important;
    font-size: 12px !important;
    color: #64748b !important;
  }

  .bn-shop-page .bn-shop-item-shorting .left-column .text p span {
    color: #111 !important;
    font-weight: 700;
  }

  .bn-shop-page .bn-shop-item-shorting .right-column {
    display: none !important;
  }

  /* ----- Product grid ----- */
  .bn-shop-page .our-shop,
  .bn-shop-page .wrapper.grid,
  .bn-shop-page .shop-grid-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .bn-shop-page #shop-products-container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .bn-shop-page #shop-products-container .shop-block-two {
    width: calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
    flex: 0 0 calc(50% - 4px) !important;
    display: flex !important;
    flex-direction: column !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .bn-shop-page #shop-products-container .popular-pick-card .inner-box {
    flex: 1 1 auto;
    height: 100%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  }

  .bn-shop-page #shop-products-container .popular-pick-card .option-list,
  .bn-shop-page #shop-products-container .popular-pick-card .product-halal {
    display: none !important;
  }

  .bn-shop-page .text-danger {
    width: 100%;
    margin: 12px 0;
    padding: 16px;
    text-align: center;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed #fecaca;
    color: #b91c1c !important;
    font-size: 14px;
  }

  /* ----- Pagination ----- */
  .bn-shop-page #shop-pagination-wrapper {
    margin-top: 14px !important;
    padding: 0 0 8px;
  }

  .bn-shop-page #shop-pagination-wrapper .pagination {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .bn-shop-page #shop-pagination-wrapper .pagination li {
    float: none !important;
    margin: 0 !important;
  }

  .bn-shop-page #shop-pagination-wrapper .pagination li a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 600;
    text-decoration: none !important;
  }

  .bn-shop-page #shop-products-container .popular-pick-card .image-box {
    height: 120px !important;
    min-height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    background: #f8fafc !important;
  }

  .bn-shop-page #shop-products-container .popular-pick-card .image-box .image {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    max-height: 120px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    background: transparent !important;
    margin: 0 !important;
  }

  .bn-shop-page #shop-products-container .popular-pick-card .image-box .image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
  }
}

@media (max-width: 599px) {
  .bn-shop-page #shop-products-container .shop-block-two {
    width: calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
    flex: 0 0 calc(50% - 4px) !important;
  }
}
