/* ============================================================
   BIOPACK SOLUTION — Product Pages Styles (Cardboard, Wood, Plastic)
   ============================================================ */

/* ─── Product Intro ──────────────────────────────────────────── */
.product-intro {
  padding: var(--section-padding);
  background: var(--white);
}

.product-intro-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 5rem;
  align-items: center;
}

.product-intro-visual {
  position: relative;
  display: inline-block;
  width: 100%;
}

.product-intro-visual::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-xl);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.product-intro-visual:hover::before {
  top: 10px;
  left: 10px;
  right: -10px;
  bottom: -10px;
  border-color: rgba(16, 185, 129, 0.45);
}

.product-intro-image {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
  border: 8px solid var(--white);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-intro-image:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2xl), 0 20px 40px -15px rgba(2, 44, 34, 0.25);
}

.product-intro-image:hover img { transform: scale(1.05); }

/* Animated floating for stat card */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.product-intro-stat-card {
  position: absolute;
  top: 1.5rem;
  right: -2rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-align: center;
  min-width: 130px;
  animation: float 4s ease-in-out infinite;
  transition: var(--transition-normal);
}

.product-intro-stat-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.15);
  border-color: var(--green-400);
  animation-play-state: paused;
}

.product-intro-stat-card .stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-600);
  letter-spacing: -0.03em;
  line-height: 1;
}

.product-intro-stat-card .stat-lbl {
  font-size: 0.8rem;
  color: var(--gray-450);
  margin-top: 0.25rem;
}

/* Animated floating for cert card */
@keyframes floatReverse {
  0% { transform: translateY(0px); }
  50% { transform: translateY(6px); }
  100% { transform: translateY(0px); }
}

.product-intro-cert {
  position: absolute;
  bottom: 1.5rem;
  left: -2rem;
  z-index: 10;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 160px;
  animation: floatReverse 4.5s ease-in-out infinite;
  transition: var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-intro-cert:hover {
  transform: translateY(10px) scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(4, 120, 87, 0.3);
  animation-play-state: paused;
}

.product-intro-cert span {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
  display: inline-block;
}

.product-intro-cert strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
}

.product-intro-cert small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Intro Text */
.product-intro-text {}

.product-intro-text .section-badge {
  margin-bottom: 1.25rem;
}

.product-intro-text .section-title {
  margin-bottom: 0.75rem;
}

.product-intro-text .section-subtitle {
  margin-bottom: 2rem;
  max-width: 100%;
}

.product-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.product-spec-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: var(--transition-fast);
}

.product-spec-item:hover {
  border-color: var(--green-200);
  background: var(--green-50);
}

.spec-icon {
  width: 36px;
  height: 36px;
  background: var(--green-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.spec-text strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.1rem;
}

.spec-text span {
  font-size: 0.75rem;
  color: var(--gray-400);
}

@media (max-width: 1024px) {
  .product-intro-stat-card { right: 0; }
  .product-intro-cert { left: 0; }
}

}

.product-intro-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.product-intro-actions .btn-primary {
  background: #059669 !important;
  border-color: #059669 !important;
  color: var(--white) !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
}

.product-intro-actions .btn-primary:hover {
  background: #047857 !important;
  border-color: #047857 !important;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35) !important;
}

.product-intro-actions .btn-outline {
  border-color: #059669 !important;
  color: #059669 !important;
  background: transparent !important;
}

.product-intro-actions .btn-outline:hover {
  background: #059669 !important;
  color: var(--white) !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15) !important;
}

/* Shrink EN buttons slightly on desktop to guarantee they stay side-by-side */
body.lang-en .product-intro-actions .btn {
  padding: 0.85rem 1.25rem !important;
  font-size: 0.85rem !important;
}

@media (max-width: 900px) {
  .product-intro-grid { grid-template-columns: 1fr; gap: 3rem; }
  .product-intro-visual { max-width: 100%; width: 100%; }
  .product-intro-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  body.lang-en .product-intro-actions .btn {
    padding: 0.85rem 2rem !important;
    font-size: 0.9375rem !important;
  }
}

/* ─── Product Types / Catalog ────────────────────────────────── */
.catalog-section {
  padding: var(--section-padding);
  background: var(--gray-50);
}

.catalog-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.catalog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  transition: var(--transition-normal);
}

.catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-200);
}

.catalog-card-header {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, var(--green-50), var(--white));
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.catalog-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: var(--white);
}

.catalog-card-header h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.catalog-card-header p {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin-top: 0.15rem;
}

.catalog-card-body {
  padding: 1.5rem 2rem;
}

