/* Poppins font for header */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
body .textbooks-header {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
}

/* Force notification bar to be visible */
.header-top-nav {
  background: #1e3a8a !important;
  padding: 4px 0 !important;
  height: 32px !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-bottom: 1px solid #1e3a8a !important;
  margin: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 5 !important;
}

.textbooks-header {
  background: #fff;
  font-family: "poppins";
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 5;
}
/* Dim overlay for landing content when search dropdown is visible */
.textbooks-landing-content {
  position: relative;
}
.textbooks-landing-content::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.textbooks-landing-content.search-dim::after {
  opacity: 0.6;
  pointer-events: auto;
}

/* Constrain content to 1400px while the bar background spans full width */
.header-top-nav .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.top-nav-left {
  display: flex;
  gap: 10px;
  z-index: 10;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-left: -200px;
}

.top-nav-left:last-child {
  left: 50%;
  transform: translateX(-50%);
  margin-left: 200px;
}

.nav-chevron {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.nav-chevron:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Notification Content */
.notification-content {
  flex: 1;
  text-align: center;
  position: relative;
  height: 24px;
  overflow: hidden;
  margin: 0;
}

/* Ensure no page-level margins/padding create gaps around the bar */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
}
.textbooks-header {
  margin: 0 !important;
}

.notification-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s ease;
}

.notification-slide.active {
  opacity: 1 !important;
  transform: translateX(0);
}

.notification-slide.prev {
  transform: translateX(-100%);
}

.notification-slide span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.notification-slide i {
  color: #d4af37;
}

/* Utility Navigation Bar (White) */
.header-utility-bar {
  background: #fff;
  padding: 10px 0;
  padding-top: 20px;
  font-size: 12px;
}

.header-utility-bar .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.utility-left {
  display: flex;
  gap: 10px;
}

.utility-left a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.utility-left a:hover {
  color: #0066cc;
}

.utility-left i {
  margin-right: 4px;
  color: #666;
}

.utility-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.utility-right a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.utility-right a:hover {
  color: #0066cc;
}

.utility-right i {
  margin-right: 4px;
  color: #666;
}

.account-dropdown {
  position: relative;
}

.account-dropdown a {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Account dropdown menu (simple theme) */
.account-dropdown .dropdown-user-profile {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: none;
  z-index: 60;
}

.account-dropdown.open .dropdown-user-profile {
  display: block;
}

.dropdown-user-profile .dropdown-list > a,
.dropdown-user-profile > li > a,
.dropdown-user-profile a.black-listing-menu,
.dropdown-user-profile .test.black-listing-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 14px;
  color: #111827;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
}

.dropdown-user-profile .dropdown-list > a:hover,
.dropdown-user-profile > li > a:hover,
.dropdown-user-profile a.black-listing-menu:hover {
  background: #d5e6f7;
  border-right: 3px solid #4c6de5;
}

.dropdown-user-profile .divider {
  height: 1px;
  background: #e5e7eb;
  margin: 6px 0;
}
.dropdown-user-profile .yellow-background,
.dropdown-user-profile .yellow-background-secondary {
  display: none;
}

/* Submenus align to left under the item */
.dropdown-user-profile .dropdown-submenu {
  position: relative;
}
.dropdown-user-profile .dropdown-submenu > .dropdown-menu {
  position: absolute;
  top: 0;
  left: -242px;
  margin-left: 6px;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px 0;
  display: none;
  list-style: none;
}
.dropdown-user-profile .dropdown-submenu:hover > .dropdown-menu {
  display: block;
}
/* Keep parent link highlighted while its submenu is open */
.dropdown-user-profile .dropdown-submenu:hover > a,
.dropdown-user-profile .dropdown-submenu:focus-within > a {
  background: #d5e6f7;
  border-right: 3px solid #4c6de5;
}

/* Header Main Section */
.header-main {
  background: #fff;
  padding: 10px 0;
}

.new-tag-header {
  margin: -2px 0 0 4px !important;
  background: red;
  color: #fff;
  border-radius: 15px;
  padding: 2px 5px;
  font-size: 7px;
  top: -6px;
  position: relative;
  font-weight: 600;
  font-family: "Poppins";
}

.header-main .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
}

