:root {
  --primary-color: #21829a;
  --secondary-color: #3ab4cc;
  --accent-color: #ff7e33;
  --dark-color: #1a3e4c;
  --light-color: #f0f9fc;
  --text-color: #333;
  --text-light: #777;
  --border-color: #e1e5e7;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Global Styles & Resets --- */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  overflow-x: hidden;
}

/* --- Header --- */
header {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease,
    box-shadow 0.3s ease;
  color: var(--primary-color);
  text-decoration: none;
  background-color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.3);
}

.fa-solid {
  font-size: 1.1rem;
}

/* --- Main Container & Page Title --- */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.page-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.page-title h1 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  position: relative;
  display: inline-block;
}

.page-title h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.page-title p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 1rem auto 0;
}

/* --- Category Navigation --- */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.category-btn {
  padding: 0.8rem 1.8rem;
  background-color: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease,
    background-color 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  min-height: 44px; /* Accessibility: good touch target size */
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.category-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.2);
}

.category-btn.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.3);
}

@media (hover: none) and (pointer: coarse) {
  .category-btn:hover {
    transform: none;
  }
  .category-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(33, 130, 154, 0.2);
  }
}

/* --- Category Sections --- */
.category-section {
  margin-bottom: 4rem;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
}

.category-section.hidden {
  display: none;
}

.category-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark-color);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.category-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  margin: 0.5rem auto;
  border-radius: 2px;
}

/* --- Subcategory Sections --- */
.subcategory-section {
  margin-bottom: 3rem;
}

.subcategory-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid black;
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-card:hover::before {
  opacity: 1;
}

.product-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  height: 250px;
  background: white;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
}

.product-card:hover .product-image-container {
  background-color: #f8f8f8;
}

.product-image {
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
  transition: transform 0.3s ease;
  width: auto;
  height: auto;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-grow: 1; /* Ensures info section fills space, aligning content in grid rows */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.product-card:hover .product-info {
  background-color: var(--primary-color);
  color: white;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.3s ease;
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
  color: var(--dark-color);
}

.product-card:hover .product-title {
  color: white;
}

/* Quick View Button */
.quick-view-btn {
  position: absolute;
  bottom: 80px; /* Positioned just above the info section */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 0.5rem 1.2rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 126, 51, 0.3);
  z-index: 2;
  min-width: 120px;
  min-height: 40px;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
  transform: translateX(-50%) translateY(-2px);
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  }
  .product-card:active {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  }
  .quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    min-height: 44px; /* Better touch target */
  }
  .product-card:active .quick-view-btn {
    background-color: #e66c22;
  }
}

/* --- Popup Styles --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.popup-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  z-index: 1060;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease, visibility 0.3s ease;
  -webkit-overflow-scrolling: touch;
}

.popup-overlay.popup-visible,
.popup-container.popup-visible {
  opacity: 1;
  visibility: visible;
}

.popup-container.popup-visible {
  transform: translate(-50%, -50%) scale(1);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--dark-color) 100%
  );
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
  border-radius: 15px 15px 0 0;
}

.popup-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  flex: 1;
  padding-right: 1rem;
}

.popup-close-btn {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  border: none;
  background: none;
  cursor: pointer;
  color: white;
  padding: 0;
  width: 44px; /* A11y: minimum touch target */
  height: 44px; /* A11y: minimum touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.popup-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

@media (hover: none) and (pointer: coarse) {
  .popup-close-btn:hover {
    background-color: transparent;
    transform: none;
  }
  .popup-close-btn:active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }
}

.popup-content {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.popup-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.popup-image {
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.popup-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.popup-details .product-code {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  background-color: rgba(33, 130, 154, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: inline-block;
  align-self: flex-start;
}

.popup-details .product-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-color);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.get-product-btn {
  flex: 1;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(33, 130, 154, 0.3);
  min-width: 150px;
}

.get-product-btn:hover {
  background-color: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.4);
}

.get-product-btn.call-btn {
  background-color: var(--accent-color);
  box-shadow: 0 3px 10px rgba(255, 126, 51, 0.3);
}

.get-product-btn.call-btn:hover {
  background-color: #e66c22;
  box-shadow: 0 5px 15px rgba(255, 126, 51, 0.4);
}

/* --- Specification Table --- */
.spec-table-container {
  grid-column: 1 / -1;
  margin-top: 2rem;
}

.spec-table-container h3 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--dark-color);
  position: relative;
  padding-left: 1rem;
}

.spec-table-container h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 70%;
  width: 4px;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.spec-table th,
