/* ============================================================
   LX-CARDS — GoldMax Premium Product Card System
   Design: Refined Minimalist B2B Luxury (Apple × Linear)
   ============================================================ */

.lx-card, .lx-card * { box-sizing: border-box; }

/* ---------- Outer wrapper (equal row height + stagger in) ---------- */
.lx-card-wrap {
  min-height: 500px;
  opacity: 0;
  transform: translateY(16px);
  animation: lxCardIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  will-change: transform, opacity;
}

@keyframes lxCardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Core card shell ---------- */
.lx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
  border: 1px solid #E5E5EA;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  isolation: isolate;
}

.lx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow:
    inset 0 0 0 1px rgba(10, 77, 184, 0.06),
    inset 0 -40px 80px -40px rgba(10, 77, 184, 0.04);
}

.lx-card:hover {
  border-color: #0A4DB8;
  transform: translateY(-4px);
  box-shadow:
    0 1px 2px rgba(29, 29, 31, 0.03),
    0 8px 24px rgba(29, 29, 31, 0.06),
    0 24px 48px -16px rgba(10, 77, 184, 0.10);
}
.lx-card:hover::before { opacity: 1; }

.lx-card:active { transform: translateY(-2px) scale(0.996); }

/* ---------- Image area (strict 1:1, Linear B2B mandate) ---------- */
.lx-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E5EA;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lx-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(10, 77, 184, 0.025) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}
.lx-card:hover .lx-card-media::after { opacity: 1; }

.lx-card-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868B;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

.lx-card-img {
  position: relative;
  z-index: 1;
  max-width: 88%;
  max-height: 88%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.2s ease;
  filter: hue-rotate(-14deg) saturate(1.15) brightness(1.04) contrast(1.02);
}
.lx-card:hover .lx-card-img { transform: scale(1.045); }

.lx-card-img-fallback {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
  background: #FFFFFF;
}
.lx-card-img-fallback .fallback-icon { font-size: 1.5rem; opacity: 0.6; }
.lx-card-img-fallback .fallback-text {
  font-size: 0.68rem;
  color: #86868B;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

/* ---------- Content body ---------- */
.lx-card-body {
  padding: 1.05rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
}

/* Badge row */
.lx-card-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 0.55rem;
  padding: 0.22rem 0.62rem;
  border-radius: 8px;
  border: 1px solid #D5D9E0;
  background: #FFFFFF;
  color: #1D1D1F;
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Model / SKU */
.lx-card-model {
  margin: 0 0 0.22rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.018em;
  line-height: 1.25;
  color: #1D1D1F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pill row: line / MOQ / sample */
.lx-card-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin: 0 0 0.6rem 0;
}
.lx-card-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 7px;
  background: #F5F5F7;
  color: #6E6E73;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

/* Subtitle */
.lx-card-subtitle {
  margin: 0 0 0.72rem 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #6E6E73;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spec pills (key-value, 2 max) */
.lx-card-specs {
  margin: 0 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.lx-card-spec {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.6rem;
  border-radius: 9px;
  background: #FFFFFF;
  border: 1px solid #D5D9E0;
  color: #1D1D1F;
  font-size: 0.68rem;
  font-weight: 550;
  line-height: 1.35;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lx-card:hover .lx-card-spec {
  border-color: #C9CFD8;
}
.lx-card-spec-label {
  opacity: 0.55;
  margin-right: 0.24rem;
  font-size: 0.62rem;
  font-weight: 550;
}
.lx-card-spec-value { font-weight: 650; }

/* Action row */
.lx-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding-top: 0.1rem;
}

/* Spec button: 1px outlined (secondary) */
.lx-btn-spec {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #86868B;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.38rem 0.72rem;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #D5D9E0;
  transition: all 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}
.lx-btn-spec svg { flex-shrink: 0; }
.lx-btn-spec:hover {
  border-color: #0A4DB8;
  color: #0A4DB8;
  background: #F5F8FC;
}
.lx-btn-spec:active { transform: scale(0.97); }

/* Quote button: solid brand (primary) */
.lx-btn-quote {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 0.4rem 0.82rem;
  border-radius: 8px;
  background: #1D1D1F;
  border: 1px solid #1D1D1F;
  transition: all 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: -0.005em;
  font-family: inherit;
}
.lx-btn-quote:hover {
  background: #0A4DB8;
  border-color: #0A4DB8;
  box-shadow: 0 4px 12px rgba(10, 77, 184, 0.22);
}
.lx-btn-quote:active { transform: scale(0.97); }

/* ============================================================
   RELATED PRODUCTS (product.html) — share tokens, smaller scale
   ============================================================ */
.lx-rel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 991px) {
  .lx-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lx-rel-grid { grid-template-columns: 1fr; }
}

.lx-rel-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: #FFFFFF;
  border: 1px solid #E5E5EA;
  border-radius: 14px;
  overflow: hidden;
  transition:
    border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  isolation: isolate;
}
.lx-rel-card:hover {
  border-color: #0A4DB8;
  transform: translateY(-3px);
  box-shadow:
    0 1px 2px rgba(29, 29, 31, 0.03),
    0 10px 26px -14px rgba(10, 77, 184, 0.18);
}

.lx-rel-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E5EA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lx-rel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(10, 77, 184, 0.025) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.lx-rel-card:hover .lx-rel-media::after { opacity: 1; }

.lx-rel-img {
  max-width: 88%;
  max-height: 88%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transform: scale(1);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  filter: hue-rotate(-14deg) saturate(1.15) brightness(1.04) contrast(1.02);
}
.lx-rel-card:hover .lx-rel-img { transform: scale(1.04); }

.lx-rel-body {
  padding: 0.95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lx-rel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.lx-rel-model {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-weight: 650;
  font-size: 0.9rem;
  color: #1D1D1F;
  letter-spacing: -0.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lx-rel-linebadge {
  flex-shrink: 0;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.16rem 0.52rem;
  border-radius: 6px;
  background: #F5F5F7;
  color: #86868B;
  font-weight: 700;
}

.lx-rel-tagline {
  font-size: 0.78rem;
  color: #6E6E73;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lx-rel-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.1rem;
}
.lx-rel-spec {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.56rem;
  border-radius: 7px;
  border: 1px solid #E5E5EA;
  background: #FFFFFF;
  font-size: 0.68rem;
  color: #1D1D1F;
  font-weight: 600;
  transition: border-color 0.2s ease;
}
.lx-rel-card:hover .lx-rel-spec { border-color: #D5D9E0; }

.lx-rel-cta {
  margin-top: auto;
  padding-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lx-rel-view {
  font-size: 0.78rem;
  font-weight: 650;
  color: #1D1D1F;
  letter-spacing: -0.002em;
  transition: color 0.2s ease;
}
.lx-rel-card:hover .lx-rel-view { color: #0A4DB8; }
.lx-rel-arr {
  color: #86868B;
  font-size: 0.92rem;
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.2s ease;
}
.lx-rel-card:hover .lx-rel-arr {
  transform: translateX(4px);
  color: #0A4DB8;
}
