@import url("https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");

/* CRITICAL: Ensure navbar is always visible */
.header-wrapper,
.announcement-bar,
.main-nav {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Color Variables */
:root {
  --primary-dark: #0a5c36;
  --primary: #0f5132;
  --primary-light: #14452f;
  --secondary-dark: #18392b;
  --secondary: #1d2e28;
  --light-accent: #cbd5c0;
  --lightest: #dfe6da;
  --warm-accent: #a68a64;
  --neutral: #b6ad90;
  --light-neutral: #bcb88a;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

a {
  text-decoration: none;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Spectral", serif !important;
}

body {
  background-color: var(--white);
  color: var(--secondary);
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header Wrapper */
.header-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}

/* Page Entry Animation */
.page-entry-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out;
}

.page-entry-animation.play-animation {
  opacity: 1;
  visibility: visible;
}

.page-entry-animation.animation-completed {
  display: none;
}

.logo-animation {
  transform: scale(0);
  animation: logoReveal 1.5s ease-out forwards;
}

@keyframes logoReveal {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.animated-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Announcement Bar */
.announcement-bar {
  background-color: var(--white);
  color: var(--secondary);
  text-align: center;
  padding: 5px;
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 500;
  /* Default visible state */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Hide only for homepage animation */
html.homepage-animation .announcement-bar {
  opacity: 0;
  visibility: hidden;
}

/* Show announcement bar after logo reveal */
.announcement-bar.show-content {
  opacity: 1;
  visibility: visible;
}

.announcement-text {
  /* Remove automatic animation - will be triggered by JavaScript */
  opacity: 1;
  transform: translateY(0);
}

/* Animation class to be added by JavaScript */
.announcement-text.animate-in {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.main-nav {
  background-color: #0f5132;
  position: relative;
  padding: 0;
  color: var(--white);
  /* Default visible state */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Hide only for homepage animation */
html.homepage-animation .main-nav {
  opacity: 0;
  visibility: hidden;
}

.main-nav.show-content {
  opacity: 1;
  visibility: visible;
}

.main-nav.animate-in {
  animation: slideIn 0.5s ease-out 0.3s both;
}

@keyframes fadeBottom {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
  padding: 0 15px;
  position: relative;
}

/* Left Nav*/
.nav-left {
  display: flex;
  gap: 30px;
  transition: all var(--transition-speed) ease;
  align-items: center;
}

.nav-left a {
  font-size: 18px;
  text-align: center;
}

.nav-link {
  color: var(--lightest);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
  display: inline-block;
}

.nav-link .link-text {
  position: relative;
  z-index: 2;
}

.nav-link .link-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--lightest);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover .link-underline,
.nav-link.active .link-underline {
  width: 100%;
}

.nav-link.active {
  color: var(--white);
  font-weight: 600;
}

/* Center Navigation */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 10;
}

.logo-container {
  display: block;
  padding: 10px;
  transition: transform 0.3s ease;
}

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

.logo {
  height: 60px;
  width: auto;
  filter: invert(1);
}

/* Right Navigation */
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Search Container and Toggle */
.search-container {
  width: auto;
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1;
}

.search-toggle {
  background: none;
  border: none;
  color: var(--lightest);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  z-index: 5;
}

.search-toggle:hover {
  background-color: var(--primary-dark);
}

.search-toggle.active {
  color: var(--white);
  background-color: var(--primary-dark);
}

.search-toggle .icon {
  color: var(--lightest);
  transition: color 0.3s ease, transform 0.3s ease;
}

.search-toggle:hover .icon {
  color: var(--white);
  transform: scale(1.1);
}

/* Desktop Search Box */
.desktop-search-box {
  position: absolute;
  top: 50px;
  right: -10px;
  width: 300px;
  height: 55px;
  background-color: var(--primary);
  border: 1px solid var(--lightest);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  display: flex;
  gap: 10px;
}

.desktop-search-box.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Desktop Search Box Input Styling */
.desktop-search-box .search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--light-accent);
  border-radius: 20px;
  font-size: 12px;
  background-color: var(--white);
  transition: all 0.3s ease;
  font-family: "Spectral", serif;
}

.desktop-search-box .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 81, 50, 0.1);
}