.header-content {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.header-logo {
  flex-shrink: 0;
  width: 154px;
}

.header-logo a {
  display: block;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-search {
  flex: 1;
  margin: 0 20px;
}

.header-cart {
  flex-shrink: 0;
  width: fit-content;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 0;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.cart-link:hover {
  background: #f8f9fa;
  color: #1e40af;
}

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

.cart-count {
  color: #666;
  font-size: 12px;
}

/* Search Container Styles */
.search-container {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #1e3a8a;
  border-radius: 0; /* Only top corners rounded when dropdown is open */
  overflow: visible; /* Changed from hidden to visible */
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 30;
}

.search-category-btn {
  background: #f8f9fa;
  border: none;
  padding: 10px 16px;
  color: #1e3a8a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-right: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
  font-family: poppins;
}

.search-category-btn:hover {
  background: #e9ecef;
}

.search-category-btn i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.search-category-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 25;
  min-width: 200px;
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}

.search-category-menu.show {
  display: block !important;
  z-index: 25 !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
}

.search-category-menu li {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.search-category-menu li:last-child {
  border-bottom: none;
}

.search-category-menu li:hover {
  background: #f8f9fa;
}

#textbooks_search_input {
  flex: 1;
  border: none;
  padding: 8px 16px;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #333;
  min-width: 0;
  font-family: poppins;
}

#textbooks_search_input::placeholder {
  color: #999;
}

.search-button {
  background: #1e3a8a;
  padding: 12px 16px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  min-width: 48px;
  flex-shrink: 0;
}

.search-button:hover {
  background: #1e40af;
}

.search-button i {
  font-size: 16px;
}

/* Shopping Cart */
.header-cart {
  position: relative;
  flex-shrink: 0;
}

.cart-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #1e3a8a;
  font-size: 24px;
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: red;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal;
  padding: 3px 2px 2px 2px;
}

/* Main Navigation Menu (White) */
.header-navigation {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  z-index: 20; /* Must be above search dropdown (9) and header strips (5) */
}

.header-navigation .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex-wrap: wrap;
}

/* Mega menu removed */
/* Books Mega Menu */
.nav-item.has-mega {
  position: static;
}
.mega-menu {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  max-width: 1200px;
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 50;
}
.nav-item.has-mega:hover > .mega-menu {
  display: block;
}
.mega-inner {
  display: flex;
  gap: 32px;
  padding: 30px 25px;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 48px;
  row-gap: 24px;
  flex: 1;
}
.mega-section {
  margin-bottom: 18px;
}
.mega-col {
  min-width: 0;
}
.mega-title {
  font-weight: 700;
  font-size: 13px;
  color: #000;
  margin-bottom: 10px;
  border-bottom: 3px solid rgb(100, 171, 239);
  padding-bottom: 8px;
  font-family: poppins, serif;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mega-title .icon-star {
  color: #d4af37;
  margin-right: 6px;
}
.mega-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-links li {
  margin: 6px 0;
}
.mega-links a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
}
.mega-links a:hover {
  color: #0066cc;
  text-decoration: underline;
}

/* Apply Lato to headings and items as requested */
.rhf-globalHeader .child_header,
.rhf-globalHeader .dropdown-item.rhf_sub_cat_link,
.mega-title,
.mega-links a {
  font-family: poppins !important;
  letter-spacing: 0.32px;
  font-stretch: normal;
  font-style: normal;
}
.rhf-globalHeader .child_header,
.mega-title {
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  color: #000;
  text-transform: uppercase;
  text-decoration: none !important;
}
.mega-title svg {
  margin-right: 0;
  width: 20px;
  height: 20px;
  vertical-align: text-bottom;
}

/* Content below heading (dropdown items) */
.dropdown-item.rhf_sub_cat_link {
  font-size: 12px !important;
  font-weight: 400;
  line-height: 1.4;
  color: #363636 !important;
  white-space: unset;
  padding: 4px 0;
  display: inline-block;
}

