/* Import main styles */
@import url("/css/index.css");

/* Product Detail Section */
.product-detail-section {
  padding: 2rem 0;
  background: linear-gradient(to bottom, var(--pale-pink-beige), var(--white));
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Product Images */
.product-images {
  position: sticky;
  top: 2rem;
}

.main-image {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.main-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
}

.image-thumbnails {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail.active,
.thumbnail:hover {
  border-color: var(--airy-blue);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product-info {
  padding: 1rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--steel-blue);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--airy-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.product-title {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  color: var(--steel-blue);
  margin-bottom: 0.5rem;
}

.product-brand {
  font-size: 1.1rem;
  color: var(--airy-blue);
  margin-bottom: 1rem;
  font-weight: 500;
}

.product-price {
  font-size: 2rem;
  color: #e74c3c;
  font-weight: 700;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.product-price::after {
  display: none !important;
}

/* Product Actions */
.product-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.product-brand,
.product-name,
.product-title {
  text-decoration: none !important;
  border: none !important;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--airy-blue);
  border-radius: 8px;
  overflow: hidden;
}

.quantity-btn {
  background: var(--white);
  border: none;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--steel-blue);
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--airy-blue);
  color: var(--white);
}

#quantity {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 2px solid var(--airy-blue);
  border-right: 2px solid var(--airy-blue);
  padding: 0.8rem 0;
  font-size: 1rem;
}

.add-to-cart-btn {
  background: var(--airy-blue);
  color: var(--white);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-to-cart-btn:hover {
  background: var(--steel-blue);
  transform: translateY(-2px);
}

.wishlist-btn {
  background: var(--white);
  border: 2px solid var(--airy-blue);
  color: var(--airy-blue);
  padding: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.wishlist-btn:hover {
  background: var(--airy-blue);
  color: var(--white);
}

/* Product Details */
.product-details {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-details h3 {
  font-family: "Playfair Display", serif;
  color: var(--steel-blue);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.shades-simple {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.5rem;
}

.shades-simple div {
  color: var(--steel-blue);
  font-size: 0.9rem;
  padding: 0.1rem 0;
}

.description {
  line-height: 1.6;
  color: var(--steel-blue);
  margin-bottom: 1.5rem;
}

.specifications {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.spec-item {
  display: flex;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
}

.spec-item strong {
  min-width: 120px;
  color: var(--steel-blue);
}

.spec-item span {
  color: var(--steel-blue);
  flex: 1;
}

/* Related Products */
.related-products-section {
  padding: 3rem 0;
  background: var(--white);
}

.related-products-section .section-title {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--steel-blue);
  margin-bottom: 2rem;
}

.related-products-section .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.related-products-section .product-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(186, 213, 242, 0.2);
  transition: var(--transition);
  border: 3px solid rgba(245, 234, 233, 0.5);
}

.related-products-section .product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(186, 213, 242, 0.3);
}

.related-products-section .product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-products-section .product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.related-products-section .product-info {
  padding: 1.5rem;
  text-align: center;
}

/* Mobile Responsive - Enhanced Flexibility */
@media (max-width: 768px) {
  .product-detail-section {
    padding: 1.5rem 0;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Reduced gap for smaller screens */
  }

  /* Product Images */
  .product-images {
    position: static;
  }

  .main-image {
    padding: 1rem; /* Reduced padding */
    margin-bottom: 0.5rem;
  }

  .main-image img {
    max-width: 90%;
  }

  .image-thumbnails {
    gap: 0.4rem; /* More compact thumbnails */
    padding: 0 0.5rem;
    overflow-x: auto; /* Allow horizontal scrolling if many thumbnails */
    justify-content: flex-start;
  }

  .thumbnail {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
  }

  /* Product Info */
  .product-info {
    padding: 0 1rem; /* Keep some padding */
  }

  .product-title {
    /* Fluid font size */
    font-size: clamp(1.6rem, 5vw, 2rem);
    margin-bottom: 0.3rem;
  }

  .product-brand {
    font-size: clamp(0.9rem, 3vw, 1rem);
    margin-bottom: 0.5rem;
  }

  .product-price {
    /* Fluid font size for price */
    font-size: clamp(1.6rem, 5vw, 1.8rem);
    margin-bottom: 1.5rem;
  }

  /* Product Actions */
  .product-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .quantity-selector {
    justify-content: center;
    align-self: center; /* Center the selector itself */
    width: 100%; /* Take full width of its container on mobile */
    max-width: 250px; /* But limit its max width */
  }

  .quantity-btn,
  #quantity {
    /* Ensure good touch targets */
    padding: 0.6rem 0;
    min-height: 44px;
  }

  .quantity-btn {
    padding: 0.6rem 1rem;
  }

  .add-to-cart-btn,
  .wishlist-btn {
    min-height: 48px; /* Larger touch target for main actions */
    font-size: 1rem;
    padding: 0.8rem 1rem; /* Adjust padding for full width */
  }

  /* Product Details */
  .product-details {
    padding: 1.5rem; /* Reduced padding */
  }

  .product-details h3 {
    font-size: 1.3rem;
  }

  .spec-item {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }

  .spec-item strong {
    min-width: auto;
  }

  /* Related Products */
  .related-products-section {
    padding: 2rem 0;
  }

  .related-products-section .section-title {
    font-size: clamp(1.8rem, 5vw, 2rem);
    margin-bottom: 1.5rem;
  }

  .related-products-section .products-grid {
    /* Auto-fit with a minimum of 180px for smaller cards */
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
  }

  .related-products-section .product-image {
    height: 150px; /* Slightly smaller image height */
  }
}

/* Ensure the smallest mobile screens are covered, too */
@media (max-width: 480px) {
  .product-detail-section {
    padding: 1rem 0;
  }

  .product-info {
    padding: 0 0.5rem;
  }

  .product-title {
    font-size: 1.6rem;
  }

  .product-price {
    font-size: 1.4rem;
  }

  .quantity-selector {
    max-width: 200px;
  }
}
