/* Product Details Page Styles */

.product-details-page {
  padding: 2rem 0;
}

/* Product Details Card */
.product-details-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Product Image Section */
.product-image-section {
  position: sticky;
  top: 2rem;
}

.product-main-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fa;
  margin-bottom: 1rem;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-main-image:hover img {
  transform: scale(1.05);
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.product-image-placeholder i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #adb5bd;
}

.product-image-placeholder p {
  font-size: 1rem;
  color: #6c757d;
}

.product-image-thumbnails {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.thumbnail-item {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.thumbnail-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.thumbnail-item.active {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info Section */
.product-info-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-breadcrumb {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.product-breadcrumb a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-breadcrumb a:hover {
  color: #764ba2;
}

.product-breadcrumb span {
  color: #495057;
}

.product-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Product Meta */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.product-category,
.product-collections {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #495057;
}

.product-category i,
.product-collections i {
  color: #667eea;
  font-size: 1rem;
}

.collections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.collection-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.collection-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Price Section */
.product-price-section {
  padding: 1rem 0;
}

.product-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #667eea;
  letter-spacing: -0.02em;
}

/* Stock Section */
.product-stock-section {
  padding: 0.5rem 0;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
}

.stock-badge.in-stock {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  box-shadow: 0 2px 8px rgba(21, 87, 36, 0.15);
}

.stock-badge.out-of-stock {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  box-shadow: 0 2px 8px rgba(114, 28, 36, 0.15);
}

.stock-badge i {
  font-size: 1.1rem;
}

/* Description Section */
.product-description-section {
  padding: 1.5rem 0;
  border-top: 1px solid #e9ecef;
}

.product-description-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 1rem 0;
}

.product-description-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #495057;
}

/* Specifications */
.product-specifications {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin-top: 1rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 600;
  color: #6c757d;
  font-size: 0.9rem;
}

.spec-value {
  color: #495057;
  font-size: 0.95rem;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #f59e0b;
  font-weight: 600;
}

.featured-badge i {
  color: #f59e0b;
}

/* Related Products Section */
.related-products-section {
  margin-top: 4rem;
  padding: 2.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1rem;
  color: #6c757d;
  margin: 0;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

/* Related Product Card */
.related-product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.related-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 1;
}

.related-product-card:hover::before {
  transform: scaleX(1);
}

.related-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.2);
}

.related-product-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.related-product-image-wrapper {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
}

.related-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.related-product-card:hover .related-product-image {
  transform: scale(1.1) rotate(1deg);
}

.related-product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  color: #6c757d;
}

.related-product-placeholder i {
  font-size: 3rem;
  color: #667eea;
  opacity: 0.6;
}

.related-product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-product-title {
  font-size: 1.2rem;
  margin: 0;
  color: #2d3748;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.6em;
}

.related-product-card:hover .related-product-title {
  color: #667eea;
}

.related-product-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #667eea;
  margin: 0;
  letter-spacing: -0.01em;
}

.related-product-stock {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  align-self: flex-start;
  margin-top: auto;
}

.related-product-stock.out-of-stock {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .product-details-card {
    gap: 2rem;
    padding: 2rem;
  }
  
  .related-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .product-details-page {
    padding: 1rem 0;
  }
  
  .product-details-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .product-image-section {
    position: static;
  }
  
  .product-main-image {
    aspect-ratio: 1;
  }
  
  .product-title {
    font-size: 1.75rem;
  }
  
  .product-price {
    font-size: 2rem;
  }
  
  .related-products-section {
    margin-top: 3rem;
    padding: 2rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .related-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
  
  .related-product-image-wrapper {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .product-details-card {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .product-price {
    font-size: 1.75rem;
  }
  
  .product-image-thumbnails {
    gap: 0.5rem;
  }
  
  .thumbnail-item {
    width: 60px;
    height: 60px;
  }
  
  .product-meta {
    gap: 0.75rem;
  }
  
  .product-specifications {
    padding: 1rem;
  }
  
  .related-products-section {
    margin-top: 2rem;
    padding: 1.5rem 0;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
  }
  
  .related-products-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .related-product-image-wrapper {
    height: 200px;
  }
  
  .related-product-info {
    padding: 1.25rem;
  }
  
  .related-product-title {
    font-size: 1.1rem;
  }
  
  .related-product-price {
    font-size: 1.35rem;
  }
}
