/* ============================================================
   WebDealz - Homepage layout  (assets/css/wd-home.css)
   "Modern marketplace" homepage. Every rule is scoped to
   body.home so it can never leak into other pages, and so it
   (0,2,0 +) beats Tailwind's runtime utilities that are injected
   last in <head>.

   Palette: blue #0866F5 . navy #0B1F42 . yellow #FFB800 . orange #FF6B00
   ============================================================ */

body.home { --hm-radius: 18px; }

/* ---------------- HERO ---------------- */
body.home .hm-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.6rem, 5vw, 4.8rem) 0 clamp(2.2rem, 4vw, 3.6rem);
  background:
    radial-gradient(58% 78% at 3% -12%, rgba(8, 102, 245, .14), transparent 60%),
    radial-gradient(46% 60% at 103% 2%, rgba(255, 107, 0, .10), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  border-bottom: 1px solid var(--wd-border);
}
body.home .hm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(11, 31, 66, .055) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 72%);
}
body.home .hm-hero > .container { position: relative; z-index: 1; }
body.home .hm-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
}

/* copy column */
body.home .hm-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--wd-navy);
  background: #fff;
  border: 1px solid var(--wd-border);
  box-shadow: var(--wd-shadow-xs);
  padding: .4rem .85rem;
  border-radius: 999px;
}
body.home .hm-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-primary); box-shadow: 0 0 0 3px var(--wd-primary-soft); }
body.home .hm-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.035em;
  margin: 1.05rem 0 0;
}
body.home .hm-hero h1 .hl {
  background: linear-gradient(120deg, #0866F5 0%, #0B1F42 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body.home .hm-lead { color: var(--wd-muted); font-size: clamp(1rem, 1.4vw, 1.12rem); max-width: 560px; margin: 1.1rem 0 1.7rem; }

/* search */
body.home .hm-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .3rem;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--wd-border);
  border-radius: 12px;
  padding: .25rem;
  box-shadow: 0 10px 30px -18px rgba(11, 31, 66, .4);
}
body.home .hm-search > .bi-search { position: absolute; left: .8rem; color: var(--wd-muted); font-size: .9rem; pointer-events: none; z-index: 2; }
body.home .hm-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none; padding: .65rem .7rem .65rem 2.4rem; font-size: .88rem; color: var(--wd-heading); }
body.home .hm-search input::placeholder { color: var(--wd-muted); }
body.home .hm-search .btn { flex: none; padding: .6rem .9rem; font-size: .85rem; border-radius: 10px; min-width: 80px; }

/* popular chips */
body.home .hm-popular { margin-top: 1rem; font-size: .82rem; color: var(--wd-muted); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
body.home .hm-popular a { color: var(--wd-navy); background: #fff; border: 1px solid var(--wd-border); padding: .26rem .72rem; border-radius: 999px; font-weight: 600; font-size: .8rem; transition: .16s; }
body.home .hm-popular a:hover { border-color: var(--wd-primary); color: var(--wd-primary); background: var(--wd-primary-soft); }

/* trust row */
body.home .hm-trust { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; margin-top: 1.6rem; }
body.home .hm-rating { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; font-weight: 600; color: var(--wd-text); }
body.home .hm-rating .stars { font-size: .82rem; letter-spacing: .06em; }
body.home .hm-rating strong { color: var(--wd-heading); }
body.home .hm-trust .t { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 600; color: var(--wd-text); }
body.home .hm-trust .t i { color: var(--wd-green); }

/* hero panel */
body.home .hm-panel { position: relative; background: #fff; border: 1px solid var(--wd-border); border-radius: 22px; padding: 1.05rem; box-shadow: 0 34px 80px -34px rgba(11, 31, 66, .45); }
body.home .hm-panel-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .15rem .3rem .85rem; }
body.home .hm-live { display: inline-flex; align-items: center; gap: .5rem; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--wd-heading); }
body.home .hm-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-green); box-shadow: 0 0 0 3px rgba(18, 161, 80, .18); animation: hmBlink 2.2s ease-in-out infinite; }
@keyframes hmBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
body.home .hm-panel-count { font-size: .74rem; font-weight: 800; color: var(--wd-primary); background: var(--wd-primary-soft); border-radius: 999px; padding: .26rem .7rem; white-space: nowrap; }

