/* Product Detail Page Styles */

/*
 * Note: We're using the main site header styles from style.css
 * This ensures consistent header spacing across all pages
 * Header elements include: .header, .header__content, .logo__image,
 * .main-nav__list, .main-nav__link, .header__actions, .btn-icon,
 * .cart-icon, .cart-count, .mobile-menu-toggle
 */

/* Product Detail Styles */
.product-detail {
  padding: 4rem 0;
}

.product-detail__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .product-detail__content {
    grid-template-columns: minmax(300px, 1fr) 1.5fr;
    gap: 3rem;
  }
}

/* Gallery */
.product-detail__gallery {
  position: relative;
}

.product-detail__main-image {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: #f8f8f8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-detail__main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.product-detail__thumbnails {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.thumbnail-btn {
  width: 70px;
  height: 70px;
  border: 2px solid transparent;
  padding: 2px;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.thumbnail-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.thumbnail-btn.active {
  border-color: #5a3e36;
}

.thumbnail-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* Product Info */
.product-detail__header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1.5rem;
}

.product-detail__title {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

.product-detail__price {
  font-size: 1.5rem;
  font-weight: 600;
  color: #5a3e36;
}

.product-detail__description {
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #666;
}

.product-detail__description p {
  margin-bottom: 1rem;
}

.product-detail__features {
  margin-bottom: 2rem;
}

.product-detail__features h3,
.product-detail__ingredients h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #444;
}

.product-detail__features ul {
  padding-left: 1.5rem;
  list-style-type: disc;
}

.product-detail__features li {
  margin-bottom: 0.5rem;
  color: #666;
}

.product-detail__ingredients {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.product-detail__ingredients p {
  color: #666;
  line-height: 1.6;
}

/* Actions section */
.product-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 576px) {
  .product-detail__actions {
    flex-direction: row;
    align-items: center;
  }
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
}

.quantity-btn {
  background-color: #f5f5f5;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.quantity-btn:hover {
  background-color: #eaeaea;
}

.quantity-input {
  width: 50px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 1rem;
}

.add-to-cart-btn {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  flex-grow: 1;
  max-width: 300px;
}

/* Meta info */
.product-detail__meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9rem;
  color: #777;
}

@media (min-width: 576px) {
  .product-detail__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.product-detail__category a {
  color: #5a3e36;
  text-decoration: none;
  font-weight: 500;
}

.product-detail__category a:hover {
  text-decoration: underline;
}

.product-detail__share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-share {
  display: flex;
  gap: 0.5rem;
}

.social-share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: #f5f5f5;
  border-radius: 50%;
  color: #555;
  transition: all 0.2s;
}

.social-share__link:hover {
  background-color: #5a3e36;
  color: white;
}

.social-share__link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

/* Related products section */
.related-products {
  padding: 4rem 0;
  background-color: #f9f9f9;
}

.related-products .section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
  color: #333;
}

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

/* Loading indicator */
.loading-indicator {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.spinner {
  margin-bottom: 1rem;
}

/* Notification styling */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  background-color: #5a3e36;
  color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Enhancements */
.footer__contact-info {
  margin-top: 1rem;
}

.footer__contact-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer__contact-info a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.footer__contact-info a:hover {
  color: #5a3e36;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #f5f5f5;
  border-radius: 50%;
  color: #5a3e36;
  transition: all 0.2s;
}

.social-link:hover {
  background-color: #5a3e36;
  color: white;
  transform: translateY(-3px);
}

/* Product card styles for related products */
.product-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card__image {
  position: relative;
  padding-top: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
}

.product-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__content {
  padding: 1.5rem;
}

.product-card__title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.product-card__title a {
  color: #333;
  text-decoration: none;
}

.product-card__title a:hover {
  color: #5a3e36;
}

/* Fix for the webkit-line-clamp issue */
.product-card__description {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1rem;
  /* Fix for multi-line truncation */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* Standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis for proper truncation */
  max-height: 2.8em; /* Fallback for browsers that don't support line-clamp */
}

.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-card__price {
  font-weight: 600;
  color: #5a3e36;
}

.product-card .add-to-cart-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}