/**
 * B2B Menu - Frontend Styles
 * Estilos para el menú B2B personalizado
 */

/* ===================================
   Header Principal
   =================================== */
.b2btp-menu-header {
  position: relative;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.b2btp-menu-header.sticky {
  position: fixed;
  left: 0;
  right: 0;
  animation: slideDown 0.3s ease;
  /* Note: top is set via JavaScript to account for admin bar */
}

/* Scrolled State */
.b2btp-menu-header.scrolled {
  background-color: var(--b2btp-scrolled-bg) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.b2btp-menu-header.scrolled .b2btp-nav-list > li > a,
.b2btp-menu-header.scrolled .b2btp-menu-actions button,
.b2btp-menu-header.scrolled .b2btp-user-toggle .user-name {
  color: var(--b2btp-scrolled-text) !important;
}

.b2btp-menu-header.scrolled .b2btp-nav-list > li > a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.b2btp-menu-header .b2btp-nav-list > li > a,
.b2btp-menu-header .b2btp-menu-actions button,
.b2btp-menu-header .b2btp-user-toggle .user-name {
  transition: color 0.4s ease;
}

/* Fix white bar below header - Reset Stackable block margin */
.b2btp-menu-header + #main-container .wp-block-stackable-hero,
.b2btp-menu-header ~ div .wp-block-stackable-hero:first-child,
main .wp-block-stackable-hero:first-child {
  margin-top: 0 !important;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Container */
.b2btp-menu-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

/* ===================================
   Logo
   =================================== */
.b2btp-menu-logo {
  flex-shrink: 0;
}

.b2btp-menu-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
}

.b2btp-menu-logo img {
  height: auto;
  display: block;
}

/* ===================================
   Navigation
   =================================== */
.b2btp-nav {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  margin: 0 20px;
  position: static;
}

.b2btp-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  /* Improved gap */
  flex-wrap: wrap;
  /* Safety for many items */
}

.b2btp-nav-list > li {
  position: relative;
  margin: 0;
  /* Reset WP defaults */
}

.b2btp-nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  color: var(--b2btp-menu-text);
}

.b2btp-nav-list > li > a .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.b2btp-nav-list > li > a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--b2btp-menu-hover) !important;
}

/* Active states */
.b2btp-nav-list > li.current-menu-item > a,
.b2btp-nav-list > li.active > a,
.b2btp-nav-list > li.current_page_item > a {
  background-color: rgba(255, 255, 255, 0.15);
  font-weight: 600;
}

/* Submenu (Supports both Custom .b2btp-submenu and WP .sub-menu) */
.b2btp-nav-list .sub-menu,
.b2btp-nav-list .b2btp-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  list-style: none;
  margin: 10px 0 0 0;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.b2btp-nav-list > li:hover .sub-menu,
.b2btp-nav-list > li:hover .b2btp-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.b2btp-nav-list .sub-menu li,
.b2btp-nav-list .b2btp-submenu li {
  display: block;
  margin: 0;
}

.b2btp-nav-list .sub-menu li a,
.b2btp-nav-list .b2btp-submenu li a {
  display: block;
  padding: 10px 16px;
  color: #1a1a2e !important;
  /* Force dark text on white dropdown */
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
  background: transparent;
}

.b2btp-nav-list .sub-menu li a:hover,
.b2btp-nav-list .b2btp-submenu li a:hover {
  background-color: #f1f5f9;
  color: var(--b2btp-menu-hover) !important;
  padding-left: 20px;
}

/* Hero Section in Mega Menu */
.b2btp-menu-hero {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  background: #000000;
  padding: 0;
}

.b2btp-menu-hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(20%);
}

.b2btp-menu-hero .hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 20px 30px;
  color: white;
  width: auto;
}

.b2btp-menu-hero .hero-title {
  margin: 0;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -1px;
  text-transform: uppercase;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  white-space: pre-line;
  word-break: keep-all;
}

.b2btp-menu-hero .hero-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  font-weight: 400;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.b2btp-menu-hero .hero-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
}

/* Popular Products in Mega Menu */
.b2btp-popular-products {
  margin-top: 0;
  padding: 40px;
  padding-top: 30px;
  border-top: none;
  background: #ffffff;
}

.b2btp-popular-products .popular-products-title {
  margin: 0 0 25px 0;
  font-size: 20px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.popular-products-grid {
  display: grid;
  gap: 16px;
}

.popular-products-grid[data-columns="1"] {
  grid-template-columns: 1fr;
}

.popular-products-grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.popular-products-grid[data-columns="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.popular-products-grid[data-columns="4"] {
  grid-template-columns: repeat(2, 1fr);
}

.popular-product-item {
  background: #0088fe;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  transition: background 0.2s ease;
  padding: 16px 20px;
  position: relative;
}

.popular-product-item:hover {
  background: #0070d1;
}

.popular-product-item a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
}

