/* AyurvedBhandar Theme - Enhanced Ayurvedic Color Palette */
:root {
  /* Primary Brand Colors - Rich Ayurvedic Green */
  --ab-green: #2d7a52;
  --ab-green-dark: #1a5a37;
  --ab-green-light: #48a56f;
  --ab-green-lighter: #e8f5ef;

  /* Secondary Accent Colors - Turmeric/Golden */
  --ab-gold: #f4a742;
  --ab-gold-dark: #e09424;
  --ab-gold-light: #ffc870;

  /* Tertiary Colors - Earthy Tones */
  --ab-amber: #d4a574;
  --ab-brown: #8b6f47;
  --ab-terracotta: #c87941;

  /* Neutral Background Colors */
  --ab-bg: #fafbf9;
  --ab-bg-secondary: #f5f7f4;
  --ab-card: #ffffff;
  --ab-border: #e0e5dd;

  /* Text Colors */
  --ab-text-dark: #2c3e2d;
  --ab-text-light: #5a6c5b;
  --ab-text-muted: #8a9788;

  /* Bootstrap Color Overrides */
  --bs-primary: #2d7a52;
  --bs-primary-rgb: 45, 122, 82;
  --bs-success: #2d7a52;
  --bs-success-rgb: 45, 122, 82;
  --bs-warning: #f4a742;
  --bs-warning-rgb: 244, 167, 66;
  --bs-info: #48a56f;
  --bs-info-rgb: 72, 165, 111;

  /* Semantic Colors */
  --ab-success: #2d7a52;
  --ab-warning: #f4a742;
  --ab-danger: #dc3545;
  --ab-info: #48a56f;
}

/* Site header height variable - adjust if your header/nav height changes */
:root {
  --site-header-height: 92px; /* default header + topbar height on desktop */
}

/* Base Styles */
html {
  font-size: 14px;
  scroll-behavior: smooth;
}

/* Header Logo Styling */
.header-bar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-logo {
  transition: transform 0.3s ease;
  object-fit: contain;
}

.navbar-brand {
  transition: opacity 0.3s ease;
}

.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-brand:hover .header-logo {
  transform: scale(1.05);
}

.brand-text {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* Wishlist and Cart Count Badges */
.wishlist-count,
.cart-count {
  font-size: 0.7rem;
  min-width: 18px;
  min-height: 18px;
  padding: 0.25rem 0.4rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

/* Header Button Adjustments */
.header-bar .btn {
  white-space: nowrap;
  padding: 0.5rem 1rem;
}

.header-bar .btn-outline-danger,
.header-bar .btn-outline-success {
  min-width: auto;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ab-text-dark);
  background: var(--ab-bg);
}

/* Logo Styles */
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-lockup img {
  height: 50px;
  width: auto;
}

.logo-lockup span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ab-green-dark);
}
}

.logo-img {
  height: 45px;
  max-width: 200px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.navbar-brand {
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.02);
}

.footer-logo {
  filter: none;
  max-height: 60px;
}

@media (max-width: 768px) {
  .logo-lockup img {
    height: 40px;
  }

  .logo-lockup span {
    font-size: 1rem;
  }

  .logo-img {
    height: 45px;
    max-width: 150px;
  }
}

/* Top Bar */
.top-bar {
  font-size: 0.875rem;
  background: var(--ab-green-dark) !important;
}

/* Navigation */
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 600 !important;
  color: #333 !important;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--ab-green) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--ab-green);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* Dropdown Menu */
.dropdown-menu {
  border: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  margin-top: 0 !important;
  top: 100% !important;
}

.dropdown-menu-categories {
  min-width: 250px;
}

.dropdown-menu-brands {
  min-width: 220px;
}

/* Show dropdown on hover for desktop */
@media (min-width: 992px) {
  .navbar-nav .dropdown {
    position: relative;
  }

  /* Create hover bridge - invisible area between link and dropdown */
  .navbar-nav .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    z-index: 999;
    pointer-events: auto;
  }

  .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block !important;
    animation: fadeInDown 0.15s ease;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .navbar-nav .dropdown-menu {
    margin-top: 0 !important;
    z-index: 1000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  /* Keep dropdown visible when hovering over it */
  .navbar-nav .dropdown-menu:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure smooth transition between trigger and menu */
  .navbar-nav .dropdown .dropdown-toggle {
    pointer-events: auto;
  }

  /* Prevent gap-induced flickering */
  .navbar-nav .dropdown.show .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 0.6rem 1.25rem;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background-color: rgba(20, 90, 67, 0.08);
  color: var(--ab-green);
  padding-left: 1.5rem;
}

