@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #1E88E5;
  --primary-light: #e3f2fd;
  --primary-dark: #1565c0;
  --text-dark: #333;
  --text-light: #666;
  --white: #fff;
  --gray-light: #f9f9f9;
  --gray: #ddd;
  --danger: #f44336;
  --header-top-bar-height: 60px;
  --header-navbar-height: 100px;
}

body {
  background-color: #f0f8ff;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

body.sidebar-loading .sidebar-common {
    visibility: hidden;
}

/* ---------------------------- CSS FOR HEADER-------------------------- */
.header-top-bar {
  position: sticky;
  top: 0;
  z-index: 1050;
  width: 100%;
  background-color: var(--gray-light);
  border-bottom: 1px solid var(--gray);
}

.header-navbar {
  position: fixed;
  top: 60px; /* height of the top bar */
  z-index: 1049;
  width: 100%;
  display: flex;
  align-items: center;
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s, top 0.3s;
}

.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1 0 auto;
  transition: margin-left 0.3s ease;
  margin-left: 0;
}

.main-content.sidebar-push {
  margin-left: 250px;
}

.header-top-bar a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.header-top-bar a:hover {
  color: var(--primary-color);
}

.header-menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.header-menu-toggle:hover {
  transform: scale(1.1);
}

.header-notification-container {
  position: relative;
  display: inline-block;
  z-index: 2002 !important; /* Higher than .header-navbar and .dropdown */
}

.header-notification-btn {
  position: relative;
  padding: 0.5rem;
  display: block;
}

.header-notification-icon {
  background-color: var(--primary-light);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.header-notification-icon:hover {
  background-color: var(--primary-color);
  color: var(--white) !important;
}

.header-notification-icon.active {
  background-color: var(--primary-color);
  color: var(--white) !important;
}

.header-notification-icon i {
  font-size: 1.2rem;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 280px;
  max-height: 60vh;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid var(--gray);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  z-index: 1061;          /* Higher than container (1060) */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-panel.d-none {
  display: none;
}

.notification-panel:not(.d-none) {
  display: block;
}

#notificationList {
  max-height: 300px;
  overflow-y: auto;
}

.notification-panel ul li {
  padding: 0.75rem 1rem;
  word-wrap: break-word;
  white-space: normal;
  border-bottom: 1px solid var(--gray-light);
  transition: background-color 0.2s ease;
}

.notification-panel ul li:hover {
  background-color: var(--primary-light);
}

.notification-panel ul li:last-child {
  border-bottom: none;
}

#notifCount {
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#notifCount:empty {
  display: none;
}

@media (max-width: 768px) {
  .notification-panel {
    width: 250px;
    max-width: calc(100% - 80px);
  }
}

@media (max-width: 576px) {
  .notification-panel {
    width: 240px;
    max-width: calc(100% - 60px);
  }
}

.notification-panel.adjust-right {
  left: auto;
  right: 0;
  transform: translateX(0);
}

/* NAVBAR */

