:root {
  --bg: #22242a;
  --search: #4e5156;
  --search-icon: #e8eaed;
  --text: #e8e8e8;
  --text-bright: #e9eaed;
  --muted: #9e9e9e;
  --nav-muted: #81868b;
  --link: #a2c2fa;
  --cite: #8d9b90;
  --star: #f7d876;
  --star-empty: #6a6c6f;
  --card: #28292a;
  --card-border: #323335;
  --divider: #454746;
  --chip-border: #5f6368;
  --filter-btn: #3d465a;
  --avatar: #4395a5;
  --badge: #f7d876;
  --pin: #93b3f3;
  --left: 196px;
  --header-h: 72px;
  --radius-pill: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  zoom: 0.75;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: arial, sans-serif;
  min-width: 1180px;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

button,
input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ----- Header ----- */
.header {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 8px 16px 0 28px;
  gap: 40px;
}

.logo {
  display: flex;
  align-items: center;
  width: 96px;
  flex: 0 0 96px;
  text-decoration: none;
  margin-top: -2px;
}

.logo:hover {
  text-decoration: none;
}

.logo-text {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.6px;
  color: #fff;
  line-height: 1;
}

.search {
  display: flex;
  align-items: center;
  width: min(852px, calc(100% - 280px));
  height: 52px;
  background: var(--search);
  border-radius: var(--radius-pill);
  padding: 0 8px 0 20px;
  flex: 0 1 852px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-bright);
  font-size: 16px;
  line-height: 52px;
  height: 52px;
  padding: 0;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--search-icon);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn svg:not([fill="none"]) {
  fill: currentColor;
}

.search-clear svg {
  width: 20px;
  height: 20px;
}

.search-divider {
  width: 1px;
  height: 26px;
  background: #6e7278;
  margin: 0 6px;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-right .icon-btn {
  color: #e8eaed;
  width: 42px;
  height: 42px;
}

.header-right .icon-btn svg {
  width: 22px;
  height: 22px;
}

.apps-btn svg {
  width: 20px;
  height: 20px;
}

.avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  margin-left: 4px;
  cursor: pointer;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--avatar);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  position: absolute;
  top: 5px;
  left: 5px;
}

.badge {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 18px;
  height: 18px;
  background: var(--badge);
  color: #3a3a3a;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--bg);
}

/* ----- Nav ----- */
.nav-wrap {
  padding: 0 0 0 180px;
  position: relative;
}

.nav {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  height: 44px;
  padding-left: 12px;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  color: var(--nav-muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.nav-item.active {
  color: var(--text);
  font-weight: 500;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 3px;
  background: #e8e8e8;
  border-radius: 3px 3px 0 0;
}

.caret {
  width: 18px;
  height: 18px;
  margin-left: 0;
  opacity: 0.9;
}

.nav-border {
  height: 1px;
  background: var(--divider);
  margin-top: 0;
}

/* ----- Filters row ----- */
.filters-row {
  display: grid;
  grid-template-columns: var(--left) 1fr;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px 6px 20px;
}

.refine-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  padding-left: 0;
}

.chips {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  position: relative;
}

.chips-track {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  flex: 0 1 auto;
  max-width: calc(100% - 32px);
  padding: 4px 0;
}

.chips-track::-webkit-scrollbar {
  display: none;
}

.tune-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--filter-btn);
  color: #eff0fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tune-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.chip {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid #5a5d62;
  background: transparent;
  color: #e8eaed;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chip .pin {
  width: 14px;
  height: 14px;
  fill: var(--pin);
}

.chip.disabled {
  color: #4e5258;
  border-color: transparent;
  cursor: default;
  opacity: 0.55;
}

.chips-more {
  flex: 0 0 auto;
  width: 28px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #9aa0a6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -4px;
}

.chips-more svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ----- Page body ----- */
.page {
  display: grid;
  grid-template-columns: var(--left) 1fr;
  align-items: start;
  padding: 4px 16px 48px 20px;
  column-gap: 8px;
}

/* ----- Sidebar ----- */
.sidebar {
  padding-right: 12px;
  padding-top: 8px;
}

.facet {
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--divider);
}

.facet:last-child {
  border-bottom: 0;
}

.facet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: 0;
  width: 100%;
  padding: 0 4px 8px 0;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  gap: 8px;
}

.facet-head svg {
  width: 16px;
  height: 16px;
  fill: #b8b8b8;
  flex: 0 0 16px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  padding: 2px 0 8px;
  cursor: pointer;
}

.facet-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 4px 0 6px;
}

.facet-link {
  color: var(--text);
  font-size: 14px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.facet-link:hover,
.see-more:hover {
  text-decoration: underline;
}

.see-more {
  color: var(--link);
  font-size: 14px;
  background: none;
  border: 0;
  padding: 4px 0 2px;
  text-align: left;
  cursor: pointer;
}

.swatches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 8px;
}

.swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 14px;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.swatch i {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.swatch .red { background: #d85140; }
.swatch .black { background: #111; }
.swatch .green { background: #58a65d; }
.swatch .white { background: #fff; border-color: #5a5d62; }

/* ----- Stars ----- */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.star {
  width: 12px;
  height: 12px;
  display: inline-block;
  background: var(--star);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star.empty {
  background: #8b8d90;
}

.star.half {
  background: linear-gradient(90deg, var(--star) 50%, #6a6c6f 50%);
}

.stars.lg .star {
  width: 14px;
  height: 14px;
}

.single-star {
  width: 12px;
  height: 12px;
  display: inline-block;
  background: var(--star);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  vertical-align: -1px;
  margin: 0 2px;
}

/* ----- Main / stores ----- */
.main {
  min-width: 0;
  position: relative;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

.kebab {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #b8b8b8;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kebab:hover {
  background: rgba(255, 255, 255, 0.06);
}

.kebab svg {
  width: 18px;
  height: 18px;
}

.carousel {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.stores {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.stores::-webkit-scrollbar {
  display: none;
}

.store-card {
  flex: 0 0 352px;
  width: 352px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 12px 12px;
  overflow: hidden;
}

.store-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.store-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 22px;
}

.store-logo img,
.store-logo svg {
  width: 22px;
  height: 22px;
  display: block;
}

.store-name {
  font-size: 14px;
  color: var(--text);
}

.store-title {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  color: var(--link);
  margin: 2px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.store-title:hover {
  text-decoration: underline;
}

.store-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-img {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  margin-bottom: 8px;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  color: var(--link);
  min-height: 52px;
  margin-bottom: 6px;
  text-decoration: none;
}

.product-title:hover {
  text-decoration: underline;
}

.price {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin: 2px 0 4px;
}

.product-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.delivery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.delivery svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.carousel-next {
  position: absolute;
  right: -6px;
  top: 168px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #303134;
  color: var(--link);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.carousel-next:hover {
  background: #3c4043;
}

.carousel-next svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ----- Sponsored result ----- */
.sponsored-results {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

.sponsored-results h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 400;
}

.result {
  max-width: 920px;
}

.result-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-site {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favicon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}

.favicon svg {
  width: 28px;
  height: 28px;
}

.result-site-text {
  min-width: 0;
}

.result-site-name {
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.result-url {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cite);
}

.result-url svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.result-title {
  display: block;
  font-size: 20px;
  line-height: 1.3;
  color: var(--link);
  margin: 6px 0 4px;
  text-decoration: none;
}

.result-title:hover {
  text-decoration: underline;
}

.snippet {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 1280px) {
  .store-card {
    flex-basis: 320px;
    width: 320px;
  }
}
