html,
body {
  overflow-x: hidden;
  width: 100%;
}

h2 {
  margin: 0;
}



/* Custom Language Toggle Styles */


.navigation .nav-head {
  text-transform: uppercase;
  color: #0946b2;
  margin: 20px 0;
}

.navigation li a {
  color: #0946b2;
  text-decoration: none;
  display: block;
  padding: 10px;
}

.toggle_switch {
  padding: 5px;
  width: max-content;
  display: flex;
  gap: 5px;
  margin-left: auto;
  align-items: center;
}

.header-nav-style {
  display: grid;
  grid-template-columns: min-content 1fr min-content;
  padding: 5px 10px
}

.search-form {
  margin-left: auto;
  width: 100%;
  max-width: 450px;
  border: none;
}

.search-input {
  border: none;
  width: 100%;
  background: #f0f2f5;
}

.search-input:focus {
  outline: none;
}

.search-bar {
  display: flex;
  border-radius: 10px;
  background: #f0f2f5;
  padding: 5px 10px;
  width: 100%;
}

.main-container {
  display: flex;
  gap: 25px;
  padding: 15px;
  flex: 1;
}

.logo-sitename-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-icon {
  border: none;
}

.sitename {
  display: flex;
  margin: 0;
  height: 100%;
  align-items: center;
  font-size: 25px;
}

.sidebar-navigation {
  display: inline-block;
  width: 80px;
  height: 100%;
  background-color: #313443;
  border-radius: 20px;
}

.sidebar-navigation ul {
  text-align: center;
  color: white;
  padding: 10px;
}

.sidebar-navigation ul li {
  padding: 20px 0;
  cursor: pointer;
  transition: all ease-out 120ms;
  border-radius: 10px;
}

.sidebar-navigation ul li i {
  display: block;
  font-size: 24px;
  transition: all ease 450ms;
}

.sidebar-navigation ul li .tooltip {
  display: inline-block;
  position: absolute;
  background-color: #313443;
  padding: 8px 15px;
  border-radius: 3px;
  margin-top: -26px;
  left: 90px;
  opacity: 0;
  visibility: hidden;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.sidebar-navigation ul li .tooltip:before {
  content: "";
  display: block;
  position: absolute;
  left: -4px;
  top: 10px;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  background-color: inherit;
}

.sidebar-navigation ul li:hover {
  background-color: #22252e;
}

.sidebar-navigation ul li:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.sidebar-navigation ul li.active {
  background-color: #22252e;
}

.sidebar-navigation ul li.active i {
  color: #98d7ec;
}

.nav-data,
.nav-data:hover,
.nav-data:focus {
  color: #ffffff;
  font-size: 20px;
}

.book-container {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  background-color: white;
  transition: 0.3s;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  padding: 15px;
}

.book-container:hover {
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.random-books {
  padding: 10px 0px;
}

.Books {
  padding: 10px 0px;
}

.Discover {
  padding: 10px 0px;
}

.formatslist {
  margin: 0;
  padding: 10px 0px;
}

.filterheader {
  padding: 10px 0px;
}

.title {
  color: #000000;
  font-weight: 700;
}

.right-side-container {
  width: 100%;
}

.main-book-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px;
}

.book-image {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 1/1.4;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

.app-name-part1 {
  color: #ff7174;
}

.app-name-part2 {
  color: #0746b3;
}

.header-right-content {
  display: flex;
  align-items: center;
}

#top_user {
  display: flex;
  gap: 5px;
}


@media (max-width: 1020px) {
  .header-nav-style {
    grid-template-columns: 1fr 1fr;
  }

  .search-form {
    grid-column: 1/-1;
    max-width: 100%;
  }

  .header-right-content {
    grid-column: 2/3;
    grid-row: 1/2;
  }

}

@media (max-width: 560px) {

  .main-book-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 10px;
  }

  .main-container {
    gap: 15px;
    padding: 10px;
  }

  .sidebar-navigation {
    width: 60px;
    border-radius: 15px;
  }

  .nav-data {
    font-size: 16px;
  }

  .title {
    font-size: 12px;
    margin-bottom: 2px;
  }

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

  .book-titles {
    font-size: 20px;
    margin-bottom: 5px;
  }
}

/* New Header Styles */
.new-header-wrapper {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  z-index: 1000;
  position: relative;
}

.header-row-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 20px;
  border-bottom: 1px solid #eee;
}

.search-container-styled {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: none;
  border-radius: 50px;
  padding: 5px 5px 5px 25px;
  width: 100%;
  max-width: 600px;
  flex-grow: 1;
  margin: 0 auto;
  /* Center the search bar */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  /* Enhanced shadow */
}

.search-form-styled {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
  flex-wrap: nowrap;
}

