/* =========================
   Navigation / Dropdowns (Base & Mobile)
   ========================= */

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  /* We remove position: relative from here so it doesn't break desktop defaults */
  min-width: 250px;
  background: var(--card-background-color);
  border: 1px solid var(--muted-border-color);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
  overflow: hidden;
  z-index: 1000;
}

.dropdown-content a {
  display: block;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.dropdown-content a:hover {
  background-color: rgba(255,255,255,.08);
  /* Added missing semicolon below */
  backdrop-filter: blur(8px); 
  text-decoration: none;
}


/* =========================
   Desktop (768px and up)
   ========================= */

@media (min-width: 768px) {
  .burger-btn {
    display: none;
  }

  /* Force absolute layout only on desktop to stop the navbar shift */
  .dropdown-content {
    position: absolute !important; 
    top: 100%;
    left: 0;
    /* Added backdrop-filter to the container so you get that clean transparency overlay look over your body content */
    background: rgba(20, 24, 33, 0.85); 
    backdrop-filter: blur(12px);
  }

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


/* =========================
   Mobile (Under 767px)
   ========================= */

@media (max-width: 767px) {
  nav.container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .burger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-left: auto;
    margin-top: 0;
    margin-bottom: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 1.5rem;
  }

  #nav-menu {
    display: none !important;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
  }

  #nav-menu.show {
    display: flex !important;
  }

  #nav-menu li {
    width: 100%;
    display: block;
  }

  /* Explicitly force mobile back to relative flow so it pushes mobile items down naturally */
  .dropdown-content {
    position: relative !important;
    background: transparent;
    border: none; /* Strip out desktop borders */
    border-left: 2px solid var(--primary);
    box-shadow: none; /* Strip out desktop shadows on mobile */
    margin-left: 1rem;
    padding-left: 0.5rem;
  }

  .dropdown.open .dropdown-content {
    display: block !important;
  }

  .dropdown-content a {
    padding-left: 1.5rem;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.slideshow {
  position: relative;
  max-width: 600px;
}

.slides {
  position: relative;
  overflow: hidden;
}

.slide {
  display: none;
  width: 100%;
  border-radius: 8px;
}

.slide.active {
  display: block;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.25em 0.5em;
  cursor: pointer;

  z-index: 10;
}

.prev { left: 0; }
.next { right: 0; }
