/* Mobile storefront and phone-preview refinements live here. */
.catalog-filter-form,
body.phone-preview .catalog-filter-form {
  max-width: 100%;
  min-width: 0;
}

.mobile-storefront-tabs,
body.phone-preview .mobile-storefront-tabs,
.subcategory-showcase-scroll,
body.phone-preview .subcategory-showcase-scroll {
  justify-content: flex-start;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-storefront-tabs::-webkit-scrollbar,
body.phone-preview .mobile-storefront-tabs::-webkit-scrollbar,
.subcategory-showcase-scroll::-webkit-scrollbar,
body.phone-preview .subcategory-showcase-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-storefront-tabs > *,
body.phone-preview .mobile-storefront-tabs > *,
.subcategory-showcase-scroll > *,
body.phone-preview .subcategory-showcase-scroll > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.mobile-storefront-tabs.is-dragging,
.subcategory-showcase-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.mobile-storefront-tabs .mobile-tab-all,
body.phone-preview .mobile-storefront-tabs .mobile-tab-all {
  padding-inline: 10px;
  border-radius: 999px;
  color: #0058bc;
  background: rgba(0, 88, 188, 0.08);
}

.mobile-storefront-tabs .mobile-tab-sale,
body.phone-preview .mobile-storefront-tabs .mobile-tab-sale {
  padding-inline: 12px;
  border-radius: 999px;
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.98), rgba(254, 226, 226, 0.98));
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.26);
}

.mobile-storefront-tabs .mobile-tab-sale.is-active,
body.phone-preview .mobile-storefront-tabs .mobile-tab-sale.is-active {
  color: #9f1239;
  background: linear-gradient(135deg, rgba(255, 228, 230, 1), rgba(254, 215, 170, 0.92));
}

.mobile-storefront-tabs .mobile-tab-sale::after,
body.phone-preview .mobile-storefront-tabs .mobile-tab-sale::after {
  background: #ef4444;
}

@media (max-width: 720px) {
  .catalog-toolbar {
    top: 58px;
    z-index: 1000;
    margin-bottom: 10px;
    padding: 8px 8px 9px;
    transition: top 0.22s ease, transform 0.22s ease, opacity 0.18s ease;
  }

  body.mobile-dock-hidden .catalog-toolbar {
    top: 0;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .catalog-toolbar-grid,
  .catalog-filter-form {
    gap: 0;
  }

  .toolbar-primary-row {
    display: none !important;
  }

  .mobile-storefront-tabs {
    position: relative;
    z-index: 3;
    align-items: center;
    min-height: 42px;
    padding: 7px 10px 9px;
    border: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 26px rgba(20, 28, 45, 0.08);
  }

  .mobile-storefront-tabs a {
    padding: 5px 0 8px;
    font-size: 0.95rem;
  }

  .mobile-category-search {
    position: sticky;
    right: 0;
    z-index: 8;
    display: block;
    margin-left: auto;
    color: #0058bc;
  }

  .mobile-category-search summary {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(0, 88, 188, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 20px rgba(20, 28, 45, 0.08);
  }

  .mobile-category-search summary::-webkit-details-marker {
    display: none;
  }

  .mobile-search-icon {
    width: 21px;
    height: 21px;
  }

  .mobile-category-search-panel {
    position: fixed;
    top: 118px;
    right: 16px;
    left: 16px;
    z-index: 2400;
    display: flex;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(193, 198, 215, 0.72);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 64px rgba(20, 28, 45, 0.18);
    backdrop-filter: blur(18px);
  }

  body.mobile-dock-hidden .mobile-category-search-panel {
    top: 58px;
  }

  .mobile-category-search-panel input {
    min-width: 0;
    flex: 1;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(193, 198, 215, 0.72);
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 750;
  }

  .mobile-category-search-panel button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
  }

  .product-value-tags span {
    min-height: 25px;
    padding: 4px 9px;
    font-size: 0.78rem;
  }

  .product-value-tags .price-value {
    font-size: 0.86rem;
  }
}

body.phone-preview .catalog-toolbar {
  top: 58px;
  z-index: 1000;
  margin-bottom: 10px;
  padding: 8px 8px 9px;
  transition: top 0.22s ease, transform 0.22s ease, opacity 0.18s ease;
}

body.phone-preview.mobile-dock-hidden .catalog-toolbar {
  top: 0;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

body.phone-preview .catalog-toolbar-grid,
body.phone-preview .catalog-filter-form {
  gap: 0;
}

body.phone-preview .toolbar-primary-row {
  display: none !important;
}

body.phone-preview .mobile-storefront-tabs {
  position: relative;
  z-index: 3;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px 9px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(20, 28, 45, 0.08);
}

body.phone-preview .mobile-storefront-tabs a {
  padding: 5px 0 8px;
  font-size: 0.95rem;
}

body.phone-preview .mobile-category-search {
  position: sticky;
  right: 0;
  z-index: 8;
  display: block;
  margin-left: auto;
  color: #0058bc;
}

body.phone-preview .mobile-category-search summary {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(0, 88, 188, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(20, 28, 45, 0.08);
}

body.phone-preview .mobile-category-search summary::-webkit-details-marker {
  display: none;
}

body.phone-preview .mobile-search-icon {
  width: 21px;
  height: 21px;
}

body.phone-preview .mobile-category-search-panel {
  position: fixed;
  top: 118px;
  right: 16px;
  left: 16px;
  z-index: 2400;
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(193, 198, 215, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(20, 28, 45, 0.18);
  backdrop-filter: blur(18px);
}

body.phone-preview.mobile-dock-hidden .mobile-category-search-panel {
  top: 58px;
}

body.phone-preview .mobile-category-search-panel input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(193, 198, 215, 0.72);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 750;
}

body.phone-preview .mobile-category-search-panel button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
}
