/**
 * Product Detail Page Styles
 */

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 80px;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-text-dark);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 80px;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--color-text-dark);
}

.breadcrumb .separator {
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--color-text-dark);
}

/* Product Detail Layout */
.product-detail {
  margin-bottom: 3rem;
}

.product-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .product-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Product Image */
.product-image {
  position: relative;
}

.product-image .hero-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--color-bg-alt);
}

.product-image .no-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: 8px;
  color: var(--color-muted);
}

.product-image .gallery {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.product-image .gallery-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--color-bg-alt);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.product-image .gallery-thumb:hover {
  border-color: var(--color-accent);
}

.product-image .gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

a.product-brand {
  display: inline-block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a.product-brand:hover {
  opacity: 0.8;
}

.product-name {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.product-short-desc {
  font-size: 1.125rem;
  color: var(--color-muted);
  margin: 0;
}

/* Prices */
.product-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.price-item {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-currency {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.price-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.price-original {
  font-size: 1rem;
  color: var(--color-muted);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

/* Actions */
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.product-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.product-actions .btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.product-actions .btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.no-affiliate {
  color: var(--color-muted);
  font-style: italic;
}

/* Tags */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-tags .tag {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  background: var(--color-bg-alt);
  border-radius: 100px;
  color: var(--color-muted);
}

/* Description */
.product-description {
  margin-bottom: 3rem;
}

.product-description h2 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}

.product-description .prose {
  max-width: 70ch;
  line-height: 1.7;
  color: var(--color-text);
}

.product-description .prose h2,
.product-description .prose h3,
.product-description .prose h4 {
  color: var(--color-text-dark);
  margin: 1.5em 0 0.75em;
}

.product-description .prose p {
  margin: 0 0 1em;
}

.product-description .prose ul,
.product-description .prose ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.product-description .prose li {
  margin-bottom: 0.5em;
}

.product-description .prose a {
  color: var(--color-accent);
  text-decoration: underline;
}

.product-description .prose code {
  padding: 0.2em 0.4em;
  font-size: 0.9em;
  background: var(--color-bg-alt);
  border-radius: 3px;
}

.product-description .prose blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 3px solid var(--border);
  color: var(--color-muted);
  font-style: italic;
}

/* Sample Images */
.product-samples {
  margin-bottom: 3rem;
}

.product-samples h2 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}

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

.sample-item {
  position: relative;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.sample-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s;
}

.sample-item:hover img {
  transform: scale(1.05);
}

.sample-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  font-size: 0.75rem;
  color: #fff;
}

/* Related Products */
.related-products {
  margin-bottom: 3rem;
}

.related-products .no-image-thumb {
  width: 100%;
  height: 100%;
  background: var(--color-bg-alt);
}

/* Brand Page */
.brand-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
}

.brand-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--color-bg-alt);
  padding: 0.5rem;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-name {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.brand-website {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand-website:hover {
  opacity: 0.8;
}

.brand-description {
  margin-bottom: 2rem;
}

.brand-description .prose {
  max-width: 70ch;
  line-height: 1.7;
  color: var(--color-text);
}

.brand-description .prose h2,
.brand-description .prose h3,
.brand-description .prose h4 {
  color: var(--color-text-dark);
  margin: 1.5em 0 0.75em;
}

.brand-description .prose p {
  margin: 0 0 1em;
}

.brand-description .prose a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Category Page */
.category-header {
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.category-name {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 480px) {
  .category-name {
    font-size: 1.5rem;
  }
}

.empty-state {
  color: var(--color-muted);
  font-style: italic;
  padding: 2rem 0;
}

@media (max-width: 480px) {
  .brand-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
  }

  .brand-name {
    font-size: 1.5rem;
  }
}
