/* Bosh sahifa / kategoriya sahifasi */
/* ---------- Hero ---------- */
.hero-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-6); padding: var(--space-8) 0 var(--space-6); align-items: center; }
@media (max-width: 900px) { .hero-wrap { grid-template-columns: 1fr; padding-top: var(--space-5); } }
.eyebrow { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: var(--space-3); }
.hero-wrap h1 { font-size: 40px; line-height: 1.18; margin-bottom: var(--space-3); }
.hero-wrap h1 .accent { color: var(--brand); }
.hero-wrap p.lede { color: var(--text-2); font-size: 15.5px; max-width: 480px; margin-bottom: var(--space-5); }
@media (max-width: 640px) {
  .hero-wrap { padding: var(--space-4) 0 var(--space-3); gap: var(--space-3); }
  .hero-wrap h1 { font-size: 21px; margin-bottom: 6px; }
  .hero-wrap p.lede { font-size: 12.5px; margin-bottom: var(--space-3); }
}

.hero-search { display: flex; gap: 10px; margin-bottom: var(--space-3); }
.hero-search .header-search { flex: 1; height: 50px; border-radius: var(--radius); max-width: 480px; }
.hero-search .btn { height: 50px; }
.trending-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.trending-row .tag { color: var(--text); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.trending-row .tag:hover { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 640px) {
  .eyebrow { display: none; }
  .hero-search { gap: 8px; margin-bottom: 10px; }
  .hero-search .header-search { height: 40px; }
  .hero-search .btn { height: 40px; width: 40px; padding: 0; border-radius: 10px; }
  .hero-search .btn span { display: none; }
  .trending-row { font-size: 11px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .trending-row .tag { padding: 3px 9px; min-height: 40px; display: inline-flex; align-items: center; }
  .trending-row::-webkit-scrollbar { display: none; }
  .trending-row > span:first-child { flex-shrink: 0; }
}

.hero-illustration { display: flex; align-items: center; justify-content: center; }
.hero-illustration .stack { position: relative; width: 180px; height: 180px; }
.hero-illustration .ic { position: absolute; display: flex; }
.hero-illustration .ic.tg { top: 0; left: 0; z-index: 2; }
.hero-illustration .ic.ig { bottom: 0; right: 0; z-index: 1; }
@media (max-width: 900px) { .hero-illustration { display: none; } }

.feature-row { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
@media (max-width: 760px) { .feature-row { grid-template-columns: 1fr; } }
.feature-card { display: flex; gap: 12px; align-items: flex-start; padding: var(--space-4); }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-card h4 { font-size: 14.5px; margin-bottom: 3px; }
.feature-card p { font-size: 13px; color: var(--text-2); }
@media (max-width: 640px) {
  .feature-row { grid-template-columns: repeat(3,1fr); gap: var(--space-2); margin-bottom: var(--space-5); }
  .feature-card { flex-direction: column; align-items: center; text-align: center; padding: var(--space-3) var(--space-2); gap: 6px; }
  .feature-card p { display: none; }
  .feature-card h4 { font-size: 11.5px; margin: 0; line-height: 1.25; }
  .feature-icon { width: 34px; height: 34px; }
}

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); margin-bottom: var(--space-6); }
.tab-group { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 999px; overflow-x: auto; }
.tab-group a { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: all var(--fast) var(--ease); }
.tab-group a.active { background: var(--brand); color: #fff; }
.tab-group a .icon { width: 15px; height: 15px; }
.type-tabs { display: flex; gap: 4px; }
.type-tabs a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.type-tabs a.active { color: var(--brand); background: var(--brand-soft); }
.sort-select { margin-left: auto; height: 38px; width: auto; margin-bottom: 0; padding: 0 30px 0 12px; font-size: 13px; font-weight: 600; border-radius: var(--radius-sm); background: var(--surface); border-color: var(--border-strong); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
@media (max-width: 640px) {
  .filter-bar { gap: 6px; padding: 10px 0; margin-bottom: var(--space-4); }
  .sort-select { margin-left: 0; height: 40px; font-size: 11.5px; padding: 0 24px 0 10px; }
  .tab-group a, .type-tabs a { padding: 6px 10px; font-size: 12px; min-height: 40px; }
  .type-tabs a { display: inline-flex; align-items: center; }
  .tab-group a .icon { width: 12px; height: 12px; }
}

/* ---------- Main layout: listings + sidebar ---------- */
.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); align-items: start; }
@media (max-width: 980px) { .home-layout { grid-template-columns: 1fr; } .activity-panel { display: none; } }

.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: var(--space-4); }
@media (max-width: 640px) {
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .listing-card { padding: 10px; border-radius: 12px; }
  .lc-username { font-size: 14.5px; gap: 3px; }
  .lc-username-row { margin-bottom: 6px; }
  .lc-label { font-size: 10px; margin-bottom: 1px; }
  .lc-price { font-size: 14px; }
  .lc-meta { margin-top: 8px; padding-top: 8px; font-size: 10.5px; gap: 4px; flex-wrap: wrap; }
  .lc-seller-row { margin-top: 8px; }
  .lc-seller { font-size: 10.5px; gap: 4px; }
  .lc-seller .av { width: 16px; height: 16px; font-size: 8px; }
  .lc-rating { font-size: 10px; }
  .platform-badge { font-size: 10.5px; }
  .pf-icon { transform: scale(.85); }
  .fav-btn { padding: 0; width: 40px; height: 40px; align-items: center; justify-content: center; margin: -10px -10px 0 0; }
  .fav-btn .icon { width: 16px; height: 16px; }
}

