/* ============================================
   PACKISTRY — PRODUCT DETAIL PAGE STYLES
   ============================================ */

/* Product Tab Bar */
.product-tab-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 0;
  overflow-x: auto;
}
.product-tab-bar::-webkit-scrollbar { display: none; }
.product-tab-bar .inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 var(--sp-xl);
  min-width: max-content;
}
.product-tab-bar .product-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  border-top: none;
  transition: var(--transition-fast);
  color: var(--text-muted);
}
.product-tab-bar .product-tab:hover { color: var(--text-primary); }
.product-tab-bar .product-tab.active {
  border-bottom-color: var(--color-gold);
  border-top: none;
  color: var(--color-navy);
}
.product-tab .pt-icon {
  width: 32px; height: 32px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.product-tab.active .pt-icon {
  background: var(--color-gold);
}
.product-tab .pt-icon svg { width: 16px; height: 16px; color: var(--color-gray-400); }
.product-tab.active .pt-icon svg { color: var(--color-white); }
.product-tab span { font-size: 11px; font-weight: 500; white-space: nowrap; }

/* Product Detail Layout */
.product-detail-section { background: var(--bg-white); }
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: var(--sp-xl);
  align-items: start;
}

/* Image Gallery */
.product-gallery {}
.product-main-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
  border: 1px solid var(--color-gray-200);
}
.product-main-img img,
.product-main-img .img-placeholder {
  width: 100%; aspect-ratio: 1; object-fit: contain;
}
.product-thumbnails {
  display: flex; gap: var(--sp-sm);
}
.product-thumb {
  width: 70px; height: 70px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-gray-200);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.product-thumb.active { border-color: var(--color-gold); }
.product-thumb:hover { border-color: var(--color-gold-light); }
.product-thumb img,
.product-thumb .img-placeholder { width: 100%; height: 100%; object-fit: cover; font-size: 9px; }

/* Product Info */
.product-info {}
.product-info h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-md); }
.product-info p { font-size: var(--fs-base); line-height: 1.8; color: var(--text-secondary); margin-bottom: var(--sp-md); }

.safe-checkout {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin: var(--sp-md) 0;
  padding: var(--sp-sm) 0;
}
.safe-checkout .sc-line {
  flex: 1; height: 1px; background: var(--color-gray-200);
}
.safe-checkout .sc-text {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.payment-icons {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.payment-icons img { height: 24px; }
.payment-icon-badge {
  height: 24px; padding: 0 10px;
  background: var(--bg-light);
  border: 1px solid var(--color-gray-200);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Features Bar */
.product-features-bar {
  background: #F5F0E8;
  border-top: 1px solid #E8E0D0;
  border-bottom: 1px solid #E8E0D0;
  padding: var(--sp-lg) 0;
}
.features-bar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-md);
  text-align: center;
}
.feat-bar-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.feat-bar-item .fb-icon {
  width: 40px; height: 40px;
  background: rgba(201,168,76,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.feat-bar-item .fb-icon svg { width: 20px; height: 20px; color: var(--color-gold); }
.feat-bar-item span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Real image fixes */
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f9f9f9;
}
.product-main-img img {
  width: 100%;
  display: block;
  background: #f9f9f9;
}

/* ==========================================
   RELATED PRODUCTS SECTION
   ========================================== */
.related-products-section {
  background: var(--bg-light);
  padding: var(--sp-2xl) 0;
}

.rp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
}

.rp-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.rp-arrows {
  display: flex;
  gap: 8px;
}

.rp-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-gray-300);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.rp-arrow:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

.rp-track-wrap {
  overflow: hidden;
  padding-top: 4px;
  margin-top: -4px;
}

.rp-track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s ease;
}

/* rp-card-wrap: outer div handles border + shadow */
.rp-card-wrap {
  flex-shrink: 0;
  width: 210px;
  border-radius: var(--radius-lg);
  border: 2px solid #E8E8E8;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.rp-card-wrap:hover {
  border-color: #C9A84C;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.18);
}

/* rp-card: inner div handles overflow */
.rp-card {
  width: 100%;
  background: var(--bg-white);
  border-radius: calc(var(--radius-lg) - 2px);
  overflow: hidden;
}

.rp-card-img {
  width: 100%;
  height: 180px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.rp-card-name {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  border-top: 1px solid var(--color-gray-200);
}

.rp-card a { text-decoration: none; }

.rp-card-img {
  width: 100%;
  height: 180px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.rp-card-name {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  border-top: 1px solid var(--color-gray-200);
}

/* ==========================================
   PREMIUM FINISHES SECTION
   ========================================== */
.premium-finishes-section {
  background: var(--bg-white);
  padding: var(--sp-2xl) 0;
  overflow: hidden;
}

@media (max-width: 767px) {
  .product-tab-bar .inner { justify-content: flex-start; padding-left: 16px; }
  .product-tab-bar .product-tab { padding-left: 12px; padding-right: 12px; }
  .product-detail-layout { grid-template-columns: 1fr; gap: 28px; }
  .product-detail-layout > * { min-width: 0; max-width: 100%; }
  .product-info { order: -1; }
  .product-info h1, .product-info p { overflow-wrap: anywhere; }
  .product-info h1 { font-size: 28px; }
  .features-bar-grid { grid-template-columns: repeat(3, 1fr); gap: 20px 8px; }
  .product-thumbnails { overflow-x: auto; padding-bottom: 4px; }
  .rp-header { align-items: flex-start; gap: 12px; }
  .rp-title { font-size: 19px; }
  .pf-heading { font-size: 23px; }
  .pf-item { width: 180px; height: 140px; }
}

.pf-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 12px;
}

.pf-desc {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto var(--sp-xl);
}

.pf-track-wrap {
  overflow: hidden;
  width: 100%;
}

.pf-track {
  display: flex;
  gap: 16px;
  animation: pfScroll 22s linear infinite;
  width: max-content;
}

.pf-track:hover {
  animation-play-state: paused;
}

@keyframes pfScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.pf-item {
  flex-shrink: 0;
  width: 220px;
  height: 170px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
}

.pf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f9f9f9;
}

@media (max-width: 767px) {
  .pf-heading { font-size: 23px; }
  .pf-item { width: 180px; height: 140px; }
}
