/* Base Styles */
:root {
  --welcome-bg: linear-gradient(
    to bottom,
    #f4f8fb,
    #dbe9f7
  ); /* Define background */
  /* Light theme variables - simplified color palette */
  --bg-primary: #e6e5e5; /* Nearly white background */
  --bg-secondary: #e6e5e5; /* Slightly off-white background */
  --bg-tertiary: #ffffff; /* Pure white for cards */
  --text-primary: #333333; /* Dark gray for primary text */
  --text-secondary: #555555; /* Medium gray for secondary text */
  --text-tertiary: #777777; /* Lighter gray for tertiary text */
  --navy-blue: #3d77b5; /* Navy blue for all interactive elements */
  --navy-blue-hover: #0b2b4f; /* Darker navy blue for hover states */
  --shadow: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --border-color: #e6e6e6;
}

.trust-heading {
  text-align: center;
  padding: 20px 10px 0px 10px; /* Reduced bottom padding */
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.company-logos {
  padding: 5px 0.9rem 1rem 1rem; /* Reduced top padding */
  text-align: center;
  background-color: var(--bg-primary);
  overflow: hidden;
}

.logo:last-child {
  margin-right: 0;
}

.logo {
  flex-shrink: 0;

  animation: slideLogos 20s linear infinite;

  width: 200px; /* Fixed logo container size */
  text-align: center;
  margin-right: 4px;
  box-sizing: border-box; /* Include padding */
}

.logo img {
  max-width: 100%;
  max-height: 90px; /* Adjusted for cleanliness */
  vertical-align: middle;
  border-radius: 20px;
}

.logos-container {
  display: flex;
  width: max-content;
  animation: cleanSlide 70s linear infinite;
}

@keyframes cleanSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

[data-theme="dark"] {
  /* Dark theme variables - simplified color palette */
  --bg-primary: #121212; /* Dark background */
  --bg-secondary: #1e1e1e; /* Slightly lighter dark background */
  --bg-tertiary: #282828; /* Even lighter dark background */
  --text-primary: #f5f5f5; /* Light gray for primary text */
  --text-secondary: #d5d5d5; /* Slightly darker for secondary text */
  --text-tertiary: #a0a0a0; /* Even darker for tertiary text */
  --navy-blue: #1a5692; /* Slightly brighter navy for dark mode */
  --navy-blue-hover: #2569a8; /* Hover state */
  --shadow: rgba(0, 0, 0, 0.25);
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --border-color: #444;
}

.hero-welcome {
  background: linear-gradient(to bottom, #f4f8fb, #dbe9f7);
  padding: 4rem 2rem 3rem;
  text-align: center;
  color: var(--text-primary);
  animation: fadeIn 1s ease-in;
}

.hero-welcome h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-welcome p {
  font-size: 1.05rem;
  max-width: 850px;
  margin: 0.5rem auto;
  color: var(--text-secondary);
  line-height: 1.75;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body {
  font-family: "Open Sans", "Segoe UI", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Better touch handling for mobile */
button,
a,
.mobile-menu-toggle,
.catalogue-card {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
}

.media-wrapper {
  position: relative;
}

.badge-3d {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #3d77b5;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  z-index: 2;
}

#recent-products {
  padding: 3rem 1.5rem;
  background: none;
  text-align: center;
}

.product-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

.product-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

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

/* Typography Improvements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

p {
  margin-bottom: 1em;
  color: var(--text-secondary);
  font-weight: 400;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 750px;
  margin: 0 auto 2em;
  color: var(--text-secondary);
}

/* Header Styles - Navy Blue */
.header {
  display: grid;
  grid-template-columns: 1.5fr 3fr 1.5fr;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background-color: var(--navy-blue);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
  width: 100%;
}

/* Header Left - Logo and Navigation */
.header-left {
  display: flex;
  align-items: center;
  flex: 2;
}

.logo-img {
  height: 65px;
  margin: 8px 0;
  border-radius: 20px;
  padding: 0;
}

/* Main Navigation */
.main-nav {
  display: flex;
  margin-left: 25px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  border-radius: 4px;
  position: relative;
}

.main-nav a i {
  margin-right: 7px;
  font-size: 1rem;
}

.main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.main-nav a.active {
  color: white;
  font-weight: 700;
  border-bottom: 2px solid white;
}

/* Dropdown for Products */
.dropdown {
  position: relative;
}

.dropbtn {
  display: inline-block;
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.dropdown-icon {
  margin-left: 6px;
  font-size: 0.85rem;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(52, 94, 160, 0.85);
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  border-radius: 8px;
  overflow: hidden;
  top: 100%;
  backdrop-filter: blur(6px);
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 500;
}

.dropdown-content a:hover {
  background-color: rgba(52, 94, 160, 1);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Header Center - Search */
.header-center {
  display: flex;
  justify-content: center;
  flex: 1;
  padding: 0 20px;
}

/* Search Container */
.search-container {
  position: relative;
  width: 100%;
  max-width: 700px;
}

.search-container input {
  width: 100%;
  padding: 20px 60px 20px 25px;
  border: none;
  border-radius: 50px;
  font-size: 1.3rem;
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-weight: 500;
}

.search-container input:focus {
  outline: none;
  background-color: white;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px) scale(1.02);
}

.search-container input::placeholder {
  color: #666;
  font-size: 1.15rem;
  font-weight: 400;
}

.search-container button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #3D77B5, #2c5a8f);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 12px 16px;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-container button:hover {
  background: linear-gradient(135deg, #2c5a8f, #1a3d5f);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Header Right - Icons */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  flex: 1;
}

.header-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
  cursor: pointer;
  transition: color 0.2s;
  color: white;
}

.header-icon i {
  font-size: 1.2rem;
  margin-bottom: 3px;
}

.icon-label {
  font-size: 0.7rem;
  font-weight: 600;
}

.header-icon:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Cart Count Badge */
.cart-count {
  position: absolute;
  top: -5px;
  right: 0;
  background-color: white;
  color: var(--navy-blue);
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

/* Profile Dropdown */
.profile-icon {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-tertiary);
  box-shadow: 0 5px 15px var(--shadow);
  border-radius: 8px;
  width: 180px;
  display: none;
  z-index: 101;
  margin-top: 10px;
  overflow: hidden;
}

.profile-dropdown a {
  color: var(--text-primary);
  padding: 12px 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.profile-dropdown a i {
  margin-right: 10px;
  color: var(--navy-blue);
  font-size: 1rem;
  width: 20px;
}

.profile-dropdown a:last-child {
  border-bottom: none;
}

.profile-dropdown a:hover {
  background-color: var(--bg-secondary);
}

/* Show dropdown on hover */
.profile-icon:hover .profile-dropdown {
  display: block;
}

/* Theme toggle icon animation */
.theme-toggle i {
  transition: transform 0.5s ease;
}

.theme-toggle:hover i {
  transform: rotate(30deg);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-menu-toggle:active {
  opacity: 0.7;
}

/* Mobile Navigation Menu */
.mobile-nav {
  display: none;
  flex-direction: column;
  background-color: var(--navy-blue);
  padding: 10px 0;
  position: fixed;
  top: 70px;
  right: 10px;
  width: 220px;
  z-index: 9999;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.3s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav a {
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.mobile-nav a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.mobile-nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Hero Carousel Section - FIXED */
.hero-carousel {
  background: linear-gradient(to bottom, #f4f8fb, #dbe9f7);
  width: 100vw;
  height: calc(100vh - 90px); /* subtracting header height (~90px) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0; /* remove any top/bottom padding */
}
.carousel {
  width: 80%; /* reduced from 90% */
  max-width: 1000px; /* optional: smaller max width */
  height: 65vh; /* reduced from 80vh */
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background-color: var(
    --bg-tertiary
  ); /* optional for consistent white background */
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
  width: 100%;
}

.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  flex: 0 0 100%;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.prev:hover,
.next:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.prev {
  left: 15px;
}

.next {
  right: 15px;
}

/* Carousel Indicators */
.indicators {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.indicator {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.indicator.active {
  background-color: white;
}

.white-section {
  background: linear-gradient(
    to bottom,
    #f4f8fb,
    #dbe9f7
  ); /* match background */
  padding: 4rem 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  max-width: 1100px;
  margin: 3rem auto;
  text-align: center;
  backdrop-filter: blur(3px);
}

.white-section h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.white-section p {
  color: var(--text-secondary);
  max-width: 900px;
  margin: 0 auto 1.2rem;
  line-height: 1.7;
}

/* Catalogue Section */
.catalogue {
  padding: 3rem 2rem;
  text-align: center;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.catalogue h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.catalogue p {
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
  max-width: 100%;
  box-sizing: border-box;
}

.catalogue-card {
  background-color: var(--bg-tertiary);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 400px;
  text-align: center;
}

.catalogue-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0 0.6rem;
}

.catalogue-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.catalogue-card * {
  backface-visibility: hidden;
}

.catalogue-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow);
}

.catalogue-card model-viewer {
  border-radius: 8px;
  margin-bottom: 1rem;
  background-color: var(--bg-tertiary) !important;
}

.catalogue-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0 0.6rem;
}

.catalogue-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.catalogue-card button {
  margin-top: 0.5rem;
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  background-color: var(--navy-blue);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
}

.catalogue-card button:hover {
  background-color: var(--navy-blue-hover);
  transform: scale(1.05);
}

/* Button Container Styles */
.button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 0.5rem;
}

.view-details {
  flex: 1;
}

.cart-button {
  background-color: var(--navy-blue);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0.7rem;
  width: 50px;
  height: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  position: relative;
}

.cart-button:hover {
  background-color: var(--navy-blue-hover);
  transform: scale(1.05);
}

/* Tooltip styles */
.cart-button::after {
  content: "Add to Cart";
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.cart-button:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* Products Section */
.products,
.about-us {
  padding: 3rem 2rem;
  text-align: center;
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

.search-suggestions {
  position: absolute;
  background: rgba(47, 101, 184, 0.95);
  border: none;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  z-index: 999;
  border-radius: 10px;
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.search-suggestions div {
  padding: 16px 22px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: white;
}

.search-suggestions div:hover {
  background-color: rgba(35, 77, 144, 0.95);
}

.products h2,
.about-us h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.product-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.product-card {
  background: var(--bg-tertiary);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  width: 280px;
  padding: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow);
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  color: var(--text-primary);
}

/* About Us Section */
.about-us p {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about-us p + p {
  margin-top: 1rem;
}

/* Footer */
.footer {
  background: var(--navy-blue);
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
  transition: background-color 0.3s ease;
}

/* Popup Styles */
.popup-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.popup-content {
  background-color: var(--bg-tertiary);
  width: 90%;
  max-width: 800px;
  border-radius: 12px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  padding: 28px;
  max-height: 85vh;
  overflow-y: auto;
  animation: popupFadeIn 0.3s ease-out;
  color: var(--text-primary);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.close-popup:hover {
  color: var(--text-primary);
}

.popup-content h2 {
  color: var(--text-primary);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.8rem;
}

.popup-content-flex {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
}

.popup-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-image model-viewer {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  background-color: var(--bg-tertiary) !important;
}

.popup-details {
  flex: 2;
}

.popup-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.popup-content h3 {
  color: var(--text-primary);
  margin: 20px 0 12px 0;
  font-size: 1.3rem;
}

.specifications-list,
.features-list {
  list-style-type: none;
  padding: 0;
  margin-bottom: 20px;
}

.specifications-list li,
.features-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.specifications-list li:before,
.features-list li:before {
  content: "•";
  color: var(--navy-blue);
  font-weight: bold;
  margin-right: 12px;
  font-size: 18px;
}

.popup-footer {
  margin-top: 25px;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.popup-footer button {
  padding: 12px 22px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-footer button i {
  font-size: 0.9rem;
}

.inquiry-button {
  background-color: var(--navy-blue);
  color: white;
  border: none;
}

.inquiry-button:hover {
  background-color: var(--navy-blue-hover);
  transform: translateY(-2px);
}

.download-specs {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.download-specs:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
}

/* New popup layout styles */
.popup-content-flex-new {
  position: relative;
  margin-bottom: 25px;
}

.popup-image-small {
  float: right;
  width: 200px;
  height: 200px;
  margin: 0 0 15px 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.popup-details-full {
  overflow: hidden;
}

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

@media (max-width: 992px) {
  .header-left,
  .header-center,
  .header-right {
    flex: 1;
  }

  .main-nav a {
    padding: 8px 10px;
    font-size: 0.95rem;
  }

  .main-nav a i {
    margin-right: 3px;
  }

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

  .search-container {
    max-width: 500px;
  }

  .search-container input {
    font-size: 1.1rem;
    padding: 16px 55px 16px 20px;
  }
}

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

  h2 {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
  }

  .header-left {
    order: 1;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .main-nav {
    display: none;
  }

  .logo-img {
    height: 70px;
    margin: 10px 0;
  }

  .header-center {
    order: 3;
    width: 100%;
    margin-top: 10px;
    padding: 0 5px;
  }

  .search-container {
    max-width: 100%;
  }

  .search-container input {
    font-size: 1rem;
    padding: 14px 50px 14px 18px;
  }

  .search-container button {
    font-size: 1.1rem;
    padding: 10px 14px;
  }

  .header-right {
    order: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
  }

  .mobile-menu-toggle {
    display: block;
    padding: 10px;
  }

  .header-icon {
    padding: 0 5px;
  }

  .icon-label {
    display: none;
  }

  .popup-content-flex {
    flex-direction: column;
  }

  .popup-content {
    padding: 20px;
    width: 90%;
    max-width: 90%;
  }

  .catalogue-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }

  .catalogue-card {
    width: 100%;
  }

  h2 {
    font-size: 1.6rem;
  }

  .company-logos {
    padding: 5px 0.5rem 1rem 0.5rem;
  }

  /* Mobile Nav - Improved positioning */
  .mobile-nav {
    display: none;
    flex-direction: column;
    background-color: var(--navy-blue);
    padding: 10px 0;
    position: fixed;
    top: 80px;
    right: 10px;
    left: auto;
    width: 200px;
    z-index: 2000;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .mobile-nav.active {
    display: flex !important;
  }

  .mobile-nav a {
    color: white;
    padding: 12px 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
  }

  .mobile-nav a:last-child {
    border-bottom: none;
  }

  .mobile-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 600px) {
  .catalogue-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .catalogue-card {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .header {
    padding: 8px;
  }

  .logo-img {
    height: 50px;
  }

  .search-container input {
    font-size: 0.95rem;
    padding: 12px 45px 12px 16px;
  }

  .search-container input::placeholder {
    font-size: 0.9rem;
  }

  .search-container button {
    font-size: 1rem;
    padding: 8px 12px;
    right: 8px;
  }

  .popup-image-small {
    width: 150px;
    height: 150px;
    margin: 0 0 10px 10px;
  }

  .button-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .view-details {
    width: 100%;
  }

  h2 {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  #recent-products {
    padding: 2rem 0.5rem;
  }

  .popup-content {
    padding: 15px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .popup-content h2 {
    font-size: 1.3rem;
  }

  .whatsapp-button img {
    width: 60px;
    height: 60px;
  }

  .wp-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 8px 5px;
  }

  .logo-img {
    height: 45px;
  }

  .search-container input {
    font-size: 0.9rem;
    padding: 10px 42px 10px 14px;
    border-radius: 25px;
  }

  .search-container button {
    font-size: 0.9rem;
    padding: 7px 10px;
  }

  .catalogue-card {
    padding: 0.8rem;
  }

  .catalogue-card h3 {
    font-size: 1rem;
  }

  .catalogue-card p {
    font-size: 0.85rem;
  }

  .catalogue-card button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }

  .mobile-nav {
    width: 180px;
    top: 65px;
    right: 5px;
  }

  .mobile-nav a {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .mobile-menu-toggle {
    font-size: 1.3rem;
    padding: 6px;
  }

  .popup-content {
    padding: 12px;
    width: 98%;
  }
}

.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.whatsapp-button img {
  width: 80px;
  height: 80px;
}

.wp-text {
  margin-top: 2px;
  font-size: 14px;
  color: grey;
  font-weight: 600;
  text-align: center;
  background: none;
  padding: 0;
  box-shadow: none;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none; /* Hidden by default */
}

.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--navy-blue); /* Brand color */
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(24px);
  }
}