/* Promo side */
.mega-promo {
  max-width: 320px;
  display: flex;
  align-items: stretch;
}
.promo-card {
  background: #f8f9fb;
  border-left: 1px solid #e5e7eb;
  padding: 16px;
  width: 100%;
  text-align: center;
}
.promo-image {
  background-image: url("https://dsd5zvtm8ll6.cloudfront.net/includes/images/books/bn-august-picks.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  height: 260px;
}
.promo-caption {
  margin: 12px 0 8px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}
.promo-button {
  display: inline-block;
  background: #1e3a8a;
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 600;
}
.promo-button:hover {
  background: #1e40af;
}
.promo-dots {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.promo-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
}
.promo-dots .dot.active {
  background: #1f2937;
}

.nav-item {
  padding: 15px 15px;
}

.nav-link {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #0066cc;
}
/* Category bar link typography to match provided spec */
.rhf-category-bar .rhf-nav-link {
  font-size: 14px;
  font-weight: 600;
  font-stretch: normal;
  font-style: normal;
  line-height: 1.18;
  letter-spacing: 0.45px;
  text-transform: none;
  font-family: poppins !important;
}

.nav-separator {
  width: 1px;
  height: 20px;
  background: rgb(100, 171, 239);
  margin: 0 10px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .header-main .container {
    padding: 8px 12px;
  }
  .header-mobile-row {
    display: grid;
    grid-template-columns: 32px 1fr 32px 32px;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  .header-mobile-row .icon-button {
    background: transparent;
    border: 0;
    padding: 6px;
    color: #1e3a8a;
    font-size: 18px;
    position: relative;
  }
  .header-mobile-row .mobile-logo {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    margin-top: -10px;
  }
  .header-mobile-row .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #1e3a8a;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    padding: 2px 5px;
    line-height: 1;
  }
  .mobile-cart {
    position: relative;
  }

  .header-logo {
    display: none;
  }
  .header-cart {
    display: none;
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .header-search {
    max-width: 100%;
    margin: 0;
    width: 100%;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }

  .nav-item {
    padding: 10px 15px;
  }

  .nav-separator {
    display: none;
  }

  .utility-left,
  .utility-right {
    flex-direction: column;
    gap: 15px;
  }

  .notification-content {
    font-size: 10px;
    margin: 0 10px;
  }

  .notification-slide span {
    gap: 4px;
  }

  .top-nav-left {
    gap: 5px;
  }
}

/* Drawer styles */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  font-family: poppins;
}
.mobile-drawer.open {
  transform: translateX(0);
}
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 900;
}
.mobile-drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.no-scroll {
  overflow: hidden;
}
.drawer-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  background: #fff;
  color: #fff;
  padding: 10px 12px;
}
.drawer-logo.center {
  justify-self: center;
  display: inline-flex;
  align-items: center;
}
.drawer-title {
  display: none;
}
.icon-button {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 18px;
}
.drawer-brand {
  background: #f1f5f9;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
}
.drawer-logo {
  display: inline-flex;
  align-items: center;
}
.drawer-body {
  padding-bottom: 0;
}
.drawer-section {
  border-top: 1px solid #e5e7eb;
}
.drawer-section.secondary {
  background: #1e3a8a;
  color: #fff;
  padding-bottom: 8px;
}
.drawer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  font-weight: 600;
}
.drawer-section.secondary .drawer-item {
  justify-content: flex-start;
  gap: 7px;
}
.drawer-accordion {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: poppins;
}
.drawer-accordion.root {
  background: #f3f4f6;
}
.drawer-panel {
  display: none;
}
.drawer-panel.open {
  display: block;
}
/* Ensure panels reliably show when opened on mobile */
.mobile-drawer .drawer-panel.open {
  display: block !important;
}
.drawer-group {
  border-bottom: 1px solid #e5e7eb;
}
.drawer-link {
  display: block;
  padding: 8px 20px 8px 20px;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
}
.drawer-link:hover {
  background: #f9fafb;
}

/* Helpers */
.header-mobile-row {
  display: none;
}
@media (max-width: 1024px) {
  .header-mobile-row {
    display: grid;
    margin-bottom: 20px;
  }
}

/* Hide desktop header nav and top util bars on mobile */
@media (max-width: 1024px) {
  .header-utility-bar {
    display: none;
  }
  .header-navigation {
    display: none;
  }
  .icon-button {
    color: #000;
  }
}

