/* Product Detail Page Styles */

/* Main Product Section */
.product-details-section {
  padding: 80px 0 60px;
  background-color: #fff;
}

.product-details-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Product Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

/* Swiper Gallery Styles */
.gallery-swiper {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f8f8f8;
  position: relative;
  /* CSS Grid/Flexbox bug size workaround */
  min-height: 0;
  min-width: 0;
}

.gallery-swiper .swiper-slide {
  width: 100% !important;
  height: 100%;
  margin-right: 0 !important;
}

.gallery-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
  color: var(--color-sage-500);
  background-color: transparent;
  width: 30px;
  height: 30px;
  margin-top: -15px;
}

.gallery-swiper .swiper-button-next::after,
.gallery-swiper .swiper-button-prev::after {
  font-size: 14px;
  font-weight: 600;
}

.thumbs-swiper {
  width: 100%;
  height: 100px;
  margin-top: 12px;
}

.thumbs-swiper .swiper-slide {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  opacity: 0.6;
}

.thumbs-swiper .swiper-slide-thumb-active {
  border-color: var(--color-sage-500);
  opacity: 1;
}

.thumbs-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Legacy styles for non-Swiper galleries */
.main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f8f8f8;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumbnail-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0;
}

.thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.thumbnail.active {
  border-color: var(--color-sage-500);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product-info {
  display: flex;
  flex-direction: column;
  /* gap: 24px; */
}

.product-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-sage-500);
}

.product-description {
  margin: 16px 0;
}

/* Product Description List Styles */
.product-description ul {
  list-style-type: disc;
  margin-left: 0;
  margin-bottom: 15px;
  padding-left: 30px;
}

.product-description ol {
  list-style-type: decimal;
  margin-left: 0;
  margin-bottom: 15px;
  padding-left: 30px;
}

.product-description li {
  margin-bottom: 8px;
  line-height: 1.6;
  padding-left: 8px;
}

.product-description ul ul {
  list-style-type: circle;
  margin-top: 8px;
  margin-bottom: 10px;
  padding-left: 25px;
}

.product-description ul ul ul {
  list-style-type: square;
  padding-left: 20px;
}

/* Accordion Content List Styles */
.accordion-text ul {
  list-style-type: disc;
  margin-left: 0;
  margin-bottom: 12px;
  padding-left: 30px;
}

.accordion-text ol {
  list-style-type: decimal;
  margin-left: 0;
  margin-bottom: 12px;
  padding-left: 30px;
}

.accordion-text li {
  margin-bottom: 6px;
  line-height: 1.5;
  padding-left: 8px;
}

/* Remove all bold styling from accordion text content */
.accordion-text {
  font-weight: normal;
}

.accordion-text * {
  font-weight: normal !important;
}

.accordion-text strong,
.accordion-text b {
  font-weight: normal !important;
}

/* Size Options */
.product-options {
  margin: 24px 0;
}

.size-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.size-option {
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.size-option:hover {
  border-color: var(--color-sage-500);
}

.size-option.active {
  border-color: var(--color-sage-500);
  background-color: var(--color-sage-500);
  color: #fff;
}

.size-price {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Product Actions */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.add-to-cart {
  text-align: center;
  width: 100%;
  padding: 16px 32px;
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Product Tags */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.product-tag {
  padding: 6px 12px;
  background-color: var(--color-cream-400);
  color: var(--color-sage-600);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Product Accordion */
.product-accordion {
  margin-top: 32px;
}

.accordion-item {
  border-bottom: 1px solid #e0e0e0;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  transition: color 0.3s ease;
}

.accordion-header:hover {
  color: var(--color-sage-500);
}

.accordion-header.active {
  color: var(--color-sage-500);
}

.accordion-icon {
  font-style: normal;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-text {
  padding-bottom: 20px;
}

/* Ingredients Section */
.ingredients-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.ingredients-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.ingredients-container h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
  text-align: center;
}

.ingredients-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Usage Section */
.usage-section {
  padding: 60px 0;
  background-color: #fff;
}

.usage-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.usage-container h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
  text-align: center;
}

.usage-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Related Products */
.related-products-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.related-products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.related-product-item {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.related-product-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* .related-product-image img {
  width: 70%;
  height: 70%;
  object-fit: contain;
} */

.related-product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-product-price {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-sage-500);
  margin-bottom: 8px;
}

/* Trust Badges */
.trust-section {
  padding: 40px 0;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
}

.trust-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #333;
}

.trust-check {
  color: var(--color-sage-500);
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .product-details-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 16px;
  }

  .product-details-section {
    padding: 40px 0;
  }

  /* Remove sticky effect on mobile */
  .product-gallery {
    position: static;
    top: auto;
  }

  /* Hide thumbnails on mobile */
  .thumbs-swiper {
    display: none;
  }

  .product-title {
    font-size: 2rem;
  }

  .product-price {
    font-size: 1.25rem;
  }

  .trust-badges {
    gap: 24px;
  }

  .trust-badge {
    font-size: 0.875rem;
  }

  .ingredients-section,
  .usage-section,
  .related-products-section {
    padding: 40px 0;
  }

  .ingredients-container h2,
  .usage-container h2,
  .related-products-container h2 {
    font-size: 1.5rem;
  }

  .related-products-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .product-details-container {
    padding: 0 12px;
  }

  .product-title {
    font-size: 1.75rem;
  }

  .size-options {
    gap: 8px;
  }

  .size-option {
    padding: 10px 16px;
  }

  .trust-badges {
    flex-direction: column;
    gap: 16px;
  }
}