/* ============================================================
   FORTIS — PRODUCTS Page Styles
   Design Tokens, Dual-Material P-Lines, Vertical Stack & 4-Col Grid
   ============================================================ */

/* ---------- PAGE HEADER BANNER ---------- */
.page-header {
  position: relative;
  padding: 140px 0 70px;
  background: var(--brand-navy, #231F20);
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.4) contrast(1.15);
  transform: scale(1.05);
  transition: transform 10s ease;
}

.page-header:hover .page-header-bg {
  transform: scale(1);
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 31, 32, 0.7) 0%, rgba(35, 31, 32, 0.95) 100%);
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header .eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #EB193D;
  margin-bottom: 12px;
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 16px;
}

.page-header h1 span {
  color: #EB193D;
}

.page-header p {
  max-width: 680px;
  margin: 0 auto 20px;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: #D1D5DB;
  line-height: 1.6;
}

.crumb {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.crumb a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.crumb a:hover {
  color: #EB193D;
}

.crumb span {
  color: #EB193D;
}

/* ---------- PRODUCTS SHOWCASE SECTION ---------- */
.products-showcase {
  background: #191617;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  padding: 80px 0 100px;
}

.products-showcase .section-head .eyebrow {
  color: #EB193D;
}

.products-showcase .section-head h2 {
  color: #FFFFFF;
}

.products-showcase .section-head p {
  color: #A1A1AA;
}

/* ---------- P-LINES HEADER RESET BAR ---------- */
.p-lines-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  margin-bottom: 24px;
  padding: 14px 24px;
  background: rgba(35, 31, 32, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  animation: fadeInHeader 350ms ease-out forwards;
}

@keyframes fadeInHeader {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.p-lines-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(235, 25, 61, 0.14);
  border: 1.5px solid #EB193D;
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 250ms ease;
}

.p-lines-reset-btn:hover {
  background: #EB193D;
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(235, 25, 61, 0.45);
  transform: translateX(-3px);
}

.p-lines-reset-btn i {
  transition: transform 250ms ease;
}

.p-lines-reset-btn:hover i {
  transform: translateX(-4px);
}

.p-lines-active-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-material-badge {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #A1A1AA;
  text-transform: uppercase;
}

.active-category-badge {
  background: linear-gradient(135deg, #EB193D 0%, #C2122C 100%);
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(235, 25, 61, 0.4);
}

/* ---------- P-LINES DUAL CARDS & VERTICAL STACK LAYOUT ---------- */
.p-lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 36px;
  perspective: 1000px;
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.p-lines.has-active-category {
  grid-template-columns: 1fr;
  gap: 28px;
}

.p-line {
  position: relative;
  background: linear-gradient(145deg, rgba(38, 34, 35, 0.95), rgba(24, 20, 21, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 34px 32px;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 300ms ease, opacity 450ms cubic-bezier(0.4, 0, 0.2, 1),
              filter 450ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms ease;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.p-card-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(235, 25, 61, 0.18) 0%, rgba(235, 25, 61, 0) 70%);
  pointer-events: none;
  transition: opacity 300ms ease;
}

.p-line:hover {
  transform: translateY(-6px);
  border-color: rgba(235, 25, 61, 0.6);
  box-shadow: 0 16px 36px -10px rgba(235, 25, 61, 0.3), inset 0 0 20px rgba(235, 25, 61, 0.05);
}

.p-line:hover .p-card-glow {
  opacity: 1;
}

.p-line.is-disappearing {
  transform: scale(0.85) translateY(-20px) !important;
  opacity: 0 !important;
  filter: blur(8px) !important;
  pointer-events: none !important;
}

.p-line.is-hidden {
  display: none !important;
}

.p-line.is-active-card {
  grid-column: 1 / -1;
  width: 100%;
  border-color: rgba(235, 25, 61, 0.8);
  box-shadow: 0 0 28px rgba(235, 25, 61, 0.35), inset 0 0 15px rgba(235, 25, 61, 0.1);
  background: linear-gradient(145deg, rgba(42, 36, 38, 0.98), rgba(28, 22, 24, 0.98));
}

.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  align-self: flex-start;
  padding: 8px 18px;
  background: linear-gradient(135deg, #EB193D 0%, #B8102B 100%);
  color: #FFFFFF !important;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(235, 25, 61, 0.45);
  overflow: hidden;
  transition: all 300ms ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.p-line h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 16px 0 8px;
}

.p-line p {
  font-size: 0.92rem;
  color: #A1A1AA;
  line-height: 1.5;
}

.pill-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.pill-btn {
  background: rgba(235, 25, 61, 0.12);
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(235, 25, 61, 0.5);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-btn:hover {
  background: #EB193D;
  color: #FFFFFF;
  border-color: #EB193D;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 25, 61, 0.45);
}

.pill-btn.is-active {
  background: #EB193D !important;
  color: #FFFFFF !important;
  border-color: #EB193D !important;
  box-shadow: 0 0 20px rgba(235, 25, 61, 0.6), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  transform: scale(1.02);
}

/* ---------- SUB-PRODUCT SLOT (FULL WIDTH UNDERNEATH TOP CARD) ---------- */
.sub-product-slot {
  position: relative;
  width: 100%;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.sub-product-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.sub-product-count-badge {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #EB193D;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(235, 25, 61, 0.1);
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid rgba(235, 25, 61, 0.3);
}

/* 4-COLUMN RESPONSIVE CSS GRID FOR PRODUCTS PAGE */
.sub-product-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}

.sub-product-card {
  width: 100%;
  min-height: 270px;
  background: rgba(35, 31, 32, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 350ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 250ms ease, box-shadow 250ms ease;
  cursor: pointer;
  outline: none;
}

.sub-product-card.is-entered {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sub-product-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(235, 25, 61, 0.7);
  box-shadow: 0 12px 28px -6px rgba(235, 25, 61, 0.35);
}

.sub-product-img-frame {
  width: 100%;
  height: 135px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
}

.sub-product-img-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 350ms ease;
}

.sub-product-card:hover .sub-product-img-frame img {
  transform: scale(1.08);
}

.sub-product-info-wrap {
  margin-top: 12px;
  margin-bottom: 12px;
}

.sub-product-badge {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #EB193D;
  margin-bottom: 4px;
}

.sub-product-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 4px;
}

.sub-product-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #A1A1AA;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sub-product-action {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #EB193D;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.sub-product-action i {
  transition: transform 250ms ease;
}

.sub-product-card:hover .sub-product-action i {
  transform: translateX(4px);
}

/* ---------- CUSTOM REQUEST CTA BAND ---------- */
.p-lines-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 56px;
  padding: 24px 36px;
  background: rgba(35, 31, 32, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 300ms ease, background 300ms ease;
}

.p-lines-cta:hover {
  border-color: rgba(235, 25, 61, 0.6);
  background: rgba(35, 31, 32, 0.9);
}

.custom-request-hint {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: #D1D5DB;
  margin: 0;
}

.custom-request-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #25D366;
  color: #FFFFFF !important;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  transition: all 250ms ease;
}

.custom-request-btn:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.5);
}