.spec-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.spec-table th {
  background-color: var(--light-color);
  color: var(--dark-color);
  font-weight: 600;
  width: 40%;
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.spec-table tbody tr:hover {
  background-color: rgba(33, 130, 154, 0.05);
}

/* --- Footer --- */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #0d2b36 100%);
  color: #ced4da;
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* --- Utilities --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
    background-color 0.3s ease;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
}

.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(33, 130, 154, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background-color: #fafafa;
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-light);
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
  }
}

@media (max-width: 992px) {
  .page-title h1 {
    font-size: 2.4rem;
  }
  .category-nav {
    gap: 0.8rem;
  }
  .category-btn {
    padding: 0.7rem 1.6rem;
    font-size: 0.95rem;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
  .product-image-container {
    height: 230px;
    padding: 1.8rem;
  }
  .product-title {
    font-size: 1rem;
  }
  .popup-content {
    grid-template-columns: 1fr;
  }
  .popup-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }
  .popup-container {
    width: 95%;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  body {
    line-height: 1.5;
  }
  .main-container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  .page-title {
    margin-bottom: 2rem;
  }
  .page-title h1 {
    font-size: 2rem;
  }
  .page-title p {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .category-nav {
    gap: 0.6rem;
    margin-bottom: 2rem;
  }
  .category-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  .category-section {
    padding: 1.5rem;
    margin-bottom: 3rem;
  }
  .category-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  .subcategory-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
  }
  .product-image-container {
    height: 200px;
    padding: 1.5rem;
  }
  .product-info {
    padding: 10px;
  }
  .product-title {
    font-size: 0.95rem;
  }
  .quick-view-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    bottom: 60px;
    display: none;
  }
  .popup-header {
    padding: 1.2rem;
  }
  .popup-title {
    font-size: 1.3rem;
  }
  .popup-content {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .action-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  .get-product-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  .spec-table-container {
    margin-top: 1.5rem;
  }
  .spec-table-container h3 {
    font-size: 1.2rem;
  }
  .spec-table th,
  .spec-table td {
    padding: 0.6rem 0.8rem;
  }
}

@media (max-width: 576px) {
  .header-container {
    gap: 1rem;
    padding: 0 1rem;
  }
  .logo img {
    height: 40px;
  }
  .main-nav {
    gap: 0.5rem;
  }
  .nav-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  .main-container {
    padding: 0 1rem;
  }
  .page-title h1 {
    font-size: 1.8rem;
  }
  .page-title p {
    font-size: 0.9rem;
  }
  .category-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  .category-btn {
    width: 100%;
    max-width: 250px;
  }
  .category-title {
    font-size: 1.6rem;
  }
  .subcategory-title {
    font-size: 1.3rem;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .product-info {
    padding: 1rem;
    min-height: 40px;
  }
  .product-title {
    font-size: 10px !important;
    padding: 0;
  }
  .product-image-container {
    height: 150px;
  }
  .quick-view-btn {
    /* position: absolute; */
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    bottom: 70px;
    display: none;
  }
  .product-card:hover .quick-view-btn {
    transform: translateX(-50%) translateY(-2px);
  }
  .popup-container {
    width: 90% !important;
    /* max-height: calc(100vh- 100px) !important; */
  }
  .popup-header {
    padding: 1rem;
  }
  .popup-title {
    font-size: 1.2rem;
  }
  .popup-content {
    padding: 1rem;
  }
  .popup-image {
    max-height: 200px;
  }
  .popup-details .product-description {
    font-size: 0.9rem;
  }
  .back-to-top {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    bottom: 1rem;
    right: 1rem;
  }
}
footer{
  padding: 20px;
}
footer p {
  font-size: 10px;
}

@media (max-width: 420px) {
  .products-grid {
    gap: 0.8rem;
  }
  .product-image-container {
    height: 140px;
  }
  .page-title h1 {
    font-size: 1.6rem;
  }
  .category-title {
    font-size: 1.4rem;
  }
  .subcategory-title {
    font-size: 1.2rem;
  }
  .popup-container {
    width: 90%;
    height: 90%;
    max-height: 100vh;
    border-radius: 0;
    margin: 50px 5% 0 5%;
    top: 0;
    left: 0;
    transform: none;
  }
  .popup-container.popup-visible {
    transform: none;
  }
  .popup-header {
    border-radius: 0;
  }
  .spec-table th,
  .spec-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
    word-break: break-word;
  }
}:root {
  --primary-color: #21829a;
  --secondary-color: #3ab4cc;
  --accent-color: #ff7e33;
  --dark-color: #1a3e4c;
  --light-color: #f0f9fc;
  --text-color: #333;
  --text-light: #777;
  --border-color: #e1e5e7;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Global Styles & Resets --- */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  overflow-x: hidden;
}

/* --- Header --- */
header {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease,
    box-shadow 0.3s ease;
  color: var(--primary-color);
  text-decoration: none;
  background-color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.3);
}