.dropdown-item.fw-bold {
  color: var(--ab-green);
}

.dropdown-divider {
  margin: 0.5rem 0;
}

/* Search Bar Styling */
.search-form-wrapper {
  flex-wrap: nowrap !important;
  min-width: 0;
}

.search-input-group {
  width: 180px;
  flex-wrap: nowrap;
}

.search-input {
  border-radius: 50px 0 0 50px;
  border-right: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  height: 38px;
  min-width: 0;
  flex: 1;
}

.search-input:focus {
  border-color: var(--ab-green);
  box-shadow: none;
  border-right: none;
}

.search-btn {
  border-radius: 0 50px 50px 0;
  border-left: none;
  padding: 0.5rem 1rem;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: var(--ab-green);
  border-color: var(--ab-green);
  color: white;
}

/* Responsive search bar */
@media (min-width: 992px) and (max-width: 1199px) {
  .search-input-group {
    width: 160px;
  }

  .search-input::placeholder {
    font-size: 0.85rem;
  }
}

@media (min-width: 1200px) {
  .search-input-group {
    width: 200px;
  }
}

@media (max-width: 991px) {
  .search-form-wrapper {
    margin-top: 1rem;
    width: 100%;
  }

  .search-input-group {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }
}

/* Cart Badge */
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #dc3545;
  color: white;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0.25rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Ensure parent button doesn't cut off badge */
.btn.position-relative {
  overflow: visible !important;
}

/* Hero Carousel */
.hero-carousel {
  margin-bottom: 0;
}

.ab-carousel {
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  width: 100%;
}

.ab-carousel .carousel-item {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 31.25%; /* 600/1920 = 0.3125 for 1920x600 aspect ratio */
  min-height: 400px;
  max-height: 650px;
}

@supports (aspect-ratio: 16 / 5) {
  .ab-carousel .carousel-item {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 16 / 5; /* Modern browsers: 1920:600 = 16:5 */
  }
}

.ab-carousel .slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.ab-carousel .slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -ms-interpolation-mode: bicubic;
  backface-visibility: hidden;
  transform: translateZ(0);
  display: block;
}

.ab-carousel .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,61,46,.85), rgba(15,61,46,.25));
  z-index: 2;
  pointer-events: none;
}

.ab-carousel .content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* ensure banner text sits below the site header when header is fixed/overlapping */
  /* reduce top offset so hero text shifts upward (less white-space below) */
  padding: calc(var(--site-header-height) * 0.35 + 0.5rem) 3rem 2.0rem calc(8% + 2rem);
  z-index: 10;
  display: flex;
  align-items: flex-start; /* place content toward the top instead of perfectly centered */
  height: 100%;
}

.ab-carousel h1,
.ab-carousel h2 {
  color: #fff;
}

.ab-carousel p {
  color: rgba(255,255,255,.88);
}

.ab-carousel .pill {
  display: inline-block;
  background: rgba(242,183,5,.18);
  border: 1px solid rgba(242,183,5,.35);
  color: #fff;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
}

