@font-face {
  font-family: "HelveticaNeue";
  src: url("/static/fonts/HelveticaNeueLTGEO-55Roman.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueMedium";
  src: url("/static/fonts/HelveticaNeueLTGEO65Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueBold";
  src: url("/static/fonts/HelveticaNeueLTGEO-75Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #ffffff;
  --text: #111820;
  --muted: #9aa5b5;
  --border: #e5ebf0;
  --accent: #176db3;
  --accent-soft: #eaf4fc;
  --danger: #d44136;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  background: var(--surface);
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "HelveticaNeue", "Noto Sans Georgian", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.shell {
  width: min(1100px, calc(100% - 32px));
  height: 100dvh;
  margin: 0 auto;
  padding-top: 25px;
}

/* Plain search line used by nova.ge's overlay. */
.search-shell {
  position: relative;
  z-index: 3;
}

.searchbar {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.searchbar:focus-within {
  border-bottom-color: #d9e2e9;
}

.searchbar input {
  flex: 1;
  min-width: 0;
  padding: 20px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
}

.searchbar input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-actions {
  order: -1;
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 34px;
}

.clear {
  display: grid;
  width: 28px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: color 150ms ease, opacity 150ms ease;
}

.clear.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.clear:hover {
  color: var(--accent);
}

.clear:focus-visible,
.category-row:focus-visible,
.card:focus-visible,
.view-all:focus-visible {
  outline: 2px solid rgba(23, 109, 179, 0.28);
  outline-offset: 2px;
}

.spinner {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: flex;
  width: max-content;
  height: auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 150ms ease;
}

.spinner.on {
  opacity: 1;
}

.spinner-ring {
  width: 34px;
  height: 34px;
  border: 3px solid #d7e2eb;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Categories and products share one scroll surface. */
.results-shell {
  position: relative;
  display: flex;
  height: calc(100dvh - 111px);
  min-height: 0;
  flex-direction: column;
  margin-top: 18px;
}

.product-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 4px 58px 0;
  background: var(--surface);
}

.product-scroll::-webkit-scrollbar {
  width: 4px;
}

.product-scroll::-webkit-scrollbar-button,
.product-scroll::-webkit-scrollbar-button:single-button,
.product-scroll::-webkit-scrollbar-button:vertical:start:decrement,
.product-scroll::-webkit-scrollbar-button:vertical:end:increment {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
}

.product-scroll::-webkit-scrollbar-track {
  background: #edf2f6;
}

.product-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
}

.section {
  margin: 0;
}

#catSection {
  padding-bottom: 25px;
}

.categories {
  display: grid;
  gap: 1px;
}

.category-row {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.category-row:hover .name {
  color: var(--accent);
}

.category-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
}

.category-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.category-row .name {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms ease;
}

#prodSection {
  padding-top: 5px;
}

.section-title {
  margin: 0 0 11px;
  color: var(--text);
  font-family: "HelveticaNeueMedium", "HelveticaNeue", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.products {
  display: grid;
  gap: 0;
}

.card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-height: 98px;
  align-content: center;
  column-gap: 0;
  row-gap: 7px;
  padding: 8px 22px 8px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: background 150ms ease;
}

.card:hover {
  background: #fbfcfd;
}

.thumb {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 96px;
  height: 82px;
  align-self: center;
  place-items: center;
  padding: 4px 14px;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.thumb.empty {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.info {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: end;
}

.info h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "HelveticaNeueMedium", "HelveticaNeue", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info .cat {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}

.price .now {
  font-family: "HelveticaNeueBold", "HelveticaNeue", sans-serif;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.load-more-sentinel {
  height: 1px;
  margin-top: 1px;
}

.product-loading {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 0 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.product-loading-icon {
  width: 15px;
  height: 15px;
  animation: spin 0.75s linear infinite;
}

.view-all-wrap {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: 62px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.94) 42%,
    #ffffff 72%
  );
  pointer-events: none;
}

.view-all {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  pointer-events: auto;
}

.view-all:hover {
  color: #125a93;
}

.view-all-arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform 150ms ease;
}

.view-all:hover .view-all-arrow {
  transform: translateX(3px);
}

/* Empty and error states. */
.state {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.state .big {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  place-items: center;
  color: var(--accent);
}

.state p {
  margin: 0;
  color: var(--text);
  font-family: "HelveticaNeueMedium", "HelveticaNeue", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.state small {
  color: var(--muted);
  font-size: 14px;
}

.error {
  color: var(--danger) !important;
}

@media (max-width: 700px) {
  .shell {
    width: calc(100% - 20px);
    padding-top: 8px;
  }

  .searchbar {
    min-height: 58px;
  }

  .results-shell {
    height: calc(100dvh - 76px);
    margin-top: 10px;
  }

  .product-scroll {
    padding-top: 6px;
  }

  #catSection {
    padding-bottom: 18px;
  }

  .card {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 94px;
    padding-right: 10px;
  }

  .thumb {
    width: 82px;
    height: 78px;
    padding-right: 12px;
    padding-left: 8px;
  }

  .info h3 {
    font-size: 14.5px;
  }

  .price .now {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