.fa-solid {
  font-size: 1.1rem;
}

/* --- Main Container & Page Title --- */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.page-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.page-title h1 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  position: relative;
  display: inline-block;
}

.page-title h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.page-title p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 1rem auto 0;
}

/* --- Category Navigation --- */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.category-btn {
  padding: 0.8rem 1.8rem;
  background-color: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease,
    background-color 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  min-height: 44px; /* Accessibility: good touch target size */
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.category-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.2);
}

.category-btn.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.3);
}

@media (hover: none) and (pointer: coarse) {
  .category-btn:hover {
    transform: none;
  }
  .category-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(33, 130, 154, 0.2);
  }
}

/* --- Category Sections --- */
.category-section {
  margin-bottom: 4rem;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
}

.category-section.hidden {
  display: none;
}

.category-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark-color);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.category-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  margin: 0.5rem auto;
  border-radius: 2px;
}

/* --- Subcategory Sections --- */
.subcategory-section {
  margin-bottom: 3rem;
}

.subcategory-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid black;
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-card:hover::before {
  opacity: 1;
}

.product-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  height: 250px;
  background: white;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
}

.product-card:hover .product-image-container {
  background-color: #f8f8f8;
}

.product-image {
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
  transition: transform 0.3s ease;
  width: auto;
  height: auto;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-grow: 1; /* Ensures info section fills space, aligning content in grid rows */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.product-card:hover .product-info {
  background-color: var(--primary-color);
  color: white;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.3s ease;
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
  color: var(--dark-color);
}

.product-card:hover .product-title {
  color: white;
}

/* Quick View Button */
.quick-view-btn {
  position: absolute;
  bottom: 80px; /* Positioned just above the info section */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 0.5rem 1.2rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 126, 51, 0.3);
  z-index: 2;
  min-width: 120px;
  min-height: 40px;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
  transform: translateX(-50%) translateY(-2px);
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  }
  .product-card:active {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  }
  .quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    min-height: 44px; /* Better touch target */
  }
  .product-card:active .quick-view-btn {
    background-color: #e66c22;
  }
}

/* --- Popup Styles --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.popup-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  z-index: 1060;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease, visibility 0.3s ease;
  -webkit-overflow-scrolling: touch;
}

.popup-overlay.popup-visible,
.popup-container.popup-visible {
  opacity: 1;
  visibility: visible;
}

.popup-container.popup-visible {
  transform: translate(-50%, -50%) scale(1);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--dark-color) 100%
  );
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
  border-radius: 15px 15px 0 0;
}

.popup-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  flex: 1;
  padding-right: 1rem;
}

.popup-close-btn {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  border: none;
  background: none;
  cursor: pointer;
  color: white;
  padding: 0;
  width: 44px; /* A11y: minimum touch target */
  height: 44px; /* A11y: minimum touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.popup-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

@media (hover: none) and (pointer: coarse) {
  .popup-close-btn:hover {
    background-color: transparent;
    transform: none;
  }
  .popup-close-btn:active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }
}

.popup-content {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.popup-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.popup-image {
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.popup-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.popup-details .product-code {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  background-color: rgba(33, 130, 154, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: inline-block;
  align-self: flex-start;
}

.popup-details .product-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-color);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.get-product-btn {
  flex: 1;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(33, 130, 154, 0.3);
  min-width: 150px;
}

.get-product-btn:hover {
  background-color: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.4);
}

.get-product-btn.call-btn {
  background-color: var(--accent-color);
  box-shadow: 0 3px 10px rgba(255, 126, 51, 0.3);
}

.get-product-btn.call-btn:hover {
  background-color: #e66c22;
  box-shadow: 0 5px 15px rgba(255, 126, 51, 0.4);
}

/* --- Specification Table --- */
.spec-table-container {
  grid-column: 1 / -1;
  margin-top: 2rem;
}

.spec-table-container h3 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--dark-color);
  position: relative;
  padding-left: 1rem;
}

.spec-table-container h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 70%;
  width: 4px;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.spec-table th,
