/* ==========================================================================
   Tharanga Electronics - Cyber Industrial Dark System (Updated)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@600;700&display=swap');

:root {
  --te-bg-main: #090d16;
  --te-bg-surface: #111827;
  --te-bg-card: rgba(17, 24, 39, 0.75);
  --te-bg-card-hover: rgba(31, 41, 55, 0.9);
  
  --te-primary: #2563eb;
  --te-primary-glow: #3b82f6;
  --te-accent: #06b6d4;
  --te-success: #10b981;
  --te-warning: #f59e0b;
  --te-danger: #ef4444;
  
  --te-text-main: #f8fafc;
  --te-text-muted: #94a3b8;
  
  --te-border-subtle: rgba(255, 255, 255, 0.08);
  --te-border-glow: rgba(59, 130, 246, 0.4);
  
  --te-radius-lg: 16px;
  --te-radius-md: 10px;
  --te-radius-sm: 6px;
  
  --te-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --te-shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);
  --te-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.te-dark-body {
  background-color: var(--te-bg-main) !important;
  color: var(--te-text-main) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.te-shell {
  background: var(--te-bg-main);
  min-height: 100vh;
}

.te-container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Top Bar & Navigation Header
   -------------------------------------------------------------------------- */
.te-top-bar {
  background: #030712;
  border-bottom: 1px solid var(--te-border-subtle);
  font-size: 0.78rem;
  padding: 8px 0;
  color: var(--te-text-muted);
}

.te-top-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.te-announcement {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #38bdf8;
}

.te-top-contact a {
  color: var(--te-primary-glow);
  text-decoration: none;
  font-weight: 700;
  transition: var(--te-transition);
}

.te-top-contact a:hover {
  color: var(--te-accent);
  text-decoration: underline;
}

.te-main-header {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--te-border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.te-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.te-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.te-brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--te-primary), var(--te-accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
  transition: var(--te-transition);
}

.te-brand:hover .te-brand-logo {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.6);
}

.te-brand-text h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}

.te-brand-text span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--te-text-muted);
  letter-spacing: 0.08em;
}

.te-nav-search {
  flex-grow: 1;
  max-width: 480px;
  display: flex;
  background: #090d16;
  border: 1px solid var(--te-border-subtle);
  border-radius: var(--te-radius-sm);
  overflow: hidden;
  transition: var(--te-transition);
}

.te-nav-search:focus-within {
  border-color: var(--te-primary-glow);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.te-nav-search input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: #fff;
  outline: none;
  font-size: 0.88rem;
}

.te-nav-search button {
  background: var(--te-primary);
  color: #fff;
  border: none;
  padding: 0 18px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--te-transition);
}

.te-nav-search button:hover {
  background: var(--te-primary-glow);
}

.te-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.te-nav-links a {
  color: var(--te-text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: var(--te-transition);
}

.te-nav-links a:hover {
  color: var(--te-primary-glow);
}

.te-btn-register {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 8px 16px;
  border-radius: var(--te-radius-sm);
  color: #60a5fa !important;
  transition: var(--te-transition);
}

.te-btn-register:hover {
  background: var(--te-primary);
  color: #fff !important;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

/* --------------------------------------------------------------------------
   Hero Section & Outlets
   -------------------------------------------------------------------------- */
.te-hero {
  padding: 60px 0 40px;
  background: 
    linear-gradient(180deg, rgba(9, 13, 22, 0.85) 0%, rgba(9, 13, 22, 0.95) 100%),
    url('https://lh3.googleusercontent.com/d/13xdsFGD6_Y8LgBgDKqmW2sAJZsuNEaD5=s1600') center/cover no-repeat;
  border-bottom: 1px solid var(--te-border-subtle);
  position: relative;
}

.te-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 992px) {
  .te-hero-grid {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

.te-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #60a5fa;
}

.te-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--te-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--te-success);
  animation: tePulse 2s infinite;
}

@keyframes tePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.te-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 850;
  color: #fff;
  line-height: 1.15;
  margin-top: 16px;
  letter-spacing: -0.02em;
}

.te-hero p {
  color: var(--te-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 14px;
}

.te-hero-search {
  display: flex;
  gap: 8px;
  margin-top: 26px;
  background: var(--te-bg-surface);
  padding: 6px;
  border-radius: var(--te-radius-md);
  border: 1px solid var(--te-border-subtle);
  transition: var(--te-transition);
}

.te-hero-search:focus-within {
  border-color: var(--te-border-glow);
  box-shadow: var(--te-shadow-glow);
}

.te-hero-search input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  color: #fff;
  outline: none;
  font-size: 0.95rem;
}

