.books-body{
    background:#ffffff !important;
    color:#000000;
}

.force-show{ opacity:1 !important; }

header nav a{ color:#000000; }
header nav a:hover,
header nav a.active{
    color:#b74b4b;
    border-bottom:2px solid #b74b4b;
}

/* PAGE */
.resources-page{
    min-height:100vh;
    padding-top:160px;
    background:#ffffff;
}

/* SEARCH */
.resource-search{
    display:flex;
    justify-content:center;
    gap:12px;
    margin-bottom:40px;
}

.resource-search input{
    width:320px;
    padding:10px;
    border:1px solid #999;
    font-size:14px;
    text-transform:uppercase;
}

.resource-search button{
    padding:10px 18px;
    border:none;
    background:#b74b4b;
    color:#fff;
    cursor:pointer;
}

#clearBtn{ background:#444; }

/* RESULT */
.resource-result{
    display:flex;
    justify-content:center;
}

.resource-card{
    width:320px;
    border:1px solid #ccc;
    padding:15px;
    text-align:center;
}

/* RESOURCE PDF THUMBNAIL – FIX SIZE & FIT */

.resource-card img{
    width:160px;          /* side se kam */
    height:220px;         /* height zyada (rectangle) */
    margin:0 auto 12px;
    display:block;
    object-fit:contain;   /* crop nahi hogi */
    background:#f4f4f4;   /* optional clean bg */
    padding:6px;          /* thoda inner space */
}


.resource-actions button{
    padding:8px 14px;
    margin:6px;
    border:none;
    cursor:pointer;
    background:#b74b4b;
    color:#fff;
}

.resource-actions .secondary{ background:#444; }

/* PDF POPUP */
.pdf-popup{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.75);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:10000;
}

.pdf-popup.hidden{ display:none; }

.pdf-popup-box{
    width:82%;
    height:88%;
    background:#fff;
}

#popupPdfFrame{
    width:100%;
    height:100%;
    border:none;
}

/* 🔴 CLOSE – POPUP SE BAHAR */
.pdf-close-btn{
    position:fixed;
    top:90px;
    right:40px;
    width:46px;
    height:46px;
    background:#b74b4b;
    color:#fff;
    font-size:28px;
    font-weight:bold;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index:20000;
}

.pdf-close-btn.hidden{ display:none; }

/* ===== CART ICON (PNG FINAL FIX) ===== */

.cart-link{
  position:relative;
  margin-left:20px;
  display:inline-flex;
  align-items:center;
  vertical-align:middle;
}

/* 🔥 MAIN FIX — YAHI BUG TODTA HAI */
.cart-png{
  width:24px !important;
  height:24px !important;
  max-width:24px !important;
  max-height:24px !important;
  display:block;
  object-fit:contain;
}

/* COUNT BADGE */
.cart-count{
  position:absolute;
  top:-6px;
  right:-10px;
  background:#b74b4b;
  color:#fff;
  font-size:11px;
  padding:2px 6px;
  border-radius:50%;
  line-height:1;
}


       .resource-options{
            display:flex;
            justify-content:center;
            gap:40px;
            margin-top:60px;
        }

        .resource-card{
            width:250px;
            height:150px;
            background:#fff;
            border-radius:12px;
            display:flex;
            align-items:center;
            justify-content:center;
            font-size:20px;
            font-weight:bold;
            cursor:pointer;
            box-shadow:0 5px 15px rgba(0,0,0,0.2);
            transition:0.3s;
        }

        .resource-card:hover{
            transform:translateY(-5px);
            background:#f0f0f0;
        }

        .hidden{
            display:none;
        }


/* ================= ANSWER KEY SECTION ================= */

#answerKeySection{
    max-width:1200px;
    margin:40px auto;
}

/* Back Button */
.back-btn{
    background:#1a237e;
    color:#fff;
    border:none;
    padding:8px 16px;
    border-radius:6px;
    cursor:pointer;
    margin-bottom:25px;
}

.back-btn:hover{
    background:#0d1b5e;
}

/* ================= SERIES ================= */

#answerSeriesWrapper{
    display:flex;
    justify-content:center;
    gap:35px;
    flex-wrap:wrap;
    margin-bottom:40px;
}

#answerSeriesWrapper .series-logo{
    width:200px;
    height:130px;
    background:#fff;
    border-radius:12px;
    box-shadow:0 5px 18px rgba(0,0,0,0.12);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:0.3s;
}

#answerSeriesWrapper .series-logo img{
    max-width:85%;
    max-height:85%;
    object-fit:contain;
}

#answerSeriesWrapper .series-logo:hover{
    transform:translateY(-5px);
}

#answerSeriesWrapper .series-logo.active{
    outline:3px solid #1a237e;
}

/* ================= BOOK GRID ================= */

#answerBookGrid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:25px;
}

/* Book Card Same As Books Page */

#answerBookGrid .book-card{
    background:#fff;
    border:2px solid #e0e0e0;
    border-radius:12px;
    padding:12px;
    text-align:center;
    cursor:pointer;
    transition:.3s;
}

#answerBookGrid .book-card:hover{
    border-color:#1a237e;
    transform:translateY(-4px);
}

#answerBookGrid .book-card img{
    width:100%;
    height:150px;
    object-fit:contain;
    margin-bottom:10px;
}

/* ===== ANSWER TOP BAR ===== */
.answer-top-bar{
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

/* Heading center */
.answer-heading{
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* Back button left red */
.answer-back-btn{
    position: absolute;
    left: 0;
    top: 0;
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.answer-back-btn:hover{
    background:#b71c1c;
}

.hidden {
    display: none !important;
}