/* Shared public navigation and a search layout independent of dashboard grids. */
.browse-page .home-mobile-nav {
  display: none;
}

.browse-page .footer-brand {
  min-width: 0;
}

.browse-page .footer-brand .brand {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.browse-page .footer-links {
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-main {
  padding-top: 32px;
  padding-bottom: 56px;
}

.search-header {
  max-width: 760px;
}

.search-header h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.search-page .search-form {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 54px;
  gap: 12px;
  margin: 0;
  padding: 5px 5px 5px 16px;
  border: 1px solid #e5e5e8;
  border-radius: 16px;
  background: #f7f7f8;
  box-shadow: none;
}

.search-page .search-form:focus-within {
  border-color: var(--tenant-primary);
  box-shadow: 0 0 0 3px #d9152b12;
}

.search-page .search-form input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  background: transparent;
  font-size: 16px;
}

.search-page .search-form button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
}

.search-page .search-icon {
  display: flex;
  flex: 0 0 21px;
}

.search-summary {
  margin: 12px 0 0;
  color: #747780;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.search-summary strong {
  color: #373a40;
  font-weight: 600;
}

.search-feedback {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.search-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: 6px;
  padding: 0 10px;
  border-radius: 10px;
  color: #595c64;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.search-clear > span { font-size: 20px; }
.search-clear:hover { background: #f7f7f8; color: var(--tenant-primary); }

.search-categories {
  display: flex;
  gap: 12px;
  min-width: 0;
  margin: 20px 0 24px;
  padding: 3px 3px 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #dedee2 transparent;
}

.search-category {
  display: flex;
  flex: 0 0 74px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: #666a72;
  font-size: 11px;
  font-weight: 600;
  scroll-snap-align: start;
}

.search-category-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 56px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: #f7f7f8;
}

.search-category[aria-current="page"] {
  color: var(--tenant-primary);
}

.search-category[aria-current="page"] .search-category-icon {
  border-color: #f3c1c8;
  background: #fff1f3;
}

.search-section + .search-section {
  margin-top: 28px;
}

.search-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 12px;
}

.search-section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.search-result-count {
  display: inline-block;
  margin-left: 5px;
  color: #91959b;
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
}

.search-gallery-controls:not([hidden]) {
  display: flex;
  flex: none;
  gap: 8px;
}

.search-gallery-controls button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e9e9ec;
  border-radius: 50%;
  background: #fff;
  color: #36393e;
  font-size: 22px;
}

.search-gallery-controls button:disabled {
  opacity: .35;
  cursor: default;
}

.search-store-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 3px 3px 12px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 3px;
  scrollbar-width: thin;
  scrollbar-color: #dedee2 transparent;
}

.search-store-gallery > li {
  display: flex;
  min-width: 0;
  scroll-snap-align: start;
}

.search-store-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e9e9ec;
  border-radius: 18px;
  background: #fff;
  overflow-wrap: anywhere;
}

.search-store-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  flex: 1;
}

.search-store-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid #f0f0f2;
  border-radius: 16px;
  background: #faf6ef;
}

.search-store-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.search-store-card[data-store-open="false"] .search-store-logo img,
.search-product-tile[data-store-open="false"] .search-product-image img {
  filter: grayscale(1);
}

.search-store-info h3 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.search-store-info p {
  margin: 0;
  color: #666b73;
  font-size: 12px;
  line-height: 1.5;
}

.search-store-info .search-store-location {
  margin-top: 4px;
  color: #858991;
  font-size: 11px;
}

.search-store-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
}

.search-store-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #238154;
}

.search-store-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.search-store-state.is-closed {
  color: #8a6751;
}

.search-store-rating {
  color: #946313;
}

.search-store-delivery {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #f0f0f2;
  color: #737780;
  font-size: 11px;
  line-height: 1.5;
}

.search-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.search-product-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e9e9ec;
  border-radius: 18px;
  background: #fff;
}

.search-product-image {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 13px;
  background: #faf6ef;
}

.search-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-product-image svg {
  width: 50px;
  height: 50px;
}

.search-product-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-product-info h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.search-product-store {
  margin: 5px 0 0;
  color: #72767e;
  font-size: 11px;
  line-height: 1.5;
}

.search-product-description {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: #858991;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-product-price {
  display: block;
  margin-top: 10px;
  color: var(--tenant-primary);
  font-size: 14px;
  line-height: 1.4;
}