/* Add spacing between navigation and content text */
.ab-carousel .content .col-lg-7 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero-slide {
  min-height: 500px;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.carousel-item {
  transition: transform 0.6s ease-in-out;
}

.carousel-fade .carousel-item {
  opacity: 0;
  transition-duration: 0.6s;
  transition-property: opacity;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
}

.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev {
  transform: translateX(0);
}

.carousel-control-prev,
.carousel-control-next {
  width: 8%;
  opacity: 0.7;
  z-index: 15;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(15, 61, 46, 0.7);
  border-radius: 50%;
  padding: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(15, 61, 46, 0.9);
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.carousel-indicators {
  margin-bottom: 2rem;
  z-index: 15;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicators [data-bs-target]:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.carousel-indicators .active {
  background-color: #fff;
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .ab-carousel .carousel-item {
    padding-bottom: 56.25%; /* 9:16 aspect ratio for mobile (more vertical space) */
    min-height: 350px;
    max-height: 500px;
  }

  @supports (aspect-ratio: 9 / 16) {
    .ab-carousel .carousel-item {
      aspect-ratio: 9 / 5; /* Slightly taller for mobile */
      padding-bottom: 0;
    }
  }

  .hero-slide {
    min-height: 350px;
    padding: 40px 0;
  }

  /* On small screens make the hero content part of normal flow so it doesn't overlap controls
     and so long text can wrap without covering the image controls */
  .ab-carousel .content {
    position: relative !important;
    top: auto; left: auto; right: auto; bottom: auto;
    padding: 0.8rem 1rem;
    z-index: 10;
    display: block;
    align-items: flex-start;
    height: auto;
    margin: 0;
    background: rgba(0,0,0,0.18); /* subtle backdrop to improve text contrast */
    border-radius: 8px;
  }

  .ab-carousel .content .col-lg-7 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* hide large carousel controls on small screens to avoid overlap with text */
  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }

  /* Reduce heading sizes on mobile so long titles don't wrap too many lines */
  .hero-slide h1,
  .ab-carousel h1 {
    font-size: 1.5rem !important;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }

  .ab-carousel h2 {
    font-size: 1.15rem !important;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }

  .hero-slide .lead,
  .ab-carousel p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
  }

  .ab-carousel .pill {
    font-size: 0.75rem;
    padding: .25rem .6rem;
  }

  .ab-carousel {
    margin-bottom: 0;
  }
}

/* Banner Product Showcase */
.banner-product-showcase {
  position: relative;
  width: 100%;
  height: 400px;
}

.floating-product {
  position: absolute;
  animation: float 3s ease-in-out infinite;
}

.floating-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.floating-product.product-1 {
  top: 10%;
  right: 15%;
  width: 180px;
  height: 180px;
  animation-delay: 0s;
}

.floating-product.product-2 {
  top: 45%;
  right: 5%;
  width: 150px;
  height: 150px;
  animation-delay: 0.5s;
}

.floating-product.product-3 {
  bottom: 15%;
  right: 25%;
  width: 120px;
  height: 120px;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Banner Text Animations */
.animate-fade-in {
  animation: fadeIn 0.8s ease-in;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-slide-up.delay-1 {
  animation-delay: 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.animate-slide-up.delay-2 {
  animation-delay: 0.4s;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Popular Categories Section Peek */
.popular-categories-section {
  background: var(--ab-bg);
  position: relative;
  z-index: 2;
  /* Reduce the large gap below the hero banner */
  padding-top: 60px !important;
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .ab-carousel .carousel-item {
    min-height: 350px;
    max-height: 500px;
  }

  .ab-carousel .content {
    padding: 3rem 2rem;
  }

  .ab-carousel h1 {
    font-size: 2rem !important;
  }

  .ab-carousel h2 {
    font-size: 1.75rem !important;
  }
}

/* Large desktop adjustments */
@media (min-width: 1920px) {
  .ab-carousel .carousel-item {
    max-height: 700px;
  }
}

/* Remove duplicate mobile media query - already defined above */
@media (max-width: 768px) {
  .ab-carousel {
    margin-bottom: 0;
  }

  .popular-categories-section {
    padding-top: 3rem !important;
  }
}

/* Promo Badges */
.promo-badges {
  background: var(--ab-green);
}

.promo-badges i {
  opacity: 0.9;
}

.promo-badges h6 {
  font-size: 0.95rem;
}

.promo-badges small {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Brand Badge */
.brand-badge {
  background: rgba(20,90,67,.10);
  color: var(--ab-green-dark);
  border: 1px solid rgba(20,90,67,.18);
  padding: .25rem .6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
}

@media (max-width: 768px) {
  .promo-badges .d-flex {
    flex-direction: column;
    text-align: center !important;
  }

  .promo-badges .text-start {
    text-align: center !important;
  }

  .promo-badges i {
    margin: 0 0 0.5rem 0 !important;
  }

  .promo-badges h6 {
    font-size: 0.85rem;
  }

  .promo-badges small {
    font-size: 0.7rem;
  }
}

/* Hero Section (Legacy) */
.hero-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 500px;
}

/* Feature Cards */
.feature-card {
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08) !important;
  border-color: var(--ab-green);
}

/* Category Cards */
.category-card {
  transition: all 0.15s ease;
  border: 1px solid #e9ecef;
  cursor: pointer;
  background: var(--ab-card);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08) !important;
  border-color: var(--ab-green);
}

.card-hover {
  transition: transform .15s ease, box-shadow .15s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
}

.category-icon {
  font-size: 3rem;
}

/* Product Cards */
.product-card {
  transition: all 0.15s ease;
  border: 1px solid #e9ecef;
  overflow: hidden;
  background: var(--ab-card);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08) !important;
}

.product-card img {
  transition: transform 0.3s ease;
  height: 250px;
  object-fit: cover;
  width: 100%;
  background-color: var(--ab-bg);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card .btn {
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.product-card:hover .btn {
  opacity: 1;
}

.product-card .badge {
  z-index: 10;
}

/* Hover Lift Effect */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-success,
.btn-ab {
  background: var(--ab-green-dark);
  border-color: var(--ab-green-dark);
  color: #fff;
}

.btn-success:hover,
.btn-ab:hover {
  background: var(--ab-green);
  border-color: var(--ab-green);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(20, 90, 67, 0.3);
}

.btn-outline-success,
.btn-ab-outline {
  border: 1px solid var(--ab-green-dark);
  color: var(--ab-green-dark);
  background: transparent;
}

.btn-outline-success:hover,
.btn-ab-outline:hover {
  background: rgba(15,61,46,.08);
  color: var(--ab-green-dark);
  border-color: var(--ab-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(20, 90, 67, 0.2);
}

.btn-light {
  background-color: #fff;
  border-color: #fff;
}

.btn-light:hover {
  background-color: #f8f9fa;
  border-color: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline-light {
  border-color: #fff;
  color: #fff;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  color: #fff;
}

/* Button Grid (for View Details + Add to Cart layout) */
.d-grid.gap-2 .btn {
  border-radius: 6px;
  font-weight: 600;
  padding: 0.5rem 1rem;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.5em 0.8em;
}

/* Product Image Container */
.product-image-container {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Star Ratings */
.fa-star, .fa-star-half-alt {
  color: #ffc107;
}

/* Testimonial Cards */
.testimonial-card {
  transition: all 0.15s ease;
  background: var(--ab-card);
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08) !important;
}

/* Section Titles */
.section-title {
  font-weight: 800;
  color: #132b21;
}

.small-muted {
  color: rgba(0,0,0,.65);
}

/* Footer */
footer {
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,.08);
}

footer a {
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--ab-green) !important;
}

.social-links a {
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
  color: #28a745 !important;
}

/* Cart Items */
.cart-item {
  transition: background-color 0.3s ease;
}

.cart-item:hover {
  background-color: #f8f9fa;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background-color: #28a745;
  color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-notification.success {
  background-color: #28a745;
}

.toast-notification.error {
  background-color: #dc3545;
}

.toast-notification.warning {
  background-color: #ffc107;
  color: #333;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .product-card img {
    height: 200px;
  }

  .category-icon {
    font-size: 2rem;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #28a745;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #218838;
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #28a745;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Form Focus States */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Filter Sidebar */
.filter-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for filter sidebar */
.filter-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--ab-green);
}

.filter-sidebar ul li a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
}

.filter-sidebar ul li a:hover {
  color: var(--ab-green) !important;
  padding-left: 0.5rem;
}

.filter-sidebar ul li a i {
  width: 20px;
  text-align: center;
  color: var(--ab-green);
}

/* Tabs */
.nav-tabs .nav-link {
  color: #666;
  border: none;
  border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
  border-color: #28a745;
  color: #28a745;
}

.nav-tabs .nav-link.active {
  color: #28a745;
  background-color: transparent;
  border-color: transparent transparent #28a745 transparent;
}

/* Success Icon Animation */
.success-icon i {
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Popular Categories Section */
.popular-categories-section {
  background: var(--ab-bg);
  position: relative;
  z-index: 2;
}

.popular-categories-section .section-title {
  font-size: 2rem;
  color: #1a1a1a;
  font-weight: 700;
}

.category-card-modern {
  transition: all 0.3s ease;
  border-color: #e0e0e0 !important;
  background: #fff;
}

.category-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,.1) !important;
  border-color: var(--ab-green) !important;
}

.category-card-modern h4 {
  font-size: 1.5rem;
  color: #1a1a1a;
  font-weight: 700;
  transition: color 0.3s ease;
}

.category-card-modern:hover h4 {
  color: var(--ab-green);
}

.category-card-modern p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

/* Category Icons */
.category-icon-home {
  font-size: 2.5rem;
  color: var(--ab-green);
  transition: all 0.3s ease;
}

.category-card-modern:hover .category-icon-home {
  transform: scale(1.1);
  color: var(--ab-green-dark);
}

.category-icon-large {
  font-size: 3.5rem;
  color: var(--ab-green);
}

.btn-explore {
  background: transparent;
  border: 2px solid var(--ab-green);
  color: var(--ab-green);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.btn-explore:hover {
  background: var(--ab-green);
  color: #fff;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(20, 90, 67, 0.3);
}

.btn-explore i {
  transition: transform 0.3s ease;
}

.btn-explore:hover i {
  transform: translateX(3px);
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  gap: 0.5rem;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ab-green);
  background: transparent;
  color: var(--ab-green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--ab-green);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(20, 90, 67, 0.3);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn i {
  font-size: 0.9rem;
}

/* Carousel Smooth Transitions */
#categoriesCarousel .carousel-item,
#featuredProductsCarousel .carousel-item {
  transition: transform 0.6s ease-in-out;
}

#categoriesCarousel .carousel-inner,
#featuredProductsCarousel .carousel-inner {
  overflow: visible;
}

@media (max-width: 768px) {
  .popular-categories-section .section-title {
    font-size: 1.5rem;
  }

  .category-card-modern h4 {
    font-size: 1.25rem;
  }

  .category-card-modern p {
    font-size: 0.875rem;
  }

  .btn-explore {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
  }

  .carousel-controls {
    display: none !important;
  }

  #categoriesCarousel .carousel-item .row > div,
  #featuredProductsCarousel .carousel-item .row > div {
    margin-bottom: 1rem;
  }
}

