/*--------------------------------------------------------------
# Products v3 — luxury product showcase
--------------------------------------------------------------*/

.site-layout-v2 #main #portfolio.products-section {
  position: relative;
  overflow: hidden;
}

.site-layout-v2 #main #portfolio.products-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(196, 169, 98, 0.09), transparent 52%),
    radial-gradient(ellipse 65% 45% at 0% 100%, rgba(5, 150, 105, 0.08), transparent 50%);
  z-index: 0;
}

.site-layout-v2 #main #portfolio.products-section > .container {
  position: relative;
  z-index: 1;
}

/* —— Stats strip —— */
.products-v3__strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 575px) {
  .products-v3__strip {
    grid-template-columns: 1fr;
  }
}

.products-v3__stat {
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--color-border, #d4e5df);
  background: linear-gradient(145deg, var(--color-surface, #fafdfb), var(--color-surface-muted, #eef6f2));
  box-shadow: var(--shadow-sm);
}

.products-v3__stat-value {
  display: block;
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-heading, #0c1815);
  background: linear-gradient(135deg, var(--color-accent, #059669), var(--color-gold, #c4a962));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.products-v3__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
  justify-content: center;
}

.products-v3__chips span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: var(--color-soft, #5c726b);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.16);
}

.products-v3__card:not(.products-v3__card--featured) .products-v3__features li:nth-child(n+4) {
  display: none;
}

.products-v3__card:not(.products-v3__card--featured) .products-v3__count {
  display: none;
}

.products-v3__card:not(.products-v3__card--featured) .products-v3__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.products-v3__stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-soft, #5c726b);
}

/* —— Grid —— */
.products-v3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .products-v3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .products-v3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
  }
}

.products-v3__empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem 1rem;
  margin: 0;
  color: var(--color-soft, #5c726b);
  font-size: 0.92rem;
}

.products-v3__empty.is-visible {
  display: block;
}

/* —— Card —— */
.products-v3__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--color-border, #d4e5df);
  background: linear-gradient(168deg, var(--color-surface, #fafdfb) 0%, var(--color-surface-muted, #eef6f2) 100%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s ease, border-color 0.34s ease;
}

.products-v3__card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md, 0 20px 52px rgba(6, 18, 16, 0.11));
  border-color: rgba(5, 150, 105, 0.3);
}

/* —— Media —— */
.products-v3__media {
  position: relative;
  height: 210px;
  overflow: hidden;
  flex-shrink: 0;
}

.products-v3__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.products-v3__card:hover .products-v3__media img {
  transform: scale(1.08);
}

.products-v3__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 18, 16, 0.05) 0%,
    rgba(6, 18, 16, 0.28) 48%,
    rgba(6, 18, 16, 0.62) 100%
  );
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.products-v3__card:hover .products-v3__scrim {
  opacity: 0.92;
}

.products-v3__category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  max-width: calc(100% - 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-v3__logo-wrap {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  right: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 1.7rem);
  padding: 0.42rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 10px 28px rgba(6, 18, 16, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

.products-v3__logo {
  display: block;
  max-width: 118px;
  max-height: 26px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: none;
}

/* —— Body —— */
.products-v3__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.2rem 1.3rem;
  min-width: 0;
}

.products-v3__desc {
  margin: 0 0 0.9rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-body, #3d524c);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.products-v3__features {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  flex: 1;
}

.products-v3__card:not(.products-v3__card--featured) .products-v3__features {
  min-height: 7.5rem;
}

.products-v3__card--featured .products-v3__features {
  min-height: 9.75rem;
}

.products-v3__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-body, #3d524c);
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  background: rgba(5, 150, 105, 0.05);
  border: 1px solid rgba(5, 150, 105, 0.08);
}

.products-v3__features li i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--color-accent, #059669);
  font-size: 0.72rem;
}

.products-v3__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.15rem;
}

.products-v3__count {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-soft, #5c726b);
  white-space: nowrap;
}

.products-v3__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff !important;
  background: linear-gradient(135deg, var(--color-accent, #059669), var(--color-accent-hover, #047857));
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, gap 0.25s ease;
  white-space: nowrap;
}

.products-v3__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.36);
  gap: 0.65rem;
  color: #fff !important;
}

