/* Product Detail Page */

:root {
  --primary: #1d6bb3;
  --primary-dark: #0b4f8a;
  --primary-light: rgba(29,107,179,0.08);
  --steel-900: #0f1720;
  --steel-700: #2b3642;
  --steel-600: #3a4654;
  --steel-400: #7a8a99;
  --steel-100: #e6eef5;
  --white: #ffffff;
  --bg: #f4f7fb;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 2px 12px rgba(15,23,32,0.08);
  --shadow-md: 0 6px 24px rgba(15,23,32,0.12);
  --transition: 0.3s ease;
  --myshadow: 0 0 5px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--white);
  color: var(--steel-900);
  -webkit-font-smoothing: antialiased;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--steel-100);
  padding: 0.75rem 5vw;
  font-size: 0.8rem;
  color: var(--steel-400);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--primary-dark); }

.breadcrumb span { color: var(--steel-600); }

/* Page Hero */
.product-hero {
  background: linear-gradient(160deg, #0a1628 0%, #0f2040 55%, #0d1a35 100%);
  padding: 2.5rem 5vw 2rem;
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(29,107,179,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,107,179,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.product-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

.product-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #79b6f0;
  margin-bottom: 0.5rem;
}

.product-hero .eyebrow::before,
.product-hero .eyebrow::after { content: ':::::'; opacity: 0.5; }

.product-hero h1 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  color: #e8f3ff;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}

.product-hero .breadcrumb-hero {
  font-size: 0.82rem;
  color: #7a9bbf;
  margin: 0;
}

.product-hero .breadcrumb-hero a {
  color: #4da3ff;
  text-decoration: none;
}

.product-hero .breadcrumb-hero a:hover { text-decoration: underline; }

/* Page wrapper */
.product-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 4vw 4rem;
}

/* ── Main Product Container ── */
.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  margin-bottom: 2rem;
  align-items: start;
  position: relative;
}

/* Views counter */
.top-right-info {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 5;
}

.views-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--steel-100);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--steel-600);
  font-weight: 600;
}

/* ── Image Section ── */
.product-image-section {
  position: sticky;
  top: 90px;
  align-self: start;
  display: flex;
  gap: 10px;
  background: var(--white);
  padding: 20px;
  border-radius: 15px;
  /* border: 1px solid var(--primary); */
  /* box-shadow: var(--myshadow); */
}

.main-image {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--steel-100);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform var(--transition);
}

.main-image:hover img { transform: scale(1.03); }

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-400);
  font-size: 0.9rem;
}

/* Thumbnails */
.image-thumbnails {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-direction: column;
  /* overflow-x: auto; */
  padding-bottom: 4px;
  /* scrollbar-width: thin; */
  /* scrollbar-color: var(--primary) transparent; */
}

.thumbnail {
  width: 68px;
  height: 68px;
  min-width: 68px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ── Product Details ── */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-top: 0.5rem;
  background: var(--white);
  padding: 20px;
  border-radius: 15px;
  /* border: 1px solid var(--primary); */
  box-shadow: var(--myshadow);
}

.product-details h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--steel-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Short description */
.short-description {
  background: var(--primary-light);
  /* border-left: 3px solid var(--primary); */
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--steel-700);
  line-height: 1.7;
}

/* Description */
.description-content {
  background: var(--bg);
  border: 1px solid var(--steel-100);
  border-radius: var(--radius);
  padding: 1.4rem;
  font-size: 0.9rem;
  color: var(--steel-700);
  line-height: 1.75;
}

.description-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--steel-900);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.description-content p { margin-bottom: 0.6rem; }
.description-content ul, .description-content ol { padding-left: 1.4rem; margin: 0.6rem 0; }
.description-content li { margin-bottom: 0.4rem; }

/* Contact CTA */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.buy-now-btn,
.add-to-cart-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
}

.buy-now-btn {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(29,107,179,0.3);
}

.buy-now-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29,107,179,0.35);
}

.add-to-cart-btn {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.add-to-cart-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.product-3d-section {
  background: var(--white);
  padding: 2rem;
  margin: 0 0 2rem;
}

.product-3d-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.product-3d-section h2,
.related-products h2,
.product-tabs-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--steel-900);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  padding: 0.6rem 1rem;
  background: var(--bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  display: inline-block;
}

.product-3d-section p {
  font-size: 0.85rem;
  color: var(--steel-400);
  margin-bottom: 1.25rem;
}

.model-view-reset {
  width: 40px;
  height: 40px;
  border: 1px solid var(--steel-100);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--steel-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex: 0 0 auto;
}

.model-view-reset:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.model-viewer-wrap {
  position: relative;
  width: 100%;
  height: 430px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--steel-100);
  background: #f3f5f7;
}

.model-viewer-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.model-viewer-wrap canvas:active {
  cursor: grabbing;
}

.model-viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--steel-600);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  background: rgba(243, 245, 247, 0.86);
  pointer-events: none;
}

.model-viewer-loading .iconify {
  color: var(--primary);
  animation: spin3d 1.5s linear infinite;
}

.model-viewer-loading.is-error {
  color: #b42318;
  letter-spacing: 0;
}

.model-viewer-loading.is-error .iconify {
  animation: none;
  color: #b42318;
}