/* ===== ENHANCED POPULAR CATEGORIES SECTION ===== */

/* Section Titles */
.small-title {
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--ab-green);
  font-weight: 700;
}

.section-title-large {
  font-size: 2.5rem;
  color: var(--ab-text-dark);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.lead-subtitle {
  font-size: 1.1rem;
  color: var(--ab-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Category Carousel Wrapper */
.category-carousel-wrapper {
  padding: 2rem 0;
  position: relative;
  margin: 0 -15px;
  padding-left: 80px;
  padding-right: 80px;
}

@media (max-width: 991px) {
  .category-carousel-wrapper {
    padding-left: 15px;
    padding-right: 15px;
    margin: 0;
  }
}

/* Enhanced Category Cards */
.category-card-enhanced {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8faf9 100%);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e8efe9;
  cursor: pointer;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.category-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(45, 122, 82, 0.05), transparent);
  transition: left 0.6s ease;
}

.category-card-enhanced:hover::before {
  left: 100%;
}

.category-card-enhanced:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(45, 122, 82, 0.15);
  border-color: var(--ab-green);
  background: linear-gradient(135deg, #ffffff 0%, #e8f5ef 100%);
}

/* Category Icon Wrapper */
.category-icon-wrapper {
  width: 75px;
  height: 75px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ab-green-lighter) 0%, var(--ab-green-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.4s ease;
  box-shadow: 0 8px 20px rgba(45, 122, 82, 0.1);
  flex-shrink: 0;
}

.category-card-enhanced:hover .category-icon-wrapper {
  transform: rotate(-5deg) scale(1.1);
  background: linear-gradient(135deg, var(--ab-green) 0%, var(--ab-green-light) 100%);
  box-shadow: 0 12px 30px rgba(45, 122, 82, 0.25);
}

.category-icon-enhanced {
  font-size: 2.3rem;
  color: var(--ab-green);
  transition: all 0.4s ease;
}

.category-card-enhanced:hover .category-icon-enhanced {
  color: #ffffff;
  transform: scale(1.1);
}

/* Category Content */
.category-content {
  position: relative;
  z-index: 2;
}

.category-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ab-text-dark);
  margin-bottom: 0.65rem;
  transition: color 0.3s ease;
  line-height: 1.3;
}