.products-v3__link--ghost {
  color: var(--color-accent, #059669) !important;
  background: transparent;
  border: 1px solid rgba(5, 150, 105, 0.35);
  box-shadow: none;
}

.products-v3__link--ghost:hover {
  background: var(--color-accent, #059669);
  color: #fff !important;
  border-color: var(--color-accent);
}

/* —— Featured flagship (same grid cell — aligned with suite) —— */
.products-v3__card--featured {
  border-color: rgba(5, 150, 105, 0.28);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(196, 169, 98, 0.18);
  background: linear-gradient(168deg, var(--color-surface, #fafdfb) 0%, rgba(238, 246, 242, 0.95) 55%, rgba(196, 169, 98, 0.06) 100%);
}

.products-v3__card--featured:hover {
  border-color: rgba(5, 150, 105, 0.42);
  box-shadow: var(--shadow-md, 0 20px 52px rgba(6, 18, 16, 0.11));
}

.products-v3__card--featured .products-v3__media {
  height: 210px;
}

.products-v3__card--featured .products-v3__features li:nth-child(n+5) {
  display: none;
}

.products-v3__card--featured .products-v3__count {
  display: inline-block;
  color: var(--color-gold, #b8963f);
}

.products-v3__card--featured .products-v3__category--flagship {
  background: linear-gradient(135deg, rgba(196, 169, 98, 0.42), rgba(5, 150, 105, 0.4));
  border-color: rgba(255, 255, 255, 0.4);
}

body.theme-dark .products-v3__card--featured {
  background: linear-gradient(168deg, #111c19 0%, #0a1210 70%, rgba(212, 188, 122, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.22);
}

body.theme-white .products-v3__card--featured {
  background: linear-gradient(168deg, #ffffff 0%, #f8fafc 70%, rgba(29, 78, 216, 0.04) 100%);
  border-color: rgba(29, 78, 216, 0.2);
}

/* —— Footer CTA —— */
.products-v3__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.35rem 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--color-border, #d4e5df);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.06), rgba(196, 169, 98, 0.08));
}

.products-v3__footer-copy {
  margin: 0;
  max-width: 32rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-body, #3d524c);
}

.products-v3__footer-copy strong {
  color: var(--color-heading, #0c1815);
  font-weight: 600;
}

.products-v3__footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-heading, #0c1815) !important;
  background: var(--color-surface, #fafdfb);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.2s ease;
}

.products-v3__footer-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 150, 105, 0.35);
  color: var(--color-accent, #059669) !important;
}

.products-v3__footer-cta i {
  transition: transform 0.25s ease;
}

.products-v3__footer-cta:hover i {
  transform: translateX(4px);
}

/* —— Dark theme —— */
body.theme-dark .products-v3__logo-wrap {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

body.theme-white .products-v3__logo-wrap {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

body.theme-dark .products-v3__card {
  background: linear-gradient(168deg, #111c19 0%, #0a1210 100%);
}

body.theme-dark .products-v3__card:hover {
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.45);
}

body.theme-dark .products-v3__stat {
  background: linear-gradient(145deg, #111c19, #0a1210);
}

body.theme-dark .products-v3__features li {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.12);
}

body.theme-dark .products-v3__footer {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(212, 188, 122, 0.06));
}

body.theme-dark .products-v3__footer-cta {
  background: #111c19;
  border-color: rgba(52, 211, 153, 0.18);
  color: var(--color-heading) !important;
}

body.theme-dark #portfolio.products-section::before {
  background:
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(212, 188, 122, 0.07), transparent 52%),
    radial-gradient(ellipse 65% 45% at 0% 100%, rgba(52, 211, 153, 0.07), transparent 50%);
}

/* —— White theme —— */
body.theme-white .products-v3__card {
  background: linear-gradient(168deg, #ffffff 0%, #f8fafc 100%);
}

body.theme-white .products-v3__card:hover {
  border-color: rgba(29, 78, 216, 0.28);
}

body.theme-white .products-v3__features li {
  background: rgba(29, 78, 216, 0.05);
  border-color: rgba(29, 78, 216, 0.1);
}

body.theme-white .products-v3__features li i {
  color: var(--color-accent, #1d4ed8);
}

body.theme-white .products-v3__link {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 8px 22px rgba(29, 78, 216, 0.25);
}

body.theme-white #portfolio.products-section::before {
  background:
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(148, 163, 184, 0.1), transparent 52%),
    radial-gradient(ellipse 65% 45% at 0% 100%, rgba(29, 78, 216, 0.06), transparent 50%);
}

@media (max-width: 767px) {
  .products-v3__logo-wrap {
    bottom: 0.7rem;
    left: 0.7rem;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
  }

  .products-v3__logo {
    max-width: 100px;
    max-height: 22px;
  }

  .products-v3__features {
    gap: 0.3rem;
    min-height: 0 !important;
  }

  .products-v3__features li {
    font-size: 0.75rem;
  }

  .products-v3__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .products-v3__link {
    justify-content: center;
  }

  .products-v3__count {
    text-align: center;
  }
}