@keyframes spin3d {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Tabs ── */
.product-tabs {
  background: var(--white);
  border: 1px solid var(--steel-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid var(--steel-100);
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-buttons::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--steel-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.tab-btn:hover { color: var(--primary); }

.tab-btn.active {
  color: var(--primary);
  background: var(--white);
}

.tab-btn.active::after { width: 60%; }

.tab-content { padding: 2rem; }

.tab-panel { display: none; opacity: 0; transition: opacity var(--transition); }
.tab-panel.active { display: block; opacity: 1; animation: fadeUp 0.35s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* FAQ */
.faq-section { display: flex; flex-direction: column; gap: 0.75rem; }

.faq-item {
  background: var(--bg);
  border: 1px solid var(--steel-100);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
  transition: var(--transition);
}

.faq-item:hover {
  border-left-color: var(--primary-dark);
  box-shadow: var(--shadow);
  transform: translateX(3px);
}

.faq-item h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--steel-900);
  margin-bottom: 0.5rem;
}

.faq-item p {
  font-size: 0.85rem;
  color: var(--steel-600);
  line-height: 1.65;
}

/* Video */
.video-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--steel-900);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  text-align: center;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 42%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Related Products ── */
.related-products {
  margin-top: 2rem;
  background: var(--white);
  border: 1px solid var(--steel-100);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.related-products .products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.related-products .product-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--steel-100);
  transition: transform var(--transition), box-shadow var(--transition);
  grid-row: span 1 !important;
  grid-column: span 1 !important;
}

.related-products .product-card::before,
.related-products .product-card::after { display: none !important; content: none !important; }

.related-products .product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.related-products .product-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.related-products .product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

.related-products .product-card:hover img { transform: scale(1.04); }

.related-products .product-card .no-image {
  width: 100%;
  height: 160px;
  background: var(--steel-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-400);
  font-size: 0.8rem;
}

.related-products .product-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--steel-900);
  padding: 0.75rem 0.9rem;
  margin: 0;
  line-height: 1.4;
}

/* ── Responsive ── */

/* Laptop (≤1280px) */
@media (max-width: 1280px) {
  /* .product-page { padding: 1rem 3vw 4rem; } */
  .product-container { gap: 2rem; }
}

/* Tablet landscape (≤1024px) */
@media (max-width: 1024px) {
  /* .product-page { padding: 1rem 3vw 3rem; } */
  .product-container { gap: 1.75rem; }
  .related-products .products-grid { grid-template-columns: repeat(3, 1fr); }
  .main-image { height: 360px; }
  .model-viewer-wrap { height: 380px; }
}

/* Tablet portrait (≤768px) */
@media (max-width: 768px) {
  .product-page { padding: 1rem 4vw 3rem; }
  .product-hero { padding: 1.75rem 4vw 1.5rem; }
  .product-hero h1 { font-size: clamp(1rem, 4vw, 1.4rem); }

  /* Stack image + details vertically */
  .product-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }

  /* Unstick image on tablet */
  .product-image-section {
    position: static;
    flex-direction: column;
    padding: 14px;
  }

  /* Thumbnails go horizontal below main image */
  .image-thumbnails {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    padding-bottom: 4px;
    gap: 0.5rem;
  }

  .thumbnail { width: 58px; height: 58px; min-width: 58px; }

  .main-image { height: 300px; }

  .product-details h1 { font-size: clamp(1.2rem, 4vw, 1.6rem); }

  .related-products .products-grid { grid-template-columns: repeat(2, 1fr); }

  .tab-content { padding: 1.5rem; }
  .video-container { padding-bottom: 56.25%; }
  .model-viewer-wrap { height: 320px; }
  .product-3d-section,
  .product-tabs,
  .related-products { padding: 1.5rem; }
}

/* Mobile (≤560px) */
@media (max-width: 560px) {
  .product-page { padding: 0.75rem 3.5vw 2rem; }
  .product-hero { padding: 1.25rem 3.5vw 1.25rem; }
  .product-hero h1 { font-size: clamp(0.95rem, 5vw, 1.2rem); }

  .product-container { gap: 1rem; padding: 1rem 0; }

  .product-image-section { padding: 10px; border-radius: 10px; }
  .main-image { height: 240px; border-radius: 8px; }

  /* Thumbnails horizontal row */
  .image-thumbnails {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 0.4rem;
    padding-bottom: 4px;
  }
  .thumbnail { width: 50px; height: 50px; min-width: 50px; border-radius: 6px; }

  .product-details { padding: 14px; border-radius: 10px; gap: 1rem; }
  .product-details h1 { font-size: clamp(1.1rem, 5vw, 1.4rem); }

  .short-description { padding: 0.85rem 1rem; font-size: 0.85rem; }
  .description-content { padding: 1rem; font-size: 0.85rem; }

  .action-buttons { flex-direction: column; }
  .buy-now-btn, .add-to-cart-btn { min-width: unset; width: 100%; }

  .product-3d-section,
  .product-tabs,
  .related-products { padding: 1rem; border-radius: var(--radius); }

  .model-viewer-wrap { height: 260px; }

  .tab-buttons { flex-wrap: nowrap; }
  .tab-btn { min-width: 100px; padding: 0.75rem 1rem; font-size: 0.72rem; }
  .tab-content { padding: 1rem; }

  .faq-item { padding: 0.9rem 1rem; }
  .faq-item h4 { font-size: 0.85rem; }
  .faq-item p { font-size: 0.8rem; }

  .video-container { padding-bottom: 56.25%; }

  .related-products .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .related-products .product-card img { height: 120px; }
  .related-products .product-card h4 { font-size: 0.75rem; padding: 0.6rem 0.7rem; }

  .product-3d-section h2,
  .related-products h2 { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
}

/* Small mobile (≤400px) */
@media (max-width: 400px) {
  .product-page { padding: 0.5rem 3vw 1.5rem; }
  .main-image { height: 200px; }
  .thumbnail { width: 42px; height: 42px; min-width: 42px; }
  .model-viewer-wrap { height: 220px; }
  .related-products .products-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .related-products .product-card img { height: 100px; }
  .product-details h1 { font-size: 1rem; }
}