.category-card-enhanced:hover .category-title {
  color: var(--ab-green);
}

.category-description {
  font-size: 0.9rem;
  color: var(--ab-text-light);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  min-height: 44px;
  flex-grow: 1;
}

/* Enhanced Explore Button */
.btn-category-explore {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--ab-green);
  color: #ffffff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--ab-green);
  box-shadow: 0 4px 12px rgba(45, 122, 82, 0.2);
  align-self: flex-start;
}

.btn-category-explore:hover {
  background: var(--ab-green-dark);
  border-color: var(--ab-green-dark);
  color: #ffffff;
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(45, 122, 82, 0.3);
}

.btn-category-explore i {
  transition: transform 0.3s ease;
}

.btn-category-explore:hover i {
  transform: translateX(3px);
}

/* Custom Carousel Controls */
.carousel-control-custom {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #ffffff 0%, #f8faf9 100%);
  border: 2px solid var(--ab-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ab-green);
  font-size: 1.2rem;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(45, 122, 82, 0.15);
}

.carousel-control-prev-custom {
  left: 10px;
}

.carousel-control-next-custom {
  right: 10px;
}

.carousel-control-custom:hover {
  background: var(--ab-green);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 25px rgba(45, 122, 82, 0.3);
}

.carousel-control-custom:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-control-custom i {
  transition: transform 0.3s ease;
}

