/**
 * Additional styling for enhanced design
 */

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay .search-form {
  display: flex;
  width: 100%;
  max-width: 600px;
}

.search-overlay .search-field {
  flex: 1;
  padding: 15px 20px;
  font-size: 18px;
  border: none;
  background-color: #fff;
  border-radius: 50px 0 0 50px;
}

.search-overlay .search-submit {
  padding: 15px 30px;
  background-color: #c9302c;
  color: #fff;
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-overlay .search-submit:hover {
  background-color: #a02622;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-toggle {
  display: block; /* Always show hamburger menu */
}

.search-toggle,
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #fff;
  font-size: 20px;
}



.hamburger {
  display: flex;
  flex-direction: column;
  width: 25px;
  height: 20px;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s;
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Sticky Header */
.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header.hidden {
  transform: translateY(-100%);
}

/* Featured Brands Section */
.featured-brands-section {
  margin-bottom: 60px;
  padding-top: 40px;
}

.featured-brands-section .section-title {
  font-size: 28px;
  font-weight: 500;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.featured-brands-section .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: #c9302c;
}

.featured-brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.featured-brand-card {
  display: block;
  background: #fff;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.featured-brand-card:hover {
  opacity: 0.9;
}

.brand-card-image {
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  position: relative;
  overflow: hidden;
  background-color: #f9f9f9;
}

.brand-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.featured-brand-card:hover .brand-card-image img {
  transform: scale(1.05);
}

.brand-card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  color: #fff;
}

.brand-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
  text-shadow: 
    0 0 5px rgba(0, 0, 0, 0.9),
    0 2px 4px rgba(0, 0, 0, 0.8),
    1px 1px 3px rgba(0, 0, 0, 0.8);
}

.featured-brand-card:hover .brand-card-title {
  color: #fff;
}

.brand-card-count {
  display: none;
}

.brand-card-arrow {
  display: none;
}

/* Responsive Design for Featured Brands */
@media (max-width: 992px) {
  .featured-brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .featured-brands-section {
    margin-bottom: 40px;
    padding-top: 20px;
  }
  
  .featured-brands-section .section-title {
    font-size: 24px;
    margin-bottom: 25px;
  }
  
  .featured-brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  

  
  .brand-card-image {
    padding-top: 100%; /* Keep square aspect ratio */
  }
  
  .brand-card-content {
    padding: 20px;
  }
  
  .brand-card-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .brand-card-image {
    padding-top: 100%; /* Keep square aspect ratio */
  }
  
  .brand-card-content {
    padding: 15px;
  }
  
  .brand-card-title {
    font-size: 18px;
  }
}

/* Price Guarantee Banner */
.price-guarantee-banner {
  background: linear-gradient(135deg, #c9302c 0%, #a02622 100%);
  color: #fff;
  padding: 20px 30px;
  margin: 30px 0;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(201, 48, 44, 0.2);
}

.guarantee-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.guarantee-text strong {
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .price-guarantee-banner {
    padding: 15px 20px;
    margin: 20px 0;
  }
  
  .guarantee-text {
    font-size: 14px;
  }
  
  .guarantee-text strong {
    font-size: 18px;
  }
}

/* Product Filters */
.product-filters {
  margin: 30px 0;
  display: flex;
  gap: 20px;
}

.filter-select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.filter-select:hover,
.filter-select:focus {
  border-color: #999;
}

/* Load More Button */
.load-more-wrapper {
  text-align: center;
  margin-top: 50px;
}

.load-more-button {
  padding: 15px 40px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.load-more-button:hover {
  background-color: #c9302c;
  transform: translateY(-2px);
}

.load-more-button.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* Products Grid Loading State */
.products-grid.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Product Card Enhancements */
.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-price {
  font-size: 18px;
  font-weight: 600;
  color: #c9302c;
  margin: 10px 0;
}

.product-model {
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
}

/* No Products Message */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #999;
}

/* Desktop and Mobile Menu Styles */
.main-navigation {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 1001;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  overflow-x: hidden;
}

.main-navigation.mobile-active {
  display: block;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    padding: 80px 30px 40px;
    min-height: min-content;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Close button for mobile menu */
  .mobile-menu-close {
    position: fixed;
    top: 80px;
    right: 30px;
    font-size: 36px;
    color: #333;
    cursor: pointer;
    z-index: 1002;
    line-height: 1;
    background: none;
    border: none;
    padding: 5px;
    display: none;
    transition: opacity 0.3s;
  }

  .mobile-menu-close.active {
    display: block;
  }

  .mobile-menu-close:hover {
    opacity: 0.7;
  }

  .nav-menu > li {
    margin-bottom: 15px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background-color: #f9f9f9;
    margin-top: 10px;
    display: block !important;
    max-height: none;
    padding: 10px 0;
  }

  .dropdown-menu ul {
    display: block;
  }

  .dropdown-menu ul li {
    padding: 8px 15px;
  }

  .dropdown-menu ul li a {
    font-size: 14px;
    color: #666;
  }

  body.menu-open {
    overflow: hidden;
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  /* Mobile menu item styles */
  .main-navigation.mobile-active .menu-item-has-children > a {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  /* Ensure all dropdown items are expanded and visible */
  .main-navigation.mobile-active .dropdown-menu,
  .main-navigation.mobile-active .dropdown-menu ul {
    overflow: visible;
    height: auto;
  }

  /* Smooth scrolling for iOS */
  .main-navigation {
    -webkit-overflow-scrolling: touch;
  }

  /* Custom scrollbar styling for mobile menu */
  .main-navigation::-webkit-scrollbar {
    width: 4px;
  }

  .main-navigation::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  .main-navigation::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
  }

  .main-navigation::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

  /* Style for regular menu items in mobile */
  .main-navigation.mobile-active #primary-menu > li > a {
    display: block;
    padding: 12px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #eee;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeIn 0.5s ease-out;
}

/* Search Results Page */
.search-results-page {
  padding: 80px 0;
  min-height: 70vh;
}

.search-results-page .page-header {
  margin-bottom: 50px;
  text-align: center;
}

.search-results-page .page-title {
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 15px;
  color: #333;
}

.search-results-page .page-title span {
  font-weight: 500;
  color: #c9302c;
}

.search-result-count {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

/* Search Results Grid */
.search-results-grid {
  margin-bottom: 50px;
}

.search-products,
.search-posts {
  margin-bottom: 60px;
}

.search-products .section-title,
.search-posts .section-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e8e8e8;
}

/*/* Products Grid in Search - Using same styles as home page */
.search-products .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

/* Posts List in Search */
.search-posts .posts-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.search-posts .post-item {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #eee;
  transition: box-shadow 0.3s;
}

.search-posts .post-item:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.search-posts .post-title {
  margin-bottom: 10px;
}

.search-posts .post-title a {
  font-size: 20px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.search-posts .post-title a:hover {
  color: #c9302c;
}

.search-posts .post-meta {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: #999;
  margin-bottom: 15px;
}

.search-posts .post-type {
  background: #f5f5f5;
  padding: 2px 10px;
  border-radius: 3px;
}

.search-posts .post-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
}

.no-results h2 {
  font-size: 28px;
  font-weight: 500;
  color: #333;
  margin-bottom: 20px;
}

.no-results p {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
}

.search-suggestions {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.search-suggestions h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #333;
}

.search-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-suggestions li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: #666;
}

.search-suggestions li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #c9302c;
}