.desktop-search-box .search-btn {
  background-color: var(--lightest);
  color: var(--primary-dark);
  border: none;
  border-radius: 20px;
  padding: 5px 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
}

.desktop-search-box .search-btn:hover {
  background-color: var(--primary-dark);
  color: var(--lightest);
  transform: translateY(-1px);
}

/* Mobile Search Box */
.mobile-search-box {
  width: 100%;
  background-color: var(--primary-light);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 90;
}

.mobile-search-box.active {
  padding: 10px 15px;
  max-height: 60px;
  opacity: 1;
  visibility: visible;
}

/* Search Input and Button Styling */
.search-input {
  padding: 8px 15px;
  border: 1px solid var(--light-accent);
  border-radius: 20px;
  font-size: 14px;
  width: 100%;
  background-color: var(--white);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(15, 81, 50, 0.3);
}

/* Mobile search button styling */
.mobile-search-box .search-btn {
  background-color: var(--light-accent);
  color: var(--primary-dark);
  font-weight: 500;
}

.mobile-search-box .search-input {
  border: none;
}

/* Mobile Products Dropdown */
.mobile-products-dropdown {
  width: 100%;
  background-color: var(--primary-dark);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 90;
  margin-top: 0;
}

.mobile-products-dropdown.active {
  padding: 0;
  max-height: 200px;
  opacity: 1;
  visibility: visible;
}

.mobile-dropdown-item {
  display: block;
  padding: 15px 40px;
  color: var(--lightest);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  text-align: left;
}

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

.mobile-dropdown-item:hover {
  background-color: var(--secondary-dark);
  color: var(--white);
}

.mobile-dropdown-item:active {
  background-color: var(--primary);
}

/* Hide mobile products dropdown on desktop */
@media (min-width: 993px) {
  .mobile-products-dropdown {
    display: none;
  }
}

/* Icon Styling */
.icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.icon-wrapper:hover {
  background-color: var(--primary-dark);
}

.icon {
  color: var(--lightest);
  transition: color 0.3s ease, transform 0.3s ease;
}

.icon-wrapper:hover .icon {
  color: var(--white);
  transform: scale(1.1);
}

.icon-effect {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--primary-dark);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon-wrapper:hover .icon-effect {
  transform: scale(0.8);
  opacity: 0.3;
}

/* Badge */
.badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--warm-accent);
  color: var(--white);
  font-size: 10px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(166, 138, 100, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(166, 138, 100, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(166, 138, 100, 0);
  }
}

/* Notification Dropdown */
.notification-container {
  position: relative !important;
}

.notification-dropdown {
  position: absolute !important;
  top: 50px !important;
  right: -15px !important;
  width: 280px !important;
  max-width: 90vw !important;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(15, 81, 50, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #cbd5c0 !important;
  padding: 0 !important;
  z-index: 1500 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(15px) scale(0.95) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  overflow: hidden !important;
}

.notification-dropdown::before {
  content: "" !important;
  position: absolute !important;
  top: -8px !important;
  right: 25px !important;
  width: 16px !important;
  height: 16px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5c0 !important;
  border-bottom: none !important;
  border-right: none !important;
  transform: rotate(45deg) !important;
  z-index: 1 !important;
}

.notification-dropdown.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
}

.dropdown-header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  ) !important;
  color: var(--white) !important;
  padding: 12px 16px !important;
  margin: 0 !important;
  border: none !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.dropdown-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="60" cy="70" r="1" fill="rgba(255,255,255,0.06)"/><circle cx="30" cy="80" r="2.5" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.6;
}

.dropdown-header h3 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.dropdown-header h3::before {
  font-size: 12px;
  opacity: 0.9;
}

.dropdown-header .mark-read {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: none;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.dropdown-header .mark-read:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

#notificationList {
  max-height: 240px !important;
  overflow-y: auto !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 6px !important;
}

#notificationList::-webkit-scrollbar {
  width: 4px !important;
}

#notificationList::-webkit-scrollbar-track {
  background: transparent !important;
}

#notificationList::-webkit-scrollbar-thumb {
  background: #cbd5c0 !important;
  border-radius: 2px !important;
}