.header-navbar.sticky {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 200;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-navbar-nav {
  display: flex;
  list-style: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  height: 100%; 
  position: relative; /* Ensure stacking context */
}

.header-nav-item {
  margin: 0;
  position: relative;
}

.header-nav-link {
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  display: block;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.header-nav-link:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.header-nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

/* Logo inside navbar */
.header-logo-nav {
  padding: 0 1rem;
  position: relative;
  z-index: 1051;          /* Higher than navbar */
}

.header-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.header-logo-link:hover {
  transform: scale(1.05);
}

.header-logo-navbar {
  width: auto;
  height: 100px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  background-color: var(--white);
  padding: 8px;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1051;          /* Higher than navbar */
}

.header-logo-navbar:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Dropdown styles */
.dropdown-menu {
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 0.5rem;
}

.dropdown-item {
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

/* Responsive styles */
@media (max-width: 991.98px) {
  .header-navbar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
  }
  .header-navbar-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }
  .header-nav-item {
    width: 100%;
  }
  .header-nav-link {
    text-align: center;
  }
  .header-logo-nav {
    order: -1;
    margin-bottom: 1rem;
  }
  .header-logo-navbar {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .header-top-bar {
    padding: 0.5rem;
  }

  .header-notification-icon {
    width: 32px;
    height: 32px;
  }

  .notification-panel {
    min-width: 240px;
  }
}

@media (max-width: 576px) {
  .header-navbar {
    top: 80px;           /* Further increased spacing on smaller screens */
  }
  .header-top-bar {
    padding: 0.25rem;
  }
  .header-logo-navbar {
    width: 50px;
    height: 50px;
  }
}

/* ---------------------------- CSS FOR HEADER-------------------------- */


/* ---------------------------- SIDEBAR: FARM MANAGER ---------------------------- */
.sidebar-farm-manager {
  position: fixed;
  top: 60px; /* same as header-top-bar height */
  left: 0;
  width: 250px;
  height: 100%;
  background-color: #ffffff;
  z-index: 1201 !important;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
}

/* Optional: smooth show/hide if you later animate via JS */
.sidebar-farm-manager.show {
  transform: translateX(0);
}

.sidebar-farm-manager.d-none {
  transform: translateX(-100%);
}

.sidebar-farm-manager .sidebar-nav li {
  padding: 12px 0;
  border-bottom: 1px solid #f1f1f1;
  color: #0093e0;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.sidebar-farm-manager .sidebar-nav li:hover {
  background-color: #e3f2fd;
  padding-left: 15px;
  transition: 0.2s ease;
}

.sidebar-farm-manager .bi {
  font-size: 1.2rem;
}
  
.sidebar-common {
  position: fixed;
  top: 60px; /* Match the navbar height */
  left: 0;
  height: calc(100vh - 60px); /* Subtract navbar height from total height */
  width: 280px;
  background-color: #fff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
  transform: translateX(-100%);
  visibility: visible;
}

/* Add this new class */
.sidebar-common.sidebar-initialized {
  transform: translateX(0);
}

/* Add custom scrollbar styling */
.sidebar-common::-webkit-scrollbar {
  width: 6px;
}

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

.sidebar-common::-webkit-scrollbar-thumb {
  background: #0093e0;
  border-radius: 3px;
}

.sidebar-common::-webkit-scrollbar-thumb:hover {
  background: #007bb8;
}

/* Adjust sidebar nav items for better spacing */
.sidebar-common .sidebar-nav {
  padding-bottom: 20px;
  direction: ltr;
}

.sidebar-common .sidebar-nav li {
  padding: 0; /* Remove padding from li */
  border-bottom: 1px solid #f1f1f1;
  color: #0093e0;
  font-weight: bold;
  cursor: pointer;
}

.sidebar-common .sidebar-nav li a.nav-link {
  padding: 12px 15px; /* Add padding to the link instead */
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0093e0;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-common .sidebar-nav li a.nav-link:hover {
  background-color: #e3f2fd;
  padding-left: 20px;
}

/* Adjust logo size in sidebar */
.sidebar-common .img-fluid.rounded-circle {
  width: 60px !important; /* Reduce logo size */
  height: 60px !important;
  margin: 10px auto;
}

/* Adjust spacing for nested items */
.sidebar-common .collapse .nav-link {
  padding: 10px 15px 10px 30px; /* Add more left padding for nested items */
  font-size: 0.95rem;
}

/* Make sure the collapse toggle area is also fully clickable */
.sidebar-common .nav-link[data-bs-toggle="collapse"] {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------------------------- SIDEBAR: FARM MANAGER ---------------------------- */





/* ---------------------------- CSS FOR FOOTER-------------------------- */
/* Footer */
.footer {
  background-color: #333;
  color: white;
  padding: 20px;
  text-align: center;
  height: 60px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .header-menu-toggle {
    display: block;
  }

  .header-navbar-nav {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 250px;
    height: calc(100vh - 60px);
    background-color: white;
    flex-direction: column;
    padding: 20px 0;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .header-navbar.mobile-active .header-navbar-nav {
    left: 0;
  }

  .header-navbar {
    flex-direction: column;
  }

  .header-nav-item {
    width: 100%;
    margin: 0;
  }

  .header-nav-link {
    padding: 12px 20px;
    border-radius: 0;
  }

  .header-logo-nav {
    width: 120px;
    height: auto;
    margin: 10px 0;
  }

  .header-logo-nav-item {
    order: -1;
    margin: 10px 0;
    border-radius: 20px;
  }
}
/* ---------------------------- CSS FOR FOOTER-------------------------- */


/* ---------------------------- CSS FOR HOME PAGE-------------------------- */
.top-bar {
  height: 60px;
}

/* Logo responsiveness */
.logo-img {
  height: 40px; /* mobile default */
  width: auto; /* Maintain aspect ratio */
}

/* Tablet */
@media (min-width: 768px) {
  .logo-img {
      height: 50px;
  }
}

/* Desktop large */
@media (min-width: 1200px) {
  .logo-img {
      height: 60px;
  }
}

/* LOGO SIZE*/
.logo-img {
  height: 100px; /* Change this value to make the logo bigger */
  /* Optionally, set the width if needed */
  width: auto; /* Maintain aspect ratio */
}

/* Optional: Customize the size for larger screens */
@media (min-width: 768px) {
  .logo-img {
    height: 80px; /* Logo size for tablets and up */
  }
}

@media (min-width: 1200px) {
  .logo-img {
    height: 100px; /* Logo size for large desktop screens */
  }
}

/* NAV BAR DESIGN COLOR */
.custom-navbar {
  background-color: #0193e0; /* or any color you want */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* optional: gives a slight shadow for separation */
  z-index: 1030; /* make sure it stays on top */
}

.custom-navbar .nav-link {
  color: #0193e0; /* color of the nav links */
  font-weight: 500;
}

.custom-navbar .nav-link:hover {
  color: #0d6efd; /* Bootstrap primary color on hover */
}


/* Default nav link style */
.navbar-nav .nav-link{
  color: black;
  padding: 0.5rem 0.5rem;
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

/* Hover effect */
.navbar-nav .nav-link:not(.logo-link):hover{
  background-color: #0d6efd; /* Blue background when hovering */
  color: white;
}

/* Active link (current page) */
.nav-link.active {
  background-color: #074bb0; /* Same blue background when active */
  color: white;
}

.navbar-nav .nav-link.active:not(.logo-link) {
  background-color: #0d6efd;
  color: white;
}

/*HERO SECTION */
/* Hero Section Carousel Images */
#carouselExampleSlidesOnly .carousel-inner,
#carouselExampleSlidesOnly .carousel-item,
#carouselExampleSlidesOnly img {
height: 90vh; /* 90% of the screen height */
object-fit: cover; /* Makes the image nicely fill without distortion */
}

/* Center the text perfectly */
#carouselExampleSlidesOnly .carousel-caption {
bottom: 0;
top: 0;
left: 0;
right: 0;
padding: 0;
background: rgba(0, 0, 0, 0.3); /* Slight dark overlay */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

/* Heading and paragraph styling */
#carouselExampleSlidesOnly .carousel-caption h1,
#carouselExampleSlidesOnly .carousel-caption p {
color: white;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Stronger shadow for mobile visibility */
text-align: center;
}

/* Buttons */
#carouselExampleSlidesOnly .carousel-caption .btn {
padding: 10px 30px;
font-size: 1.2rem;
border-radius: 30px;
}

/* --- RESPONSIVE FIXES --- */

/* On smaller screens, make text smaller */
@media (max-width: 768px) {
#carouselExampleSlidesOnly .carousel-caption h1 {
  font-size: 2rem;
}

#carouselExampleSlidesOnly .carousel-caption p {
  font-size: 1rem;
}

#carouselExampleSlidesOnly .carousel-caption .btn {
  font-size: 1rem;
  padding: 8px 20px;
}
}

