/* ==========================================================================
   STELLAR PIPES - REUSABLE COMPONENTS
   File: css/components.css
   ========================================================================== */

/* 1. TOP ANNOUNCEMENT BAR */
.announcement-bar {
  background: var(--navy-dark);
  color: #FFFFFF;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1001;
}

.announcement-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-badge {
  background: var(--safety);
  color: #000;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.announcement-text {
  color: #E2E8F0;
}

.announcement-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.top-phone-link {
  color: #FFFFFF;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-phone-link:hover {
  color: var(--aqua);
}

/* Language Toggle Button */
.lang-toggle-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #CBD5E1;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--blue);
  color: #FFFFFF;
}

/* 2. STICKY MAIN HEADER */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  transition: box-shadow var(--transition-normal), height var(--transition-fast);
}

.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.08);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon-svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-name span {
  color: var(--blue);
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  padding: 6px 3px;
  position: relative;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2.5px;
  background: var(--blue);
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Mobile Hamburger Toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--navy);
  border: 1px solid var(--line);
}

.menu-toggle-icon {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle-icon span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.menu-toggle.is-active .menu-toggle-icon span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.menu-toggle.is-active .menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active .menu-toggle-icon span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile Nav Drawer (Hidden by default on Desktop) */
.mobile-nav-drawer {
  display: none;
}

/* 3. BUTTON SYSTEM */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.86rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

/* Safety Orange Primary CTA */
.btn-safety {
  background: var(--safety);
  color: #0A2540;
  box-shadow: 0 4px 14px rgba(245, 165, 36, 0.35);
}

.btn-safety:hover {
  background: var(--safety-hover);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 165, 36, 0.45);
}

/* Primary Brand Blue */
.btn-primary {
  background: var(--blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(11, 94, 215, 0.3);
}

.btn-primary:hover {
  background: var(--blue-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(11, 94, 215, 0.4);
}

/* Outline Blue */
.btn-outline {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
}

.btn-outline:hover {
  background: var(--blue);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Outline Light (for Dark Sections) */
.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  background: transparent;
}

.btn-outline-light:hover {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* WhatsApp Button */
.btn-whatsapp {
  background: var(--whatsapp);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.32);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.42);
}

/* 4. CARDS & ELEVATIONS */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  max-width: 100%;
  min-width: 0;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(11, 94, 215, 0.3);
}

/* Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
}

.product-card-img-wrap {
  position: relative;
  height: 220px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.product-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.06);
}

.product-badge-standard {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(10, 37, 64, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.product-meta-item {
  display: flex;
  justify-content: space-between;
}

.meta-label {
  color: var(--muted);
  font-weight: 500;
}

.meta-val {
  color: var(--navy);
  font-weight: 700;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 5. TRUST STRIP & METRICS */
.trust-strip {
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}

.trust-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.metric-item {
  padding: 10px;
  border-right: 1px solid var(--line);
}

.metric-item:last-child {
  border-right: none;
}

.metric-num {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-num span {
  color: var(--blue);
}

.metric-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

/* 6. RESPONSIVE SPECIFICATION TABLE CONTAINER */
.spec-table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.spec-table th {
  background: var(--navy);
  color: #FFFFFF;
  font-weight: 700;
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.spec-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background: var(--bg-soft);
}

.spec-table td.sticky-col,
.spec-table th.sticky-col {
  position: sticky;
  left: 0;
  background: var(--surface);
  font-weight: 700;
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04);
}

.spec-table th.sticky-col {
  background: var(--navy);
}

.spec-note {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

/* 7. FLOATING WHATSAPP PULSE BUTTON */
.floating-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  z-index: 999;
  transition: transform var(--transition-bounce), background var(--transition-fast);
  text-decoration: none;
}

.floating-whatsapp:hover {
  transform: scale(1.12);
  background: var(--whatsapp-hover);
}

.floating-whatsapp::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  border: 2px solid var(--whatsapp);
  animation: pulse-ring 2s infinite;
  opacity: 0.7;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.floating-whatsapp svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

/* 8. STICKY MOBILE ACTION BAR (Hidden on Desktop) */
.mobile-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(10, 37, 64, 0.08);
  z-index: 990;
  padding: 8px 12px;
}

.mobile-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mobile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  line-height: 1.1;
}

.mobile-action-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-action-btn.btn-call { color: var(--blue); }
.mobile-action-btn.btn-wa { color: var(--whatsapp); }
.mobile-action-btn.btn-dir { color: var(--navy); }
.mobile-action-btn.btn-quote { 
  background: var(--safety); 
  color: #000;
  border-radius: var(--radius-sm);
}

/* 9. MODALS & RFQ OVERLAY */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 37, 64, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.is-active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--line);
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15);
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-error-msg {
  color: #DC2626;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select {
  border-color: #DC2626;
}

.form-group.has-error .form-error-msg {
  display: block;
}

/* Honeypot field (Anti-spam) */
.honeypot-field {
  display: none !important;
  visibility: hidden !important;
}

/* 10. ACCORDION (FAQ) */
.accordion-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item.is-open {
  border-color: var(--blue);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--blue);
  transition: transform var(--transition-fast);
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 24px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.accordion-item.is-open .accordion-content {
  display: block;
}

/* 11. SITE FOOTER */
.site-footer {
  background: var(--navy-dark);
  color: #CBD5E1;
  padding: 80px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-col-title {
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 22px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--aqua);
}

.footer-desc {
  color: #94A3B8;
  font-size: 0.92rem;
  margin-bottom: 18px;
  line-height: 1.6;
}

.footer-legal-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #CBD5E1;
}

.footer-links-list li {
  margin-bottom: 12px;
}

.footer-links-list a {
  color: #94A3B8;
  font-size: 0.92rem;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: inline-block;
}

.footer-links-list a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  color: #94A3B8;
}

.footer-contact-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--aqua);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: #64748B;
}

.footer-bottom a {
  color: var(--aqua, #38BDF8);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-bottom a:hover {
  color: #FFFFFF;
  opacity: 0.95;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 6px;
}
