/* ===== Conversion-focused mobile WebApp refresh ===== */
body.home-page {
  background:
    radial-gradient(circle at top right, var(--app-accent-glow), transparent 35%),
    linear-gradient(180deg, var(--app-bg-start) 0%, var(--app-bg-end) 100%);
  background-repeat: no-repeat;
}

body.home-page .app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  justify-content: center;
  min-height: 50px;
  padding: 6px 16px 5px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: linear-gradient(135deg, #4a2575 0%, #7448b0 100%);
  border-bottom: 0;
  box-shadow: 0 8px 24px rgba(42, 19, 64, 0.16);
}

html.is-tg-fullscreen body.home-page .app-header {
  position: sticky;
  top: 0;
  padding-top: max(44px, calc(var(--tg-top-inset, 84px) - 24px));
  padding-bottom: 5px;
}

html.is-telegram-webapp body.home-page .app-header {
  padding-top: max(44px, calc(max(env(safe-area-inset-top), var(--tg-top-inset, 84px)) - 24px));
}

body.home-page .app-header > div {
  width: 100%;
  align-items: center;
  text-align: center;
}

body.home-page .brand-logo {
  justify-content: center;
  width: 100%;
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  transform: none;
}

body.home-page .brand-logo-img {
  display: block;
  width: min(34vw, 136px);
  height: auto;
  max-height: 67px;
  object-fit: contain;
}

body.home-page .app-header p {
  display: none;
}

body.home-page .content {
  padding: 12px 12px 0;
}

body.home-page .search-card {
  top: 8px;
  z-index: 35;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(42, 19, 64, 0.10);
}

html.is-telegram-webapp body.home-page .search-card {
  top: calc(max(env(safe-area-inset-top), var(--tg-top-inset, 0px)) + 8px);
}

body.home-page .search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
  gap: 6px;
  min-height: 48px;
  padding: 0 4px 0 12px;
  border: 1px solid rgba(91, 46, 138, 0.14);
  border-radius: 18px;
  background: #fff;
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
}

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

body.home-page .search-row input {
  font-size: 14px;
  font-weight: 600;
}

body.home-page .search-row input::placeholder {
  color: #81728f;
}

body.home-page .search-row button {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

body.home-page .search-submit-inline {
  display: inline-flex;
  background: rgba(91, 46, 138, 0.09);
  color: var(--brand-700);
  box-shadow: none;
}

.popular-searches-panel {
  margin: 8px 2px 0;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(91, 46, 138, 0.10);
  box-shadow: 0 8px 20px rgba(42, 19, 64, 0.10);
}

.popular-searches-panel[hidden] {
  display: none !important;
}

.popular-search-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.popular-search-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.popular-search-row::-webkit-scrollbar {
  display: none;
}

.popular-search-chip {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: #f4edfb;
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.popular-search-chip small {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(91, 46, 138, 0.12);
  color: var(--brand-600);
  font-size: 11px;
}

body.home-page #filter-open {
  background: var(--primary-grad);
  color: #fff;
}

body.home-page .filter-summary {
  margin-top: 8px;
}

body.home-page .cards {
  gap: 12px;
  grid-auto-rows: auto;
  scroll-behavior: smooth;
}

body.home-page .card {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 19, 64, 0.10);
}

body.home-page .image-wrap {
  height: clamp(156px, 42vw, 180px);
  border-radius: 22px 22px 0 0;
}

body.home-page .carousel-btn {
  width: 30px;
  height: 34px;
  font-size: 18px;
  background: rgba(42, 19, 64, 0.46);
}

body.home-page .carousel-btn.left { left: 8px; }
body.home-page .carousel-btn.right { right: 8px; }

