@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Barlow:wght@300;400;500&display=swap');

/* ─── Reset & Base (scoped to the shortcode wrapper) ─── */
.pf-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
.pf-wrap {
  font-family: 'Barlow', sans-serif;
  background: #000820;
  color: #c8dff0;
  overflow: hidden;
  position: relative;
}

/* ─── Animations ─── */
@keyframes scanLine {
  0%   { top: 0; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes priceFlash {
  0%   { color: #4696FF; }
  50%  { color: #6aaeff; }
  100% { color: #4696FF; }
}
@keyframes btnShimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}
@keyframes calcPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(70,150,255,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(70,150,255,0); }
}

/* ─── Section head (used in calc header) ─── */
.pf-section-head {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #4696FF;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── CALCULATOR ─── */
.pf-calc-section {
  padding: 0 40px 60px;
}
.pf-calc-outer {
  max-width: 860px;
  margin: 0 auto;
  background: #000F50;
  border: 1px solid rgba(70,150,255,0.2);
  position: relative;
  overflow: hidden;
}
.pf-calc-outer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4696FF, transparent);
}
.pf-calc-outer::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4696FF, transparent);
}
.pf-calc-scan {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(70,150,255,0.2), transparent);
  animation: scanLine 5s ease-in-out infinite;
  z-index: 0;
}
.pf-calc-head {
  padding: 32px 40px 24px;
  border-bottom: 1px solid rgba(70,150,255,0.1);
  position: relative;
  z-index: 1;
}
.pf-calc-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  color: #c8dff0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pf-calc-title span { color: #4696FF; }
.pf-calc-title-icon { font-size: 22px; color: #4696FF; }
.pf-calc-body {
  padding: 32px 40px;
  position: relative;
  z-index: 1;
}
/* dims row */
.pf-dims-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.pf-dim-x {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: rgba(70,150,255,0.5);
  text-align: center;
  flex-shrink: 0;
  padding: 0 4px;
}
/* inputs row */
.pf-fields-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pf-field label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(70,150,255,0.7);
}
.pf-field input,
.pf-field select {
  background: #000820;
  border: 1px solid rgba(70,150,255,0.22);
  color: #c8dff0;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  width: 100%;
}
.pf-field input:focus,
.pf-field select:focus {
  border-color: #4696FF;
  box-shadow: 0 0 0 2px rgba(70,150,255,0.12);
}
.pf-field input::placeholder { color: rgba(70,150,255,0.3); }
.pf-field select option {
  background: #000F50;
  color: #c8dff0;
}
/* select arrow */
.pf-select-wrap {
  position: relative;
}
.pf-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4696FF;
  font-size: 12px;
  pointer-events: none;
}
.pf-select-wrap select { padding-right: 30px; cursor: pointer; }
/* dims label */
.pf-dims-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(70,150,255,0.7);
  margin-bottom: 7px;
  display: block;
}
/* calculate button */
.pf-calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000820;
  background: #4696FF;
  border: none;
  padding: 15px 36px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  animation: calcPulse 3s ease-in-out infinite;
}
.pf-calc-btn::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -100%;
  width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
}
.pf-calc-btn:hover {
  background: #5aa8ff;
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(70,150,255,0.5), 0 6px 16px rgba(70,150,255,0.3);
  animation: none;
}
.pf-calc-btn:hover::before {
  animation: btnShimmer 0.6s ease forwards;
}
.pf-calc-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pf-calc-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* inline validation message */
.pf-error {
  margin-top: 14px;
  font-size: 12px;
  color: #ff6b6b;
  display: none;
}
.pf-error.pf-error-visible { display: block; }