#notificationList::-webkit-scrollbar-thumb:hover {
  background: #b6ad90 !important;
}

#notificationList li {
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(203, 213, 192, 0.2) !important;
  position: relative !important;
  transition: all 0.3s ease !important;
  background: transparent !important;
  cursor: pointer !important;
  margin: 2px 0 !important;
}

#notificationList li:last-child {
  border-bottom: none !important;
}

#notificationList li:hover {
  background: linear-gradient(
    135deg,
    #dfe6da 0%,
    rgba(203, 213, 192, 0.3) 100%
  ) !important;
  transform: translateX(3px) !important;
  padding-left: 3px !important;
}

#notificationList li.unread {
  background: linear-gradient(
    135deg,
    rgba(15, 81, 50, 0.03) 0%,
    rgba(203, 213, 192, 0.08) 100%
  ) !important;
  border-left: 3px solid #0f5132 !important;
  margin-left: 3px !important;
  padding-left: 3px !important;
}

#notificationList li.unread::after {
  content: "" !important;
  position: absolute !important;
  right: 14px !important;
  top: 12px !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #a68a64 0%, #c49060 100%) !important;
  box-shadow: 0 0 6px rgba(166, 138, 100, 0.4) !important;
  animation: pulse-notification 2s infinite !important;
}

@keyframes pulse-notification {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.notification-content {
  display: block;
  width: 100%;
  overflow: hidden;
}

.notification-item,
.read {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1d2e28 !important;
  line-height: 1.3 !important;
  margin-bottom: 4px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 220px !important;
}

.notification-message {
  font-size: 12px !important;
  color: #0f5132 !important;
  line-height: 1.4 !important;
  margin-bottom: 4px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  max-height: 2.8em !important;
  font-weight: 400 !important;
}

.notification-time {
  font-size: 10px !important;
  color: #b6ad90 !important;
  opacity: 0.8 !important;
  font-weight: 400 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#notificationList li small {
  display: block !important;
  color: #b6ad90 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  opacity: 0.8 !important;
  font-weight: 400 !important;
}

.no-notifications {
  padding: 30px 16px !important;
  text-align: center !important;
  color: #b6ad90 !important;
  font-style: italic !important;
  font-size: 12px !important;
  background: linear-gradient(
    135deg,
    rgba(203, 213, 192, 0.1) 0%,
    rgba(223, 230, 218, 0.1) 100%
  ) !important;
}

.no-notifications::before {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
  opacity: 0.6;
}

.dropdown-footer {
  padding: 10px 16px;
  background: linear-gradient(
    135deg,
    rgba(203, 213, 192, 0.1) 0%,
    rgba(223, 230, 218, 0.2) 100%
  );
  border-top: 1px solid rgba(203, 213, 192, 0.3);
  text-align: center;
}

.dropdown-footer .view-all-link {
  color: #0f5132 !important;
  text-decoration: none !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  border-radius: 16px !important;
  background: rgba(15, 81, 50, 0.1) !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
  font-family: "Spectral", serif !important;
}

.dropdown-footer .view-all-link:hover {
  background: #0f5132 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(15, 81, 50, 0.3) !important;
}

/* Mobile Responsive Design */
@media (max-width: 992px) {
  .notification-dropdown {
    position: fixed;
    top: 80px !important;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: 350px;
    margin: 0 auto;
    z-index: 1001;
  }

  .notification-dropdown::before {
    display: none;
  }

  .dropdown-header {
    padding: 12px 14px;
  }

  .dropdown-header h3 {
    font-size: 13px;
  }

  .dropdown-header .mark-read {
    font-size: 9px;
    padding: 3px 7px;
  }

  #notificationList {
    max-height: 220px;
    padding: 4px 0;
  }

  #notificationList li {
    padding: 9px 12px;
  }

  .notification-title {
    font-size: 11px;
    max-width: 200px;
  }

  .notification-message {
    font-size: 10px;
  }

  .notification-time {
    font-size: 8px;
  }

  .dropdown-footer {
    padding: 8px 14px;
  }

  .dropdown-footer .view-all-link {
    font-size: 10px;
    padding: 5px 10px;
  }
}

