
/* =========================================
   Main stylesheet for Ganesh Auto Parts
   ========================================= */

/* Global */
body {
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Header and navigation */
header {
  background: #0a2a43;
  color: white;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ff6600;
}

/* Homepage hero */
.hero {
  background: url('../img/factory.jpg') no-repeat center center / cover;
  color: white;
  padding: 90px 20px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 10px 0;
  font-size: 2.2rem;
}

/* Buttons */
.btn,
.btn-small {
  background: #ff6600;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  display: inline-block;
  margin-top: 10px;
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn:hover,
.btn-small:hover {
  background: #e65500;
  transform: translateY(-2px);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.9rem;
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* Product cards */
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
}

.card:hover {
  text-decoration: none;
}

.card img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
}

/* Page heading */
.page-header {
  background: #f2f2f2;
  padding: 34px 20px;
  text-align: center;
}

/* =========================================
   Contact form
   ========================================= */

.contact-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
}

/* Text fields only — excludes checkboxes */
.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  display: block;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

/* Human verification checkbox and label */
.contact-form label.checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Reset general input styling for the checkbox */
.contact-form label.checkbox input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  display: inline-block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  flex: 0 0 16px;
  accent-color: #0a2a43;
}

/* Map */
.map {
  margin-top: 20px;
}

/* Footer */
footer {
  background: #0a2a43;
  color: white;
  text-align: center;
  padding: 18px 0;
  margin-top: 40px;
}

/* =========================================
   Breadcrumbs
   ========================================= */

.breadcrumb-section {
  background: #fff;
  padding: 14px 0 0;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.breadcrumbs a {
  color: #0a2a43;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #ff6600;
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 8px;
  color: #999;
}

.breadcrumbs strong {
  color: #555;
}

/* Product category navigation */
.product-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ddd;
}

.product-category-nav a {
  display: inline-block;
  padding: 7px 14px;
  background: #f2f2f2;
  color: #0a2a43;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.25s ease, color 0.25s ease;
}

.product-category-nav a:hover {
  background: #ff6600;
  color: #fff;
}

.product-category-nav a.active {
  background: #0a2a43;
  color: #fff;
}

/* =========================================
   Responsive layout
   ========================================= */

@media (max-width: 768px) {
  .hero {
    padding: 60px 12px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .nav-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 12px;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    width: 92%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .product-category-nav {
    gap: 6px;
  }

  .product-category-nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}