/* JavaScript Effects and Animations */
.textbooks-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-container.focused {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.nav-link.active {
  color: #0066cc;
  font-weight: bold;
}

.cart-badge.pulse {
  animation: pulse 2s infinite;
}

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

.search-category-btn.active:after {
  transform: rotate(180deg);
}

.search-category-menu li a.selected {
  background: #1e3a8a;
  color: #ffffff;
  border-left: 3px solid #ffffff;
}

/* Search category dropdown show/hide */
.search-dropdown:hover .search-category-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Focus states for accessibility */
.search-category-btn:focus {
  outline: 2px solid #1e3a8a;
  outline-offset: 2px;
}

.search-category-menu li a:focus {
  outline: 2px solid #1e3a8a;
  outline-offset: -2px;
}

/* Book card hover effects */
/*.book-card.hovered {*/
/*    transform: translateY(-8px);*/
/*    box-shadow: 0 8px 25px rgba(0,0,0,0.15);*/
/*    transition: all 0.3s ease;*/
/*}*/

/* Search Results Dropdown Styles */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px; /* Only bottom corners rounded to match search bar */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9;
  max-height: 600px;
  overflow-y: auto;
  display: block;
}

.search-results-dropdown.hidden {
  display: none !important;
}

.search-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #666;
}

.search-loader.hidden {
  display: none;
}

.loader-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1e3a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.search-results-list {
  max-height: 550px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

.search-result-item.selected {
  background-color: #e3f2fd;
}

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

.search-result-image {
  width: 70px;
  height: 85px;
  border-radius: 7px;
  margin-right: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.search-result-title {
  font-weight: 600;
  font-size: 15px;
  color: #333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-author {
  font-size: 14px;
  color: #00769e;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-isbn {
  font-size: 13px;
  color: #1c2324;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Courier New", monospace;
}

.search-result-price {
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
}

.search-result-free {
  color: #059669;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Update search container for dropdown positioning */
.search-container {
  position: relative;
}

/* Ensure search input has proper z-index */
#textbooks_search_input {
  position: relative;
  z-index: 1;
}

/* Search button positioning */
.search-button {
  position: relative;
  z-index: 2;
}

/* Category dropdown positioning */
.search-category-menu {
  z-index: 3;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .search-results-dropdown {
    max-height: 400px;
  }

  .search-result-item {
    padding: 10px 12px;
  }

  .search-result-image {
    width: 50px;
    height: 62px;
    margin-right: 12px;
    border-radius: 5px;
  }

  .search-result-title {
    font-size: 13px;
  }

  .search-result-author {
    font-size: 11px;
  }

  .search-result-isbn {
    font-size: 10px;
  }

  .search-result-price {
    font-size: 12px;
  }
}

/* Additional Search Results Styling (moved from landing page) */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.search-result-item {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

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

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-content h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
}

.search-result-content p {
  margin: 0 0 5px 0;
  font-size: 12px;
  color: #666;
}

.search-result-price {
  font-weight: bold;
  color: #e74c3c;
}

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

.no-results {
  padding: 20px;
  text-align: center;
  color: #666;
}

/* Mobile responsive for additional search results */
@media (max-width: 1024px) {
  .search-results {
    position: fixed;
    top: 60px;
    left: 10px;
    right: 10px;
    max-height: 300px;
    overflow-y: auto;
  }
}

@media (max-width: 479px) {
  .header-mobile-row {
    gap: 5px;
  }

  .search-category-btn {
    padding: 10px 7px;
    font-size: 12px;
  }

  .notification-slide {
    font-size: 12px;
  }
}


/* Funpack Dark Accordion for Secondary Section */
.drawer-accordion-dark {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
}

.drawer-accordion-dark .accordion-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.drawer-accordion-dark.open .accordion-icon {
    transform: rotate(180deg);
}

.drawer-panel-dark {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin: 0 12px 8px;
    overflow: hidden;
}

.drawer-panel-dark.open {
    display: block;
}

.drawer-link-dark {
    display: block;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.drawer-link-dark:last-child {
    border-bottom: none;
}

.drawer-link-dark:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* Funpack dropdown in utility bar */
.utility-left .funpack-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.utility-left .funpack-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
}

.utility-left .funpack-toggle i {
    font-size: 10px;
    color: #666;
}

.utility-left .funpack-dropdown:hover .funpack-toggle {
    color: #0066cc;
}

.utility-left .funpack-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 6px 0;
    display: none;
    z-index: 40;
}

.utility-left .funpack-dropdown:hover .funpack-menu {
    display: block;
}

.utility-left .funpack-menu a {
    display: block;
    padding: 6px 14px;
    font-size: 12px;
    color: #111827;
    text-decoration: none;
    white-space: nowrap;
}

.utility-left .funpack-menu a:hover {
    background: #d5e6f7;
    color: #111827;
}

