/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* Header Alignment and Profile Styling */
.user-profile {
    display: flex;
    align-items: center;
    margin-right: 20px;
    position: relative;
}

.user-profile:hover .profile-dropdown,
.profile-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.profile-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    position: relative;
}

.profile-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #333;
}

.profile-image {
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.profile-dropdown {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    min-width: 200px;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.profile-dropdown li {
    border-bottom: 1px solid #f0f0f0;
}

.profile-dropdown li:last-child {
    border-bottom: none;
    border-top: 2px solid #e0e0e0;
    margin-top: 8px;
    padding-top: 8px;
}

.profile-dropdown a {
    padding: 12px 16px;
    display: block;
    color: #333 !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
}

.profile-dropdown a:hover {
    background-color: #f8f9fa;
    color: #0056d6;
}

/* Header top menu alignment */
#top_menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

#top_menu li {
    margin: 0;
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .profile-link {
        padding: 6px;
    }
    
    .profile-image {
        margin-right: 0;
    }
}

/* Custom Header Styles - White Background with Black Text */
/* Override all header styles with higher specificity */
header.header,
header.header_in,
header {
  background-color: #fff !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Main menu text color - higher specificity */
header .main-menu > ul > li span > a,
.main-menu > ul > li span > a,
header.header .main-menu > ul > li span > a,
header.header_in .main-menu > ul > li span > a {
  color: #000 !important;
  color: black !important;
  font-weight: 500;
}

header .main-menu > ul > li span:hover > a,
.main-menu > ul > li span:hover > a,
header.header .main-menu > ul > li span:hover > a,
header.header_in .main-menu > ul > li span:hover > a {
  color: #0056d6 !important;
  opacity: 1 !important;
}

/* Logo text color */
header #logo a,
#logo a {
  color: #333 !important;
}

/* Top menu items */
header ul#top_menu li a,
ul#top_menu li a {
  color: #333 !important;
}

header ul#top_menu li a:hover,
ul#top_menu li a:hover {
  color: #0056d6 !important;
}

/* User profile text */
header .user-profile .profile-link,
.user-profile .profile-link {
  color: #333 !important;
}

header .user-profile .user-name,
.user-profile .user-name {
  color: #333 !important;
}

/* Force user name to be black */
.user-name,
span.user-name,
.user-profile .user-name,
header .user-profile .user-name,
.user-profile span.user-name,
header .user-profile span.user-name {
  color: #000 !important;
  color: black !important;
}

/* Login button */
header .btn_add,
.btn_add {
  background-color: #0056d6 !important;
  color: #fff !important;
  border: 2px solid #0056d6 !important;
}

header .btn_add:hover,
.btn_add:hover {
  background-color: #0044b3 !important;
  border-color: #0044b3 !important;
}

/* Mobile menu button */
header .btn_mobile .hamburger-inner,
header .btn_mobile .hamburger-inner::before,
header .btn_mobile .hamburger-inner::after,
.btn_mobile .hamburger-inner,
.btn_mobile .hamburger-inner::before,
.btn_mobile .hamburger-inner::after {
  background-color: #333 !important;
}