.spec-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.spec-table th {
  background-color: var(--light-color);
  color: var(--dark-color);
  font-weight: 600;
  width: 40%;
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.spec-table tbody tr:hover {
  background-color: rgba(33, 130, 154, 0.05);
}

/* --- Footer --- */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #0d2b36 100%);
  color: #ced4da;
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* --- Utilities --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
    background-color 0.3s ease;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
}

.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(33, 130, 154, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background-color: #fafafa;
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-light);
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
  }
}

@media (max-width: 992px) {
  .page-title h1 {
    font-size: 2.4rem;
  }
  .category-nav {
    gap: 0.8rem;
  }
  .category-btn {
    padding: 0.7rem 1.6rem;
    font-size: 0.95rem;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
  .product-image-container {
    height: 230px;
    padding: 1.8rem;
  }
  .product-title {
    font-size: 1rem;
  }
  .popup-content {
    grid-template-columns: 1fr;
  }
  .popup-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }
  .popup-container {
    width: 95%;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  body {
    line-height: 1.5;
  }
  .main-container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  .page-title {
    margin-bottom: 2rem;
  }
  .page-title h1 {
    font-size: 2rem;
  }
  .page-title p {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .category-nav {
    gap: 0.6rem;
    margin-bottom: 2rem;
  }
  .category-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  .category-section {
    padding: 1.5rem;
    margin-bottom: 3rem;
  }
  .category-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  .subcategory-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
  }
  .product-image-container {
    height: 200px;
    padding: 1.5rem;
  }
  .product-info {
    padding: 10px;
  }
  .product-title {
    font-size: 0.95rem;
  }
  .quick-view-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    bottom: 60px;
    display: none;
  }
  .popup-header {
    padding: 1.2rem;
  }
  .popup-title {
    font-size: 1.3rem;
  }
  .popup-content {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .action-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  .get-product-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  .spec-table-container {
    margin-top: 1.5rem;
  }
  .spec-table-container h3 {
    font-size: 1.2rem;
  }
  .spec-table th,
  .spec-table td {
    padding: 0.6rem 0.8rem;
  }
}

@media (max-width: 576px) {
  .header-container {
    gap: 1rem;
    padding: 0 1rem;
  }
  .logo img {
    height: 40px;
  }
  .main-nav {
    gap: 0.5rem;
  }
  .nav-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  .main-container {
    padding: 0 1rem;
  }
  .page-title h1 {
    font-size: 1.8rem;
  }
  .page-title p {
    font-size: 0.9rem;
  }
  .category-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  .category-btn {
    width: 100%;
    max-width: 250px;
  }
  .category-title {
    font-size: 1.6rem;
  }
  .subcategory-title {
    font-size: 1.3rem;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .product-info {
    padding: 1rem;
    min-height: 40px;
  }
  .product-title {
    font-size: 10px !important;
    padding: 0;
  }
  .product-image-container {
    height: 150px;
  }
  .quick-view-btn {
    /* position: absolute; */
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    bottom: 70px;
    display: none;
  }
  .product-card:hover .quick-view-btn {
    transform: translateX(-50%) translateY(-2px);
  }
  .popup-container {
    width: 90% !important;
    /* max-height: calc(100vh- 100px) !important; */
  }
  .popup-header {
    padding: 1rem;
  }
  .popup-title {
    font-size: 1.2rem;
  }
  .popup-content {
    padding: 1rem;
  }
  .popup-image {
    max-height: 200px;
  }
  .popup-details .product-description {
    font-size: 0.9rem;
  }
  .back-to-top {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    bottom: 1rem;
    right: 1rem;
  }
}
footer{
  padding: 20px;
}
footer p {
  font-size: 10px;
}

@media (max-width: 420px) {
  .products-grid {
    gap: 0.8rem;
  }
  .product-image-container {
    height: 140px;
  }
  .page-title h1 {
    font-size: 1.6rem;
  }
  .category-title {
    font-size: 1.4rem;
  }
  .subcategory-title {
    font-size: 1.2rem;
  }
  .popup-container {
    width: 90%;
    height: 90%;
    max-height: 100vh;
    border-radius: 0;
    margin: 50px 5% 0 5%;
    top: 0;
    left: 0;
    transform: none;
  }
  .popup-container.popup-visible {
    transform: none;
  }
  .popup-header {
    border-radius: 0;
  }
  .spec-table th,
  .spec-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
    word-break: break-word;
  }
}:root {
  --primary-color: #21829a;
  --secondary-color: #3ab4cc;
  --accent-color: #ff7e33;
  --dark-color: #1a3e4c;
  --light-color: #f0f9fc;
  --text-color: #333;
  --text-light: #777;
  --border-color: #e1e5e7;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Global Styles & Resets --- */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  overflow-x: hidden;
}

/* --- Header --- */
header {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease,
    box-shadow 0.3s ease;
  color: var(--primary-color);
  text-decoration: none;
  background-color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.3);
}

