/* Mobile-only catalog filter layout. Loaded after workspace-compact.css. */
.mobile-catalog-actions {
  display: contents;
}

.mobile-catalog-sort-button {
  display: none;
}

@media (max-width: 640px) {
  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .topbar {
    display: none !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] {
    padding-top: 12px !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar,
  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar.catalog-filter-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 6px !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar #keywordInput,
  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar #brandFilterInput,
  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar #categoryFilterInput {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 38px !important;
    box-sizing: border-box !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar #productSortInput {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar .mobile-catalog-actions {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 6px !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] .mobile-catalog-sort-button,
  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] #clearCatalogFiltersButton {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] .mobile-catalog-sort-button {
    color: #0f766e !important;
    font-size: 0 !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] .mobile-catalog-sort-button::before {
    content: "\21C5";
    font-size: 18px !important;
    line-height: 1 !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] #clearCatalogFiltersButton {
    color: #9f1239 !important;
    border-color: #f3c5c0 !important;
    background: #fff7f4 !important;
  }

  html body.customer-commerce .mobile-sort-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  html body.customer-commerce .mobile-sort-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
    border-radius: 14px 14px 0 0 !important;
  }

  html body.customer-commerce .mobile-sort-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
  }

  html body.customer-commerce .mobile-sort-header h2 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  html body.customer-commerce .mobile-sort-options {
    display: grid !important;
    gap: 8px !important;
  }

  html body.customer-commerce .mobile-sort-option {
    height: 42px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  html body.customer-commerce .mobile-sort-option.active {
    border-color: #0f766e !important;
    background: #edf7f5 !important;
    color: #0f766e !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] .mobile-catalog-sort-select {
    position: relative !important;
    overflow: hidden !important;
  }

  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] .mobile-catalog-sort-select #productSortInput,
  html body.customer-commerce #dashboardView [data-customer-page-panel="products"] > .toolbar .mobile-catalog-sort-select #productSortInput {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.01 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 2 !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
  }
}
