/* ==========================================================================
   TRUST AVIATION - MODULES CSS (ECOMMERCE, ERP, ARCA INVOICE, CUSTOMS & AUDIT)
   ========================================================================== */

/* --- HERO BANNER & CATALOG HEADER --- */
.hero-aviation {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(8, 13, 26, 0.4) 0%, rgba(8, 13, 26, 0.95) 100%);
  min-height: 380px;
  display: flex;
  align-items: center;
}

.hero-aviation-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 1;
  opacity: 0.38;
  filter: saturate(1.2) contrast(1.1);
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 9, 19, 0.95) 0%, rgba(6, 9, 19, 0.75) 50%, rgba(6, 9, 19, 0.4) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
  padding: 48px;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--cyan-hud);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 40px;
  line-height: 1.15;
  margin-bottom: 14px;
  font-weight: 800;
}

.hero-title span {
  background: linear-gradient(90deg, #38bdf8 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-stats-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-val {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-display);
  color: #fff;
}

.hero-stat-lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- BARRA DE BÚSQUEDA Y FILTROS ECOMMERCE --- */
.catalog-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-input-wrap svg {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.filter-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  transition: var(--transition-fast);
}

.filter-input:focus {
  outline: none;
  border-color: var(--cyan-hud);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.filter-select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-select:focus {
  outline: none;
  border-color: var(--cyan-hud);
}

/* --- GRILLA DE REPUESTOS --- */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.part-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
}

.part-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(14, 165, 233, 0.15);
}

.part-img-wrap {
  width: 100%;
  height: 200px;
  background: #090e1c;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.part-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.part-card:hover .part-img-wrap img {
  transform: scale(1.05);
}

.part-badges-floating {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.part-hangar-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 10.5px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 4px;
}

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

.part-pn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.part-pn {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--cyan-hud);
}

.part-ata {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.part-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.part-compatibility {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.part-card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.part-price-block {
  display: flex;
  flex-direction: column;
}

.price-main {
  font-size: 19px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.price-alt {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
}

.part-actions {
  display: flex;
  gap: 6px;
}

/* --- FICHA TÉCNICA / CERTIFICADO 8130-3 PREVIEW --- */
.cert-preview-box {
  background: #f8fafc;
  color: #0f172a;
  border: 2px solid #0284c7;
  border-radius: 8px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin-top: 16px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cert-header {
  border-bottom: 2px solid #0284c7;
  padding-bottom: 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cert-title-faa {
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  color: #0369a1;
}

.cert-stamp {
  position: absolute;
  right: 25px;
  bottom: 25px;
  border: 3px double #059669;
  color: #059669;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  transform: rotate(-8deg);
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.cert-cell strong {
  display: block;
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
}

/* --- FACTURA ELECTRÓNICA ARCA PREVIEW --- */
.invoice-arca-paper {
  background: #ffffff;
  color: #1e293b;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 30px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-family: var(--font-body);
}

.invoice-arca-header {
  border: 1px solid #94a3b8;
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  position: relative;
  margin-bottom: 14px;
}

.invoice-arca-left {
  padding: 14px;
  border-right: 1px solid #94a3b8;
}

.invoice-arca-center {
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.invoice-arca-type-box {
  font-size: 28px;
  border: 2px solid #0f172a;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: #fff;
}

.invoice-arca-type-code {
  font-size: 9px;
  font-family: var(--font-mono);
  margin-top: 4px;
}

.invoice-arca-right {
  padding: 14px;
  border-left: 1px solid #94a3b8;
}

.invoice-client-box {
  border: 1px solid #cbd5e1;
  padding: 12px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  font-size: 12px;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 11.5px;
}

.invoice-items-table th {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 8px;
  text-align: left;
  font-weight: 700;
}

.invoice-items-table td {
  border: 1px solid #e2e8f0;
  padding: 8px;
}

.invoice-totals-box {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.invoice-totals-table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 280px;
}

.invoice-totals-table td {
  padding: 5px 10px;
  text-align: right;
}

.invoice-totals-table tr.total-highlight {
  font-weight: 800;
  font-size: 14px;
  background: #f1f5f9;
}

.invoice-footer-arca {
  border-top: 2px solid #0f172a;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.invoice-cae-block {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
}

.invoice-cae-number {
  font-size: 15px;
  font-weight: 800;
  color: #0369a1;
}

/* --- CALCULADORA DE COSTO NACIONALIZADO --- */
.landed-cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.cost-input-group {
  margin-bottom: 14px;
}

.cost-input-group label {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 5px;
  font-weight: 500;
}

.cost-input-group input, .cost-input-group select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-mono);
}

.cost-summary-card {
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: var(--radius-md);
  padding: 18px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .catalog-filter-bar {
    grid-template-columns: 1fr;
  }
  .landed-cost-grid {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding: 24px;
  }
  .hero-title {
    font-size: 28px;
  }
}