.fa-solid {
  font-size: 1.1rem;
}

/* --- Main Container & Page Title --- */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.page-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.page-title h1 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  position: relative;
  display: inline-block;
}

.page-title h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.page-title p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 1rem auto 0;
}

/* --- Category Navigation --- */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.category-btn {
  padding: 0.8rem 1.8rem;
  background-color: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease,
    background-color 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  min-height: 44px; /* Accessibility: good touch target size */
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.category-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.2);
}

.category-btn.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.3);
}

@media (hover: none) and (pointer: coarse) {
  .category-btn:hover {
    transform: none;
  }
  .category-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(33, 130, 154, 0.2);
  }
}

/* --- Category Sections --- */
.category-section {
  margin-bottom: 4rem;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
}

.category-section.hidden {
  display: none;
}

.category-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark-color);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.category-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  margin: 0.5rem auto;
  border-radius: 2px;
}

/* --- Subcategory Sections --- */
.subcategory-section {
  margin-bottom: 3rem;
}

.subcategory-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid black;
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-card:hover::before {
  opacity: 1;
}

.product-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  height: 250px;
  background: white;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
}

.product-card:hover .product-image-container {
  background-color: #f8f8f8;
}

.product-image {
  object-fit: contain;
  max-height: 100%;
  max-width: 100%;
  transition: transform 0.3s ease;
  width: auto;
  height: auto;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-grow: 1; /* Ensures info section fills space, aligning content in grid rows */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.product-card:hover .product-info {
  background-color: var(--primary-color);
  color: white;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.3s ease;
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
  color: var(--dark-color);
}

.product-card:hover .product-title {
  color: white;
}

/* Quick View Button */
.quick-view-btn {
  position: absolute;
  bottom: 80px; /* Positioned just above the info section */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 0.5rem 1.2rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 126, 51, 0.3);
  z-index: 2;
  min-width: 120px;
  min-height: 40px;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
  transform: translateX(-50%) translateY(-2px);
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  }
  .product-card:active {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  }
  .quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    min-height: 44px; /* Better touch target */
  }
  .product-card:active .quick-view-btn {
    background-color: #e66c22;
  }
}

/* --- Popup Styles --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.popup-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  z-index: 1060;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease, visibility 0.3s ease;
  -webkit-overflow-scrolling: touch;
}

.popup-overlay.popup-visible,
.popup-container.popup-visible {
  opacity: 1;
  visibility: visible;
}

.popup-container.popup-visible {
  transform: translate(-50%, -50%) scale(1);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--dark-color) 100%
  );
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
  border-radius: 15px 15px 0 0;
}

.popup-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  flex: 1;
  padding-right: 1rem;
}

.popup-close-btn {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  border: none;
  background: none;
  cursor: pointer;
  color: white;
  padding: 0;
  width: 44px; /* A11y: minimum touch target */
  height: 44px; /* A11y: minimum touch target */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.popup-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

@media (hover: none) and (pointer: coarse) {
  .popup-close-btn:hover {
    background-color: transparent;
    transform: none;
  }
  .popup-close-btn:active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }
}

.popup-content {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.popup-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.popup-image {
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.popup-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.popup-details .product-code {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  background-color: rgba(33, 130, 154, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: inline-block;
  align-self: flex-start;
}

.popup-details .product-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-color);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.get-product-btn {
  flex: 1;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(33, 130, 154, 0.3);
  min-width: 150px;
}

.get-product-btn:hover {
  background-color: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(33, 130, 154, 0.4);
}

.get-product-btn.call-btn {
  background-color: var(--accent-color);
  box-shadow: 0 3px 10px rgba(255, 126, 51, 0.3);
}

.get-product-btn.call-btn:hover {
  background-color: #e66c22;
  box-shadow: 0 5px 15px rgba(255, 126, 51, 0.4);
}

/* --- Specification Table --- */
.spec-table-container {
  grid-column: 1 / -1;
  margin-top: 2rem;
}

.spec-table-container h3 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--dark-color);
  position: relative;
  padding-left: 1rem;
}

.spec-table-container h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 70%;
  width: 4px;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.spec-table th,
