/* Homepage only. Loaded after the shared landing styles. */

body.home-v2 {
  --home-bg: #08090d;
  --home-bg-2: #0e1117;
  --home-card: rgba(12, 14, 20, 0.78);
  --home-elev: #171a22;
  --home-red: #e11d2e;
  --home-red-2: #ff4d5a;
  --home-text: #f5f5f7;
  --home-muted: #a0a4b0;
  --home-faint: #777d89;
  --home-line: rgba(255, 255, 255, 0.1);
  --home-line-red: rgba(225, 29, 46, 0.45);
  --home-ok: #22c55e;
  --home-radius: 16px;
  background-color: #08090d;
  background-image: none;
  color: var(--home-text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

body.home-v2::before {
  content: "";
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 0;
  width: 100%;
  aspect-ratio: 1800 / 874;
  transform: translateY(-50%);
  pointer-events: none;
  background-image: url("../assets/hero-background.png?v=1");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 10%,
    #000 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 10%,
    #000 78%,
    transparent 100%
  );
}

body.home-v2 > * {
  position: relative;
  z-index: 1;
}

html:has(body.home-v2) {
  height: auto !important;
  min-height: 100%;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  overscroll-behavior-y: auto;
  background-color: #08090d;
}

body.home-v2.landing-body[data-page="home"],
body.home-v2.landing-body.landing-body--logged-in[data-page="home"] {
  display: block;
  height: auto !important;
  min-height: 100vh;
  max-height: none !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  padding-bottom: 0;
}

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

.home-wrap {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}

body.home-v2 .landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 9, 13, 0.92);
  border-bottom: 1px solid var(--home-line);
  backdrop-filter: blur(16px);
}

body.home-v2 .landing-nav__cart-wrap {
  margin-inline: 2px;
}

body.home-v2 .landing-nav__inner {
  width: min(1360px, calc(100% - 32px));
  gap: 16px;
}

body.home-v2 .landing-brand {
  align-items: center;
  gap: 10px;
}

body.home-v2 .landing-brand__mark {
  width: 34px;
  height: 34px;
  max-width: 34px;
}

body.home-v2 .landing-nav__links {
  overflow: visible;
  flex: 1 1 auto;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

body.home-v2 .landing-nav__actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

body.home-v2 .landing-nav__links > a,
body.home-v2 .site-nav-drop__btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--home-muted);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

body.home-v2 .landing-nav__links > a:hover,
body.home-v2 .site-nav-drop__btn:hover,
body.home-v2 .landing-nav__links > a.is-active,
body.home-v2 .site-nav-drop__btn.is-active {
  color: var(--home-text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transform: none;
}

body.home-v2 .landing-icon-btn,
body.home-v2 .landing-btn-outline,
body.home-v2 #auth-slot .btn {
  border-radius: 999px;
  border: 1px solid var(--home-line);
  background: rgba(17, 20, 27, 0.72);
  color: var(--home-text);
  box-shadow: none;
  min-height: 40px;
}

body.home-v2 .landing-icon-btn:hover,
body.home-v2 .landing-btn-outline:hover,
body.home-v2 #auth-slot .btn:hover {
  border-color: var(--home-line-red);
  background: rgba(225, 29, 46, 0.14);
  box-shadow: none;
  transform: none;
}

body.home-v2 .home-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 240px;
  width: 240px;
  min-width: 160px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--home-line);
  background: rgba(14, 17, 23, 0.72);
  color: var(--home-faint);
}

body.home-v2 .home-nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--home-text);
  font: inherit;
  font-size: 0.86rem;
}

body.home-v2 .home-nav-search input::placeholder {
  color: var(--home-faint);
}

body.home-v2 #siteNavLang {
  min-width: 72px;
  height: 40px;
  padding-inline: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

body.home-v2 .site-nav-drop__menu {
  background: rgba(17, 20, 27, 0.96);
  border-color: var(--home-line);
}

body.home-v2 .site-nav-drop__menu a {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--home-muted);
  justify-content: flex-start;
}

body.home-v2 .site-nav-drop__menu a:hover,
body.home-v2 .site-nav-drop__menu a.is-active {
  color: var(--home-text);
  background: rgba(225, 29, 46, 0.12);
}

/* Hero */
.home-hero {
  position: relative;
  isolation: isolate;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 28px 0 12px;
  background: none;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(8, 9, 13, 0.72) 0%,
    rgba(8, 9, 13, 0.28) 32%,
    rgba(8, 9, 13, 0) 58%
  );
}