/* On very small screens, adjust even more */
@media (max-width: 480px) {
#carouselExampleSlidesOnly .carousel-caption h1 {
  font-size: 1.5rem;
}

#carouselExampleSlidesOnly .carousel-caption p {
  font-size: 0.9rem;
}

#carouselExampleSlidesOnly .carousel-caption .btn {
  font-size: 0.9rem;
  padding: 6px 16px;
}
}


/* Product Section - Image Styling */
.product-card {
  width: 250px; /* Fixed width for all cards */
}

.product-img {
  width: 100%;            /* Fill the card width */
  height: 200px;           /* Fixed height */
  object-fit: cover;       /* Make sure image covers nicely */
  border-radius: 70%;     /* Optional: rounded corners */
  border: 8px solid #0093e0; /* Adds border color */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Optional: soft shadow */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .product-card {
    width: 200px; /* Slightly smaller on tablets */
  }

  .product-img {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .product-card {
    width: 100%; /* Full width on very small devices */
  }

  .product-img {
    height: 180px;
  }
}

.modal .form-control {
  border-radius: 0.5rem;
}
.modal-footer .btn {
  width: auto;
  padding: 10px 20px;
  min-width: 120px;
}

/* ---------------------------- CSS FOR HOME PAGE-------------------------- */


/* ---------------------------- CONTACT PAGE ONLY -------------------------- */
.contact-form-page {
  padding-top: 20px;
}

