@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Poppins:wght@400;500;600&display=swap');

.yarn-detail-page {
  font-family: 'Montserrat', sans-serif;
  background: #f6f6f6;
  color: #111;
  line-height: 1.6;
}

.yarn-detail-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 450px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yarn-detail-hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;

  background:linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.35) 40%,
    rgba(0,0,0,0.65) 100%
  );
}

.yarn-detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
  z-index: 1;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.yarn-detail-hero:hover img {
  transform: scale(1.03);
  filter: brightness(1);
}

.yarn-detail-hero-overlay {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
  animation: fadeInUp 0.9s ease forwards;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.yarn-detail-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(42px, 6vw, 60px);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #c6a46c;
  text-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.6);
  margin: 0;
  text-align: center;
}

.yarn-detail-price {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 800;
  color: #333;
  margin: 20px 0;
  text-align: center;
  letter-spacing: 2px;
}

.yarn-detail-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(18px, 2.5vw, 24px);
  font-style: italic;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 3px;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: center;
  margin-top: 20px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.8);
  opacity: 0.95;
}

.yarn-detail-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 60px 20px 100px;
}

.yarn-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.yarn-detail-text {
  background: #ffffff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.yarn-detail-section-title {
  font-size: 32px;
  font-weight: 700;
  margin: 30px 0 20px;
  letter-spacing: 1px;
}

.yarn-detail-paragraph {
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 16px;
}

.yarn-detail-list {
  list-style: disc inside;
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  margin-top: 10px;
  padding-left: 20px;
  text-align: left;
}

.yarn-detail-colors {
  margin-top: 80px;
  padding-bottom: 100px;
  text-align: center;
}

.yarn-detail-colors h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 50px;
}

.yarn-detail-colors-grid {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.yarn-detail-color-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.yarn-detail-color-card img {
  width: 350px;
  height: 350px;
  border-radius: 0%;
  box-shadow: 0 22px 55px rgba(0,0,0,0.28);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.yarn-detail-color-card:hover {
  transform: translateY(-8px);
}

.yarn-detail-color-card:hover img {
  transform: scale(1.25);
  box-shadow: 0 32px 70px rgba(0,0,0,0.38);
}

.yarn-detail-color-card span {
  display: block;
  margin-top: 18px;
  font-size: 20px;
  font-weight: 700;
  color: #222;
  transition: color 0.3s ease;
}

.yarn-detail-color-card:hover span {
  color: #000;
}



@media (max-width: 1200px) {
  .yarn-detail-colors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
  }

  .yarn-detail-color-card img {
    width: 280px;
    height: 280px;
  }
}


@media (max-width: 992px) {
  .yarn-detail-hero {
    height: 55vh;
  }

  .yarn-detail-title {
    font-size: clamp(36px, 6vw, 50px);
  }

  .yarn-detail-subtitle {
    font-size: clamp(16px, 2.2vw, 20px);
  }

  .yarn-detail-color-card img {
    width: 240px;
    height: 240px;
  }
}


@media (max-width: 768px) {
  .yarn-detail-hero {
    height: 50vh;
  }

  .yarn-detail-grid {
    gap: 35px;
  }

  .yarn-detail-container {
    padding: 50px 15px 80px;
  }

  .yarn-detail-color-card img {
    width: 200px;
    height: 200px;
  }

  .yarn-detail-colors-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}


@media (max-width: 576px) {
  .yarn-detail-title {
    font-size: clamp(28px, 6vw, 36px);
  }

  .yarn-detail-subtitle {
    font-size: clamp(14px, 2.5vw, 18px);
  }

  .yarn-detail-text {
    padding: 30px 20px;
  }

  .yarn-detail-list {
    font-size: 15px;
  }

  .yarn-detail-color-card img {
    width: 160px;
    height: 160px;
  }

  .yarn-detail-color-card span {
    font-size: 16px;
  }
}


@media (max-width: 360px) {
  .yarn-detail-hero {
    height: 45vh;
  }

  .yarn-detail-title {
    font-size: 24px;
  }

  .yarn-detail-subtitle {
    font-size: 14px;
  }

  .yarn-detail-color-card img {
    width: 140px;
    height: 140px;
  }

  .yarn-detail-color-card span {
    font-size: 14px;
  }
}