.carousel-control-prev-custom:hover i {
  transform: translateX(-3px);
}

.carousel-control-next-custom:hover i {
  transform: translateX(3px);
}

/* Custom Carousel Indicators (Dots) */
.carousel-indicators-custom {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 3rem;
  position: relative;
}

.carousel-indicators-custom button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  padding: 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-indicators-custom button.active {
  width: 40px;
  border-radius: 6px;
  background: var(--ab-green);
}

.carousel-indicators-custom button:hover {
  background: var(--ab-green-light);
  transform: scale(1.2);
}

/* Carousel Smooth Animations */
#categoriesCarousel .carousel-item {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#categoriesCarousel .carousel-item-next,
#categoriesCarousel .carousel-item-prev {
  display: flex;
}

/* Responsive Design */
@media (max-width: 1199px) {
  .category-card-enhanced {
    padding: 1.75rem 1.25rem;
    min-height: 320px;
  }

  .category-icon-wrapper {
    width: 70px;
    height: 70px;
  }

  .category-icon-enhanced {
    font-size: 2.1rem;
  }

  .category-title {
    font-size: 1.2rem;
  }

  .category-description {
    font-size: 0.875rem;
  }
}

@media (max-width: 991px) {
  .section-title-large {
    font-size: 2rem;
  }

  .carousel-control-custom {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .carousel-control-prev-custom {
    left: -15px;
  }

  .carousel-control-next-custom {
    right: -15px;
  }

  .category-card-enhanced {
    padding: 1.75rem 1.25rem;
    min-height: 300px;
  }

  .category-icon-wrapper {
    width: 65px;
    height: 65px;
  }

  .category-icon-enhanced {
    font-size: 2rem;
  }

  .category-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 768px) {
  .popular-categories-section {
    padding-top: 3rem !important;
  }

  .section-title-large {
    font-size: 1.75rem;
  }

  .lead-subtitle {
    font-size: 1rem;
  }

  .carousel-control-custom {
    display: none;
  }

  .category-card-enhanced {
    margin-bottom: 1rem;
  }

  .carousel-indicators-custom {
    margin-top: 2rem;
  }

  .category-icon-wrapper {
    width: 70px;
    height: 70px;
  }

  .category-icon-enhanced {
    font-size: 2rem;
  }

  .category-title {
    font-size: 1.25rem;
  }

  .category-description {
    font-size: 0.9rem;
    min-height: auto;
  }

  .btn-category-explore {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* User Dropdown Button - Permanent Solution */
.user-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* User icon - no extra spacing needed */
.user-dropdown-btn > .fa-user {
  flex-shrink: 0;
}

/* Username text */
.user-dropdown-btn .user-name {
  flex-shrink: 0;
}

/* Dropdown arrow icon */
.user-dropdown-btn > .fa-caret-down {
  flex-shrink: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Header Logo Styling */
.header-logo {
  height: 80px !important; /* fixed logo size on desktop */
  max-height: 80px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  transition: transform 0.3s ease !important;
}

.header-logo:hover {
  transform: scale(1.05);
}

/* Brand text styling */
.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Responsive logo sizing */
@media (max-width: 991px) {
  .header-logo {
    height: 60px !important; /* tablet */
    max-height: 60px !important;
  }
  .brand-text {
    font-size: 1.1rem;
  }
}

@media (max-width: 575px) {
  .header-logo {
    height: 48px;
  }
}

/* Mobile Cart Styling */
@media (max-width: 767px) {
  .cart-item {
    padding: 1rem !important;
  }

  .cart-item .btn-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .cart-item .input-group {
    max-width: 120px !important;
  }

  .cart-item .form-control-sm {
    font-size: 0.9rem;
  }

  .cart-section .sticky-top {
    position: relative !important;
    top: auto !important;
  }
}

/* Mobile Search Suggestions */
@media (max-width: 767px) {
  #searchSuggestionsMobile {
    width: 100% !important;
    min-width: auto !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  #searchSuggestionsMobile .suggestion-item {
    padding: 0.75rem !important;
  }

  #searchSuggestionsMobile .suggestion-image {
    width: 50px !important;
    height: 50px !important;
  }

  #searchSuggestionsMobile .suggestion-name {
    font-size: 0.9rem !important;
  }

  #searchSuggestionsMobile .suggestion-meta {
    font-size: 0.75rem !important;
  }

  #searchSuggestionsMobile .badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.4rem !important;
  }
}

