/* Main Stylesheet for B2B Website */

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: #ffffff;
}

/* Navigation */
.navbar {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  margin: 3px 0;
  transition: 0.3s;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary-color);
}

.btn-secondary {
  background: var(--accent-color);
  color: white;
}

.btn-secondary:hover {
  background: #d97706;
}

/* Cards */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  max-width: 100%;
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  max-width: 100%;
}

/* Limit card max width when there are few items */
.grid > .card {
  max-width: 400px;
  justify-self: start;
}

@media (min-width: 768px) {
  .grid > .card {
    justify-self: stretch;
  }
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.1);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Demo-only additions on top of the cf_b2b template styles */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.spec-table th,
.spec-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}
.spec-table th {
  width: 38%;
  color: var(--text-light);
  font-weight: 600;
  background: #fbfcfe;
}
.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}
.card-image {
  height: 200px;
  object-fit: cover;
}
@media (max-width: 768px) {
  .spec-table th { width: 42%; }
}

/* ---------- layout helpers ---------- */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } }

.hero-sm { padding: 3rem 2rem; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 2rem; color: var(--primary-color); }
.center-narrow { text-align: center; max-width: 820px; margin: 0 auto; }
.lead { color: var(--text-light); font-size: 1.1rem; line-height: 1.8; }
.body-p { color: var(--text-light); line-height: 1.8; margin-bottom: 1rem; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.badge { background: var(--primary-color); color: #fff; padding: .25rem .75rem; border-radius: 1rem; font-size: .85rem; }
.stat-num { font-size: 2.4rem; font-weight: 700; color: var(--primary-color); }
.stat-label { color: var(--text-light); font-size: .95rem; }
@media (max-width: 480px) { .stat-num { font-size: 1.9rem; } }

.feature { text-align: center; }
.feature-icon { margin-bottom: .75rem; display: flex; justify-content: center; }
.step-num { font-size: 1.6rem; font-weight: 700; color: var(--accent-color); }

.cta-band { background: var(--bg-light); padding: 3rem 2rem; }
.cta-title { font-size: 1.8rem; margin-bottom: 1rem; color: var(--primary-color); }
.cta-text { color: var(--text-light); max-width: 660px; margin: 0 auto 1.5rem; }

.filter-bar { background: #fff; padding: 1.5rem; border-radius: .5rem; box-shadow: 0 2px 4px rgba(0,0,0,.1); margin-bottom: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
[hidden] { display: none !important; }

/* ---------- product detail ---------- */
.breadcrumb { margin-bottom: 2rem; font-size: .95rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb span { margin: 0 .4rem; }
.breadcrumb em { font-style: normal; color: var(--primary-color); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.detail-img { width: 100%; border-radius: .5rem; box-shadow: 0 4px 6px rgba(0,0,0,.1); }
.thumbs { display: flex; gap: .75rem; margin-top: .75rem; }
.thumbs img { width: 32%; border-radius: .35rem; border: 1px solid var(--border-color); opacity: .75; }
.detail-title { font-size: 2rem; margin: 1rem 0; color: var(--text-dark); }
.btn-row { display: flex; gap: 1rem; margin-top: 1.75rem; flex-wrap: wrap; }
.btn-muted { background: #6b7280; color: #fff; }
.note-box { margin-top: 2rem; padding: 1.25rem; background: var(--bg-light); border-radius: .5rem; color: var(--text-light); font-size: .95rem; line-height: 1.7; }

/* ---------- about / contact ---------- */
.facts { background: var(--bg-light); padding: 2rem; border-radius: .5rem; }
.facts h3 { color: var(--primary-color); margin-bottom: 1rem; }
.facts ul { list-style: none; }
.facts li { padding: .5rem 0; border-bottom: 1px solid var(--border-color); color: var(--text-light); }
.facts li:last-child { border-bottom: none; }
.facts strong { color: var(--text-dark); }

.chips { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.chip { border: 1px solid var(--border-color); border-radius: .5rem; padding: 1rem 1.5rem; color: var(--text-light); font-weight: 500; background: #fff; }

.contact-list { margin: 0; }
.contact-list dt { font-weight: 500; margin-top: 1.25rem; }
.contact-list dd { margin: .25rem 0 0; color: var(--text-light); }
.contact-list a { color: var(--primary-color); text-decoration: none; }
.form-hint { color: var(--text-light); font-size: .85rem; margin-top: 1rem; line-height: 1.6; }

/* ---------- product cards ---------- */
.card-image { height: 200px; }

/* ---------- ultra-narrow screens ---------- */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .container { padding: 1rem 1.25rem; }
}
