/* ==========================================================================
   eboibd.site - UI Components
   Buttons, Pinned Cards, Marquee, Book Grids, Lightbox, FAQs, Reviews
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--theme-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(225, 29, 46, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(225, 29, 46, 0.38);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--theme-color);
  border-color: var(--theme-color);
}

.btn-outline:hover {
  background: var(--theme-light);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.2rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* Sales Badge */
.sales-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  background: #fff1f2;
  color: #e11d2e;
  border: 1px solid #ffe4e6;
  width: fit-content;
}

.sales-badge.new {
  background: #eff6ff;
  color: #2563eb;
  border-color: #dbeafe;
}

/* Trust Points */
.trust-points-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  font-size: 12px;
  font-weight: 800;
}

/* Tilted Dark Marquee Strip */
.marquee-container {
  overflow: hidden;
  padding: 24px 0;
  margin: 20px 0 40px 0;
  position: relative;
}

.marquee-strip {
  background: #0f172a;
  color: #f8fafc;
  padding: 14px 0;
  transform: rotate(-1.5deg) scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-red);
}

/* Book Grid on Home */
.book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 640px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .book-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.book-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.book-card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: var(--shadow-hover);
}

.book-card-mockup {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
}

.book-card-mockup img {
  width: 82%;
  height: auto;
  transition: transform var(--transition-smooth);
}

.book-card:hover .book-card-mockup img {
  transform: scale(1.05) rotate(1deg);
}

.book-card-badge-wrap {
  margin-bottom: 10px;
}

.book-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text-main);
  min-height: 52px;
}

.book-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.5;
}

.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
  margin-top: auto;
}

.book-card-price {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--theme-color);
}

.book-card-btn {
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

/* "কেন eboibd" - Pinned Note Cards */
.pinned-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 640px) {
  .pinned-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pinned-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pinned-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 36px 24px 28px 24px;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pinned-card:nth-child(1) { transform: rotate(-1.5deg); }
.pinned-card:nth-child(2) { transform: rotate(1.2deg); }
.pinned-card:nth-child(3) { transform: rotate(-1.8deg); }
.pinned-card:nth-child(4) { transform: rotate(1.5deg); }

.pinned-card:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: var(--shadow-hover);
  z-index: 2;
}

/* Red Push Pin */
.pin-head {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff4b5a, #e11d2e 60%, #900c19 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), inset 0 2px 2px rgba(255, 255, 255, 0.6);
  z-index: 3;
}

.pin-head::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.pinned-card-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}

.pinned-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.pinned-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Steps: "৩ ধাপে কেনা" */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 32px 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--theme-light);
  color: var(--theme-color);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  border: 1px solid var(--theme-border);
}

.step-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.95rem;
}

/* Problem vs Solution Boxes */
.problem-solution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 40px 0;
}

@media (min-width: 768px) {
  .problem-solution-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.comparison-box {
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
}

.problem-box {
  background: #fff5f5;
  border: 1px solid #fed7d7;
}

.problem-box-title {
  color: #c53030;
  font-size: 1.45rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.solution-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.solution-box-title {
  color: #15803d;
  font-size: 1.45rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.comparison-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.problem-icon {
  background: #fee2e2;
  color: #dc2626;
}

.solution-icon {
  background: #dcfce7;
  color: #16a34a;
}

/* Table of Contents */
.toc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}

@media (min-width: 640px) {
  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.toc-card:hover {
  transform: translateY(-2px);
  border-color: var(--theme-color);
}

.toc-num {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--theme-color);
  background: var(--theme-light);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toc-content h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.toc-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Inside Preview Swipe Gallery */
.gallery-wrap {
  position: relative;
  margin: 32px 0;
}

.gallery-scroller {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 4px 20px 4px;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroller::-webkit-scrollbar {
  height: 6px;
}
.gallery-scroller::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gallery-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

@media (min-width: 640px) {
  .gallery-card {
    flex: 0 0 280px;
  }
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery-caption {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: var(--bg-card);
  color: var(--text-main);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Audience "এই বই তোমার জন্য..." */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 32px 0;
}

@media (min-width: 640px) {
  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.audience-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.audience-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--theme-light);
  color: var(--theme-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.audience-card p {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.5;
}

/* Big Offer Box */
.offer-box {
  background: var(--theme-gradient);
  border-radius: var(--radius-xl);
  color: #ffffff;
  padding: clamp(36px, 6vw, 60px) clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-hover);
  position: relative;
  overflow: hidden;
  margin: 48px 0;
}

.offer-box::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.offer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 840px) {
  .offer-inner {
    grid-template-columns: 1fr 1.3fr;
  }
}

.offer-mockup {
  display: flex;
  justify-content: center;
}

.offer-mockup img {
  max-width: 280px;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
}

.offer-details h3 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #ffffff;
  margin-bottom: 16px;
}

.offer-included-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 28px 0;
}

.offer-included-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.95);
}

.offer-included-check {
  background: rgba(255, 255, 255, 0.2);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.offer-price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}

.offer-price-main {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--yellow-marker);
}

.offer-price-note {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.offer-btn {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 1.25rem;
  padding: 16px 36px;
}

.offer-btn:hover {
  background: #f8fafc;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.offer-secure-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.review-buyer-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.review-stars {
  color: #f59e0b;
  font-size: 1rem;
  margin-bottom: 10px;
}

.review-comment {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex-grow: 1;
}

.review-book-tag {
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: auto;
}

/* Friendly Empty State for Reviews */
.reviews-empty-state {
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  max-width: 600px;
  margin: 30px auto;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.reviews-empty-state h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.reviews-empty-state p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* FAQ Accordions */
.faq-wrap {
  max-width: 780px;
  margin: 32px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--theme-color);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  gap: 16px;
}

.faq-question:hover {
  color: var(--theme-color);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-base), background var(--transition-fast), color var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--theme-color);
  color: #ffffff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 24px 22px 24px;
}

.faq-answer p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Mobile Sticky Bottom Bar */
.mobile-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 820px) {
  .mobile-buy-bar {
    display: none;
  }
}

.mobile-buy-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

.mobile-bar-info {
  display: flex;
  flex-direction: column;
}

.mobile-bar-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.mobile-bar-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--theme-color);
}

.mobile-bar-btn {
  padding: 10px 22px;
  font-size: 1rem;
}
