/* ===============================
   PROGETTO DONNA — MODERN UI
   =============================== */

:root {
  --primary: #d4a5b4;
  --dark: #1a1a1a;
  --light: #faf7f9;
  --white: #ffffff;
  --text: #222;
  --muted: #777;

  /* section colors */
  --section-1: #8d3560; /* rosy */
  --section-2: #153867; /* teal */
  --section-3: #590321; /* purple */
  --section-4: #243b5b; /* blue */
  --section-5: #a67857; /* terracotta/body products */
  --section-6: #d66a9d; /* magenta/lips */

  --radius: 18px;
  --shadow: 0 10px 40px rgba(0,0,0,.08);
  --transition: all .35s ease;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--light);
}

/* HERO */
.products-hero {
  text-align: center;
  padding: 110px 20px 80px;
  background: linear-gradient(135deg,#fff,#faf4f7);
}

.products-hero img {
  width: 100px;
  margin-bottom: 20px;
}

.products-hero h2 {
  font-family: "Playfair Display", serif;
  font-size: 56px;
  font-weight: 600;
  margin-bottom: 10px;
}

.products-hero p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
}

/* NAV */
.products-nav {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 15px;
}

.products-nav button {
  padding: 16px;
  border-radius: 999px;
  border: 1px solid #eee;
  background: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: var(--transition);
}

.products-nav button:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* SECTION HEADER */
.product-section-header {
  position: relative;
  margin: 0 auto 40px;
  max-width: 1100px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  background: #fff;
}

.product-section-header-image {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-section-header img {
  /* Responsive header image: scales with viewport but never too small or too tall */
  width: clamp(180px, 24vw, 380px);
  height: auto;
  max-height: 62vh; /* never exceed viewport height */
  object-fit: contain;
  background: none;
  border-radius: 12px;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  align-self: center;
}

.product-section-title-wrapper {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  padding: 6px 12px;
  background: transparent; /* removed white background */
  border-radius: 10px;
}

.product-section-title {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  color: var(--dark);
  margin: 0;
}

/* Section-specific title colors */
.product-section-subsection.section-1 .product-section-title { color: var(--section-1); }
.product-section-subsection.section-2 .product-section-title { color: var(--section-2); }
.product-section-subsection.section-3 .product-section-title { color: var(--section-3); }
.product-section-subsection.section-4 .product-section-title { color: var(--section-4); }
.product-section-subsection.section-5 .product-section-title { color: var(--section-5); }
.product-section-subsection.section-6 .product-section-title { color: var(--section-6); }

/* When header image is not present, fallback to full-width style */
@media (max-width: 900px) {
  .product-section-header {
    flex-direction: column;
    padding: 0;
  }
  .product-section-header img {
    width: 100%;
    height: auto;
    border-radius: 0;
    flex: 0 0 auto;
  }
  .product-section-title-wrapper {
    background: linear-gradient(180deg,rgba(0,0,0,.25),rgba(0,0,0,.25));
    color: #fff;
    padding: 30px 20px;
  }
  .product-section-title { font-size: 32px; color: #fff; }
}

/* GRID */
.products-grid {
  max-width: 1100px;
  margin: 0 auto 90px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 30px;
}

/* Section wrapper: visually links header to product grid below */
.product-section-subsection {
  margin-bottom: 80px;
}

.product-section-subsection.section-1 .product-section-header {
  border-bottom: 3px solid var(--section-1);
  background: linear-gradient(180deg, rgba(200, 90, 106, 0.04), rgba(255,255,255,0));
}
.product-section-subsection.section-2 .product-section-header {
  border-bottom: 3px solid var(--section-2);
  background: linear-gradient(180deg, rgba(58, 167, 163, 0.04), rgba(255,255,255,0));
}
.product-section-subsection.section-3 .product-section-header {
  border-bottom: 3px solid var(--section-3);
  background: linear-gradient(180deg, rgba(124, 87, 194, 0.04), rgba(255,255,255,0));
}
.product-section-subsection.section-4 .product-section-header {
  border-bottom: 3px solid var(--section-4);
  background: linear-gradient(180deg, rgba(74, 144, 226, 0.04), rgba(255,255,255,0));
}
.product-section-subsection.section-5 .product-section-header {
  border-bottom: 3px solid var(--section-5);
  background: linear-gradient(180deg, rgba(106, 191, 105, 0.04), rgba(255,255,255,0));
}
.product-section-subsection.section-6 .product-section-header {
  border-bottom: 3px solid var(--section-6);
  background: linear-gradient(180deg, rgba(242, 168, 59, 0.04), rgba(255,255,255,0));
}

/* CARD */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

/* IMAGE — ADATTIVA, NO TAGLI, NO ALTEZZE FORZATE */

.product-card-image-wrapper {
  width: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px; /* make image area much larger */
  overflow: hidden;
  padding: 0;
}

.product-card-image-wrapper img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .22s ease;
}

.product-card:hover .product-card-image-wrapper img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .product-card-image-wrapper {
    min-height: 220px;
  }
}

/* Section-specific card title and price colors */
.product-section-subsection.section-1 .product-card-title,
.product-section-subsection.section-1 .product-price { color: var(--section-1); }
.product-section-subsection.section-2 .product-card-title,
.product-section-subsection.section-2 .product-price { color: var(--section-2); }
.product-section-subsection.section-3 .product-card-title,
.product-section-subsection.section-3 .product-price { color: var(--section-3); }
.product-section-subsection.section-4 .product-card-title,
.product-section-subsection.section-4 .product-price { color: var(--section-4); }
.product-section-subsection.section-5 .product-card-title,
.product-section-subsection.section-5 .product-price { color: var(--section-5); }
.product-section-subsection.section-6 .product-card-title,
.product-section-subsection.section-6 .product-price { color: var(--section-6); }

/* CONTENT */
.product-card-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card-title {
  font-size: 20px;
  font-weight: 600;
}

.product-card-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.product-card-footer {
  margin-top: auto;
  padding-top: 10px;
}

.product-price {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .products-hero h2 { font-size: 42px; }
  .product-section-title { font-size: 32px; }
}

/* Keep default stacking for product cards (vertical layout)
   Desktop-specific side-by-side layout removed to restore previous behavior. */