/* Google Font for Bengali + Clean Typography */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Galada&family=Poppins:wght@200&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Tiro+Bangla:ital@0;1&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans Bengali', sans-serif;
  background: #f5f7fa;
  color: #222;
  padding: 0px;
  line-height: 1.6;
}
/*header*/
#header{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 80px;
    background: #E3E6F3;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    z-index: 999;
    position: sticky;
    top: 0;
    left: 0;
}
#navbar {
    display: flex;
    align-items: center;
    justify-content: center;

    
}
#navbar li{
    list-style: none;
    padding: 0 20px;
    position: relative;
}
#navbar li a {
    font-family: Roboto;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    transition: 0.3s ease;
    text-transform: uppercase;
    
}
#navbar li a:hover,
#navbar li a.active {
    color: #088178;
}
#navbar li a.active::after,
#navbar li a:hover::after{
    content: "";
    width: 30%;
    height: 2px;
    background: #088178;
    position: absolute;
    bottom: -4px;
    left: 20px;
}

/*Home page hero*/
#hero {
    background-image: url(/Assets/banner3.png);
    height: 25vh;
    width: 100%;
    background-position: top 25% right 0%;
    background-size: cover;
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
#hero h4{
    font-family: "Tiro Bangla", serif;
    padding-bottom: 10px;
    font-size: 30px;
    color: white;

}
#hero h1{
    font-family: "Tiro Bangla", serif;
    color: white;
    font-size: 33px;
}
#hero p {
    color: white;
    padding: 10px 0 20px 0;
    font-size: 18px;
}
#hero button {
    background-color: orange;
    color: white;
    border-radius: 50px;
    padding: 10px 80px 14px 65px;
    transition: 0.5s ease;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
}
#hero button:hover{
    background-color: #088178;
}
#mobile {
    display: none;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #1e3a8a;
  font-size: 2rem;
}

/* 🔍 Search and Filter Bar */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}

.controls input,
.controls select {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  width: 250px;
  transition: all 0.3s ease;
}

.controls input:focus,
.controls select:focus {
  border-color: #1d4ed8;
  outline: none;
  box-shadow: 0 0 6px rgba(29, 78, 216, 0.3);
}

/* 📚 Book Grid */
.book-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 2fr));
  gap: 25px;
  justify-content: center;
}

/* 🧾 Book Card Design */
.book-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.book-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* 🏷️ Book Info */
.book-card h3 {
  font-size: 1.1rem;
  color: #1e293b;
  margin-bottom: 5px;
}

.book-card p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 6px;
}
/* 🟢 Stock Status */
.stock {
  font-weight: bold;
  margin: 8px 0;
}

.in-stock {
  color: #2ecc71; /* Green for available */
}

.out-of-stock {
  color: #e74c3c; /* Red for unavailable */
}
.book-img {
  width: 100%;
  height: auto;
  object-fit: cover; /* optional for cropping nicely */
  border-radius: 8px; /* optional for rounded corners */
}

/* 🛒 Button Style */
button {
  background: linear-gradient(45deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(45deg, #10b981, #059669)
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
/* Chat Button */
#chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #000;
  color: #fff;
  padding: 12px 16px;
  border-radius: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Chat Box */
#chat-box {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 360px;
  max-height: 500px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 999;
}

#chat-box.hidden {
  display: none;
}

/* Header */
#chat-header {
  background-color: #f0f2f5;
  color: #000;
  padding: 12px 14px;
  font-weight: bold;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid #ddd;
}

/* Message area */
#chat-messages {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #f9f9f9;
}

/* Message styles */
.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
  position: relative;
}

.message.user {
  align-self: flex-end;
  background-color: #000;
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background-color: #000;
  color: white;
  border-bottom-left-radius: 4px;
}

/* Status text */
.status {
  font-size: 11px;
  color: green;
  margin-top: -2px;
  margin-left: auto;
  margin-right: 4px;
}

/* Input area */
#chat-input {
  border: none;
  border-top: 1px solid #ddd;
  padding: 14px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  background: white;
}

/* 📱 Responsive Tweaks */
@media (max-width: 768px) {
  /* --- 1. Header and Navigation Bar --- */
  #navbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    right: -300px; /* Start off-screen */
    height: 100vh;
    width: 300px;
    background-color: #ffffff;
    box-shadow: 0 40px 60px rgba(0, 0, 0, 0.1);
    padding: 80px 0 0 10px;
    transition: 0.3s ease; /* Smooth slide-in animation */
  }

  /* Style for when the menu is active/open */
  #navbar.active {
    right: 0px;
  }

  #navbar li {
    margin-bottom: 25px;
  }

  /* Show the hamburger menu icon */
  #mobile {
    display: block; /* Use block or flex, not inline */
    align-items: center;
  }

  #mobile i {
    color: #1a1a1a;
    font-size: 24px;
    padding-left: 20px;
    cursor: pointer;
  }


  /* --- 2. Hero Section --- */
  #hero {
    height: 25vh;
    padding: 0 80px;
    background-position: top 30% right 30%;
  }

  #hero h1 {
    font-size: 1.5rem; /* Decrease font size for mobile */
  }

  #hero h2 {
    font-size: 1rem;
  }
  h1 {
    font-size: 1rem;
  }

  .controls input,
  .controls select {
    width: 90%;
  }
  #hero button {
    background-color: orange;
    color: white;
    border-radius: 50px;
    padding: 10px 20px 10px 20px;
    transition: 0.5s ease;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
}
#hero button:hover{
    background-color: #088178;
}

  .book-card img {
    height: 220px;
  }
  .book-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  
    #header {
    padding: 10px 30px;
  }

  #hero {
    height: 25vh;
    padding: 0 80px;
    background-position: top 30% right 30%;
  }
  #hero {
    padding: 0 20px;
    background-position: 55%;
  }
  #hero h1 {
    font-size: 1.5rem; /* Decrease font size for mobile */
  }
  #hero p{
    font-size: 0.8rem;
  }

  #hero h2 {
    font-size: 0.2rem;
  }
  h1 {
    font-size: 1rem;
  }

  .controls input,
  .controls select {
    width: 90%;
  }
  #hero button {
    background-color: orange;
    color: white;
    border-radius: 50px;
    padding: 5px 20px 5px 20px;
    transition: 0.5s ease;
    cursor: pointer;
    font-weight: 700;
    font-size: 8px;
}
#hero button:hover{
    background-color: #088178;
}
  
  .book-card {
    padding: 10px;
  }

  .book-card h3 {
    font-size: 1rem;
  }

  .book-card p {
    font-size: 0.9rem;
  }

  button {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  .book-container {
    grid-template-columns: repeat(2, 1fr); /* still 2 books per row */
    gap: 10px;
  }
}

@media (max-width: 439px) {
  #header {
    padding: 10px 30px;
  }

  #hero {
    height: 20vh;
    padding: 0 80px;
    background-position: top 30% right 30%;
  }
  #hero {
    padding: 0 20px;
    background-position: 55%;
  }
}
