/**
 * Storyteller - Product Details Preset
 * Typography-forward layout with large description
 */

.kitbix-design-product-details-storyteller .storyteller-product {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.storyteller-product__container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.storyteller-product__media {
  position: sticky;
  top: 2rem;
}

.storyteller-product__image-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  background: #f8fafc;
  aspect-ratio: 4 / 5;
  margin-bottom: 1.5rem;
}

.storyteller-product__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storyteller-product__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 1rem;
}

.storyteller-product__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
}

.storyteller-product__thumb {
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  background: none;
  aspect-ratio: 1;
}

.storyteller-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.storyteller-product__thumb:hover,
.storyteller-product__thumb.is-active {
  border-color: var(--kitbix-commerce-primary, #1d4ed8);
}

.storyteller-product__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.storyteller-product__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.storyteller-badge {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.storyteller-badge--in-stock {
  background: #d1fae5;
  color: var(--kitbix-commerce-success, #16a34a);
}

.storyteller-badge--out-of-stock {
  background: #fee2e2;
  color: var(--kitbix-commerce-danger, #dc2626);
}

.storyteller-product__title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #0f172a;
}

.storyteller-product__price-group {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.storyteller-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--kitbix-commerce-primary, #1d4ed8);
  line-height: 1;
}

.storyteller-price--old {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--kitbix-commerce-muted, #6b7280);
  text-decoration: line-through;
}

.storyteller-product__story {
  border-left: 4px solid var(--kitbix-commerce-primary, #1d4ed8);
  padding-left: 2rem;
}

.storyteller-product__story-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #1e293b;
}

.storyteller-product__description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #475569;
}

.storyteller-product__description p {
  margin: 0 0 1rem;
}

.storyteller-product__description p:last-child {
  margin-bottom: 0;
}

.storyteller-product__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--kitbix-commerce-border, #e5e7eb);
}

.storyteller-btn {
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
}

.storyteller-btn--primary {
  background: var(--kitbix-commerce-primary, #1d4ed8);
  color: #ffffff;
}

.storyteller-btn--primary:hover {
  background: var(--kitbix-commerce-accent, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.3);
}

.storyteller-btn--ghost {
  background: transparent;
  color: var(--kitbix-commerce-primary, #1d4ed8);
  border: 2px solid var(--kitbix-commerce-border, #e5e7eb);
}

.storyteller-btn--ghost:hover {
  border-color: var(--kitbix-commerce-primary, #1d4ed8);
  background: rgba(29, 78, 216, 0.05);
}

.storyteller-btn--disabled {
  background: #f1f5f9;
  color: var(--kitbix-commerce-muted, #6b7280);
  cursor: not-allowed;
}

.storyteller-product__assurance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--kitbix-commerce-muted, #6b7280);
  margin: 0;
}

.storyteller-product__assurance svg {
  color: var(--kitbix-commerce-success, #16a34a);
}

@media (max-width: 968px) {
  .storyteller-product__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .storyteller-product__media {
    position: static;
  }
  
  .storyteller-product__title {
    font-size: 2rem;
  }
  
  .storyteller-price {
    font-size: 1.5rem;
  }
  
  .storyteller-product__story {
    padding-left: 1.5rem;
  }
  
  .storyteller-product__story-title {
    font-size: 1.25rem;
  }
  
  .storyteller-product__description {
    font-size: 1rem;
  }
}