.search-empty {
  max-width: 500px;
  margin: 20px auto;
  padding: 24px 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.search-empty > span {
  color: #babcc2;
  font-size: 40px;
}

.search-empty h2 {
  margin: 12px 0;
  font-size: 22px;
}

.search-empty p {
  margin: 0 0 24px;
  color: #747780;
  font-size: 14px;
  line-height: 1.6;
}

.browse-page .category-nav {
  min-width: 0;
  max-width: 100%;
  overscroll-behavior-x: contain;
}

.browse-page .category-nav a {
  flex: none;
  white-space: nowrap;
}

@media (hover: hover) {
  .search-store-card:hover,
  .search-product-card:hover {
    border-color: #edb9c1;
    box-shadow: 0 4px 16px #15171906;
  }

  .search-category:hover .search-category-icon {
    background: #fff1f3;
  }
}

@media (max-width: 1000px) {
  .browse-page .announcement,
  .browse-page .desktop-nav,
  .browse-page .header-location {
    display: none;
  }

  .browse-page .site-header {
    padding-top: env(safe-area-inset-top, 0px);
    background: #fff;
    border-bottom-color: #f0f0f1;
  }

  .browse-page .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .browse-page .brand {
    min-width: 0;
    font-size: 21px;
  }

  .browse-page .header-actions {
    flex: none;
    gap: 10px;
    margin-left: auto;
  }

  .browse-page .header-actions .login-link:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 10px;
    color: var(--tenant-primary);
    font-size: 13px;
  }

  .browse-page .mobile-menu-button {
    display: block;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    background: #f5f5f6;
  }

  .browse-page .mobile-menu a,
  .browse-page .mobile-menu-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 14px;
  }

  .browse-page .modal-card input {
    min-height: 48px;
    font-size: 16px;
  }

  .search-store-gallery {
    grid-auto-columns: calc((100% - 16px) / 2);
  }
}

@media (max-width: 760px) {
  .search-page.marketplace-site {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  .browse-page .shell {
    width: min(calc(100% - 32px), 600px);
    min-width: 0;
  }

  .search-main {
    padding-top: 20px;
    padding-bottom: 36px;
  }

  .search-categories {
    gap: 6px;
    margin-top: 16px;
    margin-bottom: 14px;
  }

  .search-category {
    flex-basis: 70px;
  }

  .search-section-heading h2 {
    font-size: 19px;
  }

  .search-store-gallery {
    grid-auto-columns: calc(100% - 26px);
    gap: 12px;
  }

  .search-store-gallery > li:only-child {
    width: calc(100% + 26px);
  }

  .search-product-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .search-product-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .search-product-image {
    width: 88px;
    height: 96px;
  }

  .search-product-info h3 {
    font-size: 15px;
  }

  .browse-page .store-menu .product-card h4 {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .browse-page .store-menu .product-card-content > strong {
    overflow-wrap: anywhere;
  }

  .browse-page .store-heading {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .browse-page .site-footer {
    padding-top: 10px;
  }

  .browse-page .footer-main {
    display: block;
    padding-top: 22px;
    padding-bottom: 24px;
  }

  .browse-page .footer-brand {
    display: none;
  }

  .browse-page .footer-links {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
  }

  .browse-page .footer-links a {
    display: flex;
    align-items: center;
    min-height: 36px;
    font-size: 12px;
  }

  .browse-page .footer-bottom {
    gap: 8px;
    padding-top: 16px;
    padding-bottom: 20px;
    font-size: 10px;
  }

  .browse-page .home-mobile-nav {
    position: fixed;
    z-index: 19;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 68px;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ececef;
    background: #fff;
    box-shadow: 0 -5px 24px #15171905;
  }

  .browse-page .home-mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    min-height: 48px;
    color: #898d94;
    font-size: 10px;
    font-weight: 650;
  }

  .browse-page .home-mobile-nav a[aria-current="page"] {
    color: var(--red);
  }
}

.browse-page a:focus-visible,
.browse-page button:focus-visible,
.browse-page [data-gallery-track]:focus-visible {
  outline: 2px solid var(--tenant-primary);
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .search-store-card {
    padding: 14px;
  }

  .search-store-main {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }

  .search-store-logo {
    width: 54px;
    height: 54px;
    border-radius: 13px;
  }

  .search-product-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .search-product-image {
    width: 74px;
    height: 86px;
  }
}
