/* Homepage — Shopify-style industrial storefront */

.home-hero {
  position: relative;
  min-height: 0;
  aspect-ratio: 1024 / 559;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
}

.home-hero__media {
  position: absolute;
  inset: 0;
}

.home-hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(14, 18, 24, 0.35) 0%, transparent 28%);
}

.home-hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, var(--container));
  margin: 0 auto 0 max(20px, calc((100% - var(--container)) / 2));
  padding: 0 0 28px;
  max-width: 720px;
  animation: heroRise 0.9s var(--ease) both;
}

/* 促销图已含标题文案，避免叠字；保留 SEO 标题与按钮 */
.home-hero__brand,
.home-hero h1,
.home-hero__lead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Trust */
.home-trust {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.home-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.home-trust__item {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.home-trust__item:last-child {
  border-right: 0;
}

.home-trust__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.home-trust__item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* Shared helpers */
.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.text-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.section-title--sm {
  font-size: clamp(24px, 3vw, 32px);
}

/* Collections */
.home-collections {
  padding: 80px 0 24px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.collection-card {
  position: relative;
  display: block;
  min-height: 300px;
  overflow: hidden;
  background: var(--ink-2);
  color: #fff;
}

.collection-card__media,
.collection-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-card__media img {
  opacity: 0.78;
  transition: transform 0.7s var(--ease), opacity 0.35s;
}

.collection-card:hover .collection-card__media img {
  transform: scale(1.05);
  opacity: 0.58;
}

.collection-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 24px;
  background: linear-gradient(0deg, rgba(14, 18, 24, 0.92), transparent);
}

.collection-card__body h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.collection-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.collection-card__link {
  font-weight: 600;
  color: #fff;
}

.collection-card--wide {
  grid-column: span 2;
  min-height: 340px;
}

/* Hot sale banner — 与下方分类共用 .collection-row__banner（含深色底/黑边） */
.home-hot-banner {
  line-height: 0;
  background: #0e1218;
}

.home-hot-banner .collection-row__banner {
  margin-bottom: 0;
}

/* Shopify-like product card */
.home-featured {
  padding: 72px 0 64px;
  background: var(--surface-2);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 18px;
}

.product-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.shop-card {
  display: flex;
  flex-direction: column;
}

.shop-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
}

.shop-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.shop-card:hover .shop-card__media img {
  transform: scale(1.04);
}

.shop-card__quick {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.shop-card:hover .shop-card__quick {
  opacity: 1;
  transform: translateY(0);
}

.shop-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 2px 0;
}

.shop-card__sku {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-card__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.shop-card__title a:hover {
  color: var(--accent);
}

.shop-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.shop-card__row .price {
  font-size: 16px;
}

.shop-card__cart {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.shop-card__cart svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shop-card__cart:hover,
.shop-card__cart.is-added {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Promo banners */
.home-promos {
  padding: 24px 0 16px;
  background: var(--surface-2);
}

.home-promos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.promo-banner {
  position: relative;
  display: block;
  min-height: 360px;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
}

.promo-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.7s var(--ease), opacity 0.35s;
}

.promo-banner:hover img {
  transform: scale(1.05);
  opacity: 0.4;
}

.promo-banner__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 36px;
  background: linear-gradient(0deg, rgba(14, 18, 24, 0.78), transparent 55%);
}

.promo-banner__content span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}

.promo-banner__content strong {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
}

.promo-banner__content em {
  font-style: normal;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 18px;
}

.promo-banner__cta {
  font-size: 14px;
  font-weight: 600;
}

/* Collection rows */
.home-rows {
  padding: 24px 0 24px;
}

.collection-row {
  padding: 0 0 56px;
  border-bottom: 1px solid var(--line);
}

.collection-row:last-child {
  border-bottom: 0;
  padding-bottom: 40px;
}

.collection-row__banner {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 36px;
  overflow: hidden;
  background: #0e1218;
  line-height: 0;
}

.collection-row__banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: scale(1);
  transition: transform 0.7s var(--ease), filter 0.45s ease;
  will-change: transform;
}

.collection-row__banner-shade {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 24, 0);
  transition: background 0.45s ease;
  pointer-events: none;
}