.search-input-styled {
  border: none;
  background: transparent;
  width: 100%;
  padding: 10px;
  outline: none;
  font-size: 18px;
  /* Larger font size */
  color: #333;
  font-weight: 300;
}

.search-input-styled::placeholder {
  color: #888;
  opacity: 1;
}

.search-btn-styled {
  background-color: #222;
  /* Dark button color */
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.2s;
  flex-shrink: 0;
  font-size: 20px;
  margin-left: 10px;
}

.search-btn-styled:hover {
  background-color: #000;
  transform: scale(1.05);
}


.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-search-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
  padding: 10px;
}


.language-section {
  margin: 0;
  display: flex;
  align-items: center;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: auto;
  justify-content: flex-end;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.avatar-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 16px;
}

.username {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.login-btn {
  background-color: #ff7174;
  color: white;
  padding: 8px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
  font-size: 14px;
}

.mobile-search-close {
  display: none;
  background: none;
  border: none;
  color: #555;
  font-size: 18px;
  padding: 0 10px;
  cursor: pointer;
}

.admin-setting-icon {
  display: none;
  color: #555;
  font-size: 18px;
  margin-right: 10px;
  text-decoration: none;
}

.user-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1002;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
}

.user-dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.user-dropdown-content a:hover {
  background-color: #f1f1f1;
  color: #c08486;
}

.user-dropdown-content.show {
  display: block;
}

.login-btn:hover {
  background-color: #ff5b5e;
  color: white;
  text-decoration: none;
}

.header-row-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: #fff;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  overflow: hidden;
}

.nav-scroll-wrapper {
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  display: flex;
  justify-content: center;
  width: 100%;
  scroll-behavior: smooth;
}

.nav-scroll-wrapper::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.main-menu {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  align-items: center;
}

.main-menu li a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.main-menu li a:hover {
  background: rgba(255, 113, 116, 0.08);
  color: #ff7174;
}

.main-menu li.active a {
  background: #ff7174;
  color: white;
}

.nav-scroll-btn {
  background: white;
  border: 1px solid #eee;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: none;
  /* Hidden by default, shown via JS */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ff7174;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nav-scroll-btn:hover {
  background: #ff7174;
  color: white;
  border-color: #ff7174;
}

.nav-scroll-btn.left {
  margin-right: 10px;
}

.nav-scroll-btn.right {
  margin-left: 10px;
}

/* Show buttons when class is added via JS */
.header-row-2.has-overflow .nav-scroll-btn {
  display: flex;
}

.header-row-2.has-overflow .nav-scroll-wrapper {
  justify-content: flex-start;
}

.main-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.main-menu li a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 15px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.main-menu li a:hover {
  background: rgba(255, 113, 116, 0.05);
  color: #ff7174;
}

.main-menu li.active a {
  background: #ff7174;
  color: white;
}

.main-menu li {
  flex-shrink: 0;
  white-space: nowrap;
}

.main-menu li.active a {
  position: relative;
}

.main-menu li.active a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff7174, #ff5b5e);
  border-radius: 2px;
}

.main-menu li a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
}

.main-menu li a:hover {
  color: #ff7174;
  background-color: rgba(255, 113, 116, 0.08);
}

/* 3D Toggle Switch */
.custom-lang-toggle .switch {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 34px;
  margin: 0;
}

.custom-lang-toggle .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-lang-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ff7174;
  /* Theme Red for OFF */
  transition: .4s;
  border-radius: 34px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(255, 255, 255, 0.5);
}

