/* store.css */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fdfdfd;
  margin: 0;
  color: #333;
}

img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

header {
  background-color: #006d77;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-buttons a {
  background-color: #8eceff;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-buttons a:hover {
  background-color: #7846a7;
  color: #fff;
}

.cart-icon {
  margin-left: auto;
  font-size: 1.2rem;
  cursor: pointer;
}

main {
  padding: 2rem;
}

.store-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 0 1rem;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-wrapper input[type="search"] {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.search-wrapper input[type="search"]:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.4);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #999;
  pointer-events: none;
}

#categoryFilter {
  padding: 0.6rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 1rem;
  background-color: white;
  color: #333;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

.copyright-disclaimer {
  text-align: center;
  background-color: #fff7db;
  border: 2px dashed #facc15;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  font-size: 1rem;
  color: #4b5563;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.copyright-disclaimer h3 {
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #b45309;
  letter-spacing: 1px;
}

.copyright-disclaimer p {
  font-style: italic;
  margin: 0 auto;
  max-width: 800px;
  line-height: 1.6;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.book-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
  text-align: center;
  margin-bottom: 1rem;
}

.book-card .content {
  flex-grow: 1;
}

.book-card .actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.book-card:hover {
  transform: scale(1.02);
}

.book-card img {
  width: 100%;
  max-width: 180px; /* Limits image size */
  height: auto;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.book-card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.book-card .subtitle {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
  text-align: center;
}

.book-card p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.75rem;
}

.book-card button {
  background-color: #1e88e5;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.book-card button:hover {
  background-color: #1565c0;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.actions .pricing {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.actions button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  background-color: #83c5be;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.actions button:hover {
  background-color: #006d77;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
}

.modal-content .close-btn {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #eee;
  margin-top: 3rem;
}
