:root{

    --primary:  #008080;
    --secondary: #39d790;

}



/* body */

*{
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}



  /* NAVIGATION LINKS END */

  /*LOGIN PAGE*/
  .main {
    background: #f6f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    height: 85vh;
    margin: 0;
  }
.container h1 {
  font-weight: bold;
  margin: 0;
}
.container h2 {
  text-align: center;
}
.container p {
  font-size: 14px;
  font-weight: 100;
  line-height: 20px;
  letter-spacing: 0.5px;
  margin: 20px 0 30px;
}
.container a {
  color: #333;
  font-size: 14px;
  text-decoration: none;
  margin: 15px 0;
}
.container button {
  border-radius: 20px;
  border: 1px solid #FF4B2B;
  background-color: #FF4B2B;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 80ms ease-in;
}
.container button:active {
  transform: scale(0.95);
}
.container button:focus {
  outline: none;
}
.container button.ghost {
  background-color: transparent;
  border-color: #FFFFFF;
}
.container form {
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  text-align: center;
}
.container input {
  background-color: #eee;
  border: none;
  padding: 12px 15px;
  margin: 8px 0;
  width: 100%;
}
.container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  position: relative;
  overflow: hidden;
  width: 768px;
  max-width: 100%;
  min-height: 480px;
}
.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}
.sign-in-container {
  left: 0;
  width: 50%;
  z-index: 2;
}
.container.right-panel-active .sign-in-container {
  transform: translateX(100%);
}
.sign-up-container {
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}
.container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: show 0.6s;
}
@keyframes show {
  0%, 49.99% {
    opacity: 0;
    z-index: 1;
  }
  50%, 100% {
    opacity: 1;
    z-index: 5;
  }
}
.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}
.container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}
.overlay {
  background: linear-gradient(to right, #ff330f, #FF416C);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
  color: #FFFFFF;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}
.container.right-panel-active .overlay {
  transform: translateX(50%);
}
.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 5px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}
.overlay-left {
  transform: translateX(-20%);
}
.container.right-panel-active .overlay-left {
  transform: translateX(0);
}
.overlay-right {
  right: 0;
  transform: translateX(0);
}
.container.right-panel-active .overlay-right {
  transform: translateX(20%);
}
.social-container {
  margin: 20px 0;
}
.social-container a {
  border: 1px solid #DDDDDD;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 5px;
  height: 40px;
  width: 40px;
}
/* Logged In Message Styling */
.welcome {
  text-align: center;
  font-size: 20px;
  margin-bottom: 20px;
}
.logout-link {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  color: #FF4B2B;
  font-weight: bold;
}

@media (max-width: 768px) {
  .main {
    flex-direction: column;
    height: auto;
    padding: 20px;
  }

  .container {
    width: 100%;
    min-height: auto;
    box-shadow: none;
    border-radius: 0;
  }

  .form-container,
  .sign-in-container,
  .sign-up-container,
  .overlay-container,
  .overlay,
  .overlay-panel {
    position: static;
    width: 100%;
    transform: none !important;
    opacity: 1 !important;
    z-index: auto !important;
    animation: none !important;
    height: auto;
  }

  .container.right-panel-active .sign-in-container,
  .container.right-panel-active .sign-up-container,
  .container.right-panel-active .overlay-container,
  .container.right-panel-active .overlay,
  .container.right-panel-active .overlay-left,
  .container.right-panel-active .overlay-right {
    transform: none;
  }

  .overlay-container {
    display: none;
  }

  .container form {
    padding: 0 20px;
  }

  .container input {
    width: 100%;
  }

  .social-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-container a {
    margin: 5px;
  }

  .container button {
    padding: 10px 30px;
    width: 100%;
  }
}


/*LOGIN PAGE END*/


/*HOME PAGE*/
/* SCROLLING HEADER /

.header {
    font-family: Arial, sans-serif;
    display: flex;
    height: 25vh;
    background-color: #f4f4f4;
    box-sizing: border-box;
 
}
.poster-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 10px;
   
}
.poster-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.poster {
    min-width: 100%;
    height: 100%;
    text-align: center;
}

.poster img{
   width: 100%;
    height: 194px;
}


.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 5px;
}
.arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.left { left: 10px; }
.right { right: 10px; }

/ SCROLLING HEADER END */

.book-category-section {
    width: 90%;
    margin: 20px 40px;
}

.book-cards-container {
    display: flex;
    padding: 10px;
    gap: 10px;
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
}

.book-card {
    min-width: 200px;
    max-width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: none;
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    flex: 1 1 220px;
}

.book-card:hover {
    transform: scale(1.05);
}

.card-img {
    background: white !important;
}

.book-card img {
    width: 100%;
    height: 300px !important;
    border-radius: 5px;
}

.book-card h3 {
    font-size: 16px;
    margin: 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: block;
}

.book-card p {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: block;
}

.book-card a,
.book-card button {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    text-decoration: none;
    color: white;
    background: #007bff;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
}

.book-card a:hover,
.book-card button a:hover {
    background: #0056b3;
}

.add-book-btn {
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 10px 15px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.add-book-btn:hover {
    background: #218838;
}

/*EDITING THE BOOK CARD */
.edit-book-section {
    position: relative;
    padding: 20px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    width: 600px;
    justify-content: center;
    left: 450px;
    line-height: 30px;
    margin-bottom: 20px;
}

.edit-book-section h2 {
    margin-bottom: 30px;
}

/*Input fields*/
.flex {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.input-container {
    display: flex;
    flex-direction: column;
    width: fit-content;
    position: static;
    max-width: 240px;
}

.input-container .label {
    font-size: 0.75rem;
    color: #000000;
    font-weight: 600;
    position: relative;
    top: 0.5rem;
    margin: 0 0 0 7px;
    padding: 0 3px;
    width: fit-content;
    height: 30px;
}

.input-container .input {
    padding: 11px 10px;
    font-size: 0.75rem;
    border: 2px #818CF8 solid;
    border-radius: 5px;
    background: #e8e8e8;
}

.input-container .input:focus {
    outline: none;
}

/*Update and Close buttons*/
.update-button {
    width: fit-content;
    margin: 20px auto;
    padding: 10px 15px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
}

.update-button:hover {
    background-color: #218838;
}

.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

/* ===============================
   RESPONSIVE STYLES
   =============================== */

@media (max-width: 768px) {
 .book-category-section {
    width: 90%;
    margin: 20px 0px;
}

.book-cards-container {
    display: flex;
    padding: 10px 10px 10px 100px; 
    gap: 10px;
    height: auto;
    flex-wrap: nowrap;        /* NO wrapping */
    overflow-x: auto;         /* Allow horizontal scroll if needed */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

.book-card {
    flex: 0 0 220px;          /* Fixed width, no grow or shrink */
    background: #fff;
    border-radius: 10px;
    box-shadow: none;
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.book-card:hover {
    transform: scale(1.05);
}

.card-img {
    background: white !important;
}

.book-card img {
    width: 100%;
    height: 300px !important;
    border-radius: 5px;
}

.book-card h3 {
    font-size: 16px;
    margin: 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: block;
}

.book-card p {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: block;
}

.book-card a,
.book-card button {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    text-decoration: none;
    color: white;
    background: #007bff;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
}

.book-card a:hover,
.book-card button a:hover {
    background: #0056b3;
}

.add-book-btn {
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 10px 15px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.add-book-btn:hover {
    background: #218838;
}

/*EDITING THE BOOK CARD */
.edit-book-section {
    position: relative;
    padding: 20px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    width: 600px;
    justify-content: center;
    left: 450px;
    line-height: 30px;
    margin-bottom: 20px;
}

.edit-book-section h2 {
    margin-bottom: 30px;
}

/*Input fields*/
.flex {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.input-container {
    display: flex;
    flex-direction: column;
    width: fit-content;
    position: static;
    max-width: 240px;
}

.input-container .label {
    font-size: 0.75rem;
    color: #000000;
    font-weight: 600;
    position: relative;
    top: 0.5rem;
    margin: 0 0 0 7px;
    padding: 0 3px;
    width: fit-content;
    height: 30px;
}

.input-container .input {
    padding: 11px 10px;
    font-size: 0.75rem;
    border: 2px #818CF8 solid;
    border-radius: 5px;
    background: #e8e8e8;
}

.input-container .input:focus {
    outline: none;
}

/*Update and Close buttons*/
.update-button {
    width: fit-content;
    margin: 20px auto;
    padding: 10px 15px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
}

.update-button:hover {
    background-color: #218838;
}

.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

/* OPTIONAL: hide scrollbar in WebKit but allow scrolling */
.book-cards-container::-webkit-scrollbar {
    height: 10px;
}

.book-cards-container::-webkit-scrollbar-track {
    background: transparent;
}

.book-cards-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
}

/*HOME PAGE END*/




/*ADD_BOOKS PAGE*/
.form-container2 { 
    width: 60%; 
    margin: auto; 
    padding: 20px; 
    border: 1px solid #ddd; 
    border-radius: 10px; 
}
.flex2{
    display: flex;
    flex-direction: row;
    gap: 1px;
    margin-bottom: 20px;
    justify-content: space-around;
}

.input-container2 {
    display: flex;
    flex-direction: column;
    width: fit-content;
    position: static;
    max-width: 240px;
}
  
.input-container2 .label {
    font-size: 0.75rem;
    color: #000000;
    font-weight: 600;
    position: relative;
    top: 0.5rem;
    margin: 0 0 0 7px;
    padding: 0 3px;
    width: fit-content;
    height: 30px;
}
  
.input-container2 .input {
    padding: 11px 10px;
    font-size: 0.75rem;
    border: 2px #818CF8 solid;
    border-radius: 5px;
    background: #e8e8e8;
    width: 300px;
}
  
.input-container2 .input:focus {
    outline: none;
}

.submit-btn { 
    background-color: var(--secondary); 
    color: white; 
    padding: 10px; 
    border: none; 
    margin-top: 10px; 
    cursor: pointer; 
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
.submit-btn:hover { 
    background-color: #218838; 
}
/*ADD_BOOKS PAGE END*/

/*BOOKS_DETAILS PAGE */
.book-details-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  width: 95%;
  margin: 20px auto;
  padding: 20px;
  overflow-x: auto;
  box-sizing: border-box;
}

.book-details-container > div {
  flex: 0 0 auto;
}

.book-cover {
  width: 250px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.book-info {
  flex: 1 1 auto;
  min-width: 300px;
  max-width: 800px;
  box-sizing: border-box;
}

.author {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.author p, .rating-dtl p {
  font-size: 14px;
  margin-top: 10px;
}

.price-dtl {
  margin: 13px 0;
}

.dtl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.dtl-btns button {
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.bg-primary {
  background-color: var(--primary, #007bff);
  color: white;
  border: none;
}

.bg-primary:hover {
  background-color: #0056b3;
}

.buy-now {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
}

.buy-now:hover {
  background-color: #218838;
}

.book-info-dtl {
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 10px 0;
}

.book-description {
  font-size: 16px;
  margin: 20px 0;
  line-height: 1.5;
  text-align: justify;
  padding-right: 10px;
}

/* Ensure horizontal scroll on small devices */
@media (max-width: 768px) {
  .book-details-container {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }

  .book-info {
    min-width: 300px;
  }
}

/* General styling for the reviews section */
.book-reviews {
  margin: 30px auto;
  width: 80%;
  max-width: 900px;
}

.book-reviews h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.review {
  background-color: #f9f9f9;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.review p {
  font-size: 14px;
  line-height: 1.6;
  margin: 5px 0;
}

.review strong {
  font-weight: bold;
  color: #333;
}

.review .rating {
  font-size: 16px;
  color: #f1c40f;
}

.review .created_at {
  font-size: 12px;
  color: #888;
}

/* Styling for the review submission form */
.review-form {
  margin: 30px auto;
  width: 80%;
  max-width: 900px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.review-form h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.review-form textarea {
  width: 100%;
  height: 120px;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  resize: vertical;
  font-size: 16px;
}

.review-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.review-form button {
  width: 100%;
  padding: 12px;
  background-color: #3498db;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.review-form button:hover {
  background-color: #2980b9;
}

.review-form .error-message {
  color: red;
  font-size: 14px;
  margin-top: 10px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .book-reviews {
      width: 95%;
  }

  .review-form {
      width: 95%;
  }
}

/*BOOKS_DETAILS PAGE END*/

/* BOOKS PAGE */

/* Filters Form */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.filter-form select, 
.filter-form input {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.filter-form button {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.filter-form button:hover {
  background-color: #0056b3;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 10px;
  max-width: 1200px;
  margin: 0 auto;
}


.book-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.book-card {
  width: 200px;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  background: #fff;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.book-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.pagination {
  text-align: center;
  margin-top: 20px;
}

.pagination a {
  padding: 8px 12px;
  margin: 5px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.pagination a.active {
  background: #0056b3;
}


/* BOOKS PAGE END */
/* CART PAGE  */
.cart-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 20px;
  gap: 20px;
}

/* Cart Items Section */
.cart-items {
  flex: 1 1 60%;
  min-width: 300px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #ffffff;
  border-radius: 10px;
  box-shadow: 7px 7px 7px 7px rgba(29, 22, 22, 0.3);
}

.cart-items h2 {
  font-size: 27px;
  margin-bottom: 20px;
}

/* Each cart product */
.cart-card {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cart-card img {
  width: 100px;
  height: 150px;
  object-fit: cover;
}

.cart-details {
  flex: 1;
}

.cart-details h3 a {
  font-size: 20px;
  text-decoration: none;
  color: #333;
}

/* Quantity input */
.cart-card input {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 50px;
}

/* Remove button */
.remove-btn {
  background-color: red;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.remove-btn:hover {
  background-color: #c0392b;
}

/* Summary Section */
.cart-summary {
  flex: 1 1 35%;
  min-width: 280px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid #ffffff;
  border-radius: 10px;
}

.cart-summary h3 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #9f2c1f;
}

.cart-summary a {
  display: inline-block;
  font-size: 18px;
  margin: 10px 0;
  border: 1px solid #000000;
  padding: 10px 20px;
  text-decoration: none;
  color: #fff;
  border-radius: 25px;
  background-color: #0004ff;
  font-weight: bold;
  text-align: center;
}

/* ========== Responsive Styles ========== */
@media screen and (max-width: 768px) {
  .cart-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cart-card img {
    width: 80px;
    height: 120px;
  }

  .cart-card input {
    width: 40px;
  }

  .cart-summary,
  .cart-items {
    width: 100%;
    padding: 20px;
  }

  .cart-summary h3 {
    font-size: 24px;
    text-align: center;
  }

  .cart-summary a {
    width: 100%;
    font-size: 16px;
  }
}

/* CART PAGE END */


/* search */

.suggestionsBox {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  max-width: 300px;
  z-index: 1000;
  font-size: 14px;
}

.suggestionsBox p {
  padding: 10px;
  margin: 0;
  cursor: pointer;
}

.suggestionsBox p:hover {
  background: #f2f2f2;
}


