/* Minimal Ebook Store Styles */
:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2c5aa0;
  --accent-hover: #1e3d6f;
  --card-bg: #ffffff;
  --border: #e5e5e5;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

.cart-count {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-left: 4px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}

.paypal-form {
  margin-top: 1rem;
}

.buy-now-btn {
  background: linear-gradient(180deg, #ffd76e 0%, #ffc439 45%, #f5b400 100%);
  color: #003087;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.buy-now-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.buy-now-btn .paypal-text {
  font-weight: 700;
  font-style: italic;
  color: #003087;
}

.trust-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-note::before {
  content: "🔒";
  font-size: 0.9rem;
}

.payment-logos span {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.5px;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: white;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-top: 1rem;
}

.book-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #eee;
  content-visibility: auto;
}

.book-info {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.book-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.book-author {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.book-price {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.book-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.add-btn {
  width: 100%;
  margin-top: auto;
}

footer {
  background: #fff;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: auto;
}

.about-content,
.cart-content,
.contact-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content h2,
.cart-content h2,
.contact-content h2 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
}

.about-content p {
  margin-bottom: 1rem;
  color: #444;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-item img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item-info {
  flex-grow: 1;
}

.cart-total {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: right;
}

.contact-form {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-info {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.book-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 2rem auto;
  align-items: start;
}

.book-detail img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.book-detail-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.book-detail-info .book-author {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.book-detail-info .book-price {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.book-detail-info .long-desc {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

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

@media (max-width: 700px) {
  .book-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .book-detail img {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }
}
  .nav {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
  }
  nav ul {
    gap: 1.2rem;
  }
  .hero {
    padding: 2.5rem 1rem;
  }
}
