.product-detail-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--dark-purple);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  background: var(--light-purple);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.product-gallery {
  flex: 1 1 320px;
  max-width: 400px;
}

.main-image-wrapper {
  position: relative;
}

.main-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 12px;
  background: white;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  border-radius: 6px;
  user-select: none;
  transition: background 0.2s;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-arrow.prev {
  left: 10px;
}

.gallery-arrow.next {
  right: 10px;
}

.thumbnail-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.thumbnail {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.thumbnail:hover {
  opacity: 1;
}

.thumbnail.active {
  opacity: 1;
  border-color: var(--dark-purple);
}

.product-info {
  flex: 1 1 320px;
}

.category-badge {
  display: inline-block;
  background: var(--lavender);
  color: var(--text-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.product-info h2 {
  color: var(--dark-purple);
  margin: 5px 0 15px;
}

.product-description {
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
}

.product-info .price {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.quantity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--dark-purple);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
}

.quantity-control button:hover {
  background: #5c3a8a;
}

.quantity-control input {
  width: 50px;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.add-to-cart-btn {
  width: 100%;
  font-size: 1rem;
  padding: 14px;
}

@media (max-width: 768px) {
  .product-detail {
    flex-direction: column;
    padding: 20px;
  }

  .product-gallery {
    max-width: 100%;
  }
}