@media (max-width: 768px) {
  .notification-dropdown {
    left: 5px;
    right: 5px;
    top: 75px !important;
    max-width: 320px;
  }

  .dropdown-header {
    padding: 10px 12px;
  }

  .dropdown-header h3 {
    font-size: 12px;
  }

  #notificationList {
    max-height: 200px;
  }

  #notificationList li {
    padding: 8px 10px;
  }

  .notification-title {
    font-size: 10px;
    max-width: 180px;
  }

  .notification-message {
    font-size: 9px;
  }

  .dropdown-footer {
    padding: 7px 12px;
  }
}

@media (max-width: 576px) {
  .notification-dropdown {
    left: 8px;
    right: 8px;
    top: 70px !important;
    border-radius: 8px;
    max-width: 300px;
  }

  .dropdown-header {
    padding: 8px 10px;
  }

  .dropdown-header h3 {
    font-size: 11px;
  }

  .dropdown-header .mark-read {
    font-size: 8px;
    padding: 2px 6px;
  }

  #notificationList {
    max-height: 180px;
  }

  #notificationList li {
    padding: 6px 8px;
  }

  #notificationList li:hover {
    transform: none;
    padding-left: 8px;
  }

  .notification-title {
    font-size: 9px;
    max-width: 160px;
  }

  .notification-message {
    font-size: 8px;
  }

  .notification-time {
    font-size: 7px;
  }

  .dropdown-footer {
    padding: 6px 10px;
  }

  .dropdown-footer .view-all-link {
    font-size: 9px;
    padding: 4px 8px;
  }
}

/* Profile Container */
.profile-container {
  position: relative;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--lightest);
  transition: all 0.3s ease;
  padding: 5px 8px;
  border-radius: 25px;
}

.profile-link:hover {
  background-color: var(--primary-dark);
}

.profile-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--light-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: bold;
  transition: transform 0.3s ease;
  overflow: hidden; /* Ensure image is clipped to circle */
}

.profile-link:hover .profile-avatar {
  transform: scale(1.1);
}

/* Constrain avatar image to tiny circular container */
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-name {
  padding: 0 5px;
  font-size: 16px;
  font-weight: 500;
}

.dropdown-menu {
  position: absolute;
  top: 45px;
  right: 0;
  width: 200px;
  background-color: var(--primary);
  border: 1px solid var(--light-accent);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

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

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--lightest);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background-color: var(--primary-dark);
  color: var(--lightest);
}

/* Login Link */
.login-link {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--light-accent);
  color: var(--primary-dark);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.login-link:hover {
  background-color: var(--lightest);
  transform: translateY(-2px);
}

/* Cart Link Styles */
.cart-link {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  position: relative;
  transition: all 0.3s ease;
  text-decoration: none;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--lightest);
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 5px;
}

.mobile-menu-toggle:hover {
  color: var(--white);
}

.mobile-menu-toggle.active .hamburger-icon {
  color: var(--white);
}

/* Ripple Effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(203, 213, 192, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Show Mobile Dropdown */
.dropdown-menu.show-mobile {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Responsive Styles - IMPROVED */
@media (max-width: 1200px) {
  .nav-left {
    gap: 20px;
  }

  .nav-left a {
    font-size: 16px;
  }

  .profile-name {
    font-size: 14px;
  }
}

/* FIXED RESPONSIVE STYLES FOR ALL BREAKPOINTS */
@media (max-width: 992px) {
  /* Reset the nav-content structure */
  .nav-content {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 15px;
  }

  /* First row: hamburger and right-nav perfectly aligned */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    order: 1;
    margin: 0;
    height: 40px;
  }

  .nav-right {
    display: flex;
    align-items: center;
    order: 2;
    margin-left: auto;
  }

  /* Second row: centered logo */
  .nav-center {
    position: relative;
    left: 0;
    transform: none;
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Nav left should only appear when hamburger is clicked */
  .nav-left {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--primary-light);
    padding: 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    z-index: 100;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
  }

  .nav-left.active {
    max-height: 500px; /* Increased to accommodate Products dropdown */
    opacity: 1;
  }

  /* Hide desktop search box on mobile */
  .desktop-search-box {
    display: none;
  }

  /* Ensure notification dropdown works on mobile */
  .notification-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    z-index: 1500 !important;
  }

  /* Disable hover for profile dropdown */
  .profile-container:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
  }

  .dropdown-menu.show-mobile {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Notification dropdown should also appear below main-nav */
  .notification-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    z-index: 1600;
  }

  /* Profile dropdown should also appear below main-nav */
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    width: 200px;
    border-radius: 0;
    z-index: 99;
  }

  .nav-link {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--primary);
    width: 100%;
    text-align: left;
  }

  .nav-link .link-underline {
    display: none;
  }

  .products-container {
    width: 100%;
  }

  .products-container .nav-link {
    border-bottom: 1px solid var(--primary);
  }

  .logo-container {
    padding: 5px;
  }

  .logo {
    height: 45px;
  }
}

