*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins', sans-serif;
}

body{
  background:#fdfdfd;
  color:#333;
}

/* HEADER */
/* LOGO */
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:22px;
  font-weight:600;
}

.logo-circle{
  width:34px;
  height:34px;
  background:#6a5af9;
  color:#fff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}

/* HEADER */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:15px 8%;
  background:#f7f5ff;
  position:sticky;
  top:0;
  z-index:1000;
}

/* NAV */
/* NAV LINKS */
.nav a{
  font-weight:600;              /* bold */
  color:#444;
  text-decoration:none;
  padding:6px 4px;
  transition:color 0.2s ease;
}

/* HOVER */
.nav a:hover{
  color:#6a5af9;                /* pastel primary color */
}

/* ACTIVE (CLICKED / CURRENT PAGE) */
.nav a:active{
  color:#6a5af9;
}

/* OPTIONAL: active page highlight (recommended) */
.nav a.active{
  color:#6a5af9;
}

/* HAMBURGER */
.menu-toggle{
  display:none;
  font-size:26px;
  cursor:pointer;
  user-select:none;
}

/* CART ICON */
.cart-icon{
  cursor:pointer;
  font-size:18px;
}

#cart-count{
  background:#6a5af9;
  color:white;
  border-radius:50%;
  padding:2px 7px;
  font-size:12px;
}

/* CART PANEL */
.cart-panel{
  position:fixed;
  right:-340px;
  top:0;
  width:320px;
  height:100%;
  background:#fff;
  box-shadow:-10px 0 30px rgba(0,0,0,0.15);
  padding:20px;
  transition:0.4s ease;
  z-index:999;
}

.cart-panel.open{
  right:0;
}

.cart-item{
  display:flex;
  justify-content:space-between;
  margin-bottom:12px;
  font-size:14px;
}

.cart-item button{
  background:none;
  border:none;
  color:red;
  cursor:pointer;
}
.checkout-button{
  width:100%;
  margin-top:12px;
  padding:14px;
  border:none;
  border-radius:30px;
  background:#22c55e; /* green = payment */
  color:#fff;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s ease;
}

.checkout-button:hover{
  background:#16a34a;
}
/* ADD TO CART BUTTON */
.book-card button{
  padding:10px;
  width:100%;
  border:none;
  background:#6a5af9;
  color:white;
  border-radius:20px;
  cursor:pointer;
  transition:0.3s;
}

.book-card button.added{
  background:#4CAF50;
}

/* MOBILE */
@media(max-width:768px){
  .menu-toggle{
    display:block;
  }

  .nav{
    position:absolute;
    top:70px;
    left:0;
    width:100%;
    background:#fff;
    display:none;    /* hidden by default */
    flex-direction:column;
    padding:10px 0;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
    z-index:999;
  }

  .nav.open{
    display:flex;    /* show when open */
  }

  .nav a{
    padding:14px 20px;
    font-size:16px;
    border-bottom:1px solid #eee;
  }
}

/* HERO */
/* ===============================
   HERO BASE
================================ */
.hero{
  position:relative;
  min-height:90vh;
  display:flex;
  align-items:center;
  padding:0 8%;
  background:
    linear-gradient(rgba(10,10,25,0.7), rgba(10,10,25,0.7)),
    url("https://images.unsplash.com/photo-1507842217343-583bb7270b66")
    center/cover no-repeat;
  color:#fff;
}

/* CONTENT */
.hero-content{
  max-width:620px;
  opacity:0;
  transform:translateY(16px);
  animation:heroEnter 0.9s ease-out forwards;
}

.hero-badge{
  display:inline-block;
  padding:6px 16px;
  border-radius:20px;
  background:rgba(255,255,255,0.15);
  font-size:13px;
  font-weight:600;
  margin-bottom:18px;
}

.hero-content h1{
  font-size:52px;
  line-height:1.15;
  margin-bottom:18px;
}

.hero-content p{
  font-size:18px;
  color:#e5e5e5;
  line-height:1.6;
}

/* BUTTONS */
.hero-actions{
  margin-top:30px;
  display:flex;
  gap:18px;
}

.btn-primary,
.btn-secondary{
  padding:14px 34px;
  border-radius:30px;
  font-weight:600;
  text-decoration:none;
  display:inline-block;
}

.btn-primary{
  background:#6a5af9;
  color:#fff;
}

.btn-secondary{
  border:1px solid rgba(255,255,255,0.5);
  color:#fff;
}

