/* Flipkart-style Header - Jetlink Brand Colors */

:root {
  --jetlink-primary: #00bcd4;
  --jetlink-primary-dark: #0097a7;
  --jetlink-primary-light: #4dd0e1;
}

.flipkart-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: visible !important;
}

/* Main Header Top Bar */
.flipkart-header-top {
  background: #fff;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  overflow: visible !important;
  z-index: 10001;
}

.flipkart-header-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo Section */
.flipkart-logo-section {
  flex-shrink: 0;
}

.flipkart-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.flipkart-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Search Section */
.flipkart-search-section {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
}

.flipkart-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 2px;
  padding: 0;
  height: 36px;
  transition: background 0.2s ease;
  border: 1px solid var(--jetlink-primary);
}

.flipkart-search-container:focus-within {
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.flipkart-search-icon {
  color: var(--jetlink-primary);
  font-size: 18px;
  margin-left: 12px;
  margin-right: 8px;
  flex-shrink: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.flipkart-search-icon:hover {
  color: var(--jetlink-primary-dark);
}

.flipkart-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #212121;
  padding: 0 16px;
}

.flipkart-search-btn {
  background: var(--jetlink-primary);
  color: #fff;
  border: none;
  padding: 0 20px;
  height: 100%;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.flipkart-search-btn:hover {
  background: var(--jetlink-primary-dark);
}

.flipkart-search-input::placeholder {
  color: #878787;
}

/* Right Navigation Section */
.flipkart-nav-section {
  flex-shrink: 0;
}

.flipkart-nav-items {
  display: flex;
  align-items: center;
  gap: 20px;
}

.flipkart-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #212121;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 2px;
  transition: all 0.2s ease;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.flipkart-nav-item i {
  font-size: 20px;
}

.flipkart-nav-item span:not(.flipkart-nav-badge):not(.flipkart-cart-count):not(.flipkart-cart-price) {
  font-size: 12px;
  line-height: 1.2;
}

.flipkart-nav-link {
  text-decoration: none;
}

.flipkart-nav-item:hover {
  background: #f0f0f0;
  color: var(--jetlink-primary);
}


.flipkart-dropdown-icon {
  font-size: 12px;
  margin-left: 2px;
}

/* Navigation Badges */
.flipkart-nav-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--jetlink-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

.flipkart-nav-badge-red {
  background: #f44336;
}

/* Cart Link */
.flipkart-cart-link {
  background: var(--jetlink-primary-light) !important;
  border-radius: 4px;
  padding: 8px 12px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.flipkart-cart-link i {
  font-size: 20px;
}

.flipkart-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--jetlink-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

.flipkart-cart-price {
  font-size: 12px;
  font-weight: 600;
  color: #212121;
}

/* Dropdown Menu */
.flipkart-nav-dropdown {
  position: relative;
}

.flipkart-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: 8px 0;
  margin-top: 8px;
  display: none;
  z-index: 1000;
}

.flipkart-nav-dropdown:hover .flipkart-dropdown-menu {
  display: block;
}

.flipkart-dropdown-item {
  display: block;
  padding: 10px 20px;
  color: #212121;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.flipkart-dropdown-item:hover {
  background: #f0f0f0;
  color: var(--jetlink-primary);
}

.flipkart-dropdown-divider {
  margin: 8px 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

.flipkart-logout-btn {
  color: #d32f2f;
}

.flipkart-logout-btn:hover {
  background: #ffebee;
  color: #d32f2f;
}

/* Category Ribbon */
.flipkart-category-ribbon {
  background: var(--jetlink-primary);
  border-bottom: none;
  padding: 0;
  position: relative;
  z-index: 10001;
  overflow: visible !important;
  height: 70px;
  display: flex;
  align-items: center;
}

.flipkart-category-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  height: 70px;
}

.flipkart-category-wrapper::-webkit-scrollbar {
  display: none;
}

/* All Categories Button */
.flipkart-all-categories {
  flex-shrink: 0;
}

.all-categories-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.all-categories-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.all-categories-btn i:first-child {
  font-size: 18px;
}

.all-categories-btn i:last-child {
  font-size: 12px;
  margin-left: 4px;
}

/* Category Links (Text Only) */
.flipkart-category-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.flipkart-category-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.flipkart-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  min-width: 65px;
  flex-shrink: 0;
  justify-content: center;
  height: 100%;
}

.flipkart-category-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.flipkart-category-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 5px;
  margin-bottom: 2px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.flipkart-category-item:hover .flipkart-category-icon {
  transform: scale(1.05);
}

.flipkart-category-item:hover .category-icon-img {
  transform: scale(1.05);
}

.category-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  filter: brightness(1.1) contrast(1.1);
}

.flipkart-category-icon i[style*="display: block"] {
  font-size: 20px;
  color: #fff;
}