/* Hide mobile search box and products dropdown on desktop */
@media (min-width: 993px) {
  .mobile-search-box {
    display: none;
  }
  .mobile-products-dropdown {
    display: none;
  }
}

/* Apply the same layout to smaller breakpoints */
@media (max-width: 768px) {
  /* Keep the same structure as 992px */
  .nav-content {
    padding: 8px 12px;
  }

  .logo {
    height: 40px;
  }

  .icon-wrapper,
  .search-toggle {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 576px) {
  /* Keep the same structure as 992px */
  .nav-content {
    padding: 6px 10px;
  }

  .logo {
    height: 38px;
  }

  .icon-wrapper,
  .search-toggle {
    width: 32px;
    height: 32px;
  }

  .login-link {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  /* Keep the same structure as 992px */
  .nav-content {
    padding: 5px 8px;
  }

  .logo {
    height: 35px;
  }

  .icon-wrapper,
  .search-toggle {
    width: 30px;
    height: 30px;
  }

  .login-link {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* Products Dropdown Styles */
.products-container {
  position: relative;
}

.products-container .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.dropdown-arrow {
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.products-container:hover .dropdown-arrow {
  opacity: 1;
  transform: rotate(180deg);
}

.products-dropdown {
  position: absolute;
  top: 45px;
  left: 0;
  width: 200px;
  border: 0.5px solid var(--light-accent);
  background-color: var(--primary);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.products-container:hover .products-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.products-dropdown a {
  display: block;
  padding: 10px 15px;
  color: var(--light-accent);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 14px;
}

.products-dropdown a:hover {
  background-color: var(--primary-dark);
  color: var(--lightest);
}

/* Mobile Responsive for Products Dropdown */
@media (max-width: 768px) {
  .products-dropdown {
    width: 180px;
    left: -50px;
  }
}

@media (max-width: 480px) {
  .products-dropdown {
    width: 160px;
    left: -70px;
  }
}

/* Immediate navbar visibility for non-homepage pages */
/* Override animation delays and ensure immediate visibility */
html.non-homepage .announcement-bar,
html.non-homepage .main-nav,
body:not(.homepage-animation) .announcement-bar,
body:not(.homepage-animation) .main-nav {
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

html.non-homepage .announcement-text,
body:not(.homepage-animation) .announcement-text {
  opacity: 1 !important;
  transform: translateY(0) !important;
  animation: none !important;
}

html.non-homepage .page-entry-animation,
body:not(.homepage-animation) .page-entry-animation {
  display: none !important;
}

/* Fallback for all pages - ensure navbar is always visible */
.announcement-bar,
.main-nav {
  opacity: 1;
  visibility: visible;
}

/* Only hide if specifically on homepage with animation class */
html.homepage-animation .announcement-bar,
html.homepage-animation .main-nav {
  opacity: 0;
  visibility: hidden;
}

/* Force search and notification dropdowns to be visible when active */
.desktop-search-box.active,
.notification-dropdown.active {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2000 !important;
  pointer-events: auto !important;
}

/* Ensure proper positioning for desktop */
@media (min-width: 993px) {
  .notification-dropdown {
    position: absolute !important;
    top: 50px !important;
    right: -15px !important;
    left: auto !important;
    width: 280px !important;
    border-radius: 12px !important;
  }

  .desktop-search-box {
    position: absolute !important;
    top: 50px !important;
    right: -10px !important;
    width: 300px !important;
  }
}