.listing-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); color: inherit; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.listing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); color: inherit; }
.lc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.lc-top { padding-right: 30px; min-width: 0; }
.lc-top .platform-badge { min-width: 0; overflow: hidden; }
.lc-top .platform-badge > :last-child, .lc-top .platform-badge { white-space: nowrap; text-overflow: ellipsis; }
.fav-btn { background: none; border: none; padding: 4px; cursor: pointer; color: var(--text-2); display: flex; }
.fav-btn.active { color: var(--danger); }
.fav-btn .icon { width: 19px; height: 19px; }
.fav-btn.active .icon { fill: var(--danger); }
.lc-username-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.lc-username { font-size: 19px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 5px; }
.lc-label { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.lc-price { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.lc-meta-item { display: flex; align-items: center; gap: 4px; }
.lc-timer { color: var(--warning); font-variant-numeric: tabular-nums; }
.lc-seller-row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-3); }
.lc-seller { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.lc-seller .av { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--text-2); }
.lc-rating { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.lc-rating .icon { width: 13px; height: 13px; color: var(--warning); fill: var(--warning); }

/* ---------- Sidebar: recent activity ---------- */
.activity-panel { position: sticky; top: calc(var(--header-h) + 16px); }
.activity-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.activity-panel-head h3 { font-size: 15px; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { flex-shrink: 0; display: flex; }
.activity-text { font-size: 13px; }
.activity-text b { font-weight: 700; }
.activity-sub { font-size: 11.5px; color: var(--text-2); margin-top: 1px; }

.promo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: var(--space-8); padding: var(--space-5); background: var(--brand-soft); border-radius: var(--radius-lg); flex-wrap: wrap; }
.promo-bar-left { display: flex; align-items: center; gap: 14px; }
.promo-bar-icon { display: flex; gap: 6px; flex-shrink: 0; }
.promo-bar h4 { font-size: 15px; margin-bottom: 2px; }
.promo-bar p { font-size: 13px; color: var(--text-2); }
.filter-bar .tab-group { flex: 1 1 100%; max-width: 100%; scrollbar-width: none; }
.filter-bar .tab-group::-webkit-scrollbar { display: none; }
.tab-group a .count { font-size: 11px; opacity: .7; font-weight: 700; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-bottom: var(--space-6); }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-card { display: flex; gap: 12px; align-items: center; padding: var(--space-4); color: inherit; transition: border-color var(--fast) var(--ease); }
.cat-card:hover { border-color: var(--brand); }
.cat-card h4 { font-size: 14.5px; margin-bottom: 2px; }
.cat-card p { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.cat-card .cat-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 9px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cat-grid { gap: 8px; margin-bottom: var(--space-4); }
  .cat-card { padding: 10px; gap: 8px; }
  .cat-card p { display: none; }
  .cat-card h4 { font-size: 12.5px; margin: 0; }
  .cat-card .cat-count { font-size: 10.5px; padding: 1px 7px; }
}

.section-title { font-size: 18px; margin-bottom: var(--space-3); }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
.how-step { padding: var(--space-4); }
.how-step .num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; margin-bottom: 8px; }
.how-step h4 { font-size: 14px; margin-bottom: 4px; }
.how-step p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.lc-category { font-size: 11.5px; color: var(--text-2); font-weight: 600; }

/* Mobil tuzatishlar: bosh sahifa qidiruvi header qidiruvi bilan birga yashirinmasin,
   tablar va teglar siqilmasdan gorizontal suriladi, uzun nomlar kartochkadan chiqmaydi. */
.hero-search .header-search { display: flex; }
.trending-row .tag, .tab-group a, .type-tabs a { flex-shrink: 0; }
.listing-card { min-width: 0; }
.lc-username { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) {
  .type-tabs { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .type-tabs::-webkit-scrollbar { display: none; }
  .type-tabs a { white-space: nowrap; }
}
@media (max-width: 640px) {
  /* "Batafsil" havolalari: tap target kamida 40px */
  #how > p a { display: inline-flex; align-items: center; min-height: 40px; }
}