/* Mobile Header Search Improvements */
@media (max-width: 767px) {
  .header-bar {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .header-bar .input-group input {
    font-size: 0.9rem;
  }

  .header-bar .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Cart Summary Mobile Optimization */
@media (max-width: 991px) {
  .cart-section .col-lg-4 {
    margin-top: 1.5rem;
  }

  .cart-section .bg-white.sticky-top {
    margin-bottom: 1rem;
  }
}

/* Professional Breadcrumb Styling */
.breadcrumb {
  background-color: transparent;
  padding: 0.5rem 0;
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.breadcrumb-item {
  color: #6c757d;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #adb5bd;
  padding: 0 0.5rem;
  font-weight: 400;
}

.breadcrumb-item a {
  color: var(--ab-green);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.breadcrumb-item a:hover {
  color: #145a32;
  opacity: 0.8;
}

.breadcrumb-item.active {
  color: #495057;
  font-weight: 600;
}

/* Breadcrumb with icon */
.breadcrumb-item i {
  font-size: 0.85rem;
  margin-right: 0.25rem;
}

/* Compact breadcrumb container */
nav[aria-label="breadcrumb"] {
  padding: 0.75rem 0;
  background: transparent;
}

/* Mobile breadcrumb */
@media (max-width: 767px) {
  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 0.35rem;
  }
}

/* Mobile horizontal categories scroll */
.categories-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 8px;
  scroll-snap-type: x proximity;
}

.categories-row::-webkit-scrollbar {
  height: 8px;
}

.categories-row::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
}

.category-card-mobile {
  flex: 0 0 86%; /* take most of viewport so next card peeks */
  max-width: 86%;
  scroll-snap-align: start;
}

.category-card-mobile .category-card-enhanced {
  padding: 18px;
  border-radius: 12px;
  background: var(--ab-card);
}

/* Ensure desktop carousel remains standard */
@media (min-width: 768px) {
  .categories-row { overflow: visible; display: block; }
  .category-card-mobile { flex: initial; max-width: none; }
}

/* Featured products horizontal scroll on mobile */
.products-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 8px;
  scroll-snap-type: x proximity;
}

.products-row::-webkit-scrollbar { height: 8px; }
.products-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 4px; }

.product-card-mobile {
  flex: 0 0 86%;
  max-width: 86%;
  scroll-snap-align: start;
}

.product-card-col-mobile { /* applied to outer column wrapper from partial */
  padding: 0 !important; /* partial itself renders inner card with padding */
}

@media (min-width: 768px) {
  .products-row { overflow: visible; display: block; }
  .product-card-mobile { flex: initial; max-width: none; }
}
