/* ============================================
   SEISA - Sistema de Diseño Industrial Tech
   Pivot: AutomationDirect + Waveshare Aesthetic
   ============================================ */

:root {
  /* Tech Palette (Waveshare/Seeed Inspired) */
  --primary-blue: #0078D7;
  /* Tech Blue (Microsoft/Waveshare style) */
  --primary-dark: #004E8C;
  /* Deep Blue for Headers */
  --tech-cyan: #00A7C1;
  /* Legacy SEISA Teal (Accents) */
  --accent-orange: #FF6600;
  /* Call to Action (Amazon/Industrial style) */

  /* Backgrounds */
  --bg-body: #F4F6F9;
  /* Light Cool Gray Background */
  --bg-white: #FFFFFF;
  --bg-sidebar: #FFFFFF;

  /* Grays & Text */
  --text-main: #333333;
  --text-secondary: #666666;
  --border-color: #E6E9ED;

  /* Spacing & Layout */
  --sidebar-width: 260px;
  --header-height: 70px;

  /* Typography */
  --font-primary: 'Roboto', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'Consolas', monospace;
  /* For Part Numbers */

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Reset & Base
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  /* Denser text for catalogs */
  padding-top: var(--header-height);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ============================================
   Utility Header (Functional > Decorative)
   ============================================ */
/* Header Styles */
header,
.tech-header {
  background: var(--bg-white);
  padding: 10px 0;
  position: relative;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  /* Soft shadow */
}

.tech-header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 2px solid var(--primary-blue);
  display: flex;
  align-items: center;
  padding: 0;
}

.header-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo img {
  height: auto;
  max-height: 50px;
  /* Reduced from potential overflow */
  max-width: 180px;
  background: transparent;
  display: block;
}

header .logo {
  display: inline-block;
}

/* Search Box (Centerpiece) */
.tech-search {
  flex: 1;
  display: flex;
  max-width: 600px;
}

.tech-search input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.tech-search input:focus {
  border-color: var(--primary-blue);
}

.tech-search button {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 0 25px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: bold;
}

.header-tools {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.tool-item i {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--primary-dark);
}

.tool-item:hover {
  color: var(--primary-blue);
}

/* ============================================
   Hero Section (Added for Contact/General)
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  color: white;
  padding: 80px 20px;
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  /* margin-top: var(--header-height); Handled by body padding usually, but ensuring separation */
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../assets/images/pattern.png');
  /* If exists, otherwise ignores */
  opacity: 0.1;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 300;
}

/* ============================================
   Layout: Sidebar + Main Content
   ============================================ */
.main-layout {
  display: flex;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  gap: 20px;
  min-height: calc(100vh - 100px);
}

/* Sidebar Navigation (AutomationDirect Style) */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  align-self: flex-start;
}

.sidebar-header {
  background: var(--primary-dark);
  color: white;
  padding: 12px 15px;
  font-weight: 700;
  border-radius: 7px 7px 0 0;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  color: var(--text-main);
}

.sidebar-menu a:last-child {
  border-bottom: none;
}

.sidebar-menu a:hover {
  background: #f0f7ff;
  color: var(--primary-blue);
  padding-left: 20px;
  /* Slight movement effect */
}

.sidebar-menu i {
  width: 20px;
  margin-right: 10px;
  color: var(--text-secondary);
}

/* Main Content Area */
.content-area {
  flex: 1;
}

/* ============================================
   Transparent Header (Contact Page)
   ============================================ */
.transparent-header {
  background: transparent !important;
  box-shadow: none !important;
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: none !important;
  padding-top: 20px !important;
}

.transparent-header .container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100%;
}

.transparent-header .nav-links {
  display: flex !important;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.transparent-header .nav-links li a {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 15px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.transparent-header .nav-links li a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white !important;
  transform: translateY(-2px);
}

.transparent-header .logo img {
  max-height: 60px !important;
  width: auto !important;
  /* Optional: Make logo white if it's dark text */
  /* filter: brightness(0) invert(1); */
}

/* Mobile Nav Adjustment for Transparent Header */
@media (max-width: 768px) {
  .transparent-header .nav-links {
    position: static !important;
    transform: none !important;
    background: transparent !important;
    flex-direction: row !important;
    padding: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    width: auto !important;
    display: flex !important;
  }

  .transparent-header .active {
    transform: none !important;
  }
}

/* ============================================
   Product Grid (Waveshare/Seeed Style)
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.tech-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.tech-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
}

.card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  background: #fff;
  /* Ensure white bg for product photos */
}

.card-img img {
  max-height: 100%;
  max-width: 100%;
}

.card-cat {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.tech-card h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 5px;
  line-height: 1.3;
}

.part-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 15px;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.price {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
}

.btn-add {
  background: var(--bg-body);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-add:hover {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

/* Banners */
.promo-banner {
  background: linear-gradient(to right, var(--primary-dark), var(--primary-blue));
  color: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.promo-text h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* ============================================
   Responsive
   ============================================ */
/* ============================================
   Missing Utilities (Added for Contact Page)
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.mb-lg {
  margin-bottom: 60px;
}

.text-center {
  text-align: center;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f7ff;
  color: var(--primary-blue);
  font-size: 24px;
  margin-bottom: 20px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
}

/* ResponsiveGrid */
.contact-grid-layout {
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 900px) {
  .contact-grid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    display: none;
    /* User can toggle */
  }

  .sidebar.active {
    display: block;
  }
}

/* ============================================
   Footer Styles (Universal)
   ============================================ */
footer {
  background: #1e293b;
  /* Slate 800-ish matches index.html */
  color: #cbd5e1;
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section p {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-section a {
  color: #cbd5e1;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-blue);
}

.footer-section i {
  margin-right: 10px;
  color: var(--primary-blue);
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}