/* ===============================
   RESPONSIVE BREAKPOINTS
================================ */

/* TABLET */
@media (max-width:1024px){
  .hero{
    min-height:85vh;
    padding:0 6%;
  }

  .hero-content h1{
    font-size:42px;
  }

  .hero-content p{
    font-size:17px;
  }
}

/* MOBILE */
@media (max-width:768px){
  .hero{
    min-height:80vh;
    text-align:center;
    justify-content:center;
  }

  .hero-content{
    max-width:100%;
  }

  .hero-content h1{
    font-size:34px;
  }

  .hero-actions{
    justify-content:center;
    flex-wrap:wrap;
  }
}

/* SMALL MOBILE */
@media (max-width:480px){
  .hero{
    min-height:75vh;
    padding:0 5%;
  }

  .hero-content h1{
    font-size:28px;
  }

  .hero-content p{
    font-size:15px;
  }

  .btn-primary,
  .btn-secondary{
    padding:12px 26px;
    font-size:14px;
  }
}

/* LARGE SCREEN */
@media (min-width:1400px){
  .hero-content h1{
    font-size:58px;
  }
}
@keyframes heroEnter{
  to{
    opacity:1;
    transform:translateY(0);
  }
}


/* FEATURES */
/* ===============================
   CATEGORIES SECTION
================================ */
.categories{
  padding:80px 8%;
  background:#fafbff;
}

.categories h2{
  text-align:center;
  margin-bottom:40px;
  font-size:32px;
  font-weight:600;
}

/* GRID RESPONSIVE */
.category-list{
  max-width:1200px;
  margin:auto;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}

/* CARD */
.category-item{
  background:#fff;
  border-radius:16px;
  padding:22px 24px;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(0,0,0,0.06);
  transition:transform .25s ease, box-shadow .25s ease;
}

.category-item:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 34px rgba(0,0,0,0.12);
}

/* TOP ROW */
.cat-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.cat-icon{
  font-size:26px;
  min-width:30px;
}

.cat-title{
  font-size:18px;
  font-weight:600;
  color:#222;
}

/* INFO */
.cat-info{
  margin-top:12px;
  font-size:15px;
  color:#555;
  line-height:1.6;
  display:none;
}

/* OPEN STATE */
.category-item.active .cat-info{
  display:block;
}

/* ===============================
   RESPONSIVE BREAKPOINTS
================================ */

/* TABLET */
@media (min-width:600px){
  .category-list{
    grid-template-columns:repeat(2,1fr);
  }
}

/* LAPTOP */
@media (min-width:1024px){
  .category-list{
    grid-template-columns:repeat(3,1fr);
  }

  .categories h2{
    font-size:36px;
  }
}

/* LARGE DESKTOP */
@media (min-width:1400px){
  .category-list{
    grid-template-columns:repeat(4,1fr);
  }
}


/* BOOKS */
.books{
  padding:80px 8%;
  background:#fffaf0;
  text-align:center;
}

.book-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:25px;
  margin-top:40px;
}

.book-grid img{
  width:100%;
  border-radius:14px;
  box-shadow:0 10px 20px rgba(0,0,0,0.1);
}

