@import url("../assets/css/shared.css");

.products-showcase {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 104px 32px 40px;
  background: linear-gradient(180deg, #6b5f54 0%, #7c7064 100%);
}

.products-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(92, 79, 67, 0.46), rgba(92, 79, 67, 0.18)),
    url("/images/salon/salon-products.jpg") center top / cover no-repeat;
}

header {
  padding: 32px 36px 0;
}

.products-layout {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 28px;
}

.products-hero {
  max-width: 760px;
  color: #fffaf4;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 244, 231, 0.8);
}

.products-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.3vw, 4.2rem);
  line-height: 0.95;
  font-weight: 500;
  text-wrap: balance;
}

.products-copy {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.65;
  color: rgba(255, 244, 231, 0.92);
}

.products-accordion {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 16px;
  max-height: max(452px, calc(100vh - 220px));
  max-height: max(452px, calc(100dvh - 220px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  min-height: 452px;
}

.product-group {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(104, 91, 78, 0.38);
  box-shadow: 0 22px 46px rgba(34, 27, 22, 0.16);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.product-line {
  position: relative;
  width: 100%;
  min-height: 148px;
  border: 0;
  padding: 24px 26px;
  display: grid;
  align-content: end;
  gap: 8px;
  text-align: left;
  color: #fffaf4;
  cursor: pointer;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.product-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.04), rgba(60, 50, 42, 0.52));
}

.product-line > * {
  position: relative;
  z-index: 1;
}

.product-line::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 20px;
  z-index: 1;
  font-size: 1.8rem;
  line-height: 1;
  color: rgba(255, 244, 231, 0.92);
}

.product-line[aria-expanded="true"]::after {
  content: "−";
}

.product-group:nth-child(1) .product-line {
  background-image: url("/images/product-lines/essentialhaircare-product-line.png");
}

.product-group:nth-child(2) .product-line {
  background-image: url("/images/product-lines/naturaltech-product-line.png");
}

.product-group:nth-child(3) .product-line {
  background-image: url("/images/product-lines/moreinside-product-line.jpg");
}

.product-brand {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 244, 231, 0.74);
}

.title {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 500;
}

.tagline {
  font-size: 0.98rem;
  color: rgba(255, 244, 231, 0.88);
}

.product-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  padding: 14px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  color: rgba(255, 244, 231, 0.92);
}

.product-table th {
  width: 33%;
  text-align: left;
  font-weight: 500;
}

.product-table td:nth-child(2) {
  text-align: left;
  color: rgba(255, 244, 231, 0.74);
}

.product-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .product-group {
    background: rgba(100, 86, 74, 0.84);
  }
}

@media (max-width: 1024px) {
  .products-showcase {
    padding: 88px 24px 32px;
  }

  .products-showcase::before {
    background:
      linear-gradient(135deg, rgba(92, 79, 67, 0.5), rgba(92, 79, 67, 0.22)),
      url("/images/salon/salon-products.jpg") center top / cover no-repeat;
  }

  .products-layout {
    margin-top: 6px;
    grid-template-columns: 1fr;
  }

  .products-accordion {
    max-height: max(452px, calc(100vh - 180px));
    max-height: max(452px, calc(100dvh - 180px));
    min-height: 452px;
  }
}

@media (max-width: 720px) {
  header {
    padding: 24px 20px 0;
  }

  .products-showcase {
    padding: 76px 16px 20px;
  }

  .products-accordion {
    max-height: max(452px, calc(100vh - 220px));
    max-height: max(452px, calc(100dvh - 220px));
    min-height: 452px;
    padding-right: 4px;
  }

  .product-group,
  .product-line {
    border-radius: 18px;
  }

  .product-line {
    min-height: 128px;
    padding: 20px 20px;
  }

  .product-line::after {
    right: 18px;
    top: 18px;
  }

  .product-table th,
  .product-table td {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  .product-table th {
    width: 34%;
  }

  .product-table td:nth-child(2) {
    width: 36%;
  }

  .product-table td:last-child {
    width: 30%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
