/**
 * Kompas Ilmu - Product Detail Stylesheet (produk-style.css)
 */

/* Main Product Card & Gallery */
.product-main-card {
  border: 1px solid var(--border-card, #EAEFF5);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 2.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: padding 0.3s ease, min-height 0.3s ease;
  min-height: 340px;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.product-main-card.has-active-video {
  padding: 1.25rem 1rem 1.25rem;
}

.product-main-img {
  max-height: 290px;
  width: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* Product Indicators (Maksimal 4 Bar Tampak dengan Animasi Bergeser) */
.product-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.product-indicators-viewport {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 136px; /* Tepat 4 bar: 4 * 28px + 3 * 8px = 136px */
  overflow: hidden;
  position: relative;
  padding: 4px 0;
}

.product-indicators-track {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 0;
  margin: 0;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.product-indicator-bar {
  width: 28px;
  height: 4px;
  background-color: #E2E8F0;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-indicator-bar:hover {
  background-color: #CBD5E1;
}

.product-indicator-pill {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 4px;
  background-color: #008FD7;
  border-radius: 4px;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 1px 3px rgba(0, 143, 215, 0.35);
  will-change: transform;
}

.product-indicator {
  width: 24px;
  height: 3.5px;
  background-color: #E2E8F0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-indicator.active {
  background-color: #008FD7;
  width: 34px;
}

/* Thumbnail Carousel Wrapper & Viewport (Maksimal 4 Thumbnail Tampak) */
:root {
  --thumb-size: 80px;
  --thumb-gap: 10px;
}

@media (max-width: 576px) {
  :root {
    --thumb-size: clamp(60px, 16.5vw, 75px);
    --thumb-gap: 8px;
  }
}

.product-thumb-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.product-thumb-viewport {
  width: calc(4 * var(--thumb-size) + 3 * var(--thumb-gap) + 6px);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 3px;
}

.product-thumb-viewport::-webkit-scrollbar {
  display: none;
}

.product-thumb-track {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--thumb-gap);
  align-items: center;
  position: relative;
  margin: 0;
  padding: 0;
}

.thumb-carousel-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.thumb-carousel-btn:hover {
  background: #008FD7;
  color: #FFFFFF;
  border-color: #008FD7;
  box-shadow: 0 3px 8px rgba(0, 143, 215, 0.25);
  transform: scale(1.06);
}

.thumb-carousel-btn:active {
  transform: scale(0.96);
}

.thumb-carousel-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.product-thumb {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  width: var(--thumb-size);
  height: var(--thumb-size);
  flex: 0 0 var(--thumb-size);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.product-thumb:hover, .product-thumb.active {
  border-color: #008FD7;
  box-shadow: 0 0 0 3px rgba(0, 143, 215, 0.15);
  transform: translateY(-2px);
}

.product-thumb img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Shopee-style Video Thumbnail */
.product-thumb-video {
  position: relative;
  overflow: hidden;
}

.product-thumb-video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  background: rgba(15, 23, 42, 0.75);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
  pointer-events: none;
}

.product-thumb-video:hover .product-thumb-video-icon,
.product-thumb-video.active .product-thumb-video-icon {
  background: #E11D48;
  transform: translate(-50%, -50%) scale(1.1);
  border-color: #FFFFFF;
}

/* Product Media & Video Containers */
.product-media-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  transition: min-height 0.3s ease;
}

.product-video-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  transition: max-width 0.3s ease, height 0.3s ease, min-height 0.3s ease;
}

/* 1. Format Vertikal (TikTok / Shorts) - Pas 9:16 Tanpa Scrollbar */
.product-video-container.video-mode-vertical {
  max-width: 340px;
  width: 100%;
  height: 580px;
  min-height: 580px;
  background: #000000;
}

/* 2. Format Landscape (YouTube Standard 16:9) */
.product-video-container.video-mode-landscape {
  max-width: 100%;
  width: 100%;
  height: 280px;
  min-height: 280px;
  aspect-ratio: 16 / 9;
  background: #000000;
}

/* 3. Format Card (Shopee Video / Direct Action Card) */
.product-video-container.video-mode-card {
  max-width: 360px;
  width: 100%;
  height: 330px;
  min-height: 330px;
}

.product-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  overflow: hidden;
}

.shopee-video-card {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #EE4D2D 0%, #FF7337 100%);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}


/* Marketplace Buttons */
.marketplace-btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 1.25rem;
  margin-bottom: 2rem;
}

.btn-market {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 22px;
  border-radius: 10px;
  color: #FFFFFF !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  min-height: 48px;
}

.btn-market i {
  color: #FFFFFF !important;
}

.btn-market:hover {
  transform: translateY(-2px);
  color: #FFFFFF !important;
}

.btn-market-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.btn-market-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #FFFFFF !important;
  line-height: 1.2;
}

.btn-market-main i {
  font-size: 1.05rem;
  color: #FFFFFF !important;
}

.btn-market-subtext {
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92) !important;
  line-height: 1.1;
  margin-top: 2px;
  white-space: nowrap;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
  font-weight: 600;
}
.btn-whatsapp:hover {
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
  color: #FFFFFF !important;
}

.btn-shopee {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}
.btn-shopee:hover {
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
  color: #FFFFFF !important;
}

.btn-tiktok {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}
.btn-tiktok:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
  color: #FFFFFF !important;
}

/* Detail Typography & Meta Grid */
.product-meta-row {
  font-size: 0.92rem;
  line-height: 1.6;
}

.product-meta-label {
  color: #64748B;
  font-weight: 500;
}

.product-meta-value {
  color: #0F172A;
  font-weight: 600;
}