@media (max-width: 768px) {
  .contact-form-page {
    padding-top: 60px;
  }
}

@media (max-width: 480px) {
  .contact-form-page {
    padding-top: 40px;
  }
}

.contact-form-page .form-group label {
  color: #386A6B;
}

.contact-form-page .form-control {
  border-radius: 10px;
}

.contact-form-page textarea.form-control {
  resize: vertical;
  height: auto;
}

.contact-form-page #submitButton,
.contact-form-page #closeButton {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  transition: background-color 0.3s ease;
}

.contact-form-page #submitButton {
  border-radius: 50px;
  background-color: #0093e0;
  color: white;
}

.contact-form-page #submitButton:hover {
  background-color: #007bb8;
}

.contact-form-page #closeButton {
  border-radius: 10px;
  background-color: #386A6B;
  color: white;
  margin: 20px auto 0;
  cursor: pointer;
}

.contact-form-page .google-map-wrapper {
  position: relative;
  width: 100%;
  height: 350px;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form-page .google-map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
/* ---------------------------- END CONTACT PAGE -------------------------- */


/* ---------------------------- CSS FOR ABOUT US PAGE-------------------------- */
.about-hero {
  background-size: cover;
  background-position: center;
  height: 60vh;
  position: relative;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.about-hero-title {
  font-size: 3rem;
  font-weight: bold;
}

.about-hero-subtitle {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.section-title {
  font-weight: 700;
  color: #386A6B;
  margin-bottom: 1rem;
}

.section-text {
  font-size: 1.1rem;
  color: #444;
}

.feature-box {
  background: #fff;
  border: 1px solid #eee;
  transition: all 0.3s ease;
}

.feature-box:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-tagline h3 {
  font-weight: bold;
  font-family: 'Georgia', serif;
}
/* ---------------------------- CSS FOR ABOUT US PAGE-------------------------- */


/* ---------------------------- CSS FOR USER MANAGEMENT PAGE-------------------------- */
.user-mgmt-body {
  background-color: #ffffff;
  color: #333;
}

.user-mgmt-heading,
.user-mgmt-body label {
  color: #0093e0;
  padding-top: 20px;
}

.user-mgmt-body .table thead {
  background-color: #0093e0;
  color: #ffffff;
}

.user-mgmt-body .btn-primary {
  background-color: #0093e0 !important;
  border-color: #0093e0 !important;
}

.user-mgmt-body .btn-primary:hover {
  background-color: #007bbf !important;
}

.user-mgmt-body .btn-outline-primary {
  color: #0093e0;
  border-color: #0093e0;
}

.user-mgmt-body .btn-outline-primary:hover {
  background-color: #0093e0;
  color: white;
}

.user-mgmt-body .btn-warning {
  background-color: #ffc107 !important;
  color: #000;
}

.user-mgmt-body .btn-danger {
  background-color: #dc3545 !important;
}

.user-mgmt-body .role-badge {
  background-color: #0093e0;
  font-size: 0.9rem;
  padding: 3px 8px;
  border-radius: 5px;
  color: white;
}

.user-mgmt-body .pagination .page-link {
  color: #0093e0;
}

.user-mgmt-body .pagination .page-item.active .page-link {
  background-color: #0093e0;
  border-color: #0093e0;
  color: white;
}

.user-mgmt-body .form-control:focus,
.user-mgmt-body .form-select:focus {
  border-color: #0093e0;
  box-shadow: 0 0 0 0.2rem rgba(0,147,224,0.25);
}

.user-modal-title {
  font-weight: bold;
  font-size: 1.3rem;
}

.user-list-group-item span {
  float: right;
  color: #444;
}


/* ---------------------------- CSS FOR USER MANAGEMENT PAGE-------------------------- */

/* ---------------------------- CSS FOR SELECTED PRODUCT PAGE-------------------------- */


.product-details h1 {
  text-align: left;
  margin: 0 0 15px 0;
}

.product-details {
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 10px;
  background-color: #0093e0;
  color: white;
}

.product-image {
  width: 100%;
  height: 100%;
  max-height: 450px;      /* set a fixed height */
  object-fit: cover;      /* crop/scale to fit the box */
  border-radius: 10px;
}

/* Align price and quantity nicely on the same row */
.price-quantity-wrapper {
  display: flex;
  align-items: center;
  gap: 20px; /* spacing between price and quantity */
  flex-wrap: wrap; /* allows wrapping on smaller screens */
}

.price-quantity-wrapper h4 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  position: relative;
  top: 12px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity-control button {
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: white;
  border: 2px solid white;
}
.quantity-control button:hover {
  background-color: white;
  color: #0093e0;
}
.quantity-number {
  margin-top: 20px;
  min-width: 40px;
  text-align: center;
  font-size: 18px;
}
.feature-list i {
  color: white;   
  font-size: 1.5rem;
  margin-right: 8px;
  vertical-align: middle;
}
.star-rating i {
  color: gold;
  font-size: 1.5rem;
}
.custom-btn {
  background-color: white;
  color: #0093e0;
  border: 2px solid #0093e0;
  font-weight: bold;
  width: auto;                 /* Makes it adjust to text size */
  padding: 8px 20px;           /* Adds compact spacing */
  display: inline-block;       /* Prevents stretching */
}
.custom-btn:hover {
  background-color: #4ebbf6;
  color: white;
}

/* ---------------------------- END OF CSS FOR SELECTED PRODUCT PAGE-------------------------- */

/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    border: none;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 2000; /* Increased to ensure it's above navbars */
    transform: translateX(100%);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.show {
    transform: translateX(0);
}

.cart-sidebar-header {
    padding: 1.25rem 2rem 1.25rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 56px;
}

.cart-sidebar-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.cart-sidebar .btn-close {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    font-size: 1.5rem;
    color: #222;
    background: #f1f3f4;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin: 0 0 0 1rem;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
    outline: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidebar .btn-close:hover {
    opacity: 1;
    background: #e2e6ea;
    color: #d32f2f;
    border-color: #d32f2f;
}

.cart-sidebar .btn-close:focus {
    outline: none !important;
    box-shadow: none !important;
}

.cart-sidebar-body {
    padding: 1.5rem 2rem 2rem 2rem;
    height: 100%;
    overflow-y: auto;
    flex: 1 1 auto;
    background: #fff;
}

/* Cart items list */
.cart-sidebar .list-group-item {
    padding: 1rem 0.5rem;
    border-left: none;
    border-right: none;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: background-color 0.15s ease;
}

.cart-sidebar .list-group-item:hover {
    background-color: #f8f9fa;
}

/* Cart totals and buttons */
.cart-sidebar .cart-totals {
    padding: 1.5rem 0 0 0;
    border-top: 1px solid #dee2e6;
    background-color: #fff;
    margin-top: 1.5rem;
}

.cart-sidebar .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.15s ease;
    outline: none !important;
    box-shadow: none !important;
    margin-bottom: 0.5rem;
}

.cart-sidebar .btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.cart-sidebar .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.cart-sidebar .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.cart-sidebar .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.cart-sidebar .btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Empty cart and login states */
.cart-sidebar .empty-state {
    padding: 2rem 0;
    text-align: center;
}

.cart-sidebar .empty-state i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Cart badge */
#cart-badge-container {
    position: relative;
    display: inline-block;
}

#cart-badge-container .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    transition: transform 0.15s ease;
}

#cart-badge-container:hover .badge {
    transform: scale(1.1);
}

