* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary: #4a6cf7;
  --primary-dark: #3a5ce5;
  --secondary: #6a7c92;
  --dark: #1d2144;
  --light: #f5f8ff;
  --accent: #ff6b6b;
  --success: #2ecc71;
  --warning: #f39c12;
  --gray: #e2e8f0;
  --gray-dark: #a0aec0;
  --white: #ffffff;
  --shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  background-color: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  padding: 5px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  transition: var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 28px;
  color: var(--primary);
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.mobile-menu {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(74, 108, 247, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* Products Hero Section */
.products-hero {
  padding: 180px 0 80px;
  background: linear-gradient(135deg, var(--primary) 0%, #6c8aff 100%);
  color: var(--white);
  text-align: center;
}

.products-hero .hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  animation: fadeUp 1s ease;
}

.products-hero .hero-content p {
  font-size: 20px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeUp 1s ease 0.3s both;
}

/* Search and Filter Section */
.search-filter {
  padding: 60px 0 30px;
  background-color: var(--white);
  border-bottom: 1px solid var(--gray);
}

.search-box {
  margin-bottom: 40px;
}

.search-input {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-input i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
}

.search-input input {
  width: 100%;
  padding: 15px 50px 15px 50px;
  border: 2px solid var(--gray);
  border-radius: 50px;
  font-size: 16px;
  transition: var(--transition);
}

.search-input input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.clear-search {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  transition: var(--transition);
}

.clear-search:hover {
  color: var(--accent);
}

.filter-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.filter-group h3 {
  margin-bottom: 15px;
  color: var(--dark);
  font-size: 18px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  background-color: var(--light);
  border: 1px solid var(--gray);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.price-filter {
  padding: 10px 0;
}

.price-filter input[type="range"] {
  width: 100%;
  margin: 10px 0;
}

.price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--secondary);
}

.brand-filter select,
.sort-filter select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  font-size: 14px;
  background-color: var(--white);
  transition: var(--transition);
}

.brand-filter select:focus,
.sort-filter select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.active-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid var(--gray);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tag {
  background-color: var(--primary);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-tag button {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0;
  margin-left: 5px;
}

.clear-filters {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.clear-filters:hover {
  color: #ff4757;
}

/* Products Grid Section */
.products-grid-section {
  padding: 60px 0;
  background-color: var(--light);
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.products-header h2 {
  font-size: 28px;
  color: var(--dark);
}

.view-options {
  display: flex;
  gap: 10px;
}

.view-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray);
  background-color: var(--white);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn.active,
.view-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.products-container {
  position: relative;
  min-height: 400px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.products-grid.list-view {
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Product Card Styles */
.product-card {
  background-color: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-card.list-view {
  display: flex;
  height: 200px;
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--accent);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.product-img {
  height: 200px;
  background: linear-gradient(135deg, #f5f8ff, #e6ecff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card.list-view .product-img {
  width: 200px;
  height: 100%;
  flex-shrink: 0;
}

.product-img img {
  max-width: 80%;
  max-height: 80%;
  transition: var(--transition);
}

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

.product-info {
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 180px;
}

.product-card.list-view .product-info {
  flex: 1;
  height: auto;
  justify-content: space-between;
}

.product-category {
  color: var(--secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.product-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-info p {
  color: var(--secondary);
  font-size: 14px;
  margin-bottom: 15px;
  flex-grow: 1;
  line-height: 1.4;
}

.product-card.list-view .product-info p {
  margin-bottom: 10px;
}

.product-price-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price {
  font-weight: 700;
  color: var(--primary);
  font-size: 20px;
}

.old-price {
  text-decoration: line-through;
  color: var(--gray-dark);
  font-size: 14px;
}

.buttons-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-to-cart {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.add-to-cart:hover {
  background-color: var(--primary);
  color: var(--white);
}

.whatsapp-quick-order {
  background: #25d366;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
  white-space: nowrap;
}

.whatsapp-quick-order:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.quick-view-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  transition: var(--transition);
  opacity: 0;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
}

.quick-view-btn:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* Loading and No Products States */
.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  color: var(--secondary);
}

.loading-spinner i {
  font-size: 40px;
  margin-bottom: 20px;
}

.no-products {
  text-align: center;
  padding: 80px 20px;
  color: var(--secondary);
}

.no-products i {
  font-size: 60px;
  margin-bottom: 20px;
  color: var(--gray-dark);
}

.no-products h3 {
  margin-bottom: 10px;
  color: var(--dark);
}

.load-more-container {
  text-align: center;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--white);
  border-radius: 15px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--gray);
}

.modal-header h3 {
  margin: 0;
  color: var(--dark);
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--secondary);
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--accent);
}

.modal-body {
  padding: 30px;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100%;
  background-color: var(--white);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--gray);
}

.cart-header h3 {
  margin: 0;
}

.close-cart {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--secondary);
  transition: var(--transition);
}

.close-cart:hover {
  color: var(--accent);
}

.cart-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--gray);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  background-color: var(--light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-img img {
  max-width: 80%;
  max-height: 80%;
}

.cart-item-details {
  flex: 1;
}

.cart-item-details h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 600;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  align-self: flex-start;
}

.cart-item-remove:hover {
  color: #ff4757;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--gray);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 18px;
}

.checkout-btn {
  width: 100%;
}

.checkout-btn:disabled {
  background-color: var(--gray);
  cursor: not-allowed;
  transform: none !important;
}

.checkout-btn:disabled:hover {
  background-color: var(--gray);
  box-shadow: none;
  transform: none !important;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
}

.whatsapp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  position: relative;
  animation: pulse 2s infinite;
}

.whatsapp-link:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-link i {
  font-size: 28px;
}

.whatsapp-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: var(--dark);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 20px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
}

.whatsapp-link:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    gap: 15px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .products-hero .hero-content h1 {
    font-size: 36px;
  }

  .products-hero .hero-content p {
    font-size: 18px;
  }

  .filter-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .products-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .product-card.list-view {
    flex-direction: column;
    height: auto;
  }

  .product-card.list-view .product-img {
    width: 100%;
    height: 200px;
  }

  .active-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-link {
    width: 50px;
    height: 50px;
  }

  .whatsapp-link i {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .products-hero {
    padding: 150px 0 60px;
  }

  .products-hero .hero-content h1 {
    font-size: 28px;
  }

  .filter-options {
    justify-content: center;
  }

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

  .product-price-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .buttons-container {
    width: 100%;
    justify-content: space-between;
  }
}
