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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
  padding: 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
  color: #333;
}

/* Navbar Layout */
.navbar {
  background-color: #fff;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  gap: 10px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff6f00;
}

.navbar-links {
  display: flex;
  gap: 15px;
}

.navbar-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.navbar-links a:hover {
  color: #ff6f00;
}

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.navbar-controls input,
.navbar-controls select {
  padding: 6px 10px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.navbar-cart {
  background: #ffeb3b;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: bold;
}

.navbar-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    flex-direction: column;
    width: 100%;
  }

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

  .navbar-toggle {
    display: block;
  }

  .navbar-controls {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-controls input,
  .navbar-controls select {
    width: 100%;
  }
}

/*End of Navbar Layout*/

.main-layout {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  flex: 1 1 200px;
  max-width: 250px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-right: 20px;
  padding: 0px;
  height: fit-content;
}

.sidebar h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #ff6f00;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s ease;
}

.sidebar a:hover {
  color: #ff6f00;
}

.sidebar a.active {
  color: #ff6f00;
  font-weight: bold;
}

/* Responsive Layout */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 20px;
  }
}

.product-section {
  max-width: 1200px;
  margin: auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 10px;
}

.cart-display {
  font-size: 1rem;
  background: #ffeb3b;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
}

.controls {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  gap: 15px;
  padding: 0 10px;
  flex-wrap: wrap;
}

#searchInput, #sortSelect {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 200px;
}
/* New Products Styles*/
.dropdown {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.dropbtn {
  background-color: #3498db;
  color: white;
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  z-index: 1;
  min-width: 160px;
}

.dropdown-content a {
  color: black;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

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

/*End of New Product Styles*/

.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

.product-image img {
  width: 100%;
  display: block;
  height: auto;
  object-fit: cover;
}

.product-info {
  padding: 15px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #222;
}

.product-price {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.product-price .current {
  color: #e53935;
  font-weight: bold;
}

.product-price .original {
  color: #999;
  text-decoration: line-through;
}

.product-rating {
  color: #ffc107;
  margin-bottom: 15px;
}

.add-to-cart-btn {
  background: #ff6f00;
  color: #fff;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.add-to-cart-btn:hover {
  background: #e65100;
}

.add-to-cart-btn.added {
  background: #4caf50;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  margin-bottom: 15px;
}

/* End of Modal Styles */


/* Banner container */
.banner-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 200px; /* default mobile height */
}

@media (min-width: 768px) {
  .banner-container {
    height: 400px; /* taller height for tablets/desktops */
  }
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures full image coverage without distortion */
}
#bannerCarousel {
  transition: transform 0.7s ease-in-out;
}

/*End of Banner Styles*/






/* Checkout Styles */
.checkout-page {
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

.checkout-page form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.checkout-page label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
}

.checkout-page input,
.checkout-page textarea {
  padding: 8px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.checkout-summary {
  background: #f4f4f4;
  padding: 10px;
  border-radius: 6px;
}

.checkout-summary ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.checkout-page button {
  padding: 12px;
  background: #4caf50;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* End of Checkout Styles */

/* Cart Styles */
.cart-page {
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.cart-item img {
  border-radius: 10px;
}

.cart-summary {
  margin-top: 20px;
  text-align: right;
}

.cart-summary button {
  padding: 10px 15px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

/* End of Cart Styles */

/* Checkout Button Styles */
.checkout-btn {
  display: inline-block;
  background: #4caf50;
  color: white;
  padding: 12px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s ease;
}

.checkout-btn:hover {
  background: #388e3c;
}

/* End of Checkout Styles */

/* Account Styles */
.navbar-account {
  position: relative;
}

.navbar-account button {
  background: none;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.account-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 10px;
  border-radius: 6px;
  display: none;
  flex-direction: column;
  gap: 10px;
  min-width: 150px;
  z-index: 10;
}

.account-menu a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.account-menu a:hover {
  color: #ff6f00;
}

/* End of Account Styles */

/* Pagination Styles */
.pagination-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.pagination-controls button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.pagination-controls button.active-page {
  background: #ff6f00;
  color: white;
  font-weight: bold;
  border-color: #e65100;
}

/* End of Pagination Styles */

/* Authentication Styles */
.auth-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.auth-container input {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.auth-container button {
  padding: 10px;
  font-weight: bold;
  border-radius: 6px;
  background: #ff6f00;
  color: white;
  border: none;
  cursor: pointer;
}

/* End of Authentication Styles */

/* Admin Styles */
.admin-container {
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.admin-container input,
.admin-container select {
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.admin-container button {
  padding: 12px 18px;
  background: #4caf50;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
}

/* End of Admin Styles */

/*Account Styles*/
.account-menu {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  right: 0;
  top: 100%;
  z-index: 1000;
  min-width: 150px;
  padding: 0.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.account-menu a {
  display: block;
  padding: 0.5rem;
  color: #333;
  text-decoration: none;
}

.account-menu a:hover {
  background-color: #f0f0f0;
}

.account-menu.active {
  display: block;
}

.modal-slider {
  position: relative;
  overflow: hidden;
}
.slide {
  display: none;
}
.slide.active {
  display: block;
}
.modal-slider button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #eee;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.prev-slide {
  left: 0;
}
.next-slide {
  right: 0;
}
.addToCart {
  width: 100%;
  background-color: #2563eb;
  color: white;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}
.addToCart:hover:not(:disabled) {
  background-color: #1e40af;
}
.addToCart:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

#mobileNavMenu {
  transition: all 0.3s ease;
}
#mobileNavMenu a {
  border-bottom: 1px solid #e5e7eb;
}

.cart-page button, .checkout-page button {
  transition: background-color 0.2s;
}
.cart-page button:hover, .checkout-page button:hover {
  background-color: #e5e7eb;
}
/* Loading styles */
    .loading-spinner {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid #f3f3f3;
      border-top: 3px solid #3498db;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    
    .error-message {
      background-color: #fee;
      border: 1px solid #fcc;
      color: #c33;
      padding: 1rem;
      border-radius: 0.5rem;
      margin: 1rem 0;
    }
    
    .success-message {
      background-color: #efe;
      border: 1px solid #cfc;
      color: #3c3;
      padding: 1rem;
      border-radius: 0.5rem;
      margin: 1rem 0;
    }
    
    .product-card {
      transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    }
    
    .product-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .skeleton {
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: loading 1.5s infinite;
    }
    
    @keyframes loading {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
/* WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(37, 211, 102, 0.9); /* WhatsApp green with transparency */
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: transform 0.3s ease, background 0.2s ease;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  background: #128C7E; /* Darker WhatsApp green */
}

.whatsapp-btn i {
  font-size: 1.8rem;
}

.whatsapp-tooltip {
  display: none;
  position: absolute;
  right: 70px;
  bottom: 15px;
  background: #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.whatsapp-btn:hover .whatsapp-tooltip {
  display: block;
}

@media (max-width: 640px) {
  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 80px; /* Adjust to avoid overlap with mobile-bottom-nav */
  }

  .whatsapp-btn i {
    font-size: 1.5rem;
  }

  .whatsapp-tooltip {
    bottom: 10px;
    right: 60px;
    font-size: 0.8rem;
  }
  
  body.auth-loading #profileLink,
  body.auth-loading #wishlistLink,
  body.auth-loading #logoutBtn,
  body.auth-loading #adminLink {
    display: none !important;
  }