.flipkart-category-icon i {
  font-size: 22px;
  color: #fff;
}

.flipkart-category-text {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
  margin-top: 0;
}

/* Category Item Wrapper for Dropdown */
.flipkart-category-item-wrapper {
  position: relative !important;
  flex-shrink: 0;
  z-index: 10002;
  overflow: visible !important;
}

.category-dropdown-icon {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  margin-left: 3px;
  margin-top: -1px;
  transition: transform 0.2s ease;
}

.flipkart-category-item-wrapper:hover .category-dropdown-icon {
  transform: rotate(180deg);
}

/* Brand Dropdown Menu */
.category-brands-dropdown {
  position: fixed !important;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  max-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: visible !important;
  z-index: 999999 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 12px 0;
  pointer-events: none;
  will-change: opacity, visibility;
}

.flipkart-category-item-wrapper:hover .category-brands-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
}

.dropdown-loading {
  padding: 20px;
  text-align: center;
  color: #878787;
  font-size: 14px;
}

.dropdown-brands-list {
  max-height: 350px;
  overflow-y: auto;
}

.dropdown-brands-list::-webkit-scrollbar {
  width: 6px;
}

.dropdown-brands-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-brands-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.dropdown-brands-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.brand-dropdown-item {
  display: block;
  padding: 10px 20px;
  color: #212121;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
  z-index: 100000;
}

.brand-dropdown-item:hover {
  background: #f5f5f5;
  border-left-color: var(--jetlink-primary);
  color: var(--jetlink-primary);
  z-index: 100001;
}

.brand-dropdown-item:first-child {
  margin-top: 0;
}

.brand-dropdown-item:last-child {
  margin-bottom: 0;
}

.dropdown-empty {
  padding: 20px;
  text-align: center;
  color: #878787;
  font-size: 14px;
  position: relative;
  z-index: 100000;
}

/* Ensure all dropdown-related elements have proper stacking */
.dropdown,
.dropdown-menu,
.submenu,
.category-brands-dropdown,
.dropdown-brands-list {
  position: fixed !important;
  z-index: 999999 !important;
}

/* Ensure navbar and header have proper stacking context */
.navbar,
.flipkart-header,
.flipkart-header-top,
.flipkart-category-ribbon {
  position: relative !important;
  overflow: visible !important;
  z-index: 10000;
}

/* Ensure banner and hero sections stay below header */
.banner,
.hero-section,
.flipkart-hero-section,
.hero-carousel-full,
.carousel,
.carousel-inner,
.carousel-item {
  position: relative;
  z-index: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
  .flipkart-header-wrapper {
    flex-wrap: wrap;
    gap: 15px;
  }

  .flipkart-search-section {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .flipkart-nav-items {
    gap: 15px;
  }

  .flipkart-nav-item span {
    display: none;
  }

  .flipkart-category-wrapper {
    gap: 8px;
    max-width: 700px;
    height: 50px;
  }

  .flipkart-category-icon {
    width: 20px;
    height: 20px;
  }

  .flipkart-category-icon i {
    font-size: 20px;
  }
  
  .flipkart-category-text {
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .flipkart-header-wrapper {
    padding: 0 15px;
  }

  .flipkart-logo {
    height: 28px;
  }

  .flipkart-nav-items {
    gap: 10px;
  }

  .flipkart-nav-item {
    padding: 6px 8px;
    font-size: 14px;
  }

  .flipkart-category-wrapper {
    gap: 6px;
    padding: 0 10px;
    max-width: 100%;
    height: 50px;
  }

  .flipkart-category-item {
    min-width: 55px;
    padding: 3px 5px;
  }

  .flipkart-category-icon {
    width: 18px;
    height: 18px;
  }

  .flipkart-category-icon i {
    font-size: 18px;
  }

  .flipkart-category-text {
    font-size: 9px;
  }
  
  .category-dropdown-icon {
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .flipkart-nav-item {
    padding: 4px 6px;
  }

  .flipkart-nav-item i {
    font-size: 16px;
  }

  .flipkart-category-icon {
    width: 40px;
    height: 40px;
  }

  .flipkart-category-icon i {
    font-size: 20px;
  }

  .flipkart-category-text {
    font-size: 10px;
  }
}


/* Currency Switcher Styles */
.currency-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.currency-option:hover {
  background-color: #f5f5f5;
}

.currency-symbol {
  font-weight: 600;
  font-size: 1.1rem;
  min-width: 20px;
}

.currency-name {
  flex: 1;
  font-size: 0.9rem;
}

.currency-option .bi-check-circle-fill {
  margin-left: auto;
  font-size: 1rem;
}

/* Cart Dropdown Wrapper */
.cart-dropdown-wrapper {
  position: relative;
}

.cart-dropdown-wrapper .flipkart-nav-link {
  cursor: pointer;
}