/* ---------- PRODUCT DETAIL MODAL VIEWER ---------- */
.p-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease-out, visibility 300ms ease-out;
}

.p-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.p-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.p-modal-dialog {
  position: relative;
  z-index: 10;
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  background: #231F20;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  transform: scale(0.92) translateY(16px);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.p-modal-backdrop.is-open .p-modal-dialog {
  transform: scale(1) translateY(0);
}

.p-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.p-modal-badge {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #EB193D;
  display: inline-block;
  margin-bottom: 4px;
}

.p-modal-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: #FFFFFF;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.25;
}

.p-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 250ms ease;
}

.p-modal-close:hover {
  background: #EB193D;
  border-color: #EB193D;
  transform: rotate(90deg);
}

.p-modal-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.p-modal-3d-frame {
  width: 100%;
  height: 220px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}

.p-modal-3d-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-modal-3d-card img {
  max-height: 170px;
  max-width: 80%;
  object-fit: contain;
  animation: horizontalTurntable 14s linear infinite;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

.p-modal-3d-card:hover img {
  animation-play-state: paused;
}

@keyframes horizontalTurntable {
  0%   { transform: perspective(1000px) rotateY(0deg); }
  100% { transform: perspective(1000px) rotateY(360deg); }
}

.p-modal-3d-hint {
  position: absolute;
  bottom: 8px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: #A1A1AA;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.p-modal-specs-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-modal-section-title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #EB193D;
  margin: 0;
}

.p-modal-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.p-modal-spec-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p-modal-spec-key {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #A1A1AA;
  letter-spacing: 0.04em;
}

.p-modal-spec-val {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: #FFFFFF;
  word-break: break-word;
}

.p-modal-diagram-card {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.p-modal-diagram-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #A1A1AA;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.p-modal-diagram-header i {
  color: #EB193D;
}

.p-modal-diagram-img-wrap {
  width: 100%;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-modal-diagram-img-wrap img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}

/* ---------- FRP MATERIAL ADVANTAGES SHOWCASE ---------- */
.frp-grid {
  margin-top: 80px;
}

.frp-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #FFFFFF;
  text-align: center;
  margin-bottom: 34px;
  letter-spacing: 0.04em;
}

.frp-items {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.frp-item {
  margin: 0;
  padding: 6px;
  background: #FFFFFF;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.frp-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.frp-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #FFFFFF;
  border-radius: 10px;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 1200px) {
  .sub-product-grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .pill-btns {
    grid-template-columns: repeat(2, 1fr);
  }
  .p-lines {
    grid-template-columns: 1fr;
  }
  .frp-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sub-product-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .p-lines-cta {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .frp-items {
    grid-template-columns: repeat(2, 1fr);
  }
  .p-modal-specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .sub-product-grid-container {
    grid-template-columns: 1fr;
  }
  .pill-btns {
    grid-template-columns: 1fr;
  }
  .frp-items {
    grid-template-columns: 1fr;
  }
}