body.home-page .tag {
  max-width: 46%;
  padding: 6px 10px;
  font-size: 11px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

body.home-page .tag.listing-badge {
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
}

body.home-page .tag.audience.audience-family { background: linear-gradient(135deg, #7a4cc2, #2bbf88); }

body.home-page .dots {
  bottom: 9px;
  gap: 4px;
}

body.home-page .dot {
  width: 5px;
  height: 5px;
}

body.home-page .dot.is-active {
  width: 16px;
}

body.home-page .card-body {
  padding: 10px 12px 12px;
}

body.home-page .card-body h3 {
  margin-bottom: 7px;
  overflow: hidden;
  color: var(--brand-900);
  font-size: 16px;
  line-height: 1.22;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.home-page .info-grid {
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}

body.home-page .info-grid span {
  min-height: 20px;
  overflow: hidden;
  gap: 5px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

body.home-page .info-grid span svg {
  width: 16px;
  height: 16px;
  color: var(--brand-500);
}

body.home-page .description {
  min-height: 34px;
  margin: 7px 0 8px;
  font-size: 12.5px;
  line-height: 1.36;
  -webkit-line-clamp: 2;
}

.cta-row {
  display: grid;
  grid-template-columns: minmax(94px, .72fr) minmax(0, 1.28fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(91, 46, 138, 0.10);
}

.save-btn,
.card-cta {
  min-height: 42px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 850;
}

.save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(91, 46, 138, 0.16);
  background: #fff;
  color: var(--brand-700);
  cursor: pointer;
}

.save-btn svg {
  width: 17px;
  height: 17px;
}

.save-btn.is-saved {
  background: #f4edfb;
  color: var(--brand-800);
}

.save-btn.is-saved svg {
  fill: currentColor;
}

.card-cta {
  width: 100%;
  padding: 0 12px;
  box-shadow: 0 8px 18px rgba(91, 46, 138, 0.18);
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-block,
.skeleton-line,
.skeleton-grid span,
.skeleton-actions span {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #eee7f4 0%, #f8f5fb 45%, #eee7f4 100%);
  background-size: 220% 100%;
  animation: skeleton-pulse 1.1s ease-in-out infinite;
}

.skeleton-line {
  width: 62%;
  height: 18px;
  border-radius: 999px;
}

.skeleton-line.wide {
  width: 78%;
  margin-bottom: 12px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.skeleton-grid span {
  height: 18px;
  border-radius: 999px;
}

.skeleton-actions {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 8px;
  margin-top: 12px;
}

.skeleton-actions span {
  height: 44px;
  border-radius: 15px;
}

@keyframes skeleton-pulse {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

body.home-page .state {
  padding: 24px 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(42, 19, 64, 0.08);
}

.filter-sheet {
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -16px 36px rgba(42, 19, 64, 0.18);
}

.filter-sheet label {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-900);
}

.filter-sheet input,
.filter-sheet select {
  min-height: 46px;
  border-radius: 15px;
}

.bottom-nav {
  gap: 6px;
  padding: 7px 10px max(7px, env(safe-area-inset-bottom, 0px), var(--tg-bottom-inset, 0px));
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -10px 24px rgba(42, 19, 64, 0.10);
}

html.is-telegram-webapp .with-bottom-nav {
  padding-bottom: calc(124px + max(env(safe-area-inset-bottom), var(--tg-bottom-inset, 0px)));
}

html.is-telegram-webapp body.home-page .search-card {
  top: calc(var(--app-header-height, 0px) + 8px);
}

html.is-telegram-webapp body.home-page .search-card.is-hidden {
  transform: translateY(calc(-100% - var(--app-header-height, 0px) - 16px));
}

.bottom-nav .bottom-nav-item {
  min-height: 62px;
  gap: 4px;
  border-radius: 17px;
  font-size: 12px;
}

.bottom-nav .bottom-nav-icon,
.bottom-nav .bottom-nav-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-nav .bottom-nav-item.is-active {
  background: #f0e9fa;
  color: var(--brand-700);
}

@media (max-width: 380px) {
  body.home-page .image-wrap {
    height: 176px;
  }
  .cta-row {
    grid-template-columns: 1fr;
  }
  .save-btn,
  .card-cta {
    width: 100%;
  }
}

/* Home page: let the logo header scroll with content so cards never pass under it. */
body.home-page .app-header,
html.is-tg-fullscreen body.home-page .app-header,
html.is-telegram-webapp body.home-page .app-header {
  position: relative;
  top: auto;
  z-index: 1;
}

html.is-telegram-webapp body.home-page .search-card {
  top: 8px;
}

html.is-telegram-webapp body.home-page .search-card.is-hidden {
  transform: translateY(calc(-100% - 16px));
}

/* ===== SherikTop marketplace refresh v56 ===== */
:root {
  --market-bg: #f7f5fa;
  --market-card: #ffffff;
  --market-ink: #241335;
  --market-muted: #7d708a;
  --market-purple: #6d3bb1;
  --market-purple-2: #8b55cf;
  --market-purple-soft: #f1e9fb;
}

body.home-page {
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 85, 207, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--market-bg) 42%, #f4f1f8 100%) !important;
  color: var(--market-ink);
}

body.home-page .app-shell {
  max-width: 620px;
}

body.home-page .app-header,
html.is-tg-fullscreen body.home-page .app-header,
html.is-telegram-webapp body.home-page .app-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(82px, auto) 1fr minmax(48px, auto);
  min-height: 78px;
  align-items: center;
  gap: 10px;
  padding: calc(max(env(safe-area-inset-top), var(--tg-top-inset, 0px)) + 8px) 16px 12px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(109, 59, 177, 0.08);
  box-shadow: none;
}

html.is-tg-fullscreen body.home-page .app-header {
  padding-top: calc(max(env(safe-area-inset-top), var(--tg-top-inset, 0px)) + 8px);
}

body.home-page .app-header > div {
  align-items: center;
  justify-self: center;
  min-width: 0;
}

body.home-page .brand-logo {
  height: 40px;
  justify-content: center;
}

body.home-page .brand-logo-img {
  width: min(132px, 34vw);
  height: auto;
  filter: brightness(0) saturate(100%) invert(20%) sepia(48%) saturate(1837%) hue-rotate(247deg) brightness(88%) contrast(92%);
}

.webapp-chrome-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: #f0e8f8;
  color: var(--market-purple);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.webapp-chrome-btn svg {
  width: 18px;
  height: 18px;
}

.webapp-close-hint {
  justify-self: start;
  padding: 0 12px 0 10px;
}

.webapp-menu-hint {
  justify-self: end;
  width: 42px;
  padding: 0;
}

body.home-page .content {
  padding: 12px 14px 0;
}

body.home-page .search-card,
html.is-telegram-webapp body.home-page .search-card {
  position: sticky;
  top: 8px;
  z-index: 28;
  padding: 8px;
  margin: 0 0 14px;
  border: 1px solid rgba(109, 59, 177, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(45, 24, 66, 0.08);
}

body.home-page .search-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 44px 46px;
  min-height: 54px;
  align-items: center;
  gap: 6px;
  padding: 0 5px 0 15px;
  border: 1px solid rgba(109, 59, 177, 0.10);
  border-radius: 22px;
  background: #fff;
}

.search-leading-icon {
  display: inline-flex;
  color: var(--market-purple);
}

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

body.home-page .search-row input {
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--market-ink);
  font-size: 14px;
  font-weight: 700;
}

body.home-page .search-row input::placeholder {
  color: #8d829b;
}

body.home-page .search-row button {
  width: 34px;
  height: 34px;
  border-radius: 16px;
}

body.home-page .search-submit-inline {
  display: none;
}

body.home-page #filter-open {
  background: linear-gradient(135deg, var(--market-purple), var(--market-purple-2));
  color: #fff;
}

body.home-page .cards {
  display: grid;
  gap: 14px;
}

body.home-page .card {
  overflow: hidden;
  border: 1px solid rgba(109, 59, 177, 0.08);
  border-radius: 26px;
  background: var(--market-card);
  box-shadow: 0 14px 34px rgba(34, 18, 55, 0.08);
}

body.home-page .card-main {
  display: grid;
  grid-template-columns: minmax(126px, 39%) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 10px 0;
}

body.home-page .image-wrap.compact-image {
  position: relative;
  height: 188px;
  min-height: 188px;
  overflow: hidden;
  border-radius: 22px;
  background: #ebe5f2;
}

body.home-page .listing-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.home-page .image-wrap.compact-image .tag.audience {
  top: 9px;
  left: 9px;
  right: auto;
  max-width: calc(100% - 18px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(45, 24, 66, 0.18);
}

body.home-page .image-wrap.compact-image .audience-girls {
  background: linear-gradient(135deg, #c76ce2, #a84dd1);
}

body.home-page .image-wrap.compact-image .audience-boys {
  background: linear-gradient(135deg, #5a32a8, #7c46c8);
}

body.home-page .image-wrap.compact-image .audience-family {
  background: linear-gradient(135deg, #2abf88, #6d3bb1);
}

body.home-page .image-wrap.compact-image .audience-all {
  background: linear-gradient(135deg, #6f647d, #8f7ea3);
}

.image-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--market-purple);
  box-shadow: 0 8px 18px rgba(31, 18, 48, 0.16);
}

.image-fav-btn svg {
  width: 17px;
  height: 17px;
}

.image-fav-btn.is-saved svg {
  fill: currentColor;
}

.photo-count {
  position: absolute;
  left: 9px;
  bottom: 9px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(31, 18, 48, 0.56);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.photo-count svg {
  width: 15px;
  height: 15px;
}

body.home-page .card-body {
  min-width: 0;
  padding: 2px 2px 0 0;
}

.card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-bottom: 7px;
}

body.home-page .card-body h3 {
  margin: 0;
  overflow: hidden;
  color: var(--market-ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.22;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.price-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--market-purple-soft);
  color: var(--market-purple);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

.location-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  color: #5e506f;
  font-size: 12px;
  font-weight: 800;
}

.location-row svg {
  width: 15px;
  height: 15px;
  color: var(--market-purple);
}

.location-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.home-page .info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

body.home-page .info-chips span {
  display: inline-flex;
  min-height: 26px;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f6f2fa;
  color: #554361;
  font-size: 11.5px;
  font-weight: 850;
}

body.home-page .info-chips svg {
  width: 14px;
  height: 14px;
  color: var(--market-purple);
}

body.home-page .description {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: #685b75;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.36;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

body.home-page .cta-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin: 11px 10px 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(109, 59, 177, 0.08);
}

body.home-page .save-btn,
body.home-page .card-cta {
  min-height: 46px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 950;
}

body.home-page .save-btn {
  border: 1px solid rgba(109, 59, 177, 0.13);
  background: #fff;
  color: var(--market-purple);
}

body.home-page .card-cta {
  background: linear-gradient(135deg, var(--market-purple), var(--market-purple-2));
  color: #fff;
  box-shadow: 0 12px 24px rgba(109, 59, 177, 0.22);
}

body.home-page .bottom-nav {
  left: 12px;
  right: 12px;
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  width: auto;
  max-width: 596px;
  margin: 0 auto;
  transform: none;
  padding: 8px;
  border: 1px solid rgba(109, 59, 177, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 32px rgba(34, 18, 55, 0.12);
}

body.home-page .bottom-nav .bottom-nav-item {
  min-height: 62px;
  border-radius: 22px;
  color: #6d617b;
  font-size: 12px;
  font-weight: 800;
}

body.home-page .bottom-nav .bottom-nav-item.is-active {
  background: #f0e8fb;
  color: var(--market-purple);
}

body.home-page .bottom-nav .bottom-nav-icon,
body.home-page .bottom-nav .bottom-nav-icon svg {
  width: 24px;
  height: 24px;
}

/* Telegram WebApp chrome already provides close/menu controls.
   Keep the app header focused on the centered logo and prevent the
   search panel from floating under Telegram's native top controls. */
body.home-page .webapp-chrome-btn {
  display: none !important;
}

body.home-page .app-header,
html.is-tg-fullscreen body.home-page .app-header,
html.is-telegram-webapp body.home-page .app-header {
  grid-template-columns: 1fr !important;
  justify-items: center;
  min-height: 82px;
  padding-left: 16px;
  padding-right: 16px;
}

body.home-page .brand-logo,
body.home-page .brand-logo-img {
  max-width: min(150px, 38vw);
}

body.home-page .search-card,
html.is-telegram-webapp body.home-page .search-card,
html.is-tg-fullscreen body.home-page .search-card {
  position: relative !important;
  top: auto !important;
  z-index: 3;
  transform: none !important;
}

body.home-page .search-card.is-hidden,
html.is-telegram-webapp body.home-page .search-card.is-hidden,
html.is-tg-fullscreen body.home-page .search-card.is-hidden {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

body.home-page .search-row {
  grid-template-columns: 24px minmax(0, 1fr) 46px;
}

body.home-page .card-main .description {
  display: none !important;
}

