/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

}

body {
  font-family: Arial, sans-serif;


}
h2 {
  font-size: 1.3rem;
  position: relative;  /* Enables left/top to take effect */
  left: 10px;
  top: 0px;
  margin: 1rem 0;
}

/* Main container - flex layout */
.main-container {
  overflow-x: hidden;
  display: flex;
  min-height: 200vh;
margin-bottom: 100px;
  flex-direction: column;
  position: relative; /* Allow absolute positioning of search bar */
}


/* Header with Menu, Logo, and Search Icon */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 60px; /* Adjust header height */
  position: relative; /* Make header container relative for absolute positioning */
}

/* Menu Icon (Hamburger) */
.hamburger {
  width: 40px;
  height: 35px;
  cursor: pointer;
}

/* Logo container */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  overflow: hidden;
  margin-top: -27px; /* Moves the logo up */
  position: relative; /* Ensure the search bar appears on top */
  z-index: 1; /* Ensure logo is below the search bar */
}

/* Logo image */
.logo img {
  width: 220px; /* Fixed width */
  height: auto;
  object-fit: contain;
  display: block; /* Removes default inline spacing */
  transition: opacity 0.3s ease; /* Smooth transition for logo fading */
}

/* Search Icon */
.search-icon {
  width: 30px;
  cursor: pointer;
  color: #0073e6;
}

/* Sidebar Menu */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100%;
  background-color: white; /* Sidebar background */
  color: black; /* Text color */
  padding: 20px;
  transform: translateX(-250px); /* Hidden by default */
  transition: transform 0.3s ease;
  z-index: 12;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.2); /* Shadow falls on the right side */
}
#sell-link, #help{
  color: black;
}
.sidebar.active {
  transform: translateX(0); /* Show sidebar */
}

.sidebar ul {
  list-style-type: none;
}

.sidebar li {
  margin: 15px 0;
}

.sidebar a {
  text-decoration: none;
  color: #666; /* Text color */
  font-size: 18px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: #ffd700; /* Hover effect */
}

/* Dim background when sidebar is active */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent dark background */
  z-index: 6; /* Below sidebar but above other content */
  visibility: hidden; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Make overlay visible when sidebar is active */
.overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Hide the logo when search bar is active */
.logo img.active {
  opacity: 0; /* Fade out the logo */
}

/* Main Section with welcome text */
.main-section {
  text-align: center;
  padding: 20px;
  margin-top: 20px;

}


p {
  font-size: 18px;
  color: #666;
}

.banner-slider {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background-color: #000; /* fallback while loading */
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5); /* soft shadow at bottom */
}


.slides {
  display: flex;
  height: 100%;
  width: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  display: block;
  z-index: 1;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Fill the entire container */
  transition: transform 0.3s ease-in-out;
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 18px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px 15px;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.slide:hover .banner-image {
  transform: scale(1.05);
}

.slide:hover .overlay {
  visibility: visible;
  opacity: 1;
}

/* Dot Navigation */
.dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  z-index: 3;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

/* Navigation Arrows */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 12px;
  cursor: pointer;
  font-size: 18px;
  z-index: 3;
  border-radius: 50%;
}

.nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.nav.prev {
  left: 15px;
  width: 30px;
}

.nav.next {
  right: 15px;
  width: 30px;
}
.recommended-section {
  padding: 1rem;
  background-color: #fff;
}

/* Recommended section base */
.recommended-section {
  padding: 1rem;
  background-color: #fff;
}

body.dark-mode .recommended-section {
  background-color: #111;
  color: #ddd !important;

}

/* Title inside recommended section */
.recommended-section .section-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: left;
  padding-left: 8px;
  color: #bfa24a !important;
  border-left: 4px solid #bfa24a;
}

/* Slider container */
.recommended-section .recommended-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.recommended-section .recommended-slider::-webkit-scrollbar {
  display: none;
}

/* Product card */
.recommended-section .recommended-card {
  flex: 0 0 auto;
  width: 140px;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  box-shadow: 0 4px 10px rgba(191, 162, 74, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommended-section .recommended-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(191, 162, 74, 0.3);
}

body.dark-mode .recommended-section .recommended-card {
  background-color: #222;
}

/* Image inside card */
.recommended-section .recommended-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}

/* Text inside card */
.recommended-section .recommended-info {
  padding: 6px 8px;
}

/* Title inside card - only in recommended section */
.recommended-section .recommended-info h4 {
  font-size: 13px;
  font-weight: bold;
  margin: 0 0 4px;
  text-align: left;
}

/* Price inside card - only in recommended section */
.recommended-section .recommended-price {
  font-size: 14px;
  font-weight: bold;
  text-align: left;
}

.product-info {
  padding: 1rem;
  text-align: left;
}

.product-info h3 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.price {
  color: #28a745;
  font-weight: bold;
  margin: 0.5rem 0;
}


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #fff;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.bottom-nav .nav-item {
  text-align: center;
  text-decoration: none;
  color: #333;
  font-size: 12px;
  flex: 1;
}

.bottom-nav .nav-item img {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 4px;
}
.scroll-to-top-btn {
  position: fixed;
  bottom: 100px;  /* Distance from the bottom */
  right: 20px;   /* Distance from the right */
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  font-size: 18px;
  display: none;  /* Hidden by default */
  cursor: pointer;
  z-index: 1000;  /* Ensure it's above other content */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scroll-to-top-btn:hover {
  background-color: #0056b3;  /* Darker shade on hover */
}

#productItemsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-left: 1rem; /* Small space from the left */
  justify-content: flex-start;
}