body.home .hm-feature { display: block; border: 1px solid var(--wd-border); border-radius: 16px; overflow: hidden; background: #fff; transition: .2s; }
body.home .hm-feature:hover { border-color: var(--wd-primary); box-shadow: var(--wd-shadow-md); transform: translateY(-2px); }
body.home .hm-feature-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--wd-bg-soft); }
body.home .hm-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
body.home .hm-feature:hover .hm-feature-media img { transform: scale(1.05); }
body.home .hm-feature-media .badge-type { position: absolute; top: .7rem; left: .7rem; }
body.home .hm-feature-body { padding: 1rem 1.1rem 1.1rem; }
body.home .hm-feature-body .cat { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--wd-primary); }
body.home .hm-feature-body h3 { font-size: 1.05rem; line-height: 1.35; margin: .3rem 0 .55rem; }
body.home .hm-feature-body h3 a { color: var(--wd-heading); }
body.home .hm-feature-body h3 a:hover { color: var(--wd-primary); }
body.home .hm-feature-stats { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .78rem; color: var(--wd-muted); margin-bottom: .85rem; }
body.home .hm-feature-stats i { color: var(--wd-primary); margin-right: .25rem; }
body.home .hm-feature-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--wd-border); }
body.home .hm-feature-price { font-size: 1.25rem; font-weight: 800; color: var(--wd-heading); line-height: 1; }
body.home .hm-feature-price small { display: block; font-size: .68rem; font-weight: 600; color: var(--wd-muted); margin-top: .2rem; }
body.home .hm-panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-top: .9rem; }
body.home .hm-panel-stat { background: var(--wd-bg-soft); border: 1px solid var(--wd-border); border-radius: 12px; padding: .6rem .5rem; text-align: center; }
body.home .hm-panel-stat strong { display: block; font-size: 1.05rem; font-weight: 800; color: var(--wd-heading); line-height: 1.1; }
body.home .hm-panel-stat span { font-size: .7rem; color: var(--wd-muted); font-weight: 600; }

/* ---------------- BRAND STRIP ---------------- */
body.home .hm-brands { padding: 1.5rem 0 .3rem; }
body.home .hm-brands p { text-align: center; color: var(--wd-muted); font-size: .84rem; margin-bottom: 1rem; }
body.home .hm-brands p strong { color: var(--wd-heading); }