/* CTA */
.cta{
  padding:90px 8%;
  background:linear-gradient(135deg,#e0f4ff,#fde2e4);
  text-align:center;
}

.cta h2{
  font-size:34px;
}

.cta button{
  margin-top:20px;
  padding:14px 34px;
  border:none;
  border-radius:30px;
  background:#6a5af9;
  color:white;
  font-size:16px;
}


/* FEEDBACK SECTION */
.feedback{
  padding:80px 8%;
  background:#ffffff;
  text-align:center;
}

.feedback h2{
  font-size:32px;
  margin-bottom:8px;
}

.feedback-sub{
  color:#666;
  font-size:15px;
  margin-bottom:30px;
}

/* TYPE BUTTONS */
.feedback-types{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:30px;
}

.feedback-types button{
  padding:10px 18px;
  border-radius:20px;
  border:1px solid #ddd;
  background:#f7f7ff;
  cursor:pointer;
  font-weight:500;
  transition:.2s ease;
}

.feedback-types button.active,
.feedback-types button:hover{
  background:#6a5af9;
  color:#fff;
  border-color:#6a5af9;
}

/* FORM */
.feedback-form{
  max-width:520px;
  margin:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.feedback-form input,
.feedback-form textarea{
  padding:14px;
  border-radius:10px;
  border:1px solid #ddd;
  font-size:14px;
}

.feedback-form textarea{
  resize:none;
  height:130px;
}

.feedback-form button{
  margin-top:10px;
  padding:14px;
  border:none;
  border-radius:30px;
  background:#6a5af9;
  color:#fff;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
}

/* RESPONSIVE */
@media(max-width:600px){
  .feedback{
    padding:60px 6%;
  }
}


/* FOOTER */
.footer{
  background:#f7f5ff;
  padding:70px 8% 25px;
  color:#444;
}

.footer-container{
  max-width:1200px;
  margin:auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:40px;
}

/* LOGO */
.footer-logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:20px;
  font-weight:600;
  margin-bottom:12px;
}

.footer-desc{
  font-size:14px;
  line-height:1.6;
  color:#666;
  max-width:280px;
}

/* COLUMNS */
.footer-col h4{
  font-size:16px;
  margin-bottom:14px;
  font-weight:600;
}

.footer-col ul{
  list-style:none;
  padding:0;
}

.footer-col ul li{
  margin-bottom:10px;
}

.footer-col ul li a{
  text-decoration:none;
  color:#555;
  font-size:14px;
  transition:color .2s ease;
}

.footer-col ul li a:hover{
  color:#6a5af9;
}

/* SOCIAL */
.social-links{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.social-links a{
  text-decoration:none;
  color:#555;
  font-size:14px;
  transition:color .2s ease;
}

.social-links a:hover{
  color:#6a5af9;
}

/* BOTTOM */
.footer-bottom{
  margin-top:50px;
  padding-top:20px;
  border-top:1px solid #ddd;
  text-align:center;
  font-size:13px;
  color:#777;
}

/* RESPONSIVE */
@media(max-width:600px){
  .footer{
    padding:60px 6% 25px;
  }
}


/* MOBILE */
@media(max-width:768px){
  .hero{
    grid-template-columns:1fr;
    text-align:center;
  }
  .hero h1{
    font-size:30px;
  }
}


/* ===============================
   BOOK HOVER EFFECT
================================ */
.book-grid img{
  transition:transform 0.4s ease, box-shadow 0.4s ease;
}

.book-grid img:hover{
  transform:translateY(-10px) scale(1.03);
  box-shadow:0 20px 40px rgba(0,0,0,0.15);
}

/* NAV */
.nav a{
  margin:0 14px;
  text-decoration:none;
  color:#555;
  font-weight:500;
}

/* CART ICON */
.cart-icon{
  cursor:pointer;
  font-size:18px;
}

#cart-count{
  background:#6a5af9;
  color:#fff;
  border-radius:50%;
  padding:2px 7px;
  font-size:12px;
  margin-left:4px;
}

/* CART PANEL */
.cart-panel{
  position:fixed;
  right:-340px;
  top:0;
  width:320px;
  height:100%;
  background:#fff;
  box-shadow:-10px 0 30px rgba(0,0,0,0.15);
  padding:20px;
  transition:0.4s ease;
  z-index:999;
}

.cart-panel.open{
  right:0;
}

.cart-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px;
  font-size:18px;
}

/* CART ITEMS */
.cart-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  font-size:14px;
}

.cart-item button{
  border:none;
  background:none;
  color:red;
  cursor:pointer;
}

/* CART FOOTER */
.cart-footer{
  position:absolute;
  bottom:20px;
  width:85%;
}

.checkout-btn{
  width:100%;
  padding:12px;
  background:#6a5af9;
  color:white;
  border:none;
  border-radius:25px;
  margin-top:10px;
}

/* MOBILE */
@media(max-width:768px){
  .nav{
    display:none;
  }
}

/* Cookie consent banner for ads compliance */
.cookie-banner{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:1200;
  background:#1f2937;
  color:#fff;
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.28);
  padding:16px;
}

.cookie-banner.hidden{
  display:none;
}

.cookie-content{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.cookie-content p{
  font-size:14px;
  line-height:1.5;
  max-width:760px;
}

.cookie-content a{
  color:#c7d2fe;
}

.cookie-actions{
  display:flex;
  gap:8px;
}

.cookie-btn{
  border:none;
  border-radius:8px;
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
}

.cookie-btn.reject{
  background:#374151;
  color:#fff;
}

.cookie-btn.accept{
  background:#22c55e;
  color:#082f1a;
}