.te-hero-search button {
  background: var(--te-primary);
  color: #fff;
  border: none;
  padding: 0 22px;
  border-radius: var(--te-radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--te-transition);
}

.te-hero-search button:hover {
  background: var(--te-primary-glow);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.te-outlet-card {
  background: var(--te-bg-card);
  border: 1px solid var(--te-border-glow);
  border-radius: var(--te-radius-lg);
  padding: 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--te-shadow);
}

.te-outlet-card h3 {
  font-size: 1.3rem;
  color: #fff;
  margin: 6px 0 8px;
}

.te-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--te-primary-glow);
  letter-spacing: 0.08em;
}

.te-contact-detail {
  margin-top: 8px;
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
}

.te-contact-detail a {
  color: var(--te-primary-glow);
  text-decoration: underline;
  transition: var(--te-transition);
}

.te-contact-detail a:hover {
  color: var(--te-accent);
}

/* Category Strip */
.te-category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 40px;
}

.te-category-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--te-bg-card);
  border: 1px solid var(--te-border-subtle);
  border-radius: var(--te-radius-md);
  color: var(--te-text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--te-transition);
}

.te-category-pill:hover {
  border-color: var(--te-border-glow);
  transform: translateY(-3px);
  background: var(--te-bg-card-hover);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   Product Cards & Layout
   -------------------------------------------------------------------------- */
.te-catalog-section {
  padding: 50px 0;
}

.te-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.te-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.te-section-sub {
  color: var(--te-text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.te-link-more {
  color: var(--te-primary-glow);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--te-transition);
}

.te-link-more:hover {
  color: var(--te-accent);
  text-decoration: underline;
}

.te-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.te-product-card {
  background: var(--te-bg-card);
  border: 1px solid var(--te-border-subtle);
  border-radius: var(--te-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--te-transition);
}

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

.te-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #030712;
  overflow: hidden;
}

.te-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.te-product-card:hover .te-image-wrapper img {
  transform: scale(1.08);
}

.te-stock-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.te-product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.te-product-brand {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--te-primary-glow);
  text-transform: uppercase;
}

.te-product-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-top: 6px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--te-transition);
}

.te-product-title:hover {
  color: var(--te-primary-glow);
}

.te-price-row {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.te-product-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.te-btn-add {
  background: var(--te-primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--te-radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--te-transition);
}

.te-btn-add:hover {
  background: var(--te-primary-glow);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.te-btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--te-text-main);
  border: 1px solid var(--te-border-subtle);
  transition: var(--te-transition);
}

.te-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--te-border-glow);
}

/* --------------------------------------------------------------------------
   Banners & Services Grid
   -------------------------------------------------------------------------- */
.te-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid var(--te-border-glow);
  border-radius: var(--te-radius-lg);
  padding: 36px;
  margin: 50px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--te-shadow-glow);
}

.te-banner h3 {
  font-size: 1.5rem;
  color: #fff;
  margin: 0;
}

.te-banner p {
  color: var(--te-text-muted);
  margin-top: 6px;
  max-width: 650px;
}

.te-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.te-btn-primary {
  background: var(--te-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--te-radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--te-transition);
}

.te-btn-primary:hover {
  background: var(--te-primary-glow);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.te-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--te-text-main);
  padding: 10px 20px;
  border-radius: var(--te-radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--te-border-subtle);
  text-decoration: none;
  transition: var(--te-transition);
}

.te-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--te-border-glow);
}

.te-brand-card {
  background: var(--te-bg-card);
  border: 1px solid var(--te-border-subtle);
  border-radius: var(--te-radius-lg);
  padding: 28px;
  margin-bottom: 40px;
}

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

.te-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.te-service-card {
  background: var(--te-bg-card);
  border: 1px solid var(--te-border-subtle);
  border-radius: var(--te-radius-md);
  padding: 24px;
  transition: var(--te-transition);
}

.te-service-card:hover {
  border-color: var(--te-border-glow);
  transform: translateY(-3px);
  background: var(--te-bg-card-hover);
}

.te-service-card .icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.te-service-card h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.te-service-card p {
  color: var(--te-text-muted);
  margin-top: 6px;
  font-size: 0.88rem;
}