.collection-row__banner-cta {
  position: absolute;
  left: max(20px, calc((100% - var(--container)) / 2 + 20px));
  bottom: 28px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(14, 18, 24, 0.28);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.35s ease, border-color 0.35s ease;
}

.collection-row__banner-cta em {
  font-style: normal;
  transition: transform 0.35s var(--ease);
}

.collection-row__banner:hover img {
  transform: scale(1.03);
  filter: brightness(1.04);
}

.collection-row__banner:hover .collection-row__banner-shade {
  background: rgba(14, 18, 24, 0.12);
}

.collection-row__banner:hover .collection-row__banner-cta {
  opacity: 1;
  transform: translateY(0);
  background: rgba(14, 18, 24, 0.45);
  border-color: rgba(255, 255, 255, 0.85);
}

.collection-row__banner:hover .collection-row__banner-cta em {
  transform: translateX(4px);
}

.collection-row__banner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.collection-row__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

/* About */
.home-about {
  padding: 88px 0;
  background: var(--surface);
}

.home-about__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.home-about__media {
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 5 / 4;
}

.home-about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-about__text p {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 34em;
}

.home-about__points {
  margin: 0 0 32px;
  display: grid;
  gap: 12px;
}

.home-about__points li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-2);
}

.home-about__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* Journal */
.home-journal {
  padding: 72px 0 88px;
  background: var(--surface-2);
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.journal-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform 0.35s var(--ease);
}

.journal-card:hover {
  transform: translateY(-4px);
}

.journal-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff;
}

.journal-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.journal-card:hover .journal-card__media img {
  transform: scale(1.04);
}

.journal-card__body {
  padding: 18px 2px 0;
}

.journal-card__body time {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.journal-card__body h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 10px;
}

.journal-card__body p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA */
.home-cta {
  padding: 80px 0;
  background:
    linear-gradient(120deg, rgba(14, 18, 24, 0.9), rgba(28, 36, 48, 0.78)),
    url("../images/gct.jpg") center/cover no-repeat;
  color: #fff;
}

.home-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.home-cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
}

.home-cta p {
  margin: 0;
  max-width: 480px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .collection-card--wide {
    grid-column: span 2;
  }

  .home-about__grid {
    gap: 36px;
  }
}

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

  .home-trust__item:nth-child(2) {
    border-right: 0;
  }

  .home-trust__item:nth-child(1),
  .home-trust__item:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .home-promos__grid,
  .home-about__grid,
  .journal-grid,
  .product-grid--3 {
    grid-template-columns: 1fr;
  }

  .home-about__grid {
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .home-hero {
    aspect-ratio: 819 / 1024;
    align-items: flex-end;
  }

  .home-hero__content {
    margin-left: auto;
    margin-right: auto;
    padding: 0 0 20px;
  }

  .collection-grid,
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .collection-card,
  .collection-card--wide {
    grid-column: span 1;
    min-height: 220px;
  }

  .collection-row__head,
  .section-head--row,
  .home-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .collection-row__banner {
    margin-bottom: 24px;
    min-height: 180px;
    aspect-ratio: 2 / 1;
    background: #0e1218;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .collection-row__banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
  }

  .collection-row__banner:hover img {
    transform: none;
    filter: none;
  }

  .collection-row__banner-cta {
    left: 16px;
    bottom: 16px;
    opacity: 1;
    transform: none;
    font-size: 13px;
    padding: 10px 16px;
  }

  .home-hot-banner .collection-row__banner {
    margin-bottom: 0;
  }

  .promo-banner,
  .promo-banner__content {
    min-height: 280px;
  }

  .shop-card__quick {
    opacity: 1;
    transform: none;
    font-size: 0;
    background: transparent;
    pointer-events: none;
  }

  .home-collections,
  .home-featured,
  .home-about,
  .home-journal {
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

@media (max-width: 480px) {
  .home-trust__grid,
  .product-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .home-trust__item {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }

  .home-trust__item:last-child {
    border-bottom: 0;
  }

  .collection-row__banner {
    min-height: 200px;
    aspect-ratio: 16 / 9;
  }
}