.all-products-section {
  padding: 1rem 0;
  margin: 0 auto;
  width: 100%;
}

.product-item-card {
  border-radius: 10px;
  width: 230px; /* Slightly smaller */
  transition: transform 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.product-image-container {
  position: relative;
background-color: #f7f7f7;
  border-radius: 10px;

}

.product-image-container img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}


.product-details {
  padding: 0.5rem;
  text-align: left;
}

.product-details h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0.1rem 0;
  color: #555;
  max-width: 100%; /* Ensure it takes up the full width of the container */
  overflow: hidden; /* Hide anything overflowing */
  text-overflow: ellipsis; /* Add ellipsis when text overflows */
}

.product-price {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
  margin: 0.5rem 0;
}


.popular-header {
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.popular-header h2 {
  font-size: 1.3rem;
  margin: 0;
}

.see-all {
  font-size: 0.95rem;
  color: #666;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none; /* remove default underline */
}

.see-text {
  position: relative;
}

.see-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #222; /* blue, or change to green (#28a745) */
}


.arrow-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.brands-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  padding-bottom: 1rem;
}

.brands-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar for cleaner look */
}

.brand-card {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
  background: transparent;
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

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

a{
  text-decoration: none;
  color: #333;
}
.brand-card img {
  width: 80px;
  height: 80px;
  object-fit: contain; 
}

.brand-card p {
  margin-top: 0.5rem;
  font-weight: 500;
}
/* Default Light Mode */
body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

/* Dark Mode */
body.dark-mode {
  background-color: #111;
  color: #ffffff;
}

/* Component color overrides */
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p,
body.dark-mode span,
body.dark-mode a,
body.dark-mode .product-card,
body.dark-mode .product-details,
body.dark-mode .brand-card,
body.dark-mode .header,
body.dark-mode .sidebar,
body.dark-mode .bottom-nav,
body.dark-mode .popular-brands,
body.dark-mode .recommended-section,
body.dark-mode .all-products-section,
body.dark-mode .banner-slider{
  background-color: #111 !important;
  color: #fff !important;
}
body.dark-mode .scroll-to-top-btn,
body.dark-mode .nav {
  background-color: #111 !important;
  color: #fff !important;
border: 1px solid white;
}
body.light-mode .product-card,
body.dark-mode .dot,
body.light-mode .product-details,
body.light-mode .brand-card,
body.light-mode .header,
body.light-mode .sidebar,
body.light-mode .bottom-nav,
body.light-mode .popular-brands,
body.light-mode .recommended-section,

body.light-mode .banner-slider,
body.light-mode .scroll-to-top-btn {
  background-color: #fff !important;
  color: #000 !important;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border: 1px solid white;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: black;
}

input:checked + .slider:before {
  transform: translateX(24px);
}


/* Default layout for larger screens (desktops/laptops) */
@media (min-width: 1024px) {
  .product-item-card {
    flex: 0 0 18%; /* 5 products per row on larger screens */
  }
}



/* Layout for mobile screens (max-width: 480px) */
@media (max-width: 480px) {
  .product-item-card {
    flex: 0 0 45%; /* 2 products per row on mobile */
  }
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .product-item-card {
    flex: 0 0 45%; /* 2 products per row on tablet and mobile screens */
  }
  .banner-slider {
    height: 200px;
  }

  .overlay-text {
    font-size: 14px;
  }

  .nav {
    padding: 8px;
    font-size: 16px;
  }
}

/* Media Queries for Responsive Layout */
@media screen and (max-width: 768px) {
  .header {
    height: 50px; /* Reduce header height for mobile */
    padding: 10px 15px;
  }

  .logo img {
    width: 220px; /* Adjust logo width for smaller screens */
  }

  .search-icon {
    width: 25px; /* Adjust search icon size */
  }

  .hamburger {
    width: 25px; /* Adjust hamburger icon size */
    height: 20px;
    object-fit: contain;
  }



  .main-section p {
    font-size: 16px; /* Adjust paragraph size */
  }
}
.product-location {
  display: inline-block;
  background-color: #ffe300; /* AliExpress-style yellow */
  color: #111;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  margin-top: 6px;
  max-width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
body.dark-mode .product-location {
  background-color: #ffb700 !important; /* Stronger yellow */
  color: #111 !important; /* Ensure black text */
  box-shadow: 0 1px 5px rgba(255, 255, 255, 0.1) !important;
}
/* Base styles using CSS variables */
.news-ticker {
  position: relative; /* Required for z-index to take effect */
  z-index: 7;
  background-color: var(--ticker-bg, #111);
  color: var(--ticker-color, #fff);
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  font-size: 16px;
  font-weight: bold;
  border-top: 2px solid var(--ticker-border, #007BFF);
  border-bottom: 2px solid var(--ticker-border, #007BFF);
}


/* Scrolling content */
.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 80s linear infinite;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Light mode overrides */
body.light-mode {
  --ticker-bg: #f5f5f5;
  --ticker-color: #111;
  --ticker-border: #007BFF;
}

/* Dark mode overrides */
body.dark-mode {
  --ticker-bg: #111;
  --ticker-color: #fff;
  --ticker-border: #007BFF;
}