/* Ensure sticky header maintains white background */
header.sticky,
header.header.sticky,
header.header_in.sticky {
  background-color: #fff !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

/* Submenu styles */
header .main-menu ul ul,
.main-menu ul ul {
  background: #fff !important;
  border: 1px solid #e9ecef !important;
}

header .main-menu ul ul li a,
.main-menu ul ul li a {
  color: #333 !important;
}

header .main-menu ul ul li a:hover,
.main-menu ul ul li a:hover {
  background-color: #f8f9fa !important;
  color: #0056d6 !important;
}

/* Force main menu text to be black */
.main-menu > ul > li span > a,
header .main-menu > ul > li span > a,
nav.main-menu > ul > li span > a,
header nav.main-menu > ul > li span > a {
  color: #000 !important;
  color: black !important;
}

/* Profile dropdown */
header .profile-dropdown,
.profile-dropdown {
  background: #fff !important;
  border: 1px solid #e9ecef !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

header .profile-dropdown li a,
.profile-dropdown li a {
  color: #333 !important;
}

header .profile-dropdown li a:hover,
.profile-dropdown li a:hover {
  background-color: #f8f9fa !important;
  color: #0056d6 !important;
}

/* Additional overrides for transparency */
header.header {
  background-color: #fff !important;
  background: #fff !important;
}

/* Override any transparent backgrounds */
header[style*="background"] {
  background-color: #fff !important;
  background: #fff !important;
}

/* Force white background on all header states */
header,
header.header,
header.header_in,
header.sticky,
header.header.sticky,
header.header_in.sticky {
  background-color: #fff !important;
  background: #fff !important;
}

/* Footer Logo Styling */
.footer-logo {
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 30px;
}

/* Profile Dropdown Fix */
.user-profile {
  position: relative;
}

.profile-dropdown {
  transition: all 0.3s ease;
  pointer-events: auto;
}

.user-profile:hover .profile-dropdown,
.profile-dropdown:hover {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.footer-logo-img {
  transition: transform 0.3s ease;
}

.footer-logo-img:hover {
  transform: scale(1.05);
}

.footer-logo h4 {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-logo p {
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* Filter Styles for Browse Crop Listings */
.filter_type {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.filter_type:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Price Range Filter Styles */
.price-range-container {
  padding: 15px 0;
}

.price-range-info {
  text-align: center;
  margin-bottom: 12px;
}

.price-range-info small {
  font-size: 12px;
  color: #6c757d;
  font-weight: 400;
}

.price-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 600;
  color: #333;
  font-size: 16px;
  padding: 0 4px;
}

.range-slider-container {
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  margin: 0;
}

.range-slider-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 1;
}

.range-slider-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  height: 6px;
  background: #0056d6;
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 1;
  width: var(--slider-fill-width, 0%);
  transition: width 0.1s ease;
  pointer-events: none;
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0056d6;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 3px solid #fff;
  transition: all 0.2s ease;
  z-index: 3;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0056d6;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 3px solid #fff;
  transition: all 0.2s ease;
  z-index: 3;
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

.range-slider::-webkit-slider-track {
  background: linear-gradient(to right, #0056d6 0%, #0056d6 var(--slider-fill-percent, 0%), #e0e0e0 var(--slider-fill-percent, 0%), #e0e0e0 100%);
  height: 6px;
  border-radius: 3px;
}

.range-slider::-moz-range-track {
  background: linear-gradient(to right, #0056d6 0%, #0056d6 var(--slider-fill-percent, 0%), #e0e0e0 var(--slider-fill-percent, 0%), #e0e0e0 100%);
  height: 6px;
  border-radius: 3px;
  border: none;
}

/* Mobile responsive price range */
@media (max-width: 768px) {
  .price-display {
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  .range-slider-container {
    height: 45px;
  }
  
  .range-slider::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
  }
  
  .range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
  }
}

.filter_type h6 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter_type ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter_type ul li {
  margin-bottom: 10px;
}

.filter_type .container_check {
  display: block;
  position: relative;
  padding-left: 30px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  user-select: none;
  transition: color 0.2s ease;
}

.filter_type .container_check:hover {
  color: #0056d6;
}

.filter_type .container_check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.filter_type .checkmark {
  position: absolute;
  top: 2px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #d1d1d1;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.filter_type .container_check:hover input ~ .checkmark {
  border-color: #0056d6;
}

.filter_type .container_check input:checked ~ .checkmark {
  background-color: #0056d6;
  border-color: #0056d6;
}

.filter_type .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.filter_type .container_check input:checked ~ .checkmark:after {
  display: block;
}

.filter_type .container_check .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter_type small {
  color: #999;
  font-size: 12px;
  float: right;
}

/* Filter Actions */
.filter_actions {
  margin-top: 20px;
}

.filter_actions .btn {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.filter_actions .btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
}

.filter_actions .btn-outline-secondary:hover {
  background-color: #6c757d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter_actions .btn-success {
  background-color: #29522D;
  border: 2px solid #29522D;
}

.filter_actions .btn-success:hover {
  background-color: #1f3d23;
  border-color: #1f3d23;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Scrollable filter sections for better UX */
.filter_type ul {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.filter_type ul::-webkit-scrollbar {
  width: 6px;
}

.filter_type ul::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.filter_type ul::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.filter_type ul::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Mobile responsive filter styles */
@media (max-width: 768px) {
  .filter_type {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }
  
  .filter_type h6 {
    font-size: 13px;
    margin-bottom: 12px;
  }
  
  .filter_type .container_check {
    font-size: 13px;
    padding-left: 28px;
  }
  
  .filter_type .checkmark {
    height: 16px;
    width: 16px;
  }
  
  .filter_type ul {
    max-height: 200px;
  }
}

/* Seed Type Badge Styles with Agricultural Colors */
.seed-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--secondary-green);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 10;
}

/* Agricultural Seed Type Colors */
.seed-type-badge.hybrid { 
  background: linear-gradient(135deg, #2ECC71, #27AE60); 
}

.seed-type-badge.organic { 
  background: linear-gradient(135deg, #8BC34A, #689F38); 
}

.seed-type-badge.traditional { 
  background: linear-gradient(135deg, #D4A574, #B8860B); 
}

.seed-type-badge.heirloom { 
  background: linear-gradient(135deg, #795548, #5D4037); 
}

.seed-type-badge.genetically-modified,
.seed-type-badge.gmo { 
  background: linear-gradient(135deg, #9C27B0, #7B1FA2); 
}

.seed-type-badge.open-pollinated { 
  background: linear-gradient(135deg, #FF9800, #F57C00); 
}

.seed-type-badge.f1-hybrid,
.seed-type-badge.f1 { 
  background: linear-gradient(135deg, #00BCD4, #0097A7); 
}

.seed-type-badge.indigenous { 
  background: linear-gradient(135deg, #4CAF50, #388E3C); 
}

.seed-type-badge.local { 
  background: linear-gradient(135deg, #FFC107, #FFA000); 
}

.seed-type-badge.certified { 
  background: linear-gradient(135deg, #3F51B5, #303F9F); 
}

.seed-type-badge.treated { 
  background: linear-gradient(135deg, #E91E63, #C2185B); 
}

.seed-type-badge.untreated { 
  background: linear-gradient(135deg, #66BB6A, #43A047); 
}

/* Mobile responsive seed badge */
@media (max-width: 768px) {
  .seed-type-badge {
    top: 8px;
    right: 8px;
    padding: 5px 9px;
    font-size: 10px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .seed-type-badge {
    top: 6px;
    right: 6px;
    padding: 4px 7px;
    font-size: 9px;
    border-radius: 10px;
  }
}