.spec-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.spec-table th {
  background-color: var(--light-color);
  color: var(--dark-color);
  font-weight: 600;
  width: 40%;
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.spec-table tbody tr:hover {
  background-color: rgba(33, 130, 154, 0.05);
}

/* --- Footer --- */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #0d2b36 100%);
  color: #ced4da;
  padding: 3rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* --- Utilities --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease,
    background-color 0.3s ease;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent-color);
  transform: translateY(-5px);
}

.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(33, 130, 154, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background-color: #fafafa;
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color);
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-light);
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
  }
}

@media (max-width: 992px) {
  .page-title h1 {
    font-size: 2.4rem;
  }
  .category-nav {
    gap: 0.8rem;
  }
  .category-btn {
    padding: 0.7rem 1.6rem;
    font-size: 0.95rem;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
  .product-image-container {
    height: 230px;
    padding: 1.8rem;
  }
  .product-title {
    font-size: 1rem;
  }
  .popup-content {
    grid-template-columns: 1fr;
  }
  .popup-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }
  .popup-container {
    width: 95%;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  body {
    line-height: 1.5;
  }
  .main-container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  .page-title {
    margin-bottom: 2rem;
  }
  .page-title h1 {
    font-size: 2rem;
  }
  .page-title p {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .category-nav {
    gap: 0.6rem;
    margin-bottom: 2rem;
  }
  .category-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  .category-section {
    padding: 1.5rem;
    margin-bottom: 3rem;
  }
  .category-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  .subcategory-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
  }
  .product-image-container {
    height: 200px;
    padding: 1.5rem;
  }
  .product-info {
    padding: 10px;
  }
  .product-title {
    font-size: 0.95rem;
  }
  .quick-view-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    bottom: 60px;
    display: none;
  }
  .popup-header {
    padding: 1.2rem;
  }
  .popup-title {
    font-size: 1.3rem;
  }
  .popup-content {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .action-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  .get-product-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  .spec-table-container {
    margin-top: 1.5rem;
  }
  .spec-table-container h3 {
    font-size: 1.2rem;
  }
  .spec-table th,
  .spec-table td {
    padding: 0.6rem 0.8rem;
  }
}

@media (max-width: 576px) {
  .header-container {
    gap: 1rem;
    padding: 0 1rem;
  }
  .logo img {
    height: 40px;
  }
  .main-nav {
    gap: 0.5rem;
  }
  .nav-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  .main-container {
    padding: 0 1rem;
  }
  .page-title h1 {
    font-size: 1.8rem;
  }
  .page-title p {
    font-size: 0.9rem;
  }
  .category-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  .category-btn {
    width: 100%;
    max-width: 250px;
  }
  .category-title {
    font-size: 1.6rem;
  }
  .subcategory-title {
    font-size: 1.3rem;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .product-info {
    padding: 1rem;
    min-height: 40px;
  }
  .product-title {
    font-size: 10px !important;
    padding: 0;
  }
  .product-image-container {
    height: 150px;
  }
  .quick-view-btn {
    /* position: absolute; */
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    bottom: 70px;
    display: none;
  }
  .product-card:hover .quick-view-btn {
    transform: translateX(-50%) translateY(-2px);
  }
  .popup-container {
    width: 90% !important;
    /* max-height: calc(100vh- 100px) !important; */
  }
  .popup-header {
    padding: 1rem;
  }
  .popup-title {
    font-size: 1.2rem;
  }
  .popup-content {
    padding: 1rem;
  }
  .popup-image {
    max-height: 200px;
  }
  .popup-details .product-description {
    font-size: 0.9rem;
  }
  .back-to-top {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    bottom: 1rem;
    right: 1rem;
  }
}
footer{
  padding: 20px;
}
footer p {
  font-size: 10px;
}

@media (max-width: 420px) {
  .products-grid {
    gap: 0.8rem;
  }
  .product-image-container {
    height: 140px;
  }
  .page-title h1 {
    font-size: 1.6rem;
  }
  .category-title {
    font-size: 1.4rem;
  }
  .subcategory-title {
    font-size: 1.2rem;
  }
  .popup-container {
    width: 90%;
    height: 90%;
    max-height: 100vh;
    border-radius: 0;
    margin: 50px 5% 0 5%;
    top: 0;
    left: 0;
    transform: none;
  }
  .popup-container.popup-visible {
    transform: none;
  }
  .popup-header {
    border-radius: 0;
  }
  .spec-table th,
  .spec-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
    word-break: break-word;
  }
}