/* ==================================================
   Product Detail Template (fw- prefix)
   Shared by: cutter-compactor-double-stage-pelletizing-line, etc.
   Reuses pe-pp-film-washing-line layout structure
   ================================================== */

html { scroll-behavior: smooth; }

/* Hero Section */
.fw-hero {
  padding: 100px 0 60px;
  background: #fff;
}
.fw-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.fw-hero-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fw-hero-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f8f9fa;
  aspect-ratio: 4/3;
}
.fw-hero-main img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.fw-hero-main img.active {
  opacity: 1;
}
.fw-hero-main img:first-child {
  position: relative;
}
.fw-hero-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.fw-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s;
}
.fw-hero-dot.active {
  background: var(--brand);
  width: 24px;
  border-radius: 4px;
}
.fw-hero-thumbs {
  display: flex;
  gap: 10px;
}
.fw-hero-thumb {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.fw-hero-thumb:hover,
.fw-hero-thumb.active {
  border-color: var(--brand);
}
.fw-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fw-hero-content { padding-top: 10px; }
.fw-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}
.fw-breadcrumb a { color: #64748b; text-decoration: none; }
.fw-breadcrumb a:hover { color: var(--brand); }
.fw-title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.fw-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 20px;
}
.fw-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.fw-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #334155;
}
.fw-feature svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
}
.fw-cta-group { display: flex; gap: 12px; flex-wrap: wrap; }
.fw-hero-video-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  transition: color 0.2s;
}
.fw-hero-video-link:hover { color: var(--brand); }
.fw-hero-video-link:hover .fw-hero-video-icon {
  background: var(--brand);
  color: #fff;
}
.fw-hero-video-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e2e8f0;
  border-radius: 50%;
  font-size: 10px;
  color: #475569;
  transition: all 0.2s;
}
.fw-hero-video-text { color: inherit; }
.fw-hero-video-badge {
  display: inline-block;
  padding: 2px 7px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.fw-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.fw-cta-primary { background: var(--brand); color: #fff; }
.fw-cta-primary:hover { background: var(--brand-dark); }
.fw-cta-secondary {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.fw-cta-secondary:hover { background: rgba(10,132,255,0.06); }

/* Materials Section */
.fw-materials-section { padding: 60px 0; background: #f8fafc; }
.fw-section-title {
  text-align: center;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 40px;
}
.fw-materials-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.fw-material-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  width: 230px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.fw-material-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.fw-material-card span {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-align: center;
  line-height: 1.2;
}
.fw-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  flex-grow: 0;
  align-self: center;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
}
.fw-output-card {
  background: linear-gradient(180deg, #f1f8e9 0%, #e8f5e9 50%, #c8e6c9 100%);
  border-color: #81c784;
  box-shadow: 0 10px 32px rgba(56, 142, 60, 0.2);
}
.fw-output-card span { color: #1b5e20; font-weight: 700; }

/* Parameter Section */
.fw-params-section { padding: 60px 0; background: #fff; }
.fw-params-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.fw-param-tab {
  padding: 10px 20px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.fw-param-tab:hover,
.fw-param-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.fw-params-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.fw-params-table thead { background: var(--brand); color: #fff; }
.fw-params-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.fw-params-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}
.fw-params-table tbody tr:hover { background: #f8fafc; }
.fw-params-note { text-align: center; margin-top: 16px; font-size: 12px; color: #64748b; }
.fw-params-cta { text-align: center; margin-top: 24px; }

/* Process Section */
.fw-process-section { padding: 60px 0; background: #f8fafc; }
.fw-tag-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  row-gap: 16px;
}
.fw-tag-step { display: flex; align-items: center; }
.fw-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: default;
}
.fw-tag:hover {
  background: #f0fdf4;
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(22,163,74,0.12);
}
.fw-tag-key {
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.fw-tag-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #94a3b8;
  font-size: 16px;
}
.fw-tag-arrow svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .fw-tag-flow { row-gap: 12px; }
  .fw-tag { padding: 8px 14px; font-size: 13px; }
  .fw-tag-arrow { padding: 0 6px; }
  .fw-tag-arrow svg { width: 14px; height: 14px; }
}

/* Machine Modules / Detail Photos Section */
.fw-modules-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}
.fw-modules-section .fw-section-title { color: #fff; }
.fw-modules-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.fw-module-tab {
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.fw-module-tab:hover,
.fw-module-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.fw-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.fw-module-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
}
.fw-module-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}
.fw-module-img { aspect-ratio: 4/3; overflow: hidden; }
.fw-module-img img { width: 100%; height: 100%; object-fit: cover; }
.fw-module-body { padding: 14px; }
.fw-module-body--top { order: -1; }
.fw-module-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.fw-module-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin: 0;
}

/* Video Section */
.fw-video-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
}
.fw-video-wrapper {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.fw-video-frame {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.fw-video-frame img { width: 100%; height: 100%; object-fit: cover; }
.fw-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(255,255,255,0.95);
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.fw-video-play:hover { transform: translate(-50%, -50%) scale(1.1); }
.fw-video-play svg {
  width: 28px;
  height: 28px;
  color: var(--brand);
  margin-left: 4px;
}
.fw-video-content { color: #fff; }
.fw-video-label {
  display: inline-block;
  padding: 5px 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.fw-video-title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 14px;
}
.fw-video-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin: 0 0 20px;
}

/* Quote Form Section */
.fw-quote-section { padding: 80px 0; background: #fff; }
.fw-quote-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.fw-quote-info h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
}
.fw-quote-info > p {
  font-size: 15px;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.6;
}
.fw-quote-features { display: flex; flex-direction: column; gap: 14px; }
.fw-quote-feature { display: flex; align-items: flex-start; gap: 12px; }
.fw-quote-feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3f2fd;
  border-radius: 10px;
  color: var(--brand);
  flex-shrink: 0;
}
.fw-quote-feature-icon svg { width: 18px; height: 18px; }
.fw-quote-feature-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px;
}
.fw-quote-feature-text p { font-size: 13px; color: #64748b; margin: 0; }
.fw-quote-form-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #e2e8f0;
}
.fw-quote-form-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}
.fw-quote-form-card > p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
}
.fw-quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fw-form-group { display: flex; flex-direction: column; gap: 4px; }
.fw-form-group.full-width { grid-column: 1 / -1; }
.fw-form-group label { font-size: 12px; font-weight: 600; color: #334155; }
.fw-form-group input,
.fw-form-group select,
.fw-form-group textarea {
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  transition: all 0.2s;
}
.fw-form-group input:focus,
.fw-form-group select:focus,
.fw-form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10,132,255,0.1);
}
.fw-form-group textarea { resize: vertical; min-height: 80px; }
.fw-form-submit { grid-column: 1 / -1; margin-top: 8px; }
.fw-form-submit button {
  width: 100%;
  padding: 14px 24px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.fw-form-submit button:hover { background: var(--brand-dark); }

/* Video Modal */
.fw-vmodal[hidden] { display: none !important; }
.fw-vmodal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.fw-vmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.fw-vmodal__panel {
  position: relative;
  width: min(980px, 100%);
  border-radius: 16px;
  background: #0b1220;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden;
}
.fw-vmodal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  z-index: 2;
  transition: background 0.2s;
}
.fw-vmodal__close:hover { background: rgba(255,255,255,0.15); }
.fw-vmodal__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.fw-vmodal__frame iframe { width: 100%; height: 100%; border: 0; }

/* Params table overflow */
.fw-params-wrap { overflow-x: auto; }
.fw-params-table { min-width: 700px; }

/* Recommended Products */
.fw-rec-section { padding: 80px 0; background: #f8fafc; }
.fw-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.fw-rec-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
}
.fw-rec-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.fw-rec-card-img { aspect-ratio: 4/3; overflow: hidden; }
.fw-rec-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fw-rec-card-body { padding: 16px; }
.fw-rec-card-title { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.fw-rec-card-link { font-size: 13px; font-weight: 600; color: var(--brand); }

/* Responsive */
@media (max-width: 1024px) {
  .fw-hero .container { grid-template-columns: 1fr; gap: 32px; }
  .fw-modules-grid { grid-template-columns: repeat(2, 1fr); }
  .fw-video-wrapper { grid-template-columns: 1fr; gap: 32px; }
  .fw-quote-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .fw-rec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .fw-hero { padding: 90px 0 40px; }
  .fw-hero-main { touch-action: pan-y pinch-zoom; }
  .fw-hero-thumbs { display: none; }
  .fw-hero-dots { display: flex; }
  .fw-materials-flow { flex-direction: column; align-items: center; }
  .fw-material-card { width: 100%; max-width: 280px; }
  .fw-material-card img { height: 140px; }
  .fw-flow-arrow { transform: rotate(90deg); }
  .fw-modules-grid { grid-template-columns: 1fr; }
  .fw-quote-form { grid-template-columns: 1fr; }
}
