/* SOROYA MOTOR SPARES LTD - Red & Black Theme */
:root {
  --black: #0a0a0a;
  --black-light: #1a1a1a;
  --red: #cc0000;
  --red-hover: #ff1a1a;
  --white: #f0f0f0;
  --gray: #666;
  --light-gray: #f5f5f5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: white;
  color: #222;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1, h2, h3 {
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 { font-size: 2.5rem; color: var(--red); }
h2 { font-size: 2rem; border-left: 5px solid var(--red); padding-left: 1rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.5rem; margin-top: 1rem; }

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover { color: var(--red-hover); }

/* ========== STICKY HEADER ========== */
header {
  background: var(--black-light);
  padding: 1rem 5%;
  /*position: sticky;
  top: 0; */
  z-index: 1000;
  border-bottom: 2px solid var(--red);
  color: var(--white);
}
/* Make the wrapper div sticky instead */
#header-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  position: relative;
}
.logo img {
  height: 50px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links li {
  position: relative;
}
.nav-links a {
  color: var(--white);
  font-weight: 500;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}
.nav-links > li > a::after,
.nav-links > li > a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #cc0000, #D4A017);
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease-out;
}
.nav-links > li > a::before {
  top: -5px;
  transform-origin: left;
}
.nav-links > li > a:hover::after,
.nav-links > li > a:hover::before {
  transform: scaleX(1);
}
.nav-links a:hover {
  color: var(--red);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--black-light);
  min-width: 180px;
  border-radius: 5px;
  padding: 0.5rem 0;
  z-index: 1001;
  border: 1px solid var(--red);
}
.dropdown-menu li {
  display: block;
  margin: 0;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--white);
  white-space: nowrap;
}
.dropdown-menu a:hover {
  background: var(--red);
  color: white;
}
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Footer */
footer {
  background: var(--black-light);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  border-top: 1px solid var(--red);
  color: var(--white);
}

/* Hero Carousel */
.swiper {
  width: 100%;
  height: 90vh;
}
.swiper-slide {
  background-size: cover;
  background-position: center;
  position: relative;
}
.swiper-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}
.slide-text {
  position: absolute;
  bottom: 20%;
  left: 10%;
  z-index: 2;
  color: white;
}
.slide-text h2 { font-size: 3rem; border-left: none; color: var(--red); }

/* Buttons */
.btn, .whatsapp-btn {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}
.btn:hover, .whatsapp-btn:hover {
  background: var(--red-hover);
  color: white;
}

/* Product Grid – taller cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.product-card {
  background: var(--light-gray);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: white;
  padding: 0.5rem;
  transition: height 0.3s ease, padding 0.3s ease;
}
.product-card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0.3rem;
}
.product-card p {
  font-size: 0.85rem;
  padding: 0 0.5rem;
  color: var(--gray);
  flex-grow: 1;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  margin: 0;
  text-align: justify;
}
.product-card .whatsapp-btn {
  margin: 0 0 0.5rem;
  width: calc(100% - 1rem);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease;
}
.product-card:hover img {
  height: 180px;
  padding: 0.3rem;
}
.product-card:hover p {
  max-height: 100px;
  opacity: 1;
  margin: 0.5rem 0;
}
.product-card:hover .whatsapp-btn {
  opacity: 1;
  transform: translateY(0);
  margin: 0.5rem auto 0.8rem;
}

/* Size Table */
.size-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--light-gray);
}
.size-table th, .size-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: left;
}
.size-table th {
  background: var(--red);
  color: white;
}

/* Bicycle Spec Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.spec-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
}
.spec-table td:first-child {
  font-weight: bold;
  background: #e9e9e9;
  width: 30%;
}

/* Bike Detail Page */
.bike-detail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.bike-detail-image {
  flex: 1;
  min-width: 250px;
}
.bike-detail-image img {
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
}
.bike-detail-info {
  flex: 2;
}

/* Search Results */
.search-results {
  margin-top: 2rem;
  display: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  border-top: 5px solid var(--red);
  color: #222;
}
.modal-content input, .modal-content textarea, .modal-content select {
  width: 100%;
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.close-modal {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

/* Home page layout */
.home-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem 5%;
}
.home-sidebar {
  flex: 1;
  min-width: 260px;
  background: #f8f8f8;
  padding: 1.5rem;
  border-radius: 10px;
  align-self: start;
  position: sticky;
  top: 100px;
}
.home-sidebar img {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 8px;
}
.brand-filter {
  margin: 1rem 0;
}
.brand-filter h4 {
  margin-bottom: 0.5rem;
}
.brand-filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
  cursor: pointer;
}
.tyre-finder-sidebar select {
  width: 100%;
  margin: 0.3rem 0;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.tyre-finder-sidebar button {
  width: 100%;
  margin-top: 0.5rem;
}
.home-content {
  flex: 3;
  min-width: 260px;
}

/* Bicycles / Tyres page layout with sidebar */
.bikes-layout {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}
.bikes-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: #f8f8f8;
  padding: 1rem;
  border-radius: 10px;
  align-self: start;
  position: sticky;
  top: 100px;
}
.bikes-sidebar h3 {
  margin-top: 0;
  color: var(--red);
}
.bikes-sidebar ul {
  list-style: none;
  padding: 0;
}
.bikes-sidebar li {
  margin: 0.5rem 0;
}
.bikes-sidebar button {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background 0.2s;
}
.bikes-sidebar button:hover {
  background: #e0e0e0;
}
.bikes-sidebar button.active-filter {
  background: var(--red);
  color: white;
}
.bikes-content {
  flex: 1;
}
.bikes-content .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ========== MOBILE MENU STYLES ========== */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  z-index: 1001;
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .nav-container {
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
  }
  .logo {
    order: 2;
    text-align: center;
    flex: 1;
  }
  .hamburger {
    order: 3;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--black-light);
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    z-index: 1002;
    border-top: 1px solid var(--red);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  /* Remove hover underline on mobile */
  .nav-links > li > a::before,
  .nav-links > li > a::after {
    display: none;
  }
  /* Dropdown on mobile: click to open */
  .dropdown .dropdown-menu {
    position: static;
    background: transparent;
    padding-left: 1rem;
    border: none;
    display: none;
  }
  .dropdown.active .dropdown-menu {
    display: block;
  }
  .swiper {
    height: 50vh;
  }
  .home-layout {
    flex-direction: column;
  }
  .home-sidebar {
    position: static;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .bikes-layout {
    flex-direction: column;
  }
  .bikes-sidebar {
    width: 100%;
    position: static;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.5rem;
  }
  .bikes-sidebar ul {
    display: flex;
    gap: 0.5rem;
  }
  .bikes-sidebar li {
    display: inline-block;
  }
  .bikes-sidebar button {
    width: auto;
    padding: 0.3rem 0.8rem;
  }
}

/* Detail page description paragraphs */
.tyre-description p {
  text-align: justify;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}
.suggestion-item .compare-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.suggestion-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.suggestion-info {
  flex: 1;
  text-align: left;
}