/* ====== Site Title Styling ====== */
.wp-block-site-title a {
  color: #2d6a30 !important;       /* dark green matching the logo */
  font-weight: 800 !important;
  font-size: 1.6rem !important;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  text-shadow: 0 1px 2px rgba(45, 106, 48, 0.15);
  transition: color 0.3s;
}
.wp-block-site-title a:hover {
  color: #1b8a1f !important;       /* brighter green on hover */
}

/* ====== Homepage Carousel Banner ====== */
.homepage-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 420px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.homepage-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.homepage-carousel img.active {
  opacity: 1;
}

/* Navigation arrows */
.homepage-carousel .carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.homepage-carousel .carousel-nav:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}
.homepage-carousel .carousel-nav.prev { left: 16px; }
.homepage-carousel .carousel-nav.next { right: 16px; }
.homepage-carousel .carousel-nav svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* Dot indicators */
.homepage-carousel .carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.homepage-carousel .carousel-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.homepage-carousel .carousel-dots span.active {
  background: #fff;
  transform: scale(1.3);
}

/* ====== Category Section ====== */
.category-section {
  max-width: 1100px;
  margin: 50px auto 40px;
  padding: 0 20px;
  text-align: center;
}

/* Decorative divider line above heading */
.category-section::before {
  content: '';
  display: block;
  width: 60%;
  max-width: 500px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2d6a30, transparent);
  margin: 0 auto 18px;
}

.category-heading {
  text-align: center;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: #333;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: transparent;
  transition: transform 0.3s;
}
.category-card:hover {
  transform: translateY(-4px);
}

.category-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e8e8e8;
}
.category-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.category-card:hover .category-img-wrap img {
  transform: scale(1.06);
}

.category-label {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Responsive */
@media (max-width: 768px) {
  .homepage-carousel { height: 220px; }
  .homepage-carousel .carousel-nav { width: 36px; height: 36px; }
  .homepage-carousel .carousel-nav svg { width: 16px; height: 16px; }
  .category-heading { font-size: 1.2rem; }
  
  /* Horizontal scroll for categories on tablet/mobile */
  .category-grid { 
    display: flex; 
    flex-wrap: nowrap;
    overflow-x: auto; 
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-grid::-webkit-scrollbar {
    display: none;
  }
  .category-card {
    width: 160px; 
    max-width: 160px;
    flex: 0 0 160px;
    scroll-snap-align: center;
  }
  .category-img-wrap { 
    height: 160px; /* Explicit height to prevent aspect-ratio bugs */
  }
}

@media (max-width: 480px) {
  .category-grid { gap: 12px; }
  .category-card { 
    width: 140px; 
    max-width: 140px;
    flex: 0 0 140px; 
  }
  .category-img-wrap { 
    height: 140px; 
  }
  .category-label { 
    font-size: 0.75rem; 
    letter-spacing: 0.8px; 
    padding: 0 5px;
  }
}

/* ====== Mobile Bottom Navigation ====== */
.mobile-bottom-nav {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
  /* Hide standard WP hamburger navigation */
  .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
  
  /* Show fixed bottom nav */
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    padding: 10px 0 15px; /* Extra bottom padding for newer phones with bottom swipe bars */
    border-top: 1px solid #eaeaea;
  }

  .mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555;
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
    transition: color 0.2s;
  }
  .mobile-bottom-nav .nav-item:hover,
  .mobile-bottom-nav .nav-item:active {
    color: #2d6a30; /* Active green color */
  }
  .mobile-bottom-nav .nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    stroke: currentColor;
  }
  
  /* Cart Badge */
  .mobile-bottom-nav .nav-item .badge {
    position: absolute;
    top: -5px;
    right: 4px;
    background: #2d6a30;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }
  
  /* Padding to body so content isn't hidden behind bottom nav */
  body {
    padding-bottom: 70px !important;
  }
}

