/* ============================================================
   VENVITY — Product Page Styles
   ============================================================ */

/* ---- Product Hero ---- */
.product-hero {
  padding-top: 68px;
}

.product-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 68px);
}

.product-hero__visual {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow: hidden;
}

.product-hero__visual .product-visual {
  width: 100%;
  height: 100%;
}

/* ---- Product Hero Carousel ---- */
.product-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Track: slides sit side by side, track slides horizontally */
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  user-select: none;
}

/* Each slide fills the container exactly */
.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* The product-visual inside each slide fills the slide fully */
.carousel__slide .product-visual {
  width: 100%;
  height: 100%;
  min-height: unset;
}

/* Images inside slides (for when real photos replace placeholders) */
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ---- Prev / Next arrows ---- */
.carousel__prev,
.carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(78,107,99,.25);
  background: rgba(47,52,55,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #f4f1ec;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
  padding: 0;
  line-height: 1;
}

.carousel__prev { left: 1rem; }
.carousel__next { right: 1rem; }

.carousel__prev:hover,
.carousel__next:hover {
  background: rgba(47,52,55,.92);
  border-color: rgba(111,143,134,.6);
}

.carousel__prev svg,
.carousel__next svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* ---- Dot indicators ---- */
.carousel__dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(47,52,55,.4);
  transition: background var(--transition), transform var(--transition);
}

.carousel__dot--active {
  background: var(--text-dark);
  transform: scale(1.4);
}

/* ---- Responsive: mobile fixed height ---- */
@media (max-width: 1024px) {
  .product-carousel {
    height: 320px;
  }
}

.product-hero__content {
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
}

.product-breadcrumb {
  margin-bottom: 2.5rem;
}

.product-role-tag {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.product-role-text {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.product-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.product-hero__tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  font-style: normal;
  font-weight: 400;
  color: var(--text-mid);
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.product-hero__desc {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* ---- Product Details Tabs ---- */
.product-details {
  margin-top: 2rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.detail-block {
  margin-bottom: 1.75rem;
}

.detail-block__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.detail-block__content {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-list li {
  font-size: 0.875rem;
  color: var(--text-mid);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.detail-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.7rem;
}

/* ---- Add to cart section ---- */
.product-atc {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.product-atc__price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.product-atc__price {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.product-atc__format {
  font-size: 0.825rem;
  color: var(--text-light);
}

.product-atc__buttons {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.product-atc__buttons .btn--primary {
  flex: 1;
}

.product-atc__note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Below fold product content ---- */
.product-body {
  background: var(--bg-white);
}

.product-body__section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--border-light);
}

.product-body__section:last-child { border-bottom: none; }

.product-who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.who-card {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.who-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.product-when-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.when-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
}

.when-item__num {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  line-height: 1;
  padding-top: 4px;
}

.when-item__text p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.when-item__text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

/* ---- Ecosystem position block ---- */
.ecosystem-position {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 2rem;
  border: 1px solid var(--border-light);
}

.ecosystem-position__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.ecosystem-position h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.ecosystem-position p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.65;
}

.ecosystem-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.eco-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(111,143,134,.1);
  border: 1px solid rgba(111,143,134,.2);
  border-radius: 99px;
  padding: 0.3rem 0.875rem;
}

/* ---- Related products ---- */
.related-products {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.related-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.related-card__visual .product-visual {
  height: 140px;
}

.related-card__body {
  padding: 1.25rem;
}

.related-card__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.related-card__price {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.related-card__link {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Product Page FAQ Section ---- */

.product-faq {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--bg-main);
  border-top: 1px solid var(--border-light);
}

.product-faq__header {
  max-width: 640px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.product-faq__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.2;
  margin-top: 0.5rem;
}

.product-faq__intro {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-mid);
  margin-top: 0.875rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.product-faq__list {
  max-width: 720px;
  margin: 0 auto;
}

/* Accordion item */
.product-faq__item {
  border-bottom: 1px solid var(--border-light);
}

.product-faq__item:first-child {
  border-top: 1px solid var(--border-light);
}

/* Question button */
.product-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.375rem 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
  transition: color var(--transition);
}

.product-faq__question:hover {
  color: var(--primary-dark);
}

.product-faq__item--open .product-faq__question {
  color: var(--primary-dark);
  font-weight: 500;
}

/* Icon */
.product-faq__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.product-faq__icon::before {
  content: '';
  position: absolute;
  width: 9px;
  height: 1.5px;
  background: var(--text-mid);
  border-radius: 1px;
  transition: background var(--transition);
}

.product-faq__icon::after {
  content: '';
  position: absolute;
  width: 1.5px;
  height: 9px;
  background: var(--text-mid);
  border-radius: 1px;
  transition:
    background var(--transition),
    transform var(--transition),
    opacity var(--transition);
}

.product-faq__item--open .product-faq__icon {
  background: var(--primary);
  border-color: var(--primary);
}

.product-faq__item--open .product-faq__icon::before {
  background: #fff;
}

.product-faq__item--open .product-faq__icon::after {
  background: #fff;
  transform: rotate(90deg);
  opacity: 0;
}

.product-faq__question:hover .product-faq__icon {
  border-color: var(--primary);
}

.product-faq__question:hover .product-faq__icon::before,
.product-faq__question:hover .product-faq__icon::after {
  background: var(--primary-dark);
}

.product-faq__item--open .product-faq__question:hover .product-faq__icon::before {
  background: #fff;
}

/* Answer panel */
.product-faq__answer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  transition:
    max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.28s ease,
    padding    0.28s ease;
}

.product-faq__item--open .product-faq__answer {
  max-height: 600px;
  opacity: 1;
  padding-bottom: 1.625rem;
}

.product-faq__answer p {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 620px;
}

.product-faq__answer p + p {
  margin-top: 0.625rem;
}


/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .product-hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .product-hero__visual {
    position: static;
    height: 320px;
  }

  .product-hero__visual .product-visual {
    height: 320px;
  }

  .product-hero__content {
    padding: 2rem 1.5rem;
  }

  .product-atc {
    margin-top: 2rem;
  }

  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .product-who-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }

  .product-atc__buttons { flex-direction: column; }
  .product-atc__buttons .btn { width: 100%; flex: none; }

  .product-faq__question {
    font-size: 0.9375rem;
    padding: 1.25rem 0;
  }

  .product-faq__answer p {
    font-size: 0.9rem;
  }
}