.popular-product-item .product-image {
  display: none;
}

.popular-product-item .product-info {
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popular-product-item .product-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.popular-product-item .product-size {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.popular-product-item .product-price {
  display: none;
}

/* ===================================
   Actions (Right Side)
   =================================== */
.b2btp-menu-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1001;
  margin-left: auto;
  flex-shrink: 0 !important;
  width: auto !important;
}

.b2btp-menu-actions > * {
  flex-shrink: 0;
}

.b2btp-menu-actions .b2btp-cart-toggle svg,
.b2btp-menu-actions .b2btp-cart-toggle path,
.b2btp-menu-actions .b2btp-cart-toggle .icon-cart {
  stroke: currentColor !important;
  color: inherit !important;
}

.b2btp-menu-actions .b2btp-cart-toggle {
  background: transparent !important;
  border: none !important;
  border-radius: 12px;
  width: auto;
  height: auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: inherit !important;
  box-shadow: none !important;
  padding: 10px !important;
}

.b2btp-menu-header.scrolled .b2btp-menu-actions .b2btp-cart-toggle {
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  box-shadow: none !important;
}

.b2btp-menu-search button,
.b2btp-menu-cart .b2btp-cart-toggle,
.b2btp-menu-user button {
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.b2btp-menu-search button:hover,
.b2btp-menu-cart .b2btp-cart-toggle:hover,
.b2btp-menu-user button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.b2btp-menu-cart {
  position: relative;
  z-index: 101;
}

.b2btp-cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: auto;
}

/* Ensure button stays in place when cart is active */
.b2btp-menu-cart.active .b2btp-cart-toggle {
  position: relative;
  transform: none !important;
}

.b2btp-menu-cart .cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background: #ef4444;
  color: white;
  border-radius: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  z-index: 10;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* User Dropdown */
.b2btp-menu-user {
  position: relative;
  z-index: 102;
}

/* Invisible bridge to keep hover active */
.b2btp-menu-user::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 20px;
  background: transparent;
}

.b2btp-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.b2btp-menu-user:hover .b2btp-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.b2btp-user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: #1a1a2e;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.b2btp-user-dropdown a:hover {
  background-color: #f1f5f9;
  color: var(--b2btp-menu-hover);
}

/* ===================================
   Mobile Menu
   =================================== */
.b2btp-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: #0088fe;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 6px 16px rgba(0, 136, 254, 0.18);
}

.b2btp-mobile-toggle .dashicons {
  color: #0088fe !important;
  fill: #0088fe !important;
  line-height: 1;
  display: block;
  width: 24px;
  height: 24px;
}

.b2btp-mobile-toggle svg {
  stroke: #0088fe !important;
  color: #0088fe !important;
}

@media (max-width: 992px) {
  .b2btp-menu-actions {
    gap: 8px;
  }
}

.b2btp-mobile-menu {
  position: fixed;
  top: 0;
  width: 88%;
  max-width: 360px;
  right: 0;
  transform: translateX(100%);
  height: 100vh;
  background: #f8fafc;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.b2btp-mobile-menu.active {
  transform: translateX(0) !important;
  opacity: 1 !important;
}

.b2btp-mobile-menu-header {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.b2btp-mobile-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.b2btp-mobile-brand .brand-logo img {
  max-width: 150px;
  height: auto;
  display: block;
}

.b2btp-mobile-brand .brand-placeholder {
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
}

.b2btp-mobile-brand .brand-tagline {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.b2btp-mobile-close {
  background: transparent;
  border: none;
  font-size: 22px;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
}

.b2btp-mobile-close:hover {
  background: rgba(0, 0, 0, 0.1);
  opacity: 0.8;
}

.b2btp-mobile-close svg {
  width: 24px;
  height: 24px;
}

.b2btp-mobile-cta-row {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #e0f2ff 0%, #f8fbff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.b2btp-mobile-cta {
  flex: 1;
  text-align: center;
  padding: 12px 10px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.b2btp-mobile-cta.primary {
  background: #0088fe;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(0, 136, 254, 0.25);
}

.b2btp-mobile-cta.primary:hover {
  background: #006fd6;
}

.b2btp-mobile-cta.secondary {
  background: #ffffff;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
}

.b2btp-mobile-cta.secondary:hover {
  border-color: #0088fe;
  color: #0f172a;
}

.b2btp-mobile-nav {
  padding: 20px;
}

.b2btp-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.b2btp-mobile-nav li {
  margin-bottom: 4px;
}

.b2btp-mobile-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 600;
  background: #0088fe;
  box-shadow: 0 8px 18px rgba(0, 136, 254, 0.18);
}

.b2btp-mobile-nav li a:hover {
  background-color: #006fd6;
  color: #ffffff;
}

.b2btp-mobile-nav li a .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* --- Mega Menu & Dropdowns --- */
.b2btp-nav-list > li {
  position: relative;
  padding: 0;
}

/* Standard Dropdown */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 220px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 10px 0;
  z-index: 1000;
}

.b2btp-nav-list > li:hover > .sub-menu {
  display: block;
  animation: fadeInArrow 0.2s ease;
}

/* Mega Menu Container */
.b2btp-nav-list > li.is-mega-menu {
  position: relative;
  /* Allows mega menu to be full width relative to nav/container */
}

/* The Mega Dropdown Wrapper */
.mega-sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 600px;
  max-width: 700px;
  background: #ffffff;
  color: #000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0;
  z-index: 9999;
  grid-template-columns: 1fr;
  gap: 0;
  align-content: start;
  border-top: none;
  box-sizing: border-box;
  border-radius: 0;
  pointer-events: none;
}