.home-hero__layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.home-hero .home-hero__copy {
  width: min(520px, 100%);
  margin: 0;
}

.home-hero__copy {
  width: min(520px, 100%);
}

.home-kicker {
  margin: 0 0 12px;
  color: var(--home-red-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.home-hero h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.15rem, 3.5vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.home-hero h1 span {
  display: block;
  color: var(--home-red);
}

.home-hero__lead {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--home-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.home-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.home-btn--solid {
  background: var(--home-red);
  color: #fff;
  box-shadow: 0 10px 28px rgba(225, 29, 46, 0.28);
}

.home-btn--solid:hover {
  background: var(--home-red-2);
}

.home-btn--ghost {
  background: rgba(17, 20, 27, 0.55);
  color: var(--home-text);
  border-color: var(--home-line);
  backdrop-filter: blur(8px);
}

.home-btn--ghost:hover {
  border-color: var(--home-line-red);
  background: rgba(225, 29, 46, 0.12);
}

.home-btn:focus-visible,
body.home-v2 a:focus-visible,
body.home-v2 button:focus-visible,
body.home-v2 input:focus-visible {
  outline: 2px solid var(--home-red-2);
  outline-offset: 3px;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  width: min(860px, 100%);
  margin-top: 0;
}

.home-stat span {
  display: block;
  color: var(--home-muted);
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
}

.home-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 9, 13, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.home-stat svg {
  flex-shrink: 0;
  color: var(--home-red-2);
}

.home-stat strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.home-stat span {
  display: block;
  color: var(--home-faint);
  font-size: 0.75rem;
}

/* Categories */
.home-veil {
  position: relative;
  isolation: isolate;
  margin-top: 8px;
}

.home-veil::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.45) 8%,
    rgba(0, 0, 0, 0.62) 50%,
    rgba(0, 0, 0, 0.45) 92%,
    rgba(0, 0, 0, 0) 100%
  );
}

.home-veil > * {
  position: relative;
  z-index: 1;
}

.home-section {
  padding: 22px 0 8px;
  background: transparent;
}

.home-section--products {
  padding-top: 48px;
  padding-bottom: 12px;
}

.home-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-section__head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
}

.home-section__head p {
  margin: 6px 0 0;
  color: var(--home-muted);
}

.home-section__head a {
  color: var(--home-text);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.home-section__head a:hover {
  color: var(--home-red-2);
}

.home-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.home-cat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--home-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--home-card);
  border: 1px solid var(--home-line);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-cat:hover {
  transform: translateY(-4px);
  border-color: var(--home-line-red);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.home-cat__media {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: #0b0d12;
}

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

.home-cat__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 16px;
  flex: 1;
}

.home-cat__body h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.25;
}

.home-cat__body p {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.home-cat__arrow {
  flex-shrink: 0;
  color: var(--home-red-2);
  margin-top: 2px;
}

.home-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.home-filter {
  appearance: none;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--home-line);
  background: transparent;
  color: var(--home-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.home-filter.is-active,
.home-filter:hover {
  color: var(--home-text);
  border-color: var(--home-line-red);
  background: rgba(225, 29, 46, 0.12);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.home-grid:has(.home-product:only-child) {
  grid-template-columns: minmax(0, 640px);
}

.home-grid:has(.home-product:only-child) .home-product {
  display: grid;
  grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
  min-height: 220px;
}

.home-grid:has(.home-product:only-child) .home-product__media {
  height: 100%;
  aspect-ratio: auto;
  min-height: 220px;
}

.home-product {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: var(--home-card);
  border: 1px solid var(--home-line);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-product:hover {
  transform: translateY(-4px);
  border-color: var(--home-line-red);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.home-product__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 20%, rgba(225, 29, 46, 0.28), transparent 55%),
    var(--home-elev);
}

.home-product__media img,
.home-product__fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
}

.home-product__fallback {
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--home-red-2);
}

.home-product__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(8, 9, 13, 0.78);
  border: 1px solid var(--home-line-red);
  color: var(--home-red-2);
  font-size: 0.72rem;
  font-weight: 700;
}

.home-product__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  flex: 1;
}

