/* Shop Dropdown Overlay System */
:root {
  --primary-green: #4caf50;
  --dark-green: #388e3c;
}

/* Overlay Background - Exclude top contact bar */
.dropdown-overlay {
  position: fixed;
  top: 36px; /* Start below the top contact bar */
  left: 0;
  width: 100%;
  height: calc(100vh - 40px);
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropdown-overlay.show {
  display: block;
  opacity: 1;
}

/* Shop Dropdown Section */
.shop-dropdown-section {
  position: absolute;
  top: 100%; /* Position directly below the navbar */
  left: 0;
  width: 100%;
  background: white;
  z-index: 999;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-top: 1px solid #e0e0e0;
}

.shop-dropdown-section.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Close Button */
.close-dropdown {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 1002;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-dropdown:hover {
  background-color: #f0f0f0;
  color: #333;
}

/* Shop Categories Container */
.shop-categories-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Page Title */
.page-title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

/* Categories Left */
.categories-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.category-item {
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.6s ease forwards;
  background: white;
}

.category-item:last-child {
  border-bottom: none;
}

.category-item:nth-child(1) {
  animation-delay: 0.3s;
}
.category-item:nth-child(2) {
  animation-delay: 0.4s;
}
.category-item:nth-child(3) {
  animation-delay: 0.5s;
}
.category-item:nth-child(4) {
  animation-delay: 0.6s;
}
.category-item:nth-child(5) {
  animation-delay: 0.7s;
}
.category-item:nth-child(6) {
  animation-delay: 0.8s;
}

.category-item:hover {
  background-color: #f8f9fa;
  padding-left: 30px;
  border-left: 4px solid var(--primary-green);
}

.category-name {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.category-arrow {
  color: #666;
  font-size: 16px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.category-item:hover .category-arrow {
  transform: translateX(5px);
  color: var(--primary-green);
}

/* Featured Collection */
.featured-collection {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--dark-green) 100%
  );
  border-radius: 15px;
  padding: 30px;
  color: white;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(30px);
  animation: slideInRight 0.6s ease forwards;
  animation-delay: 0.4s;
  box-shadow: 0 8px 30px rgba(76, 175, 80, 0.3);
}

.featured-collection::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.featured-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.featured-subtitle {
  font-size: 14px;
  margin-bottom: 25px;
  opacity: 0.9;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}

.featured-image {
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.shop-now-btn {
  background: white;
  color: var(--primary-green);
  border: none;
  padding: 14px 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 15px;
  position: relative;
  z-index: 2;
}

.shop-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  background: #f8f8f8;
}

/* Navigation Arrow Animation */
.nav-link .dropdown-arrow {
  transition: transform 0.3s ease;
}

.nav-link.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .dropdown-overlay {
    top: 35px; /* Adjust for mobile top bar */
    height: calc(100vh - 35px);
  }

  .shop-categories-container {
    padding: 25px 15px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .category-item {
    padding: 16px 20px;
  }

  .category-name {
    font-size: 15px;
  }

  .featured-collection {
    padding: 25px 20px;
  }

  .featured-title {
    font-size: 22px;
  }

  .featured-image {
    height: 160px;
  }

  .close-dropdown {
    top: 15px;
    right: 20px;
    font-size: 20px;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .dropdown-overlay {
    top: 30px; /* Adjust for smaller mobile top bar */
    height: calc(100vh - 30px);
  }

  .shop-categories-container {
    padding: 20px 10px;
  }
  .shop-dropdown-section {
    position: relative;
    top: 19px;
  }
  .featured-collection {
    display: none;
  }

  .categories-grid {
    gap: 20px;
  }

  .category-item {
    padding: 14px 18px;
  }

  .category-name {
    font-size: 14px;
  }

  .featured-collection {
    padding: 20px 15px;
  }

  .featured-title {
    font-size: 20px;
  }

  .featured-subtitle {
    font-size: 13px;
  }

  .featured-image {
    height: 140px;
  }
}

/* Make sure both top bar and navbar are positioned correctly */
.top-contact-bar {
  position: relative;
  z-index: 1001 !important;
}

.floverfy-web-header-desktop {
  position: relative;
  z-index: 1000 !important;
}

/* Ensure dropdown appears below navbar but above content */
.shop-dropdown-section {
  z-index: 999 !important;
}

.dropdown-overlay {
  z-index: 998 !important;
}

/* Hide body overflow when dropdown is open */
body.dropdown-open {
  overflow: hidden;
}