/* Ball with Text Inside */
.custom-lang-toggle .slider:before {
  position: absolute;
  content: "E";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 5px;
  /* User requested 15px for OFF */
  background: radial-gradient(circle at 30% 30%, #fff, #d1d1d1);
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 2;

  /* Text Styling */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff7174;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
}

/* Remove text from track */
.custom-lang-toggle .slider:after {
  content: none;
}

/* ON State */
.custom-lang-toggle input:checked+.slider {
  background-color: #0746b3;
  /* Theme Blue for ON */
}

.custom-lang-toggle input:checked+.slider:before {
  transform: translateX(41px);
  /* Moves horizontally to right: 3px */
  bottom: 4px;
  left: 3px;
  /* User requested 3px for ON */
  content: "\0BA4";
  /* Tamil letter Ta */
  color: #4a90e2;
}

/* Hover effect */
.custom-lang-toggle .switch:hover .slider:before {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-lang-toggle .switch {
    width: 60px;
    height: 30px;
  }

  .custom-lang-toggle .slider:before {
    height: 22px;
    width: 22px;
    font-size: 12px;
  }

  .custom-lang-toggle input:checked+.slider:before {
    transform: translateX(32px);
  }
}

/* Header Right Actions Group */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

@media (max-width: 768px) {
  .header-right-actions {
    gap: 10px;
    order: 3;
  }
}





/* Fix gap between toggle and user profile on tablet */
@media (min-width: 560px) and (max-width: 768px) {
  .header-row-1 {
    gap: 10px !important;
    /* Reduce gap */
    justify-content: space-between;
  }

  .language-section {
    margin-right: 0 !important;
  }

  .user-section {
    margin-left: 0 !important;
  }
}

/* Mobile-specific styles */
/* Mobile (below 768px) */


@media (max-width: 576px) {
  .header-row-1 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
    height: 60px !important;
    background: #fff !important;
    position: relative !important;
    z-index: 1000 !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .desktop-search-container {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 18px;
    color: #333;
    flex-shrink: 0;
    border: none;
  }

  .logo-section {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    flex: 1 !important;
  }

  .logo-section img {
    height: 28px !important;
    width: auto !important;
  }

  .sitename {
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: nowrap;
  }

  .header-right-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .language-section {
    transform: scale(0.8);
    transform-origin: right center;
    margin: 0 !important;
  }

  .user-section {
    display: none !important;
  }
}

.admin-setting-icon {
  display: block;
  order: 2;
  margin-left: 8px;
  margin-right: 0;
  font-size: 16px;
}

.user-section .admin-setting-icon {
  order: 2;
  margin-left: 8px;
}

.user-section .user-profile {
  order: 1;
}

.user-section .login-btn {
  order: 1;
  padding: 6px 15px;
  font-size: 13px;
}

.user-profile .username {
  display: none;
}

.avatar-circle {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.search-container-styled {
  display: flex !important;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.search-form-styled {
  width: 100%;
  display: flex;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 4px 4px 4px 15px;
  align-items: center;
  border: 1px solid #eee;
  box-shadow: none;
}

.search-input-styled {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 0;
  font-size: 14px;
  outline: none;
  color: #333;
}

.search-btn-styled {
  width: 36px;
  height: 36px;
  background: #ff7174;
  color: white;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-search-toggle {
  display: none;
}

/* Ensure mobile search icon is hidden on desktop */
.mobile-search-icon-visual {
  display: none;
}

/* Fix Search Button Color and Size for Desktop */
.search-btn-styled {
  background-color: #ff7174;
  /* Pink color */
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.2s;
  flex-shrink: 0;
  font-size: 18px;
  margin-left: 10px;
}

.search-btn-styled:hover {
  background-color: #ff5b5e;
  transform: scale(1.05);
}

.search-input-styled {
  border: none;
  background: transparent;
  width: 100%;
  padding: 10px;
  outline: none;
  font-size: 16px;
  color: #333;
  font-weight: 400;
}


/* Small Mobile (below 576px) */




/* Very small mobile devices */
@media (max-width: 375px) {


  .mobile-search-toggle {
    padding: 5px 8px;
    font-size: 16px;
  }

  .avatar-circle {
    width: 28px;
    height: 28px;
  }

  .admin-setting-icon {
    font-size: 15px;
    margin-left: 6px;
  }
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.close-modal-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.close-modal-btn:hover {
  color: #ff7174;
}

/* Button Styles */
.vs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ff7174;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 113, 116, 0.3);
}

.vs-btn:hover,
.vs-btn:focus {
  background-color: #ff5b5e;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 113, 116, 0.4);
  text-decoration: none;
}

.vs-btn.style2 {
  background-color: #0746b3;
  box-shadow: 0 4px 10px rgba(7, 70, 179, 0.3);
}

.vs-btn.style2:hover,
.vs-btn.style2:focus {
  background-color: #063a94;
  box-shadow: 0 6px 15px rgba(7, 70, 179, 0.4);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: #fff;
  color: #333;
  border: 1px solid #eee;
  border-radius: 50%;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.icon-btn:hover {
  background-color: #ff7174;
  color: #fff;
  border-color: #ff7174;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 113, 116, 0.3);
}

/* Dropdown adjustments for buttons */
.btn-group .vs-btn {
  border-radius: 30px;
}

.btn-group.open .dropdown-toggle {
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}

.btn-group .dropdown-menu {
  border-radius: 10px;
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

@media (min-width: 769px) {
  .row.display-flex {
    display: flex;
    flex-wrap: wrap;
  }

  .row.display-flex>[class*="col-"] {
    display: flex;
    flex-direction: column;
  }
}

/* Updated Product Details Styles */

/* Left Column - Image Box */
.product-img-box {
  background-color: #f9f0ea;
  /* Light beige/pink background */
  padding: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
}

.product-img-box img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  max-height: 450px;
}

/* Right Column - Details Box */
.product-details-box {
  padding: 10px 20px;
}

.product-rating-review {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 15px;
}

.rating {
  display: flex !important;
  flex-direction: row !important;
  gap: 4px;
  color: #f1c40f;
  justify-content: flex-start;
}

.rating .glyphicon {
  font-size: 18px;
  display: inline-block !important;
}

.rating .glyphicon-star-empty {
  color: #ddd;
}

.review-text {
  color: #666;
  font-size: 14px;
}

.product-title-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
}

.product-title {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.2;
  flex: 1;
  white-space: normal;
  word-wrap: break-word;
}

.wishlist-btn-group {
  flex-shrink: 0;
}

.wishlist-btn-group .icon-btn {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.product-author-section {
  margin-bottom: 20px;
  font-size: 16px;
  color: #555;
}

.author-label {
  font-weight: 600;
  color: #333;
}

.author-link {
  color: #d46b5e;
  /* Reddish brown color */
  text-decoration: none;
  font-weight: 500;
}

.author-link:hover {
  text-decoration: underline;
}

.product-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 15px;
}

.product-availability {
  margin-bottom: 25px;
  font-size: 16px;
}

.product-availability .label {
  font-weight: 700;
  color: #2c3e50;
  padding: 0;
  font-size: 16px;
}

.product-availability .value {
  color: #666;
  margin-left: 10px;
}

/* Actions & Buttons */
.product-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.vs-btn.style-brown {
  background-color: #d46b5e;
  /* The reddish color from image */
  color: #fff;
  border-radius: 30px;
  padding: 12px 35px;
  font-weight: 700;
  text-transform: capitalize;
  /* Or uppercase if preferred */
  font-size: 16px;
  box-shadow: none;
  border: none;
}

.vs-btn.style-brown:hover {
  background-color: #c05a4e;
  color: #fff;
}

.icon-btn.style-brown {
  background-color: #d46b5e;
  color: #fff;
  border: none;
  width: 45px;
  height: 45px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn.style-brown:hover {
  background-color: #c05a4e;
}

/* Meta Info */
.product-meta-info {
  border-top: none;
  /* Removed border as per clean look */
  padding-top: 10px;
}

.meta-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  display: inline-block;
  background: #f0f4f8;
  padding: 8px 20px;
  border-radius: 12px;
}

.meta-row {
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: baseline;
}

.user-state-section {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.user-state-section form {
  display: inline-block;
}

.user-state-section label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #2c3e50;
  background: #fff;
  padding: 15px;
  border-radius: 15px;
  border: 1px solid #eee;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  min-width: 80px;
}

.user-state-section label:hover {
  border-color: #d46b5e;
  color: #d46b5e;
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.user-state-section input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0 !important;
  cursor: pointer;
  accent-color: #d46b5e;
}

.user-state-section span {
  font-size: 14px;
}

.meta-label {
  font-weight: 700;
  color: #2c3e50;
  width: 100px;
  /* Fixed width for alignment */
  flex-shrink: 0;
}

.meta-value {
  color: #666;
}

.tag-link {
  color: #666;
  text-decoration: none;
}

.tag-link:hover {
  color: #d46b5e;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .product-img-box {
    margin-bottom: 20px;
    min-height: auto;
    padding: 20px;
    border-radius: 15px;
  }

  .product-img-box img {
    max-height: 300px;
  }

  .product-title {
    font-size: 24px;
  }

  .product-details-box {
    padding: 0 10px;
  }

  .product-description {
    margin-bottom: 15px;
    font-size: 14px;
    max-height: 80px;
    overflow-y: auto;
  }

  .product-actions {
    gap: 10px;
    margin-bottom: 20px;
  }

  .vs-btn.style-brown {
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
    max-width: none;
  }

  .discussion-btn-container {
    width: 100%;
  }

  .discussion-btn {
    width: 100%;
    max-width: none;
    padding: 10px 20px;
    font-size: 14px;
  }

  .product-meta-info {
    padding-top: 5px;
  }

  .meta-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .meta-row {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .detail-page-container {
    padding-top: 10px;
  }

  .product-img-box {
    padding: 15px;
    background-color: #f9f0ea;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100% !important;
    flex: none;
  }

  .product-img-box img {
    max-height: 280px;
    width: auto;
    max-width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    object-fit: contain;
  }

  .product-details-box {
    padding: 0;
    width: 100% !important;
    flex: none;
  }

  .product-title {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 700;
  }

  .product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-bottom: 25px;
  }

  .product-actions>.vs-btn,
  .product-actions>.btn-group {
    width: 100%;
    margin: 0;
  }

  .discussion-btn-container {
    grid-column: span 2;
    width: 100%;
    margin: 0;
  }

  .vs-btn.style-brown,
  .discussion-btn,
  .btn-group .vs-btn {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    text-align: center;
    justify-content: center;
    border-radius: 12px;
  }

  .meta-row {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
  }

  .meta-label {
    width: 90px;
    font-size: 13px;
    flex-shrink: 0;
    font-weight: 600;
  }

  .detail-page-container .row>[class*="col-"] {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

.product-meta-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 15px;
  margin-top: 20px;
}

.meta-row {
  display: flex;
  flex-direction: row;
  margin-bottom: 8px;
  align-items: baseline;
}

.meta-label {
  width: 120px;
  flex-shrink: 0;
  margin-bottom: 0;
  color: #888;
  font-size: 14px;
  font-weight: 600;
}


/* Sort Dropdown Styles */
.sort-dropdown-btn {
  border-radius: 30px;
  padding: 8px 25px;
  border: 1px solid #eee;
  background: #fff;
  color: #555;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.sort-dropdown-btn:hover,
.sort-dropdown-btn:focus {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: #ff7174;
  color: #ff7174;
  background: #fff;
}

.sort-dropdown-menu {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  min-width: 220px;
  margin-top: 10px;
}

.sort-dropdown-menu>li>a {
  padding: 8px 20px;
  color: #555;
  transition: all 0.2s;
}

.sort-dropdown-menu>li>a:hover {
  background-color: #f9f9f9;
  color: #ff7174;
}

.sort-dropdown-menu>li>a.active-sort {
  font-weight: bold;
  color: #ff7174;
  background: #fff5f5;
}

/* New Book Card Styles */
.book-container {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.book-card-new {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 450px;
  /* Fixed height for consistency */
  display: flex;
  flex-direction: column;
}

.book-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.book-card-img-container {
  height: 60%;
  /* Image takes up top 60% */
  position: relative;
  overflow: hidden;
}

.book-card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.book-card-new:hover .book-card-img-container img {
  transform: scale(1.05);
}

.book-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  pointer-events: none;
}

.book-card-content {
  padding: 20px;
  background: linear-gradient(to bottom, #2b3036, #1a1d21);
  /* Dark background like image */
  color: #fff;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
  color: #ccc;
}

.book-card-author {
  margin: 0;
  font-weight: 500;
}

.book-card-rating {
  color: #FFD700;
}

.book-card-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.badge-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.read-badge {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.format-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-card-btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: #fff;
  color: #333;
  text-align: center;
  border-radius: 25px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.book-card-btn:hover {
  background: #f0f0f0;
  color: #000;
  text-decoration: none;
  transform: scale(1.02);
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-menu-wrapper.active {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.mobile-menu-area {
  position: absolute;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background-color: #fff;
  transition: all 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.mobile-menu-wrapper.active .mobile-menu-area {
  left: 0;
}

.mobile-logo-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
}

.mobile-menu-content {
  padding: 20px 0;
  overflow-y: auto;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-list li a {
  display: block;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
}

.mobile-menu-list li a:hover {
  background-color: #f9f9f9;
  color: #ff7174;
  padding-left: 25px;
}

.mobile-menu-list li.active a {
  background-color: #ff7174;
  color: white;
  border-left: 4px solid #ff5b5e;
}

.mobile-menu-list li.active a:hover {
  background-color: #ff5b5e;
  color: white;
  padding-left: 25px;
}

/* Mobile Auth Buttons */
.mobile-menu-list li a.mobile-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  border-radius: 25px;
  text-decoration: none !important;
  font-weight: 600;
  transition: all 0.3s;
  text-align: center;
  margin-top: 5px;
}

.mobile-menu-list li a.mobile-auth-btn:hover {
  padding-left: 10px;
  /* Override the default hover effect */
}

.mobile-auth-btn.login {
  background-color: #ff7174;
  color: white !important;
  border: 1px solid #ff7174;
}

.mobile-auth-btn.login:hover {
  background-color: #ff5b5e;
}

.mobile-auth-btn.register {
  background-color: transparent;
  color: #ff7174 !important;
  border: 1px solid #ff7174;
}

.mobile-auth-btn.register:hover {
  background-color: #fff0f0;
}

/* Ensure mobile search icon is hidden on desktop */
.mobile-search-icon-visual {
  display: none;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

.pagination .page-item {
  display: inline-block;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 35px;
  padding: 0 10px;
  border-radius: 8px;
  background-color: #fff;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid #eee;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination .page-link:hover {
  background-color: #ff7174;
  color: white;
  border-color: #ff7174;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 113, 116, 0.3);
}

.pagination .page-item.active .page-link {
  background-color: #ff7174;
  color: white;
  border-color: #ff7174;
  box-shadow: 0 4px 8px rgba(255, 113, 116, 0.3);
}

.pagination .page-item.disabled .page-link {
  background-color: #f9f9f9;
  color: #ccc;
  border-color: #eee;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Mobile Menu Media Query */
@media (max-width: 576px) {
  .header-row-2 {
    display: flex !important;
    flex-direction: column;
    padding: 8px 15px 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
  }

  .mobile-menu-toggle.row2-toggle {
    display: none !important;
  }

  .nav-scroll-btn,
  .nav-scroll-wrapper,
  .main-menu {
    display: none !important;
  }
}

/* Stack search and menu in row 2 for tablet/large mobile */
@media (min-width: 577px) and (max-width: 768px) {
  .header-row-2 {
    flex-direction: column;
    gap: 10px;
  }
}

/* Initial Page Loader - Premium Book Animation */
.site-preloader.initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  opacity: 1;
  visibility: visible;
}

.site-preloader.initial-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.site-preloader .preloader-content {
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
}

.loader-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
}

.loader-logo {
  width: 80px;
  height: 80px;
  animation: logoPulse 2s ease-in-out infinite;
}

.loader-site-name {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

.loader-site-name .name-part1 {
  color: #ff7174;
}

.loader-site-name .name-part2 {
  color: #0746b3;
}

/* Book Animation */
.book-loader {
  perspective: 1200px;
  margin: 30px auto;
}

.book-spine {
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 80px;
  background: linear-gradient(180deg, #ff7174 0%, #ff5b5e 100%);
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255, 113, 116, 0.3);
  border-radius: 2px;
}

.book-page {
  position: absolute;
  width: 60px;
  height: 80px;
  background: #fff;
  border: 2px solid #ff7174;
  border-radius: 0 4px 4px 0;
  transform-origin: left center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-left {
  left: 0;
  border-radius: 4px 0 0 4px;
  transform-origin: right center;
  animation: pageFlipLeft 2s ease-in-out infinite;
  background: linear-gradient(90deg, #fff 0%, #f8f9fa 100%);
}

.page-right {
  right: 0;
  animation: pageFlipRight 2s ease-in-out infinite;
  background: linear-gradient(-90deg, #fff 0%, #f8f9fa 100%);
}

.book-page::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #ff7174 20%, #ff7174 80%, transparent 100%);
  opacity: 0.3;
}

.book-page::after {
  content: '';
  position: absolute;
  top: 25px;
  left: 10px;
  right: 15px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #ff7174 20%, #ff7174 80%, transparent 100%);
  opacity: 0.2;
}

.loading-text {
  font-size: 16px;
  color: #555;
  font-weight: 500;
  margin: 30px 0 0 0;
  animation: textPulse 2s ease-in-out infinite;
}

/* AJAX Loader - Simple and Fast */
.ajax-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s ease-out;
}

.ajax-loader.active {
  display: flex;
}

.ajax-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 113, 116, 0.2);
  border-top: 4px solid #ff7174;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Page Animation */
.initial-hidden {
  opacity: 0;
}

.animate-up {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes bookFloat {

  0%,
  100% {
    transform: translateY(0px) rotateY(0deg);
  }

  25% {
    transform: translateY(-10px) rotateY(5deg);
  }

  50% {
    transform: translateY(0px) rotateY(0deg);
  }

  75% {
    transform: translateY(-10px) rotateY(-5deg);
  }
}

@keyframes pageFlipLeft {

  0%,
  100% {
    transform: rotateY(0deg);
    opacity: 1;
  }

  50% {
    transform: rotateY(-180deg);
    opacity: 0.7;
  }
}

@keyframes pageFlipRight {

  0%,
  100% {
    transform: rotateY(0deg);
    opacity: 1;
  }

  50% {
    transform: rotateY(180deg);
    opacity: 0.7;
  }
}

@keyframes textPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

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

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .loader-site-name {
    font-size: 28px;
  }

  .loader-logo {
    width: 60px;
    height: 60px;
  }

  .book-page {
    width: 50px;
    height: 70px;
  }

  .book-spine {
    height: 70px;
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-20px);
  }

  60% {
    transform: translateY(-10px);
  }
}

@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Category Grid Styles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 20px;
}

.category-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 180px;
  text-align: center;
  color: #333;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: #ff7174;
}

.category-icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: #c08486;
  /* Or a color from your palette */
  transition: color 0.3s ease;
}

.category-card:hover .category-icon {
  color: #ff7174;
}

.category-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

/* Rating stars in card */
.category-name .rating {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.category-name .rating .glyphicon {
  font-size: 14px;
}

@media (max-width: 550px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 15px;
  }

  .category-card {
    height: 160px;
    padding: 20px 10px;
  }

  .category-icon {
    font-size: 32px;
    margin-bottom: 10px;
  }

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



/* Discussion Button Styles */
.discussion-btn-container {
  margin: 25px 0;
  display: flex;
  justify-content: flex-start;
}

.discussion-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 35px;
  background: linear-gradient(135deg, #D4917E 0%, #C8897A 100%);
  color: #fff !important;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(37, 117, 252, 0.3);
  border: none;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.discussion-btn:hover {
  background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(37, 117, 252, 0.4);
  text-decoration: none;
}

.discussion-btn:active {
  transform: translateY(-2px) scale(1);
}

.discussion-btn i {
  font-size: 20px;
}

@media (max-width: 768px) {
  .discussion-btn-container {
    justify-content: center;
    margin: 20px 0;
  }

  .discussion-btn {
    padding: 12px 28px;
    font-size: 14px;
  }
}

/* Search Bar Visibility */
.desktop-search-container {
  display: flex !important;
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
}

.mobile-search-container {
  display: none !important;
}

@media (max-width: 768px) {
  .desktop-search-container {
    display: none !important;
  }

  .mobile-search-container {
    display: flex !important;
    width: 100%;
  }

  /* Ensure mobile search looks like desktop */
  .mobile-search-container .search-form-styled {
    background: #fff;
    border-radius: 50px;
    border: none;
    padding: 5px 5px 5px 25px;
  }
}



/* Header Menu Items */
.header-menu-items {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 15px;
}

.header-menu-items li a {
  color: #555;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-menu-items li a:hover {
  color: #333;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
  cursor: pointer;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Discussion Button Styles - Matching View Details */
.discussion-btn-container {
  display: inline-block;
  margin: 0;
}

.discussion-btn {
  display: inline-block;
  padding: 18px 45px;
  background: linear-gradient(135deg, #D4917E 0%, #C8897A 100%);
  color: #FFFFFF !important;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(212, 145, 126, 0.3);
  letter-spacing: 0.5px;
  border: none;
}

.discussion-btn-popup {
  display: inline-block;
  padding: 18px 45px;
  background: #d46b5e;
  color: #FFFFFF !important;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(212, 145, 126, 0.3);
  letter-spacing: 0.5px;
  border: none;
}

.discussion-btn:hover {
  background: linear-gradient(135deg, #C8897A 0%, #B87A6E 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(212, 145, 126, 0.4);
  color: #FFFFFF;
  text-decoration: none;
}

.discussion-btn:active {
  transform: translateY(-1px);
}

.discussion-btn i {
  margin-right: 8px;
}

@media (max-width: 1024px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .discussion-btn-container {
    display: block;
    width: 100%;
    text-align: center;
  }

  .discussion-btn {
    padding: 12px 28px;
    font-size: 14px;
    width: 100%;
    max-width: 250px;
  }
}

/* Read/Unread List View Styles */
.read-unread-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.read-book-card {
  display: flex;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  /* Softer initial shadow */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  /* Smooth transition */
  border: 1px solid rgba(0, 0, 0, 0.05);
  align-items: center;
  padding: 20px;
  position: relative;
}

/* Left border accent - Theme Color */
.read-book-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to bottom, #0946b2, #2980b9);
  /* Gradient accent */
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.read-book-card:hover {
  transform: translateY(-5px) scale(1.01);
  /* Slight lift and scale */
  box-shadow: 0 15px 35px rgba(9, 70, 178, 0.15);
  /* Colored shadow glow */
  border-color: rgba(9, 70, 178, 0.1);
}

.read-book-card:hover::before {
  opacity: 1;
}

.read-book-cover-wrapper {
  flex-shrink: 0;
  width: 90px;
  /* Slightly larger */
  margin-right: 25px;
  position: relative;
}

.read-book-cover-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.read-book-card:hover .read-book-cover-wrapper img {
  transform: scale(1.05) rotate(2deg);
  /* Playful tilt on hover */
}

.read-book-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.read-book-title {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
}

.read-book-title a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.2s ease;
}

.read-book-title a:hover {
  color: #0946b2;
  /* Theme color hover */
}

.read-book-author {
  color: #7f8c8d;
  font-size: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.read-book-comment {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 8px;
  border-left: 3px solid #e0e0e0;
}

.read-book-comment::before {
  content: '\f10d';
  /* Quote icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #0946b2;
  /* Theme color */
  font-size: 14px;
  margin-top: 2px;
}

.read-book-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 5px;
}

.read-book-rating {
  color: #f1c40f;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff9e6;
  padding: 4px 10px;
  border-radius: 20px;
}

.read-status-badge {
  background-color: #e8f6f3;
  color: #27ae60;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Percentage text style from image */
.read-percentage {
  position: absolute;
  right: 100px;
  /* Adjust based on layout */
  font-size: 40px;
  font-weight: 100;
  color: #f0f0f0;
  z-index: 0;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 576px) {
  .read-book-card {
    padding: 15px;
    flex-direction: row;
    /* Keep row even on mobile if possible, or stack if too narrow */
    align-items: flex-start;
  }

  .read-book-cover-wrapper {
    width: 70px;
    margin-right: 15px;
  }

  .read-book-title {
    font-size: 17px;
  }

  .read-book-author {
    font-size: 13px;
  }

  .read-percentage {
    display: none;
  }

  .read-book-comment {
    display: none;
    /* Hide comment on very small screens to save space */
  }

  /* Pagination Styles */
  .pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 40px;
    width: 100%;
  }

  .pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-item {
    display: inline-block;
  }

  .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #555;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    cursor: pointer;
  }

  .page-link:hover {
    background-color: #f8f9fa;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
  }

  .page-item.active .page-link {
    background-color: #ff7174;
    /* Red/Pink accent from image */
    color: #fff;
    border-color: #ff7174;
    box-shadow: 0 4px 10px rgba(255, 113, 116, 0.3);
  }

  .page-item.disabled .page-link {
    background-color: #f9f9f9;
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
  }

  .page-previous .page-link,
  .page-next .page-link {
    font-weight: 700;
    padding: 0 15px;
  }

  /* Responsive Pagination */
  @media (max-width: 576px) {
    .page-link {
      min-width: 35px;
      height: 35px;
      font-size: 14px;
      padding: 0 8px;
    }

    .pagination-list {
      gap: 5px;
    }
  }

  /* Flash Message / Toast Styles - MOVED TO flashmessage.css */
  /* All flash message styles are now in /static/newStyles/css/flashmessage.css */


  /* Detail Page Layout Fixes */
  .detail-page-container {
    padding-top: 20px;
    padding-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto;
  }

  /* Reset layout for Modal to avoid double padding/margins */
  .modal-content .detail-page-container {
    padding: 0;
    margin: 0;
    max-width: 100%;
    width: 100%;
  }

  .modal-content .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  .modal-content .row {
    margin-left: 0;
    margin-right: 0;
  }

  .modal-content .col-lg-6 {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    /* Stack columns in modal */
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Modal Specific Compact Styles */
  .modal-content .product-img-box {
    padding: 10px;
    margin-bottom: 10px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: auto;
  }

  .modal-content .product-img-box img {
    max-height: 160px;
    /* Compact image */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
  }

  .modal-content .product-details-box {
    padding: 0 10px 10px 10px;
  }

  .modal-content .product-title {
    font-size: 18px;
    margin-bottom: 5px;
    line-height: 1.2;
    font-weight: 700;
  }

  .modal-content .product-author-section {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .modal-content .product-rating-review {
    margin-bottom: 5px;
    font-size: 12px;
  }

  .modal-content .product-description {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
    max-height: 60px;
    /* Very strict height limit */
    overflow-y: auto;
    color: #555;
    padding-right: 5px;
  }

  /* Compact Actions in Modal */
  .modal-content .product-actions {
    margin-bottom: 15px;
    gap: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .modal-content .vs-btn,
  .modal-content .discussion-btn,
  .modal-content .btn-group,
  .modal-content .btn-group .vs-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 25px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-transform: capitalize !important;
    letter-spacing: 0 !important;
  }

  .modal-content .discussion-btn-container {
    margin: 0;
    width: 100%;
    grid-column: span 2;
    /* Make discussion button full width or share? Let's make it span 2 if it's the main action */
  }

  /* If we want 3 buttons in a row, we can adjust grid-template-columns */
  /* But usually there's Download, Read, and Discussion. */
  /* Let's try to fit them better */
  .modal-content .product-actions>* {
    grid-column: span 1;
  }

  .modal-content .discussion-btn-container {
    grid-column: span 2;
  }

  .modal-content .discussion-btn i {
    font-size: 16px !important;
  }

  /* User State Section in Modal */
  .modal-content .user-state-section {
    margin-top: 15px;
    margin-bottom: 15px;
    gap: 10px;
    justify-content: center;
  }

  .modal-content .user-state-section label {
    padding: 10px;
    min-width: 70px;
    border-radius: 12px;
    gap: 5px;
  }

  .modal-content .user-state-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .modal-content .user-state-section span {
    font-size: 12px;
  }

  /* Hide less important elements in modal to save space */
  .modal-content .product-meta-info {
    display: none;
  }
}

/* Mobile Modal Specifics */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 10px;
    max-width: 100%;
    width: auto;
  }

  .modal-content {
    padding: 15px !important;
    border-radius: 12px;
  }

  .modal-content .product-img-box img {
    max-height: 140px;
    /* Even smaller on mobile */
  }

  .modal-content .product-title {
    font-size: 16px;
  }

  /* Ensure buttons in mobile modal are side-by-side where possible */
  .modal-content .product-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    display: grid;
  }

  .modal-content .vs-btn,
  .modal-content .discussion-btn,
  .modal-content .btn-group .vs-btn {
    padding: 6px 8px !important;
    font-size: 12px !important;
    height: 36px !important;
    min-height: 36px !important;
    width: 100% !important;
  }
}