.home-product__type {
  margin: 0;
  color: var(--home-red-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-product h3 {
  margin: 0;
  font-size: 1.08rem;
}

.home-product__desc {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.home-product__price {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.home-product__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.home-product__actions .home-btn {
  flex: 1;
  min-height: 42px;
  padding-inline: 10px;
  font-size: 0.86rem;
}

.home-empty {
  margin: 8px 0 0;
  color: var(--home-muted);
}

/* Existing reviews + trust, pulled back into the page flow */
body.home-v2 .landing-home-reviews,
body.home-v2.landing-body--logged-in .landing-home-reviews {
  display: block;
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: min(1280px, calc(100% - 48px));
  margin: 48px auto 0;
  pointer-events: auto;
  z-index: 1;
}

body.home-v2 .landing-home-reviews__card {
  background: var(--home-card);
  border: 1px solid var(--home-line);
  border-radius: 16px;
  box-shadow: none;
  padding: 22px 24px;
}

body.home-v2 .landing-home-reviews__card.is-empty .landing-home-reviews__quote {
  min-height: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

body.home-v2 .landing-home-reviews__quote[dir="rtl"] {
  text-align: right;
}

body.home-v2 footer.landing-trust-bar,
body.home-v2.landing-body--logged-in footer.landing-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: min(1280px, calc(100% - 48px));
  margin: 18px auto 10px;
  padding: 0;
  gap: 16px;
  z-index: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body.home-v2 .trust-item {
  align-items: flex-start;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border-radius: 16px;
  background: var(--home-card);
  border: 1px solid var(--home-line);
}

body.home-v2 .trust-item__icon {
  width: 40px;
  height: 40px;
}

body.home-v2 .trust-item h3 {
  font-size: 0.98rem;
}

body.home-v2 .trust-item p {
  color: var(--home-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.home-auth {
  padding: 10px 0 8px;
}

body.home-v2 .home-site-footer {
  margin: 0;
  padding: 22px 0 18px;
  background: rgba(0, 0, 0, 0.62);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body.home-v2 .home-auth .login-card {
  margin-inline: auto;
}

body.home-v2 .login-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
}

body.home-v2 .login-card h2 .accent,
body.home-v2 .register-otp-title {
  color: var(--home-red);
}

@media (max-width: 1280px) {
  .home-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  body.home-v2 .landing-nav__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand actions"
      "links links";
    align-items: center;
    row-gap: 8px;
  }

  body.home-v2 .landing-brand {
    grid-area: brand;
  }

  body.home-v2 .landing-nav__actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  body.home-v2 .landing-nav__links {
    grid-area: links;
    justify-content: flex-start;
  }

  body.home-v2 .home-nav-search {
    width: 220px;
    flex-basis: 220px;
  }
}

@media (max-width: 900px) {
  body.home-v2 .landing-nav__links > a,
  body.home-v2 .site-nav-drop__btn {
    width: 100%;
    border-radius: 12px;
    justify-content: center;
  }

  body.home-v2 .home-nav-search {
    width: 100%;
    max-width: none;
    flex: 1 1 180px;
    min-width: min(100%, 220px);
  }

  .home-hero {
    align-items: flex-start;
    padding: 20px 0 12px;
    background: none;
  }

  body.home-v2 footer.landing-trust-bar,
  body.home-v2.landing-body--logged-in footer.landing-trust-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .home-stat span {
    white-space: normal;
  }

  .home-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-grid:has(.home-product:only-child) .home-product {
    grid-template-columns: 1fr;
  }

  .home-product__actions {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .home-wrap,
  body.home-v2 .landing-home-reviews,
  body.home-v2 footer.landing-trust-bar {
    width: min(1280px, calc(100% - 24px));
  }

  .home-hero h1 {
    font-size: 2.05rem;
  }
}

@media (max-width: 560px) {
  body.home-v2 footer.landing-trust-bar,
  body.home-v2.landing-body--logged-in footer.landing-trust-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .home-cats,
  body.home-v2 footer.landing-trust-bar,
  body.home-v2.landing-body--logged-in footer.landing-trust-bar {
    grid-template-columns: 1fr;
  }
}

.home-split__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.home-split .home-grid,
.home-split .home-grid:has(.home-product:only-child) {
  grid-template-columns: 1fr;
}

.home-split .home-product,
.home-split .home-grid:has(.home-product:only-child) .home-product {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 0;
}

.home-split .home-product__media,
.home-split .home-grid:has(.home-product:only-child) .home-product__media {
  min-height: 150px;
  height: 100%;
  aspect-ratio: auto;
}

body.home-v2 .home-split .landing-home-reviews,
body.home-v2.landing-body--logged-in .home-split .landing-home-reviews {
  width: auto;
  margin: 0;
}

@media (max-width: 900px) {
  .home-split__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-cat,
  .home-product,
  .home-btn,
  .home-filter {
    transition: none;
  }

  .home-cat:hover,
  .home-product:hover {
    transform: none;
  }
}