.catalog-features {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.catalog-feature {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.catalog-feature::before {
  content: '✓';
  width: 20px;
  height: 20px;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

/* ─── Process / How it Works ─────────────────────────────────── */
.process-section {
  padding: var(--section-padding);
  background: var(--white);
}

.process-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: calc(12.5% + 1rem);
  right: calc(12.5% + 1rem);
  height: 2px;
  background: linear-gradient(90deg, var(--green-200), var(--green-400), var(--green-200));
  pointer-events: none;
}

@media (max-width: 900px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-steps::before { display: none; }
}

@media (max-width: 540px) {
  .process-steps { grid-template-columns: 1fr; }
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: var(--white);
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
  transition: var(--transition-normal);
}

.process-step:hover .process-step-number {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(16,185,129,0.45);
}

.process-step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ─── Applications / Use Cases ───────────────────────────────── */
.applications-section {
  padding: var(--section-padding);
  background: var(--green-900);
  position: relative;
  overflow: hidden;
}

.applications-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(16,185,129,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(52,211,153,0.08) 0%, transparent 50%);
}

.applications-inner { position: relative; z-index: 1; }

.applications-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.applications-header .section-title { color: var(--white); }
.applications-header .section-subtitle { color: rgba(255,255,255,0.65); margin: 0 auto; }

.applications-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.application-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  transition: var(--transition-normal);
}

.application-card:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border-color: rgba(52,211,153,0.35);
}

.application-card .app-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.application-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.application-card p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .applications-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .applications-grid { grid-template-columns: repeat(2, 1fr); }
}

/* FAQ Section moved to global.css */

/* ─── Product Image Gallery ─────────────────────────── */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.main-image-container {
  width: 100%;
  max-width: 100%;
  height: 380px !important; /* Set standard equal height for all cards */
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  background: var(--white) !important; /* Premium white background */
  position: relative;
  cursor: zoom-in;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  padding: 0.75rem !important; /* Add padding so product photo stands out */
  box-sizing: border-box !important;
}

.main-image-container:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--green-200);
}

.main-image-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* Show full image, no cropping */
  background: transparent !important;
  transition: opacity 0.2s ease-in-out, transform 0.3s ease;
}

.main-image-container:hover img {
  transform: scale(1.03);
}

.thumbnail-nav-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  height: 76px !important; /* Set standard height to ensure cards align perfectly */
}

.thumb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
}

.thumb-nav-btn:hover {
  background: var(--green-600);
  color: var(--white);
  border-color: var(--green-600);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.thumb-nav-btn i {
  font-size: 0.8rem;
  margin: 0;
}

.thumb-nav-left {
  left: -12px;
}

.thumb-nav-right {
  right: -12px;
}

.thumbnail-container {
  display: flex;
  justify-content: safe center;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.5rem 12px; /* Add padding to prevent layout clipping at borders */
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch; /* Smooth inertia scrolling for iOS */
}

.thumbnail-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
  background: var(--white);
  object-fit: cover;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.thumbnail:hover {
  border-color: var(--green-400);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.thumbnail.active {
  border-color: var(--green-600);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* --- Flex Alignment for Detail Cards & Buttons --- */
.products-all-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  align-items: stretch !important;
  gap: 2rem !important;
}

@media (max-width: 991px) {
  .products-all-grid {
    grid-template-columns: 1fr !important;
  }
}

.detail-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.detail-card-body {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}

.detail-card-body > p {
  margin-bottom: 1.5rem !important;
}

@media (min-width: 992px) {
  .detail-card-body > p {
    min-height: 96px !important; /* Aligns spec tables to the exact same vertical start without creating massive gaps */
  }
}

.detail-card-body > div:last-child {
  margin-top: auto !important;
  padding-top: 1.5rem;
}

/* --- Flute Recommendation Section Styles --- */
.flute-card {
  transition: all 0.3s ease !important;
}

.flute-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-300) !important;
  background: var(--white) !important;
  box-shadow: var(--shadow-md) !important;
}

.flute-visual .lightbox-trigger:hover .hover-overlay {
  opacity: 1 !important;
}

.flute-visual .lightbox-trigger:hover img {
  transform: scale(1.03);
}

@media (max-width: 992px) {
  .flute-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
}

.detail-card-header {
  display: flex !important;
  align-items: center !important;
  min-height: 155px !important; /* Force equal height for all card headers (green background area) even with 3 lines of text */
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .detail-card-header {
    min-height: auto !important; /* Allow auto height on small mobile screens */
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .main-image-container {
    height: 280px !important; /* Scale down image height for mobile viewports */
    padding: 0.5rem !important;
  }

  .thumbnail {
    width: 50px !important; /* Resize thumbnails on mobile */
    height: 50px !important;
  }

  .thumbnail-nav-wrapper {
    height: 66px !important; /* Correct wrapper height to match new thumbnail size */
  }

  .detail-card-body > div:last-child {
    flex-direction: column !important; /* Stack action buttons vertically on mobile */
    gap: 0.75rem !important;
  }

  .detail-card-body > div:last-child .btn {
    width: 100% !important; /* Expand buttons to fill full card width */
    flex: none !important;
    justify-content: center !important;
  }
}
