
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: var(--transition);
}

.ebook-store {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 0;
}

.page-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.ebook-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/*mobile*/
@media (max-width: 767px) {
  .ebook-grid {
    padding: 0 26px;
  }

  .ebook-card {
    width: 100%;
  }
}


/* Tablet View */
@media (min-width: 768px) and (max-width: 1024px) {
  .ebook-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0 40px;
    width: 100%;
  }

  .ebook-card {
    width: 100%;
  }
}

/* Desktop View */
@media (min-width: 1025px) {
  .ebook-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    width: 80%;
    margin: 1rem auto;
  }
}


.ebook-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  margin: auto;
  
}

.ebook-cover img {
  width: 100%;
  height: 240px;
  border-radius:10px;
  object-fit: cover;
  display: block;
}

.ebook-title {
  padding: 15px 15px 5px;
  color: var(--primary-color);
}

.ebook-tags {
  padding: 0 15px;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 15px;
}

.view-more-btn {
  margin: 0 15px 15px;
  padding: 10px 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.view-more-btn:hover {
  background:#FF0080;
  transform: translateY(-2px);
}

/*the eook tags*/
.free-badge {
  position: absolute;
  top: 12px;
  right: -40px;
  background:var(--primary-color); 
  color: white;
  padding: 4px 40px;
  font-size: 0.75rem;
  font-weight: bold;
  transform: rotate(45deg);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 10;
  pointer-events: none;
}
.ebook-card {
  position: relative; /* Needed so badge stays on card */
}


/* Modal Styles */
/*.modal is shared with pricing plans modal*/

.modal.active {
  display: flex;
  opacity: 1;
}

.modal.active .modal-content {
  transform: scale(1);
}



.modal-cover img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

.modal-body {
  padding: 20px;
}

.modal-body h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.modal-body p {
  margin-bottom: 15px;
}

.modal-body ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 8px;
}

.ebk-whatsapp {
  display: inline-block;
  padding: 12px 24px;
  background-color:var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 15px;
}

.ebk-whatsapp:hover {
  background-color: #FF0080;
  transform: translateY(-2px);
}