/* New Search Form */
.new-search .search-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
}

.new-search .search-field {
  flex: 1;
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #e8e8e8;
  border-radius: 50px 0 0 50px;
  transition: border-color 0.3s;
}

.new-search .search-field:focus {
  outline: none;
  border-color: #c9302c;
}

.new-search .search-submit {
  padding: 12px 30px;
  background-color: #c9302c;
  color: #fff;
  border: 2px solid #c9302c;
  border-radius: 0 50px 50px 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.new-search .search-submit:hover {
  background-color: #a02622;
  border-color: #a02622;
}

/* Search Results Pagination */
.search-results-page .pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
}

.search-results-page .page-numbers {
  padding: 10px 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}

.search-results-page .page-numbers:hover {
  background-color: #f5f5f5;
  border-color: #999;
}

.search-results-page .page-numbers.current {
  background-color: #c9302c;
  color: #fff;
  border-color: #c9302c;
}

.search-results-page .page-numbers.dots {
  border: none;
  background: none;
}

/* Responsive Design for Search Results */
@media (max-width: 992px) {
  .search-products .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .search-results-page {
    padding: 60px 0;
  }

  .search-results-page .page-title {
    font-size: 28px;
  }

  .search-products .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .search-posts .post-item {
    padding: 20px;
  }

  .search-posts .post-title a {
    font-size: 18px;
  }

  .new-search .search-form {
    flex-direction: column;
  }

  .new-search .search-field,
  .new-search .search-submit {
    border-radius: 50px;
    width: 100%;
  }

  .new-search .search-submit {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .search-products .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ============================================================================
   Models Grid Styles
   ============================================================================ */

/* Models Section */
.models-section {
  margin-bottom: 60px;
  padding: 40px 0;
}

.models-section .section-title {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

/* Models Grid */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

/* Model Card */
.model-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

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

.model-card-image {
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  position: relative;
  overflow: hidden;
  background-color: #f5f5f5;
  margin-bottom: 4px;
}

.model-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.model-card:hover .model-card-image img {
  transform: scale(1.05);
}

.model-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.model-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card-count {
  display: none;
}

.model-card-arrow {
  display: none;
}

.model-card:hover .model-card-arrow {
  display: none;
}

/* Brand Header */
.brand-header {
  margin-bottom: 40px;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  color: #fff;
}

.brand-title {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: #fff;
}

.brand-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Model Header */
.model-header {
  margin-bottom: 40px;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 8px;
  color: #fff;
}

.model-title {
  font-size: 38px;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: #fff;
}

.model-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Breadcrumb */
.breadcrumb {
  padding: 15px 0;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #c9302c;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #a02622;
  text-decoration: underline;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #999;
}

.breadcrumb .current {
  color: #333;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-description {
    font-size: 16px;
  }

  .model-title {
    font-size: 28px;
  }

  .model-description {
    font-size: 14px;
  }

  .models-section .section-title {
    font-size: 24px;
  }

  .model-card-title {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .model-card-image {
    padding-top: 100%; /* Keep 1:1 aspect ratio */
  }

  .brand-header,
  .model-header {
    padding: 30px 15px;
  }

  .brand-title {
    font-size: 28px;
  }

  .model-title {
    font-size: 24px;
  }

  .model-card-title {
    font-size: 11px;
  }
}