/* ---------------- STATS ---------------- */
body.home .hm-stats { padding: clamp(1.3rem, 2.4vw, 1.9rem) 0; background: linear-gradient(180deg, #fff, #f5f8ff); border-top: 1px solid var(--wd-border); border-bottom: 1px solid var(--wd-border); }
body.home .hm-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
body.home .hm-stat { display: flex; align-items: center; gap: .85rem; }
body.home .hm-stat .ico { width: 54px; height: 54px; border-radius: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
body.home .hm-stat .ico.blue { background: var(--wd-primary-soft); color: var(--wd-primary); }
body.home .hm-stat .ico.orange { background: var(--wd-orange-soft); color: var(--wd-orange); }
body.home .hm-stat .ico.green { background: rgba(18, 161, 80, .12); color: var(--wd-green); }
body.home .hm-stat .ico.yellow { background: var(--wd-yellow-soft); color: var(--wd-yellow-dark); }
body.home .hm-stat strong { display: block; font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 800; color: var(--wd-heading); line-height: 1; }
body.home .hm-stat span { color: var(--wd-muted); font-size: .82rem; font-weight: 600; }

/* ---------------- SECTION SHELL + HEADS ---------------- */
body.home .hm-sec { padding: clamp(2.8rem, 4.6vw, 4.4rem) 0; }
body.home .hm-sec.soft { background: var(--wd-bg-soft); }
body.home .hm-sec.tight { padding: clamp(1.6rem, 3vw, 2.4rem) 0; }
body.home .hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.9rem; }
body.home .hm-head .hm-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--wd-primary); background: var(--wd-primary-soft); padding: .3rem .75rem; border-radius: 999px; }
body.home .hm-head h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin: .55rem 0 .3rem; letter-spacing: -.02em; }
body.home .hm-head .hm-sub { color: var(--wd-muted); margin: 0; max-width: 680px; font-size: .95rem; }
body.home .hm-more { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .88rem; color: var(--wd-navy); background: #fff; border: 1px solid var(--wd-border); padding: .55rem 1.05rem; border-radius: 999px; transition: .18s; white-space: nowrap; }
body.home .hm-more:hover { border-color: var(--wd-primary); color: var(--wd-primary); background: var(--wd-primary-soft); transform: translateX(2px); }
body.home .hm-head.ctr { display: block; text-align: center; }
body.home .hm-head.ctr .hm-sub { margin-left: auto; margin-right: auto; }

/* ---------------- CATEGORY TILES ---------------- */
body.home .hm-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
body.home .hm-cat { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; background: #fff; border: 1px solid var(--wd-border); border-radius: 16px; color: var(--wd-navy); transition: .2s; overflow: hidden; }
body.home .hm-cat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hm-accent, var(--wd-primary)); opacity: 0; transition: opacity .2s; }
body.home .hm-cat:hover { transform: translateY(-4px); box-shadow: var(--wd-shadow-md); border-color: var(--wd-border-strong); color: var(--wd-navy); }
body.home .hm-cat:hover::after { opacity: 1; }
body.home .hm-cat .ico { width: 52px; height: 52px; border-radius: 15px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--wd-primary-soft); color: var(--wd-primary); }
body.home .hm-cat .txt { min-width: 0; }
body.home .hm-cat .txt strong { display: block; font-size: 1.04rem; line-height: 1.2; }
body.home .hm-cat .txt small { color: var(--wd-muted); font-weight: 600; font-size: .8rem; }
body.home .hm-cat .arrow { margin-left: auto; color: var(--wd-muted); transition: .2s; flex: none; }
body.home .hm-cat:hover .arrow { color: var(--wd-primary); transform: translateX(3px); }
body.home .hm-cat.sell { background: var(--wd-grad-orange); border-color: transparent; color: #fff; --hm-accent: #fff; }
body.home .hm-cat.sell .ico { background: rgba(255, 255, 255, .2); color: #fff; }
body.home .hm-cat.sell .txt small { color: rgba(255, 255, 255, .88); }
body.home .hm-cat.sell .arrow { color: rgba(255, 255, 255, .9); }
body.home .hm-cat.sell:hover .arrow { color: #fff; }

/* ---------------- SHARED CARD POLISH (home only) ---------------- */
body.home .listing-card { border-radius: 16px; box-shadow: 0 1px 2px rgba(11, 31, 66, .04); }
body.home .listing-card:hover { box-shadow: var(--wd-shadow-md); }
body.home .listing-body { padding: 1.05rem 1.15rem 1.15rem; }
body.home .bt-wrap { border-radius: 16px; box-shadow: 0 1px 2px rgba(11, 31, 66, .04); }
body.home .bt-table thead th { padding-top: .85rem; padding-bottom: .85rem; }
body.home .sold-card,
body.home .blog-card,
body.home .story-card,
body.home .wd-step-illu,
body.home .trust-card { border-radius: 16px; }
body.home .wd-cta { border-radius: 22px; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1199.98px) {
  body.home .hm-hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  body.home .hm-panel { max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 991.98px) {
  body.home .hm-cats { grid-template-columns: repeat(2, 1fr); }
  body.home .hm-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}
@media (max-width: 575.98px) {
  body.home .hm-search { flex-wrap: wrap; }
  body.home .hm-search input { flex: 1 1 100%; }
  body.home .hm-search .btn { width: 100%; }
  body.home .hm-cats { grid-template-columns: 1fr; }
  body.home .hm-head { margin-bottom: 1.4rem; }
}

@media print, (prefers-reduced-motion: reduce) {
  body.home .hm-live .dot { animation: none !important; }
}