/* result area */
.pf-result {
  margin-top: 28px;
  border: 1px solid rgba(70,150,255,0.18);
  background: rgba(70,150,255,0.04);
  padding: 24px 28px;
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.pf-result.pf-result-visible { display: flex; }
.pf-result-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7ab3d4;
  margin-bottom: 4px;
}
.pf-result-price {
  font-family: 'Rajdhani', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #4696FF;
}
.pf-result-price.pf-price-flash {
  animation: priceFlash 1.8s ease-in-out 2;
}
.pf-result-unit {
  font-size: 13px;
  color: #7ab3d4;
  margin-top: 4px;
}
.pf-result-note {
  font-size: 12px;
  color: rgba(70,150,255,0.5);
  line-height: 1.6;
  max-width: 340px;
}
.pf-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000820;
  background: #25D366;
  border: none;
  padding: 12px 28px;
  cursor: pointer;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  flex-basis: 100%;
  margin-top: 4px;
}
.pf-order-btn:hover,
.pf-order-btn:focus,
.pf-order-btn:visited {
  color: #000820;
  text-decoration: none;
}
.pf-order-btn:hover {
  background: #3be07a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}
.pf-calc-footer {
  padding: 16px 40px;
  border-top: 1px solid rgba(70,150,255,0.08);
  background: rgba(0,8,32,0.4);
  position: relative; z-index: 1;
}
.pf-calc-footer-text {
  font-size: 11px;
  color: rgba(70,150,255,0.45);
  letter-spacing: 0.5px;
  line-height: 1.6;
}

/* ─── HERO (optional [pcb_hero]) ─── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gridShift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(40px); }
}
@keyframes circuitPulse {
  0%, 100% { opacity: 0; transform: scaleX(0); }
  50%       { opacity: 0.5; transform: scaleX(1); }
}
@keyframes dotBlink {
  0%, 100% { opacity: 0; box-shadow: none; }
  50%       { opacity: 1; box-shadow: 0 0 8px #4696FF; }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(70,150,255,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(70,150,255,0); }
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
.pf-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.pf-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(70,150,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,150,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridShift 20s linear infinite;
  z-index: 0;
}
.pf-hero-img {
  position: absolute; inset: 0;
  background: url('https://v2.fares-pcb.com/wp-content/uploads/2026/06/Industrial-Grade-PCB-Fabrication-Manufacturing.jpg') center/cover no-repeat;
  opacity: 0.22;
  z-index: 1;
}
.pf-hero-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #000820 40%, rgba(0,8,32,0.7) 70%, rgba(0,8,32,0.2) 100%);
  z-index: 2;
}
.pf-hero-content {
  position: relative;
  z-index: 3;
  padding: 80px 48px 72px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.pf-circuit-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, #4696FF, transparent);
  height: 1px;
  animation: circuitPulse 4s ease-in-out infinite;
  opacity: 0.4;
  z-index: 3;
}
.pf-circuit-line:nth-child(2) { top: 18%; width: 55%; left: 20%; animation-delay: 0s; }
.pf-circuit-line:nth-child(3) { top: 35%; width: 38%; left: 38%; animation-delay: 2s; }
.pf-dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4696FF;
  animation: dotBlink 3s ease-in-out infinite;
  z-index: 3;
}
.pf-dot:nth-child(4) { top: 18%; left: 20%; animation-delay: 0s; }
.pf-dot:nth-child(5) { top: 35%; left: 38%; animation-delay: 2s; }
.pf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #4696FF;
  border: 1px solid rgba(70,150,255,0.4);
  padding: 6px 16px;
  border-radius: 2px;
  margin-bottom: 20px;
  animation: fadeSlideDown 0.8s ease both;
}
.pf-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4696FF;
  animation: pulseDot 2s ease-in-out infinite;
}
.pf-hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
  color: #c8dff0;
  margin-bottom: 14px;
  animation: fadeSlideDown 0.9s ease both 0.1s;
  max-width: 820px;
}
.pf-hero-title span { color: #4696FF; }
.pf-hero-sub {
  font-size: 15px;
  color: #a8c8e0;
  line-height: 1.8;
  font-weight: 300;
  max-width: 640px;
  margin-bottom: 36px;
  animation: fadeSlideDown 1s ease both 0.2s;
}
.pf-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000820;
  background: #4696FF;
  border: none;
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  animation: fadeSlideDown 1.1s ease both 0.3s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.pf-hero-cta:hover {
  background: #6aaeff;
  color: #000820;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(70,150,255,0.35);
}
.pf-hero-cta:focus,
.pf-hero-cta:visited {
  color: #000820;
}
.pf-hero-cta svg {
  width: 15px; height: 15px; flex-shrink: 0;
  animation: arrowBounce 1.8s ease-in-out infinite;
}

/* ─── Divider ─── */
.pf-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 40px;
  padding: 28px 0;
}
.pf-divider::before, .pf-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(70,150,255,0.3), transparent);
}
.pf-divider-chip {
  width: 8px; height: 8px;
  border: 1px solid #4696FF;
  transform: rotate(45deg);
}

/* ─── Section title (specs) ─── */
.pf-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(70,150,255,0.2);
}
.pf-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  color: #c8dff0;
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}
.pf-section-title span { color: #4696FF; }

/* ─── SPECS TABLE (optional [pcb_specs_table]) ─── */
.pf-specs {
  padding: 0 40px 56px;
}
.pf-table-wrap {
  border: 1px solid rgba(70,150,255,0.15);
  overflow: hidden;
  background: #000F50;
}
.pf-table {
  width: 100%;
  border-collapse: collapse;
}
.pf-table thead tr {
  background: rgba(70,150,255,0.1);
  border-bottom: 1px solid rgba(70,150,255,0.25);
}
.pf-table thead th {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #4696FF;
  padding: 16px 24px;
  text-align: left;
}
.pf-table tbody tr {
  border-bottom: 1px solid rgba(70,150,255,0.07);
  transition: background 0.25s;
}
.pf-table tbody tr:last-child { border-bottom: none; }
.pf-table tbody tr:hover { background: rgba(70,150,255,0.06); }
.pf-table tbody td {
  padding: 15px 24px;
  font-size: 13px;
  line-height: 1.6;
  vertical-align: middle;
}
.pf-table tbody td:first-child {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #c8dff0;
  width: 34%;
  border-right: 1px solid rgba(70,150,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pf-table tbody td:first-child::before {
  content: '◈';
  color: #4696FF;
  font-size: 9px;
  flex-shrink: 0;
}
.pf-table tbody td:last-child {
  color: #7ab3d4;
  font-size: 13px;
}
.pf-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pf-swatch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  color: #a8c8e0;
  border: 1px solid rgba(70,150,255,0.18);
  padding: 3px 9px 3px 6px;
  background: rgba(70,150,255,0.04);
}
.pf-swatch-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Responsive ─── */
@media (max-width: 820px) {
  .pf-fields-row { grid-template-columns: 1fr 1fr; }
  .pf-dims-row { grid-template-columns: 1fr auto 1fr; }
}
@media (max-width: 640px) {
  .pf-hero { min-height: 420px; }
  .pf-hero-content { padding: 48px 24px 48px; }
  .pf-specs, .pf-calc-section { padding-left: 20px; padding-right: 20px; }
  .pf-calc-head, .pf-calc-body, .pf-calc-footer { padding-left: 20px; padding-right: 20px; }
  .pf-fields-row { grid-template-columns: 1fr; }
  .pf-dims-row { grid-template-columns: 1fr auto 1fr; }
  .pf-table tbody td:first-child { width: auto; }
  .pf-divider { margin: 0 20px; }
}