/* Remove focus styles from all buttons */
.btn:focus,
.btn-close:focus,
.btn-check:focus + .btn {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove outline from all focusable elements */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Custom styles for notification icon */
.header-notification-container {
  position: relative;
  display: inline-block;
}

.header-notification-btn {
  position: relative;
  padding: 0.5rem;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.header-notification-btn:focus {
  box-shadow: none !important;
  outline: none !important;
}

.header-notification-icon {
  background-color: var(--primary-light);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.header-notification-icon:hover,
.header-notification-btn:hover .header-notification-icon {
  background-color: var(--primary-color);
  color: var(--white) !important;
  transform: scale(1.05);
}

.header-notification-icon.active,
.header-notification-btn[aria-expanded="true"] .header-notification-icon {
  background-color: var(--primary-color);
  color: var(--white) !important;
}

.header-notification-icon i {
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

/* Bootstrap Dropdown Menu Styling */
.notification-dropdown-menu {
  max-height: none !important;
  overflow: visible !important;
}

.notification-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-light);
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.notification-item:hover {
  background-color: var(--primary-light) !important;
}

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

.notification-item.bg-light {
  background-color: #f8f9fa;
}

/* Notification count badge */
#notifCount {
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: pulse 2s infinite;
}

#notifCount:empty {
  display: none !important;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Ensure dropdown appears above everything */
.dropdown-menu {
  z-index: 2000 !important;
}

/* Fix z-index hierarchy */
.header-top-bar {
  z-index: 1050;
}

.header-navbar {
  z-index: 1049;
}

.dropdown,
.dropdown-menu {
  z-index: 2000 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .notification-dropdown-menu {
    width: 300px !important;
    max-width: calc(100% - 40px);
    left: auto !important;
    right: 0 !important;
  }
  
  .header-notification-icon {
    width: 32px;
    height: 32px;
  }
  
  .header-notification-icon i {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .notification-dropdown-menu {
    width: 280px !important;
    max-width: calc(100% - 20px);
  }
}

/* Loading spinner animation */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Smooth dropdown animation */
/* REMOVED: display: block !important; and visibility properties from here */
.dropdown-menu {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease-in-out;
  /* Let Bootstrap handle display property */
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  /* Let Bootstrap handle display property */
}

/* Custom scrollbar for notification list */
.notification-list::-webkit-scrollbar {
  width: 6px;
}

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

.notification-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.dropdown {
  position: relative;
  z-index: 2001 !important;
}

/* Ensure the offcanvas sidebar is above the backdrop and always interactive */
.offcanvas {
  z-index: 1202 !important;
}
.offcanvas-backdrop {
  z-index: 1200 !important;
}

/* Universal offset for fixed navbars */
.with-navbar-offset {
  margin-top: var(--navbar-offset, 120px);
  transition: margin-top 0.2s;
}

@media (max-width: 576px) {
  .with-navbar-offset {
    margin-top: 120px;
  }
}

/* Z-INDEX HIERARCHY FIX */
.modal, .modal-backdrop, .offcanvas, .offcanvas-backdrop {
  z-index: 1200 !important;
}
.sidebar-farm-manager, .sidebar-common {
  z-index: 1100 !important;
}
.header-top-bar, .header-navbar {
  z-index: 1050 !important;
}

.modal-backdrop, .offcanvas-backdrop {
  z-index: 1199 !important;
}
.modal, .offcanvas {
  z-index: 1200 !important;
}

.modal.show .modal-dialog {
  z-index: 1201 !important;
}

/* Center modals more prominently */
.modal-dialog {
  display: flex;
  align-items: center;
  min-height: 90vh;
  justify-content: center;
}

/* Make modal a bit narrower for better focus */
.modal-lg {
  max-width: 600px;
}

@media (max-width: 600px) {
  .modal-lg {
    max-width: 95vw;
  }
}

/* Universal Responsive Adjustments */

/* Extra Small Devices (≤576px) */
@media (max-width: 576px) {
  .header-top-bar {
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
  }
  .header-navbar {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
  }
  .main-navbar-burger-arrow {
    top: 0.5rem;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
  }
  .with-navbar-offset {
    margin-top: var(--navbar-offset, 100px);
  }
  .container, .shop-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .shop-title {
    font-size: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  .shop-card {
    margin-bottom: 1rem;
    border-radius: 12px;
  }
}

/* Small Devices (≤768px) */
@media (max-width: 768px) {
  .header-top-bar {
    font-size: 1rem;
  }
  .header-navbar {
    font-size: 1.1rem;
  }
  .shop-title {
    font-size: 1.8rem;
  }
  .shop-card {
    border-radius: 14px;
  }
}

/* Medium Devices (≤992px) */
@media (max-width: 991.98px) {
  .header-top-bar {
    font-size: 1.05rem;
  }
  .header-navbar {
    font-size: 1.15rem;
  }
  .main-navbar-burger-arrow {
    display: flex !important;
  }
  .with-navbar-offset {
    margin-top: var(--navbar-offset, 110px);
  }
  .container, .shop-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .shop-title {
    font-size: 2rem;
  }
}

/* Large Devices (≤1200px) */
@media (max-width: 1200px) {
  .header-top-bar {
    font-size: 1.1rem;
  }
  .header-navbar {
    font-size: 1.2rem;
  }
  .shop-title {
    font-size: 2.2rem;
  }
}

/* Ensure .main-navbar-burger-arrow is hidden by default */
.main-navbar-burger-arrow {
  display: none;
}

.navbar-role-badge {
  position: static !important;
  display: inline-block;
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* Add new push effect styles */
.main-content {
  transition: margin-left 0.3s ease;
  margin-left: 0;
}

.main-content.sidebar-push {
  margin-left: 250px;
}

/* Responsive adjustments for push effect */
@media (max-width: 768px) {
  .main-content.sidebar-push {
    margin-left: 0;
  }
  
  .sidebar-common {
    transform: translateX(-100%);
  }
  
  .sidebar-common.show {
    transform: translateX(0);
  }
}

/* Cart quantity controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.quantity-controls .btn {
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #6c757d;
  margin-bottom: 0;
}

.quantity-controls .btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.quantity-controls .btn:active {
  background: #dee2e6;
  transform: scale(0.95);
}

.cart-qty-display {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0;
}

/* Cart item layout improvements */
.cart-sidebar .list-group-item {
  padding: 1rem 0.5rem;
  border-left: none;
  border-right: none;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: background-color 0.15s ease;
}

.cart-sidebar .list-group-item:hover {
  background-color: #f8f9fa;
}

.cart-sidebar .remove-item {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 50%;
    background: #f1f3f4;
    border: 1px solid #ccc;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    padding: 0;
    margin-left: 0.5rem;
    opacity: 0.85;
    transition: background 0.15s, color 0.15s, border 0.15s, opacity 0.15s;
}

.cart-sidebar .remove-item:hover {
    background: #ffeaea;
    color: #d32f2f;
    border-color: #d32f2f;
    opacity: 1;
}