/* ================= FORCE WHITE BACKGROUND ================= */
.books-body{
    background:#ffffff !important;
    color:#000000;
}

/* FORCE LOGO VISIBILITY */
.force-show{
    opacity:1 !important;
}

/* ================= NAVBAR FIX ================= */
header nav a{
    color:#000000;
}

header nav a:hover,
header nav a.active{
    color:#b74b4b;
    border-bottom:2px solid #b74b4b;
}

/* ================= BOOKS PAGE ================= */
.books-page{
    min-height:100vh;
    padding-top:160px;
    padding-bottom:100px;
    background:#ffffff;
}

/* ================= SERIES LOGOS ================= */
.series-wrapper{
    display:flex;
    justify-content:center;
    gap:35px;
    transition:0.4s ease;
}

.series-wrapper.large{ margin-top:80px; }
.series-wrapper.small{ margin-top:20px; }

.series-logo{
    width:220px;
    height:140px;
    background:#ffffff;
    border-radius:14px;
    box-shadow:0 4px 15px rgba(0,0,0,0.15);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:0.3s ease;
}

.series-wrapper.small .series-logo{
    width:130px;
    height:90px;
}

.series-logo img{
    max-width:85%;
    max-height:85%;
    object-fit:contain;
}

.series-logo.active{
    outline:3px solid #b74b4b;
}

/* ================= FILTER + BOOKS ================= */
.books-layout{
    display:flex;
    gap:30px;
    margin-top:40px;
    padding:0 9%;
}

.books-layout.hidden{ display:none; }

.filters{
    width:220px;
    border-right:1px solid #ccc;
    padding-right:20px;
}

.filters h3{
    margin-bottom:15px;
}

.filter-btn,
.clear-btn{
    width:100%;
    padding:8px;
    margin-bottom:10px;
    background:#fff;
    border:1px solid #999;
    cursor:pointer;
}

.filter-btn.active{
    background:#b74b4b;
    color:#fff;
    border-color:#b74b4b;
}

.clear-btn{
    border-color:#b74b4b;
    color:#b74b4b;
}

/* ================= BOOK CARDS ================= */
.books-area{
    flex:1;
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:20px;
    align-content:flex-start;
}

.book-card{
    background:#f8f8f8;
    border:1px solid #ddd;
    padding:10px;
    display:flex;
    flex-direction:column;
    height:340px;
    cursor:pointer;
    transition:0.25s ease;
}

.book-card:hover{
    transform:translateY(-4px);
    box-shadow:0 6px 18px rgba(0,0,0,0.15);
}

.book-card img{
    width:100%;
    height:210px;
    object-fit:contain;
    background:#ffffff;
}

.book-info{
    margin-top:8px;
    text-align:center;
}

.book-info h4{
    font-size:14px;
    margin-bottom:4px;
}

.book-info p{
    font-size:12px;
    color:#555;
}

/* ================= BOOK POPUP ================= */
.book-popup{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.65);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.book-popup.hidden{ display:none; }

.popup-box{
    background:#ffffff;
    width:720px;
    height:420px;
    display:flex;
    border-radius:10px;
    position:relative;
}

.close-popup{
    position:absolute;
    top:10px;
    right:15px;
    font-size:28px;
    cursor:pointer;
}

.popup-left{
    width:40%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.popup-left img{
    width:90%;
    height:90%;
    object-fit:contain;
}

.popup-right{
    width:60%;
    padding:20px;
}

.popup-price{
    margin:12px 0;
    font-weight:600;
}

.popup-btn{
    padding:10px 18px;
    margin-right:10px;
    border:none;
    background:#b74b4b;
    color:#ffffff;
    cursor:pointer;
}

.popup-btn.secondary{
    background:#444;
}

/* ===== FIX CLOSE BUTTON CLICK ISSUE ===== */

.close-popup{
    z-index:10001;
    pointer-events:auto;
}

.qr-image{
    pointer-events:none;
}


/* QR POSITION – POPUP RIGHT */

.popup-right{
    position:relative;
}

.qr-image{
    position:absolute;
    bottom:20px;
    right:20px;
    width:120px;
    height:120px;

    z-index:10001;        /* 🔥 sabke upar */
    pointer-events:auto; /* 🔥 click allow */
}

/* ================= BOOK CODE SEARCH ================= */

.book-search-bar{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    margin-top:20px;
    margin-bottom:20px;
}

.book-search-bar input{
    width:260px;
    padding:10px;
    border:1px solid #999;
    font-size:14px;
    text-transform:uppercase;
}

.book-search-bar button{
    padding:10px 16px;
    border:none;
    cursor:pointer;
    background:#b74b4b;
    color:#fff;
}

.book-search-bar button.secondary{
    background:#444;
}

/* ===== CART ICON (SVG) ===== */
.cart-link{
  position:relative;
  margin-left:20px;
  display:inline-flex;
  align-items:center;
  vertical-align:middle;
}

.cart-svg{
  width:24px;
  height:24px;
  display:inline-block;
  vertical-align:middle;
  margin-top:-4px;   /* 👈 NAV TEXT KE LEVEL PE LANE KE LIYE */
}

.cart-count{
  position:absolute;
  top:-6px;
  right:-10px;
  background:#b74b4b;
  color:#fff;
  font-size:11px;
  padding:2px 6px;
  border-radius:50%;
  line-height:1;
}

/* ===== ADD TO CART POPUP (BOOKS PAGE) ===== */
.order-popup{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.order-popup.hidden{
  display:none;
}

.order-popup-box{
  background:#fff;
  width:320px;
  padding:20px;
  text-align:center;
  position:relative;
}

.popup-close{
  position:absolute;
  top:-16px;
  right:-16px;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#b74b4b;
  color:#fff;
  font-size:22px;
  line-height:36px;
  cursor:pointer;
}

.order-popup-box img{
  width:120px;
  height:160px;
  object-fit:contain;
}

.popup-actions{
  display:flex;
  justify-content:center;
  gap:20px;
  margin-top:10px;
}

.popup-actions button{
  width:44px;
  height:44px;
  font-size:20px;
  cursor:pointer;
}

.filter-btn.hidden-filter{
  display: none !important;
}