.jc-product-detail {
  --jc-color-border: var(--jelly-color-border, #e5e7eb);
  --jc-color-bg: var(--jelly-color-white, #fff);
  --jc-color-title: var(--jelly-color-text, #111827);
  --jc-color-description: var(--jelly-color-description, #6b7280);
  --jc-color-primary: var(--jelly-color-primary, #2563eb);
  --jc-product-detail-sticky-offset: 0px;
  --jc-product-detail-scroll-offset: 7rem;
  margin-bottom: 4rem;
}

.jc-product-detail .jc-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.jc-product-detail__tabs {
  position: sticky;
  top: var(--jc-product-detail-sticky-offset);
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--jc-color-border);
  background: var(--jc-color-bg);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.jc-product-detail__tabs::-webkit-scrollbar {
  display: none;
}

.jc-product-detail__tab {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.75rem 0;
  background: transparent;
  color: var(--jc-color-description);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color 0.2s ease;
}

.jc-product-detail__tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--jc-color-primary);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.jc-product-detail__tab:hover {
  color: var(--jc-color-primary);
  text-decoration: none;
}

.jc-product-detail__tab:hover::after {
  opacity: 0.6;
  transform: scaleX(0.6);
}

.jc-product-detail__tab.is-active {
  color: var(--jc-color-title);
}

.jc-product-detail__tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.jc-product-detail__tab-label {
  display: block;
  font-weight: 600;
}

.jc-product-detail__sections {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2rem;
  scroll-margin-top: var(--jc-product-detail-scroll-offset);
}

.jc-product-detail__section {
  min-width: 0;
  scroll-margin-top: var(--jc-product-detail-scroll-offset);
}

.jc-product-detail__inquiry {
  border: 1px solid var(--jc-color-border);
  padding: 1.5rem;
  background: #fafafa;
}

.jc-product-detail__inquiry input,
.jc-product-detail__inquiry textarea {
  background: #fff;
}

@media screen and (max-width: 768px) {
  .jc-product-detail {
    margin-bottom: 2rem;
  }

  .jc-product-detail__tabs {
    gap: 1rem;
    padding: 0 1rem;
  }
}
