/* =========================================
   PRODUCTS PAGE — Editorial Premium
   css/products.css
   ========================================= */

/* ── Hero Section — Cinematic Split ── */
.products-page-hero {
  display: flex;
  flex-direction: column;
}

/* Film panel — video fills top portion */
.products-hero__film {
  position: relative;
  height: clamp(420px, 60vh, 640px);
  overflow: hidden;
  flex-shrink: 0;
}
.products-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  display: block;
}
/* Cream fade at the bottom */
.products-hero__film::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent 0%, var(--color-cream, #EEE9E2) 100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .products-hero__video { display: none; }
}

/* Text panel — cream background below video */
.products-hero__stage {
  background: var(--color-cream, #EEE9E2);
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(2.5rem, 5vh, 4rem);
  text-align: center;
}
.products-hero__stage .container {
  max-width: 680px;
}
.products-hero__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary, #C9956A);
  margin-bottom: 1rem;
}
.products-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--color-dark, #1C1C1C);
  margin: 0;
}
.products-hero__sub {
  font-size: 1.05rem;
  color: rgba(28,28,28,0.55);
  max-width: 520px;
  margin: 1.5rem auto 0;
  line-height: 1.8;
}

/* ── Filter strip — Frosted glass ── */
.products-filter {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28,28,28,0.06);
  position: sticky;
  top: 72px;
  z-index: 90;
  padding: 0.85rem 0;
}
.products-filter__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.products-filter__inner::-webkit-scrollbar { display: none; }
.products-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  padding: 0.5rem 1.15rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(28,28,28,0.5);
  background: transparent;
  border: 1px solid rgba(28,28,28,0.1);
  text-decoration: none;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.products-filter__btn:hover {
  background: var(--color-cream, #EEE9E2);
  color: var(--color-dark, #1C1C1C);
  border-color: rgba(28,28,28,0.15);
}
.products-filter__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ── Product line section ── */
.product-line {
  padding: 6rem 0;
}
.product-line--alt {
  background: var(--color-bg-light, #FAF7F4);
}

/* ── Product line header ── */
.product-line__header {
  margin-bottom: 3.5rem;
  max-width: 600px;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(28,28,28,0.08);
}
.product-line__collection {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--line-color-text, var(--color-primary));
  margin-bottom: 0.75rem;
  padding-right: 0.75rem;
  border-right: 2px solid var(--line-color-text, var(--color-primary));
}
.product-line__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--color-dark, #1C1C1C);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.product-line__tagline {
  font-size: 0.95rem;
  color: rgba(28,28,28,0.5);
  line-height: 1.7;
}

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

/* ── Product card — Editorial Premium ── */
.product-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(28,28,28,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}

/* ── Product image area ── */
.product-card__img {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0;
  background: var(--card-bg, #F8F6F3);
}
.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover .product-card__img img {
  transform: scale(1.06) translateY(-4px);
}

/* Placeholder for missing images */
.product-card__img--placeholder {
  background: var(--card-bg, #F5F3EF);
}
.product-card__img--placeholder::after {
  content: "";
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(28,28,28,0.04);
}

/* ── Line themes — flat tint + accent ── */
.product-line--milano {
  --line-color-text: #B07840;
  --line-color-dot: #B07840;
  --card-bg: #FAF7F2;
  --line-accent: rgba(176,120,64,0.1);
}
.product-line--firenze {
  --line-color-text: #5A8A57;
  --line-color-dot: #5A8A57;
  --card-bg: #F6FAF5;
  --line-accent: rgba(90,138,87,0.1);
}
.product-line--roma {
  --line-color-text: #A85850;
  --line-color-dot: #A85850;
  --card-bg: #FBF6F4;
  --line-accent: rgba(168,88,80,0.1);
}
.product-line--sardegna {
  --line-color-text: #4878A0;
  --line-color-dot: #4878A0;
  --card-bg: #F4F7FA;
  --line-accent: rgba(72,120,160,0.1);
}
.product-line--sicilia {
  --line-color-text: #7060A0;
  --line-color-dot: #7060A0;
  --card-bg: #F7F5FA;
  --line-accent: rgba(112,96,160,0.1);
}

/* ── Card body ── */
.product-card__body {
  padding: 1.5rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-card__type {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line-color-text, var(--color-primary));
  background: var(--line-accent, rgba(201,149,106,0.1));
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  width: fit-content;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-dark, #1C1C1C);
  margin-top: 0.15rem;
}

.product-card__subtitle {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(28,28,28,0.38);
  margin-bottom: 0.5rem;
}

/* ── Benefits — Checkmarks ── */
.product-card__benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.4rem;
}
.product-card__benefits li {
  font-size: 0.82rem;
  color: rgba(28,28,28,0.6);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.55;
}
.product-card__benefits li::before {
  content: "✓";
  color: var(--line-color-text, var(--color-primary));
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 0.18rem;
  opacity: 0.8;
}

/* ── VIEW DETAILS — Pill button ── */
.product-card__details {
  margin-top: 0.5rem;
}
.product-card__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-dark, #1C1C1C);
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 1.6rem;
  border: 1.5px solid rgba(28,28,28,0.2);
  border-radius: 100px;
  background: transparent;
  transition: all 0.3s ease;
  user-select: none;
  width: fit-content;
  margin-top: 0.75rem;
}
.product-card__view-btn::-webkit-details-marker { display: none; }
.product-card__view-btn:hover {
  background: var(--color-dark, #1C1C1C);
  color: #fff;
  border-color: var(--color-dark, #1C1C1C);
}
.product-card__details[open] .product-card__view-btn {
  background: var(--line-color-text, var(--color-dark));
  color: #fff;
  border-color: var(--line-color-text, var(--color-dark));
}

.product-card__details-content {
  padding-top: 1.25rem;
  animation: detailsSlide 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes detailsSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card__details-content p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(28,28,28,0.6);
}
.product-card__usage {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(28,28,28,0.08);
}
.product-card__usage strong {
  font-size: 0.78rem;
  color: rgba(28,28,28,0.7);
  display: block;
  margin-bottom: 0.3rem;
}
.product-card__usage p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(28,28,28,0.5);
  margin-top: 0;
}

/* ── CTA Banner — Dark inverted ── */
.cta-banner {
  padding: 5.5rem 0;
  background: var(--color-dark, #1C1C1C);
  text-align: center;
}
.cta-banner .tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary, #C9956A);
  margin-bottom: 0.75rem;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: #FFFFFF;
  max-width: 600px;
  margin: 0 auto 0.75rem;
}
.cta-banner > .container > p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}
.cta-banner__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Image Lightbox ── */
.product-card__img {
  cursor: zoom-in;
}
.product-card__img::after {
  content: "";
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%231C1C1C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 1 1 1 1 6'/%3E%3Cpolyline points='10 15 15 15 15 10'/%3E%3Cline x1='1' y1='1' x2='6.5' y2='6.5'/%3E%3Cline x1='15' y1='15' x2='9.5' y2='9.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 2;
}
.product-card__img:hover::after {
  opacity: 1;
}

/* Lightbox overlay */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
  padding: 2rem;
}
.product-lightbox.active {
  opacity: 1;
  visibility: visible;
}
.product-lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  filter: drop-shadow(0 16px 48px rgba(0,0,0,0.25));
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-lightbox.active .product-lightbox__img {
  transform: scale(1);
}
.product-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.product-lightbox__close:hover {
  background: rgba(255,255,255,0.3);
}
.product-lightbox__name {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

/* Mobile: always show expand icon */
@media (max-width: 640px) {
  .product-card__img::after {
    opacity: 0.6;
    width: 28px;
    height: 28px;
    background-size: 12px;
    bottom: 0.6rem;
    left: 0.6rem;
  }
  .product-lightbox__close {
    top: 1rem;
    right: 1rem;
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
  .product-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
  }
}

@media (max-width: 640px) {
  .products-hero__film { height: 65vw; min-height: 260px; }
  .products-hero__sub br { display: none; }

  .product-line { padding: 4rem 0; }
  .product-line__header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 420px;
  }

  .product-card__img {
    aspect-ratio: 3 / 4;
  }

  .product-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .products-filter__inner {
    gap: 0.4rem;
    padding: 0 0.5rem;
  }
}