.b2btp-nav-list > li.is-mega-menu:hover > .mega-sub-menu {
  display: grid;
  pointer-events: auto;
  animation: slideDownFade 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Hover Bridge - Prevents menu from closing when moving mouse */
.b2btp-nav-list > li.is-mega-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  /* Bridge height */
  background: transparent;
  z-index: 998;
  display: none;
}

.b2btp-nav-list > li.is-mega-menu:hover::after {
  display: block;
}

/* Mega Menu Columns (Direct LI Children) */
.mega-sub-menu > li {
  list-style: none;
  /* Default spans */
  grid-column: span 12;
}

.mega-sub-menu > li.col-25 {
  grid-column: span 3;
}

.mega-sub-menu > li.col-33 {
  grid-column: span 4;
}

.mega-sub-menu > li.col-50 {
  grid-column: span 6;
}

.mega-sub-menu > li.col-100 {
  grid-column: span 12;
}

/* Content within Mega Menu */
.b2btp-menu-heading {
  font-size: 14px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.b2btp-custom-html {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.mega-sub-menu a {
  color: #444;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.mega-sub-menu a:hover {
  color: var(--b2btp-primary);
  transform: translateX(5px);
}

/* Hero Section in Menu */
.b2btp-menu-hero {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 5px;
}

.b2btp-menu-hero img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.b2btp-menu-hero:hover img {
  transform: scale(1.05);
}

.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  padding: 15px;
  font-weight: 600;
}

/* Animations */
@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Overlay */
.b2btp-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.b2btp-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 992px) {
  .b2btp-nav {
    display: none !important;
    position: absolute !important;
  }

  .b2btp-menu-actions {
    margin-left: auto;
    gap: 10px;
  }

  /* Keep search icon visible on mobile */
  .b2btp-menu-search {
    display: block !important;
  }

  .b2btp-menu-search .b2btp-search-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .b2btp-menu-cart .b2btp-cart-toggle {
    background: transparent !important;
    border: none !important;
    border-radius: 12px;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .b2btp-menu-container {
    padding: 0 16px;
  }

  .b2btp-menu-user .user-name {
    display: none;
  }

  .b2btp-mobile-toggle {
    display: flex !important;
  }

  /* Hide hover dropdowns on mobile - only show on click */
  .b2btp-menu-user:hover .premium-user-dropdown,
  .b2btp-menu-cart:hover .premium-cart-dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Only show dropdowns when .active class is present (click) */
  .b2btp-menu-user.active .premium-user-dropdown,
  .b2btp-menu-cart.active .premium-cart-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 768px) {
  .b2btp-menu-container {
    padding: 0 20px;
    flex-wrap: nowrap !important;
  }

  .b2btp-menu-logo a {
    font-size: 20px;
  }

  .b2btp-menu-actions {
    gap: 8px;
    display: flex !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .b2btp-menu-search,
  .b2btp-menu-user {
    display: block;
  }
}

/* ===================================
   Utilidades
   =================================== */
.b2btp-menu-spacer {
  height: var(--b2btp-header-height);
}

/* ===================================
   Search Box
   =================================== */
.b2btp-search-box {
  display: none;
  width: 100%;
  height: auto !important;
  /* Override any inherited height */
  padding: 20px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 999;
}

.b2btp-search-box.active {
  display: block;
}

.b2btp-search-box form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.b2btp-search-box input[type="search"] {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 16px;
  transition: all 0.3s ease;
}

.b2btp-search-box input[type="search"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.b2btp-search-box input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.b2btp-search-box button[type="submit"] {
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.b2btp-search-box button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Cart Dropdown
   =================================== */
.b2btp-cart-toggle {
  position: relative;
}

.b2btp-cart-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 350px;
  max-width: 400px;
  max-height: 500px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.b2btp-menu-cart:hover .b2btp-cart-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-items {
  max-height: 350px;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s ease;
}

.cart-item:hover {
  background: #f8fafc;
}

.cart-item:last-child {
  border-bottom: none;
}

.item-image {
  flex-shrink: 0;
}

.item-image img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.item-info {
  flex: 1;
}

.item-info h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
}

.item-info .qty,
.item-info .price {
  display: inline-block;
  font-size: 13px;
  color: #64748b;
  margin-right: 12px;
}

.item-info .price {
  font-weight: 600;
  color: #0ea5e9;
}

.cart-footer {
  padding: 16px;
  border-top: 2px solid #f1f5f9;
  background: #f8fafc;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
}

.cart-total strong {
  color: #1a1a2e;
}

.cart-total span {
  font-size: 18px;
  font-weight: 700;
  color: #0ea5e9;
}

.btn-checkout,
.btn-view-cart {
  display: block;
  width: 100%;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.btn-checkout {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
}

.btn-checkout:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-view-cart {
  background: white;
  color: #0ea5e9;
  border: 2px solid #0ea5e9;
  margin-bottom: 0;
}

.btn-view-cart:hover {
  background: #f0f9ff;
}

.cart-empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
}

.cart-empty .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.cart-empty p {
  margin: 0;
  font-size: 14px;
}

/* ===================================
   User Avatar
   =================================== */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.b2btp-user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==================================
   PREMIUM REDESIGN - ADDITIONAL STYLES
   ================================== */

/* Modern Icon Styling */
.icon-search,
.icon-cart,
.icon-chevron {
  stroke: currentColor;
  transition: all 0.3s ease;
}

.b2btp-search-toggle:hover .icon-search,
.b2btp-cart-toggle:hover .icon-cart,
.b2btp-user-toggle:hover .icon-chevron {
  transform: scale(1.1);
}

/* Premium Search Modal */
.b2btp-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.b2btp-search-modal.active {
  display: flex;
}

.search-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.search-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 20px;
  padding: 40px;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #64748b;
  transition: all 0.3s ease;
}

.search-modal-close:hover {
  color: #1a1a2e;
  transform: rotate(90deg);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.search-input-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-modal-input {
  width: 100%;
  padding: 18px 20px 18px 56px !important;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 18px;
  transition: all 0.3s ease;
}

.search-modal-input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.popular-label {
  color: #64748b;
  font-size: 14px;
  margin-right: 8px;
}

.popular-tag {
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 20px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.popular-tag:hover {
  background: #0ea5e9;
  color: white;
}

/* Search Results */
.search-results-container {
  margin-top: 30px;
  max-height: 500px;
  overflow-y: auto;
  padding: 20px 0;
}

.search-results-list {
  width: 100%;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-result-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.search-result-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.search-result-info {
  padding: 16px;
}

.search-result-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-price {
  font-size: 16px;
  font-weight: 700;
  color: #0ea5e9;
}

.search-loading,
.search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 15px;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.search-loading::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 3px solid #e2e8f0;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Premium Cart Dropdown */
.premium-cart-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 400px;
  max-height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  cursor: default;

  /* Flex Layout for Overflow */
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

/* Bridge between button and dropdown */
.premium-cart-dropdown::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}

.b2btp-menu-cart.active .premium-cart-dropdown,
.b2btp-menu-cart:hover .premium-cart-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

@media (max-width: 992px) {
  .premium-cart-dropdown {
    position: fixed !important;
    width: calc(100vw - 40px) !important;
    max-width: 420px !important;
    left: 50% !important;
    right: auto !important;
    top: 120px !important;
    transform: translateX(-50%) translateY(-10px) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  }

  .b2btp-menu-cart.active .premium-cart-dropdown,
  .b2btp-menu-cart:hover .premium-cart-dropdown {
    transform: translateX(-50%) translateY(0) !important;
  }
}

.cart-header-premium {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  /* Keep header visible */
}

.cart-header-premium h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.cart-item-count {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.cart-items-scroll {
  padding: 0;
  overflow-y: auto;
  /* Enable Scroll */
  flex: 1;
  /* Take remaining space */
  min-height: 0;
  /* Flexbox scrolling fix */
}

.cart-item-premium {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: white;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.cart-item-premium:hover {
  background: #f8fafc;
}

.item-thumb {
  flex-shrink: 0;
}

.item-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-title {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.item-bottom .qty {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.item-bottom .price {
  font-size: 14px;
  font-weight: 700;
  color: #0ea5e9;
}

.remove-item {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.remove-item:hover {
  color: #ef4444;
  transform: scale(1.1);
}

.cart-footer-premium {
  padding: 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  /* Keep footer visible */
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
}

.cart-subtotal span {
  color: #64748b;
}

.cart-subtotal strong {
  font-size: 20px;
  color: #1a1a2e;
}

.cart-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.btn-checkout-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-checkout-premium span,
.btn-checkout-premium svg {
  display: inline-flex;
  align-items: center;
}

.btn-checkout-premium:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
  color: white !important;
  text-decoration: none !important;
}

.btn-view-cart-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: #64748b;
  color: white !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-view-cart-premium:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: white !important;
  text-decoration: none !important;
}

.link-view-cart {
  display: block;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-view-cart:hover {
  color: #0ea5e9;
}

.cart-empty-premium {
  padding: 60px 20px;
  text-align: center;
}

.cart-empty-premium svg {
  margin: 0 auto 20px;
  color: #cbd5e1;
}

.cart-empty-premium p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

/* Premium User Dropdown */
.premium-user-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 300px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  z-index: 1001;
  overflow: hidden;
  pointer-events: none;
}

/* Show on hover OR when .active class is present (click) */
.b2btp-menu-user:hover .premium-user-dropdown,
.b2btp-menu-user.active .premium-user-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.user-info-card {
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.user-info-card .user-details {
  flex: 1;
  min-width: 0;
}

.user-info-card .user-details h4 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-card .user-details p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.user-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Avatar Styles */
.avatar-circle {
  border-radius: 50% !important;
}

.avatar-rounded {
  border-radius: 8px !important;
}

.avatar-square {
  border-radius: 0 !important;
}

/* User Greeting */
.user-greeting {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* User Role Badge */
.user-role-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--badge-bg, #0088fe);
  color: #ffffff;
  border-radius: 20px;
  margin-top: 6px;
}

/* Quick Actions Row */
.user-quick-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.user-quick-actions .quick-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.2s ease;
}

.user-quick-actions .quick-action:hover {
  background: var(--dropdown-hover, #e2e8f0);
  color: #0088fe;
  transform: translateY(-2px);
}

.user-quick-actions .quick-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  background: #ef4444;
  color: #ffffff;
  border-radius: 8px;
}

/* User Stats Row */
.user-stats-row {
  display: flex;
  gap: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0;
}

.user-stats-row .user-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px;
  background: #ffffff;
  text-align: center;
}

.user-stats-row .stat-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.user-stats-row .stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

/* Logout Item */
.dropdown-item.logout-item {
  color: #ef4444 !important;
}

.dropdown-item.logout-item:hover {
  background: #fef2f2 !important;
}

/* Dropdown Animations - User Menu */
.premium-user-dropdown.animation-fade {
  transition: opacity 0.2s ease;
}

.premium-user-dropdown.animation-slide {
  transition: all 0.25s ease;
}

.premium-user-dropdown.animation-scale {
  transform-origin: top right;
  transition: all 0.2s ease;
}

.b2btp-menu-user.active .premium-user-dropdown.animation-scale,
.b2btp-menu-user:hover .premium-user-dropdown.animation-scale {
  transform: scale(1) !important;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-details h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
}

.user-details p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-menu-items {
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #475569;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #1a1a2e;
}

.dropdown-item.danger {
  color: #ef4444;
}

.dropdown-item.danger:hover {
  background: #fef2f2;
}

.item-icon {
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.7;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Full Height Hover on Nav Items */
.b2btp-menu-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.b2btp-nav-list > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.b2btp-nav-list > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0;
}

.b2btp-nav-list > li:hover::before {
  color: #000;
  opacity: 1;
}

.b2btp-nav-list > li > a {
  position: relative;
  z-index: 1;
}

/* Scroll Color Transition */
.b2btp-menu-header.scrolled {
  background-color: #ffffff !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.b2btp-menu-header.scrolled .b2btp-nav-list > li > a,
.b2btp-menu-header.scrolled .b2btp-search-toggle,
.b2btp-menu-header.scrolled .b2btp-cart-toggle,
.b2btp-menu-header.scrolled .b2btp-user-toggle,
.b2btp-menu-header.scrolled .user-name {
  color: #1a1a2e !important;
}

.b2btp-menu-header.scrolled .icon-search,
.b2btp-menu-header.scrolled .icon-cart,
.b2btp-menu-header.scrolled .icon-chevron {
  stroke: #1a1a2e;
}

.b2btp-menu-header.scrolled .cart-count {
  background: #0ea5e9;
}

/* =====================================================
   HEADER WRAPPER - Contains Top Bar + Header
   ===================================================== */
.b2btp-header-wrapper {
  position: relative;
  z-index: 10000;
  width: 100%;
}

.b2btp-header-wrapper.is-sticky {
  position: sticky;
  top: 0;
}

.admin-bar .b2btp-header-wrapper.is-sticky {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .b2btp-header-wrapper.is-sticky {
    top: 46px;
  }
}

/* When wrapper is sticky, the header inside doesn't need to be */
.b2btp-header-wrapper.is-sticky .b2btp-menu-header {
  position: relative !important;
  top: auto !important;
}

/* =====================================================
   TOP BAR - Premium Announcement Bar
   ===================================================== */
.b2btp-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  z-index: 10001;
  position: relative;
  transition: all 0.3s ease;
}

.b2btp-topbar.hidden {
  display: none !important;
}

.b2btp-topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  padding: 0 20px;
  margin: 0 auto;
}

.b2btp-topbar .topbar-left,
.b2btp-topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.b2btp-topbar .topbar-right {
  justify-content: flex-end;
}

.b2btp-topbar .topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 2;
  text-align: center;
}

.b2btp-topbar .topbar-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
}

.b2btp-topbar .topbar-link {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
  margin-left: 8px;
  transition: opacity 0.2s;
}

.b2btp-topbar .topbar-link:hover {
  opacity: 0.8;
}

.b2btp-topbar .topbar-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  margin-left: 15px;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b2btp-topbar .topbar-close:hover {
  opacity: 1;
}

/* Marquee Animation */
.b2btp-topbar .topbar-center.marquee {
  overflow: hidden;
  position: relative;
}

.b2btp-topbar .marquee-content {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.b2btp-topbar .topbar-center.marquee:hover .marquee-content {
  animation-play-state: paused;
}

/* =====================================================
   CTA BUTTON
   ===================================================== */
.b2btp-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  margin-left: 15px;
  white-space: nowrap;
}

.b2btp-cta-button.style-solid {
  border: none;
}

.b2btp-cta-button.style-outline {
  background: transparent !important;
  border: 2px solid currentColor;
}

.b2btp-cta-button.style-gradient {
  background: linear-gradient(
    135deg,
    var(--cta-bg) 0%,
    var(--cta-hover) 100%
  ) !important;
  border: none;
}

.b2btp-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.b2btp-cta-button svg {
  flex-shrink: 0;
}

/* =====================================================
   CART IMPROVEMENTS - Quantity Controls
   ===================================================== */
.cart-item-quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-quantity-controls .cart-qty-input {
  width: 50px;
  height: 28px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  transition: all 0.2s;
  -moz-appearance: textfield;
}

.cart-item-quantity-controls .cart-qty-input::-webkit-outer-spin-button,
.cart-item-quantity-controls .cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-quantity-controls .cart-qty-input:focus {
  outline: none;
  border-color: #0088fe;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 136, 254, 0.15);
}

.cart-item-quantity-controls .cart-qty-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cart-item-quantity-controls.updating .cart-qty-input {
  background: #e2e8f0;
}

/* Cart Progress Bar */
.cart-progress-wrapper {
  margin: 15px 0;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.cart-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
  color: #64748b;
}

.cart-progress-text .amount-needed {
  font-weight: 600;
  color: #1a1a2e;
}

.cart-progress-text.complete {
  color: #10b981;
}

.cart-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.cart-progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.cart-progress-bar .progress-fill.complete {
  background: #10b981 !important;
}

/* =====================================================
   MOBILE MENU IMPROVEMENTS
   ===================================================== */

/* Mobile Menu Slide Left */
.b2btp-mobile-menu.slide-left {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

.b2btp-mobile-menu.slide-left.active {
  transform: translateX(0);
}

/* Mobile Menu Slide Right */
.b2btp-mobile-menu.slide-right {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

.b2btp-mobile-menu.slide-right.active {
  transform: translateX(0);
}

/* Mobile Menu Fullscreen */
.b2btp-mobile-menu.fullscreen {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  transform: scale(0.95);
  opacity: 0;
  border-radius: 0;
}

.b2btp-mobile-menu.fullscreen.active {
  transform: scale(1);
  opacity: 1;
}

/* Animated Hamburger */
.hamburger-animated {
  width: 24px;
  height: 18px;
  position: relative;
  cursor: pointer;
}

.hamburger-animated span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-animated span:nth-child(1) {
  top: 0;
}

.hamburger-animated span:nth-child(2) {
  top: 8px;
}

.hamburger-animated span:nth-child(3) {
  top: 16px;
}

.hamburger-animated.active span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.hamburger-animated.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-animated.active span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

/* Minimal Hamburger */
.hamburger-minimal {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-minimal span {
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-minimal span:nth-child(2) {
  width: 70%;
}

/* =====================================================
   SEARCH LIVE RESULTS
   ===================================================== */
.b2btp-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.b2btp-search-results.active {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.search-result-item:hover {
  background: #f8fafc;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 14px;
  margin-bottom: 4px;
}

.search-result-price {
  color: #0088fe;
  font-weight: 700;
  font-size: 14px;
}

.search-result-category {
  font-size: 12px;
  color: #94a3b8;
}

.search-no-results {
  padding: 30px;
  text-align: center;
  color: #94a3b8;
}

.search-loading {
  padding: 20px;
  text-align: center;
}

.search-loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: #0088fe;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================================
   DROPDOWN ANIMATIONS
   ===================================================== */
.dropdown-animation-fade .mega-dropdown,
.dropdown-animation-fade .premium-cart-dropdown,
.dropdown-animation-fade .premium-user-dropdown {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dropdown-speed, 200ms) ease;
}

.dropdown-animation-fade .b2btp-nav-list > li:hover .mega-dropdown,
.dropdown-animation-fade .b2btp-menu-cart:hover .premium-cart-dropdown,
.dropdown-animation-fade .b2btp-menu-user:hover .premium-user-dropdown {
  opacity: 1;
  visibility: visible;
}

.dropdown-animation-slide .mega-dropdown,
.dropdown-animation-slide .premium-cart-dropdown,
.dropdown-animation-slide .premium-user-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--dropdown-speed, 200ms) ease;
}

.dropdown-animation-slide .b2btp-nav-list > li:hover .mega-dropdown,
.dropdown-animation-slide .b2btp-menu-cart:hover .premium-cart-dropdown,
.dropdown-animation-slide .b2btp-menu-user:hover .premium-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-animation-scale .mega-dropdown,
.dropdown-animation-scale .premium-cart-dropdown,
.dropdown-animation-scale .premium-user-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transform-origin: top center;
  transition: all var(--dropdown-speed, 200ms) ease;
}

.dropdown-animation-scale .b2btp-nav-list > li:hover .mega-dropdown,
.dropdown-animation-scale .b2btp-menu-cart:hover .premium-cart-dropdown,
.dropdown-animation-scale .b2btp-menu-user:hover .premium-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Hover Underline Effect */
.hover-underline .b2btp-nav-list > li > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: var(--underline-height, 2px);
  background: var(--underline-color, #ffffff);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.hover-underline .b2btp-nav-list > li:hover > a::after {
  width: 100%;
}

/* =====================================================
   RESPONSIVE IMPROVEMENTS
   ===================================================== */
@media (max-width: 768px) {
  .b2btp-topbar-container {
    padding: 0 15px;
  }

  .b2btp-topbar .topbar-left,
  .b2btp-topbar .topbar-right {
    display: none;
  }

  .b2btp-topbar .topbar-center {
    flex: 1;
  }

  .b2btp-cta-button {
    display: none;
  }

  .cart-item-quantity-controls .cart-qty-input {
    width: 45px;
    height: 26px;
    font-size: 12px;
  }
}

/* =====================================================
   NOTIFICATIONS - Bell & Dropdown
   ===================================================== */
.b2btp-menu-notifications {
  position: relative;
  z-index: 100;
}

.b2btp-notification-toggle {
  position: relative;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease;
  width: 40px;
  height: 40px;
}

.b2btp-notification-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.b2btp-notification-toggle svg {
  width: 20px;
  height: 20px;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #ffffff;
  border-radius: 8px;
  pointer-events: none;
}

/* Pulse Animation */
.b2btp-notification-toggle.has-pulse .notification-badge::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse-ring 1.5s ease infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: -49px;
  width: 320px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  z-index: 1002;
  overflow: hidden;
  pointer-events: none;
}

.b2btp-menu-notifications.active .notification-dropdown {
  pointer-events: auto;
}

.b2btp-menu-notifications:hover .notification-dropdown,
.b2btp-menu-notifications.active .notification-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.notification-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.notification-header .mark-all-read {
  background: none;
  border: none;
  color: #0088fe;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.2s ease;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item.unread {
  background: #f0f9ff;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  margin: 0 0 4px;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: #94a3b8;
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
}

.notification-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.notification-empty p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.notification-footer {
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.notification-footer a {
  color: #0088fe;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

/* =====================================================
   CART BADGE STYLES
   ===================================================== */
.cart-count.badge-circle {
  border-radius: 50%;
}

.cart-count.badge-rounded {
  border-radius: 6px;
}

.cart-count.badge-square {
  border-radius: 2px;
}

.cart-count.position-top-right {
  top: 2px;
  right: 2px;
}

.cart-count.position-top-left {
  top: 2px;
  left: 2px;
  right: auto;
}

.cart-count.position-bottom-right {
  top: auto;
  bottom: 2px;
  right: 2px;
}

.b2btp-menu-cart.badge-animate .cart-count.just-updated {
  animation: badge-bounce 0.5s ease;
}

@keyframes badge-bounce {
  0%,
  100% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.3);
  }

  60% {
    transform: scale(0.9);
  }
}

/* =====================================================
   MEGA MENU STYLES
   ===================================================== */
.mega-dropdown {
  display: none;
  /* Hidden by default - prevents layout shift */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--mega-bg, #ffffff);
  border-radius: var(--mega-radius, 16px);
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

.mega-dropdown.width-full {
  left: 0;
  right: 0;
}

.mega-dropdown.width-container {
  max-width: 1200px;
  margin: 0 auto;
}

.b2btp-nav-list > li:hover > .mega-dropdown {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hide empty mega menus */
.mega-dropdown:empty,
.mega-dropdown .mega-menu-columns:empty,
.mega-sub-menu:empty {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.b2btp-nav-list > li:hover > .mega-dropdown:empty,
.b2btp-nav-list > li:hover > .mega-dropdown .mega-menu-columns:empty {
  display: none !important;
}

.mega-dropdown.shadow-small {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mega-dropdown.shadow-medium {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.mega-dropdown.shadow-large {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.mega-menu-columns {
  display: grid;
  gap: 30px;
}

.mega-menu-columns.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.mega-menu-columns.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.mega-menu-columns.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.mega-menu-columns.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.mega-menu-columns.cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

.mega-menu-column h4 {
  margin: 0 0 15px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mega-heading, #0f172a);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--mega-link-hover, #0088fe);
}

.mega-menu-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu-column li {
  margin-bottom: 8px;
}

.mega-menu-column a {
  color: var(--mega-text, #1e293b);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.mega-menu-column a:hover {
  color: var(--mega-link-hover, #0088fe);
  transform: translateX(4px);
}

/* Mega Menu Column Items */
.mega-menu-columns > li {
  list-style: none;
}

.mega-menu-columns > li.col-25 {
  grid-column: span 1;
}

.mega-menu-columns > li.col-33 {
  grid-column: span 1;
}

.mega-menu-columns > li.col-50 {
  grid-column: span 2;
}

.mega-menu-columns > li.col-75 {
  grid-column: span 3;
}

.mega-menu-columns > li.col-100 {
  grid-column: 1 / -1;
}

.mega-menu-columns .b2btp-menu-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mega-heading, #0f172a);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--mega-link-hover, #0088fe);
}

.mega-menu-columns .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu-columns .sub-menu li {
  margin-bottom: 8px;
}

.mega-menu-columns .sub-menu a {
  color: var(--mega-text, #1e293b);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 6px 0;
  transition:
    color 0.2s ease,
    padding-left 0.2s ease;
}

.mega-menu-columns .sub-menu a:hover {
  color: var(--mega-link-hover, #0088fe);
  padding-left: 8px;
}

/* Hero in Mega Menu */
.mega-menu-columns .b2btp-menu-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
}

.mega-menu-columns .b2btp-menu-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-menu-columns .b2btp-menu-hero .hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
}

.mega-menu-columns .b2btp-menu-hero .hero-title {
  margin: 0 0 8px;
  color: #fff;
}

.mega-menu-columns .b2btp-menu-hero .hero-text {
  margin: 0;
  opacity: 0.9;
}

/* Mega Menu Promo Banner */
.mega-promo-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  color: #ffffff;
}

.mega-promo-banner h5 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.mega-promo-banner p {
  margin: 0 0 16px;
  font-size: 14px;
  opacity: 0.9;
}

.mega-promo-banner .promo-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #ffffff;
  color: #667eea;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.mega-promo-banner .promo-btn:hover {
  transform: translateY(-2px);
}

/* Product Badges */
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
  border-radius: 4px;
  z-index: 2;
}

.product-badge.badge-new {
  background: var(--new-badge-bg, #22c55e);
}

.product-badge.badge-sale {
  background: var(--sale-badge-bg, #ef4444);
}

/* CRITICAL FIX: Force icons to stay in same row */
.b2btp-menu-header .b2btp-menu-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.b2btp-menu-header .b2btp-nav {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 70% !important;
}

.b2btp-menu-header .b2btp-menu-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  width: auto !important;
}

/* Hide empty mega dropdowns completely */
.mega-dropdown:empty,
.mega-dropdown:not(:has(*)) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.mega-menu-columns:empty {
  display: none !important;
}

/* Dropdown Arrow */
.dropdown-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}

/* Force mega dropdown to be properly hidden */
.mega-dropdown {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.b2btp-nav-list > li.is-mega-menu:hover > .mega-dropdown {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
