*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Tahoma,Arial,sans-serif;background:#f6f7fb;color:#172033;line-height:1.7}a{text-decoration:none;color:inherit}.container{width:min(1180px,calc(100% - 32px));margin:auto}.site-header{background:#fff;border-bottom:1px solid #e7eaf0;position:sticky;top:0;z-index:20}.header-row{min-height:76px;display:flex;align-items:center;gap:24px}.logo{display:flex;align-items:center;justify-content:center;flex:0 0 170px;min-height:68px;white-space:nowrap;text-decoration:none}.logo small{display:block;font-size:9px;letter-spacing:2px;color:#8992a5}.logo-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#111827;color:#fff}.logo-fallback-text{font-size:18px;font-weight:900}.logo-fallback-text small{margin-top:3px}.search{display:flex;flex:1;max-width:560px}.search input{flex:1;border:1px solid #dfe3eb;border-left:0;border-radius:12px 0 0 12px;padding:12px 15px;font-size:14px;background:#fafbfc}.search button{border:0;background:#111827;color:#fff;padding:0 22px;border-radius:0 12px 12px 0;cursor:pointer}.header-row nav{display:flex;align-items:center;gap:14px;font-size:14px;white-space:nowrap}.cart-badge{background:#e9eefc;color:#3154c7;padding:2px 7px;border-radius:20px}.admin-link{color:#65708a}.hero{padding:60px 0;background:linear-gradient(135deg,#111827,#263552);color:#fff}.hero-grid{display:grid;grid-template-columns:1.4fr .8fr;gap:30px;align-items:center}.hero h1{font-size:clamp(32px,5vw,58px);line-height:1.1;margin:0 0 16px}.hero p{color:#dce2ef;max-width:620px}.hero-card{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);padding:25px;border-radius:22px}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:10px;padding:11px 18px;background:#3154c7;color:#fff;cursor:pointer;font-weight:700}.btn.dark{background:#111827}.btn.light{background:#fff;color:#111827}.btn.danger{background:#c9364b}.section{padding:42px 0}.section-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:20px}.section-head h2{margin:0;font-size:25px}.muted{color:#7b8497}.category-row{display:flex;gap:10px;flex-wrap:wrap}.category-pill{padding:10px 15px;background:#fff;border:1px solid #e2e6ed;border-radius:999px}.product-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.product-card{background:#fff;border:1px solid #e8eaf0;border-radius:16px;overflow:hidden;transition:.2s}.product-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(25,36,61,.08)}.cover{aspect-ratio:3/4;background:#eef1f6;overflow:hidden;position:relative}.cover img{width:100%;height:100%;object-fit:cover}.sale{position:absolute;top:10px;right:10px;background:#c9364b;color:#fff;border-radius:7px;padding:3px 8px;font-size:12px}.product-info{padding:11px}.product-info h3{margin:0 0 5px;font-size:15px;line-height:1.55}.author{color:#778197;font-size:13px;min-height:22px}.price{display:flex;gap:9px;align-items:center;margin-top:10px;font-weight:900}.price s{font-size:12px;color:#9aa2b1;font-weight:400}.card-actions{display:flex;gap:8px;margin-top:12px}.card-actions .btn{flex:1;font-size:12px;padding:9px 8px}.detail{padding:45px 0}.detail-grid{display:grid;grid-template-columns:340px 1fr;gap:40px;align-items:start}.detail-cover{border-radius:20px;overflow:hidden;background:transparent;align-self:start;height:max-content}.detail-cover img{width:100%;height:auto;display:block}.detail h1{font-size:38px;margin:0 0 8px}.meta-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:22px 0}.meta{background:#fff;border:1px solid #e7eaf0;padding:11px 14px;border-radius:10px}.buy-box{background:#fff;border:1px solid #e7eaf0;border-radius:16px;padding:18px;display:flex;gap:12px;align-items:center;justify-content:space-between}.qty{width:90px;padding:11px;border:1px solid #dfe3eb;border-radius:9px}.notice{padding:14px 16px;border-radius:10px;background:#e9f7ee;color:#176a38;margin:15px 0}.notice.error{background:#fff0f0;color:#a72535}.cart-table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}.cart-table th,.cart-table td{padding:14px;border-bottom:1px solid #edf0f4;text-align:right}.cart-product{display:flex;align-items:center;gap:12px}.cart-product img{width:60px;height:78px;object-fit:cover;border-radius:7px}.summary{background:#fff;border:1px solid #e5e8ef;border-radius:16px;padding:20px;max-width:420px;margin-top:20px;margin-right:auto}.summary-row{display:flex;justify-content:space-between;padding:8px 0}.summary-row.total{border-top:1px solid #e5e8ef;font-weight:900;font-size:19px;margin-top:8px}.form-card{background:#fff;border:1px solid #e5e8ef;border-radius:16px;padding:24px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.field{margin-bottom:14px}.field.full{grid-column:1/-1}.field label{display:block;font-weight:700;margin-bottom:6px}.input,.select,.textarea{width:100%;padding:12px;border:1px solid #dfe3eb;border-radius:9px;background:#fff;font:inherit}.textarea{min-height:120px;resize:vertical}.empty{text-align:center;padding:50px;background:#fff;border:1px dashed #ccd2de;border-radius:15px}.footer{margin-top:50px;background:#111827;color:#dce2ef;padding:45px 0 0}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px}.footer a{display:block;margin:6px 0;color:#dce2ef}.copyright{text-align:center;border-top:1px solid rgba(255,255,255,.1);padding:16px;margin-top:30px;color:#9aa4b8;font-size:13px}@media(max-width:1100px){.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:900px){.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.header-row{flex-wrap:wrap;padding:10px 0}.search{order:3;max-width:none;flex-basis:100%}.hero-grid,.detail-grid{grid-template-columns:1fr}.detail-cover{max-width:320px}.footer-grid{grid-template-columns:1fr 1fr}}@media(max-width:600px){.container{width:min(100% - 20px,1180px)}.header-row nav{width:100%;justify-content:space-between}.product-grid{grid-template-columns:repeat(2,1fr);gap:10px}.product-info{padding:10px}.product-info h3{font-size:14px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.cart-table th:nth-child(2),.cart-table td:nth-child(2){display:none}.footer-grid{grid-template-columns:1fr}.hero{padding:40px 0}.detail h1{font-size:30px}.buy-box{flex-direction:column;align-items:stretch}}.pagination{display:flex;gap:7px;justify-content:center;align-items:center;margin-top:28px;flex-wrap:wrap}.pagination a{display:inline-flex;min-width:36px;height:36px;align-items:center;justify-content:center;border:1px solid #dfe3eb;border-radius:9px;background:#fff;color:#172033}.pagination a.active{background:#111827;color:#fff;border-color:#111827}.pagination a:hover{border-color:#3154c7}.catalog-count{font-size:13px;color:#7b8497}
.book-description{background:#fff;border:1px solid #e7eaf0;border-radius:16px;padding:20px 22px;line-height:2;color:#273148}.book-description p{margin:0 0 18px}.book-description p:last-child{margin-bottom:0}.book-description ul,.book-description ol{padding-right:24px;margin:10px 0}.book-description strong,.book-description b{font-weight:800}.book-description em,.book-description i{font-style:italic}

/* Latest five books rotating hero */
.latest-hero{position:relative;min-height:300px;padding:0;overflow:hidden;background:#111827}
.latest-slides{position:relative;min-height:300px}
.latest-slide{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .55s ease;display:flex;align-items:stretch}
.latest-slide.active{opacity:1;visibility:visible;position:relative}
.latest-slide-bg{position:absolute;inset:0;background:#111827 center/cover no-repeat;filter:saturate(.95)}
.latest-slide-inner{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:38px;align-items:center;min-height:300px;padding-top:26px;padding-bottom:34px}
.latest-copy{max-width:700px}
.latest-kicker{display:inline-block;color:#b9c5df;font-size:13px;font-weight:800;margin-bottom:8px}
.latest-copy h1{font-size:clamp(27px,3.7vw,44px);line-height:1.12;margin:0 0 10px;color:#fff}
.latest-author{color:#dce3f1;font-size:15px;font-weight:700;margin-bottom:10px}
.latest-copy p{color:#e0e6f2;max-width:620px;margin:0 0 18px}
.latest-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.latest-price{font-size:18px;font-weight:900;color:#fff}
.latest-poster{width:180px;height:240px;display:block;border-radius:16px;overflow:hidden;box-shadow:0 22px 45px rgba(0,0,0,.38);border:1px solid rgba(255,255,255,.18);transform:rotate(2deg);transition:transform .25s ease}
.latest-poster:hover{transform:rotate(0deg) translateY(-3px)}
.latest-poster img{width:100%;height:100%;display:block;object-fit:cover}
.latest-dots{position:absolute;z-index:5;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:7px;align-items:center}
.latest-dot{width:9px;height:9px;border:0;padding:0;border-radius:50%;background:#aab4c8;opacity:.55;cursor:pointer;transition:.25s}
.latest-dot.active{width:28px;border-radius:10px;background:#fff;opacity:1}
@media(max-width:700px){.latest-slides,.latest-hero{min-height:360px}.latest-slide-inner{grid-template-columns:1fr;min-height:360px;padding:32px 0 54px}.latest-poster{position:absolute;left:12px;bottom:42px;width:105px;height:140px;opacity:.3;transform:none}.latest-copy{position:relative;z-index:2;max-width:90%}.latest-copy h1{font-size:30px}.latest-copy p{font-size:13px;max-width:100%}.latest-actions{gap:10px}.latest-price{font-size:16px}}

/* Premium category showcase */
.category-showcase{padding-top:34px;padding-bottom:48px}
.category-showcase-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:22px}
.category-showcase-head h2{margin:3px 0 3px;font-size:30px;color:#111827}
.category-showcase-head p{margin:0;color:#7b8497;font-size:14px}
.category-eyebrow{font-size:12px;font-weight:900;color:#3154c7;letter-spacing:.4px}
.category-all{background:#111827;color:#fff;padding:10px 16px;border-radius:11px;font-weight:800;white-space:nowrap}
.category-all span{margin-right:5px}
.category-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.category-tile{position:relative;min-height:132px;padding:14px 12px 12px;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);border:1px solid #e5e8ef;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;overflow:hidden;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.category-tile:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#3154c7;transform:scaleY(0);transform-origin:center;transition:transform .22s ease}
.category-tile:hover{transform:translateY(-5px);box-shadow:0 16px 35px rgba(25,36,61,.10);border-color:#cfd7e8}
.category-tile:hover:before{transform:scaleY(1)}
.category-icon{width:48px;height:48px;border:1px solid #dce3ee;border-radius:14px;display:grid;place-items:center;background:#fff;font-size:27px;margin-bottom:12px;box-shadow:0 5px 12px rgba(25,36,61,.04)}
.category-tile-title{font-size:16px;font-weight:900;color:#111827;line-height:1.35}
.category-tile-count{font-size:12px;color:#8992a5;margin-top:4px}
.category-arrow{position:absolute;bottom:12px;left:14px;color:#3154c7;font-weight:900;opacity:0;transform:translateX(4px);transition:.22s}
.category-tile:hover .category-arrow{opacity:1;transform:translateX(0)}
@media(max-width:1000px){.category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.category-showcase-head{align-items:flex-start;flex-direction:column}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.category-tile{min-height:140px}}
@media(max-width:420px){.category-grid{grid-template-columns:1fr 1fr}.category-tile{padding:16px 10px}.category-icon{width:50px;height:50px;font-size:23px}.category-tile-title{font-size:14px}}

.site-logo-image{width:150px;height:auto;max-height:58px;object-fit:contain;display:block;border-radius:0}.home-merch{padding-top:28px}.home-merch .section-head{margin-bottom:18px}.home-merch + .home-merch{padding-top:10px}.featured-deals .sale{background:#c9364b}.best-sellers .product-card{position:relative}.logo-setting{border-top:1px solid #edf0f4;padding-top:18px}.logo-upload-box{display:flex;align-items:center;gap:20px;padding:16px;background:#fafbfc;border:1px dashed #d6dce7;border-radius:12px}.settings-logo-preview{width:90px;height:90px;object-fit:contain;background:#fff;border:1px solid #e5e8ef;border-radius:12px;padding:8px}.settings-logo-placeholder{width:90px;height:90px;display:grid;place-items:center;text-align:center;background:#fff;border:1px solid #e5e8ef;border-radius:12px;color:#8992a5;font-size:12px}.remove-logo{display:block;margin-top:10px;font-size:13px;color:#8a3b46}@media(max-width:600px){.logo-upload-box{align-items:flex-start;flex-direction:column}.site-logo-image{width:150px;height:auto;max-height:58px;object-fit:contain;display:block;border-radius:0}}

/* Logo above BOOK STORE: the uploaded wordmark already contains the BOOK STORE label. */
.logo img.site-logo-image{display:block;margin:0 auto}
@media(max-width:600px){.logo{flex-basis:125px;min-height:58px}.site-logo-image{width:112px;max-height:50px}}


/* =========================================================
   KETABIKA BRAND THEME v1
   Colors derived from the uploaded Ketabika logo.
   ========================================================= */
:root{
  --kb-primary:#5450da;
  --kb-primary-dark:#3f3bb0;
  --kb-primary-deep:#29275f;
  --kb-secondary:#7772e8;
  --kb-soft:#eeedff;
  --kb-soft-2:#f7f6ff;
  --kb-ink:#171936;
  --kb-muted:#747894;
  --kb-border:#e6e5f3;
  --kb-white:#ffffff;
  --kb-shadow:0 14px 40px rgba(63,59,176,.10);
}

/* Page atmosphere */
body{
  background:
    radial-gradient(circle at 90% 0%,rgba(84,80,218,.055),transparent 28%),
    radial-gradient(circle at 5% 35%,rgba(119,114,232,.045),transparent 25%),
    #f8f8fc;
  color:var(--kb-ink);
}
.site-header{
  background:rgba(255,255,255,.96);
  border-bottom:1px solid rgba(84,80,218,.13);
  box-shadow:0 4px 22px rgba(36,34,92,.045);
  backdrop-filter:blur(12px);
}
.header-row{min-height:82px}
.logo{flex-basis:175px;min-height:70px;transition:transform .2s ease}
.logo:hover{transform:translateY(-1px)}
.site-logo-image{width:160px;max-height:62px;object-fit:contain}
.search input{
  border-color:#dddcef;
  background:#fbfbff;
  transition:border-color .2s,box-shadow .2s,background .2s;
}
.search input:focus{
  outline:none;
  border-color:rgba(84,80,218,.55);
  background:#fff;
  box-shadow:0 0 0 4px rgba(84,80,218,.09);
}
.search button{
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-primary-dark));
  box-shadow:0 7px 18px rgba(84,80,218,.20);
  transition:transform .2s,box-shadow .2s;
}
.search button:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(84,80,218,.28)}
.header-row nav a{transition:color .2s,transform .2s}
.header-row nav a:hover{color:var(--kb-primary);transform:translateY(-1px)}
.cart-badge{background:var(--kb-soft);color:var(--kb-primary-dark)}

/* Buttons and links */
.btn{
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-primary-dark));
  box-shadow:0 7px 18px rgba(84,80,218,.16);
  transition:transform .2s,box-shadow .2s,filter .2s;
}
.btn:hover{transform:translateY(-2px);box-shadow:0 12px 25px rgba(84,80,218,.24);filter:saturate(1.06)}
.btn.dark{background:var(--kb-primary-deep)}
.btn.light{color:var(--kb-primary-dark);background:#fff;border:1px solid rgba(84,80,218,.14)}
.btn.danger{background:linear-gradient(135deg,#cf4760,#b62f4b)}

/* Main hero */
.hero{
  background:
    radial-gradient(circle at 78% 35%,rgba(126,121,255,.28),transparent 28%),
    linear-gradient(135deg,#1d1b48 0%,#29275f 48%,#4540a7 100%);
}
.hero-card{
  background:rgba(255,255,255,.085);
  border-color:rgba(255,255,255,.20);
  box-shadow:0 20px 50px rgba(13,12,48,.20);
}

/* Latest-books slider */
.latest-hero{
  background:
    radial-gradient(circle at 75% 25%,rgba(119,114,232,.30),transparent 30%),
    linear-gradient(135deg,#18163d,#2e2a70 55%,#514bd0);
}
.latest-slide-bg{background-color:#211f50}
.latest-poster{
  border-color:rgba(255,255,255,.28);
  box-shadow:0 24px 55px rgba(17,15,57,.48);
}
.latest-dot.active{background:#9e9aff}
.latest-kicker{color:#c9c7ff}

/* Sections */
.section-head h2,.category-showcase-head h2{color:var(--kb-ink)}
.muted,.category-showcase-head p{color:var(--kb-muted)}
.category-eyebrow{color:var(--kb-primary)}
.category-all{
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-primary-dark));
  box-shadow:0 8px 20px rgba(84,80,218,.16);
}
.category-tile{
  background:linear-gradient(180deg,#fff 0%,#faf9ff 100%);
  border-color:var(--kb-border);
}
.category-tile:before{background:linear-gradient(180deg,var(--kb-secondary),var(--kb-primary))}
.category-tile:hover{
  border-color:rgba(84,80,218,.28);
  box-shadow:0 18px 38px rgba(63,59,176,.13);
}
.category-icon{
  color:var(--kb-primary);
  border-color:#dfdef5;
  background:linear-gradient(145deg,#fff,#f3f2ff);
}
.category-tile-count{color:var(--kb-muted)}
.category-arrow{color:var(--kb-primary)}

/* Book cards */
.product-card{
  border-color:var(--kb-border);
  box-shadow:0 4px 16px rgba(33,32,77,.025);
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.product-card:hover{
  transform:translateY(-5px);
  border-color:rgba(84,80,218,.20);
  box-shadow:var(--kb-shadow);
}
.cover{background:#f0effa}
.product-info h3{color:var(--kb-ink)}
.author{color:var(--kb-muted)}
.price{color:var(--kb-primary-dark)}
.price s{color:#a4a5b9}
.sale{
  background:linear-gradient(135deg,#df5470,#bf3655);
  box-shadow:0 6px 14px rgba(191,54,85,.18);
}

/* Featured deals / best sellers */
.featured-deals .sale{background:linear-gradient(135deg,#df5470,#bf3655)}
.home-merch{padding-top:30px}

/* Detail page */
.detail-cover{
  box-shadow:0 18px 42px rgba(43,40,110,.12);
}
.buy-box,.meta,.book-description,.form-card,.summary,.empty{
  border-color:var(--kb-border);
  box-shadow:0 6px 22px rgba(33,32,77,.035);
}
.buy-box{border-radius:18px}
.book-description{
  background:linear-gradient(180deg,#fff,#fcfbff);
}
.notice{background:#eeefff;color:#3f3bb0}
.notice.error{background:#fff0f3;color:#a42d45}

/* Form focus */
.input,.select,.textarea,.qty{
  border-color:#dddcef;
  transition:border-color .2s,box-shadow .2s;
}
.input:focus,.select:focus,.textarea:focus,.qty:focus{
  outline:none;
  border-color:rgba(84,80,218,.55);
  box-shadow:0 0 0 4px rgba(84,80,218,.09);
}

/* Footer */
.footer{
  background:
    radial-gradient(circle at 80% 0%,rgba(119,114,232,.18),transparent 30%),
    linear-gradient(135deg,#191740,#29275f);
}
.footer a{transition:color .2s}
.footer a:hover{color:#bcb9ff}

/* Pagination */
.pagination a{border-color:#deddf0;color:var(--kb-ink);transition:.2s}
.pagination a:hover{border-color:var(--kb-secondary);color:var(--kb-primary)}
.pagination a.active{
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-primary-dark));
  border-color:var(--kb-primary);
  box-shadow:0 6px 15px rgba(84,80,218,.18);
}

/* Logo responsiveness */
@media(max-width:600px){
  .logo{flex-basis:125px}
  .site-logo-image{width:118px;max-height:52px}
}


/* =========================================================
   KETABIKA MOTION SYSTEM v1 — premium scroll interactions
   ========================================================= */
html{scroll-behavior:smooth}
body{overflow-x:hidden}
.site-header{position:sticky;top:0;z-index:1000;transition:box-shadow .3s ease,background .3s ease,transform .3s ease}
.site-header.is-scrolled{background:rgba(255,255,255,.94);box-shadow:0 12px 35px rgba(35,33,91,.10);backdrop-filter:blur(16px)}
.header-row{transition:min-height .3s ease}
.site-header.is-scrolled .header-row{min-height:68px}
.scroll-reveal{opacity:0;transform:translateY(28px);transition:opacity .7s cubic-bezier(.2,.65,.2,1),transform .7s cubic-bezier(.2,.65,.2,1)}
.scroll-reveal.is-visible{opacity:1;transform:none}
.category-tile.scroll-reveal:nth-child(2),.product-card.scroll-reveal:nth-child(2){transition-delay:.06s}
.category-tile.scroll-reveal:nth-child(3),.product-card.scroll-reveal:nth-child(3){transition-delay:.12s}
.category-tile.scroll-reveal:nth-child(4),.product-card.scroll-reveal:nth-child(4){transition-delay:.18s}
.category-tile.scroll-reveal:nth-child(5),.product-card.scroll-reveal:nth-child(5){transition-delay:.24s}
.category-tile.scroll-reveal:nth-child(6),.product-card.scroll-reveal:nth-child(6){transition-delay:.30s}
.product-card .cover{transition:transform .35s ease,box-shadow .35s ease}
.product-card:hover .cover{transform:translateY(-2px);box-shadow:0 16px 28px rgba(63,59,176,.12)}
.product-card .cover img{transition:transform .55s cubic-bezier(.2,.7,.2,1)}
.product-card:hover .cover img{transform:scale(1.035)}
.category-tile{transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease}
.category-tile:hover{transform:translateY(-7px)}
.category-icon{transition:transform .3s ease,background .3s ease}
.category-tile:hover .category-icon{transform:rotate(-4deg) scale(1.06);background:linear-gradient(145deg,#fff,#ebeaff)}
.btn{position:relative;overflow:hidden}
.btn:after{content:"";position:absolute;top:-60%;left:-80%;width:55%;height:220%;background:rgba(255,255,255,.16);transform:rotate(24deg);transition:left .55s ease}
.btn:hover:after{left:135%}
.latest-poster{transition:transform .5s ease,filter .5s ease}
.latest-poster:hover{transform:translateY(-8px) rotate(1deg);filter:drop-shadow(0 25px 28px rgba(0,0,0,.28))}
.latest-slide-bg{transform:scale(1.03);transition:transform 7s ease}
.latest-slide.active .latest-slide-bg{transform:scale(1.09)}
.latest-copy h1{animation:none}
.latest-slide.active .latest-copy h1{animation:kbTitleIn .7s ease both}
.latest-slide.active .latest-poster{animation:kbPosterIn .8s .08s ease both}
@keyframes kbTitleIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes kbPosterIn{from{opacity:0;transform:translateY(22px) scale(.97)}to{opacity:1;transform:none}}
.section-head h2{position:relative}
.section-head h2:after{content:"";display:block;width:42px;height:3px;margin-top:9px;border-radius:10px;background:linear-gradient(90deg,var(--kb-primary),var(--kb-secondary))}
#scroll-progress{position:fixed;top:0;right:0;left:0;height:3px;width:0;background:linear-gradient(90deg,var(--kb-secondary),var(--kb-primary));z-index:2000;box-shadow:0 1px 8px rgba(84,80,218,.35)}
#back-to-top{position:fixed;right:22px;bottom:22px;width:46px;height:46px;border:0;border-radius:50%;background:linear-gradient(135deg,var(--kb-primary),var(--kb-primary-dark));color:#fff;font-size:20px;line-height:46px;text-align:center;cursor:pointer;z-index:1100;opacity:0;visibility:hidden;transform:translateY(12px);transition:opacity .3s,transform .3s,visibility .3s,box-shadow .3s;box-shadow:0 10px 25px rgba(63,59,176,.25)}
#back-to-top.show{opacity:1;visibility:visible;transform:none}
#back-to-top:hover{box-shadow:0 14px 30px rgba(63,59,176,.35);transform:translateY(-3px)}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.scroll-reveal,.latest-slide.active .latest-copy h1,.latest-slide.active .latest-poster{animation:none!important;transition:none!important}.latest-slide-bg{transition:none}.btn:after{display:none}}
@media(max-width:600px){#back-to-top{right:14px;bottom:14px;width:42px;height:42px;line-height:42px}.site-header.is-scrolled .header-row{min-height:62px}}


/* =========================================================
   BOOK POP-UP ON SCROLL v4 — never hides content
           JavaScript          .
   ========================================================= */
.product-grid{perspective:1000px}
.product-card.book-pop{
  opacity:1!important;
  transform:none;
  transform-origin:center bottom;
  transition:transform .35s ease,box-shadow .35s ease;
}
.product-card.book-pop.is-visible{
  animation:kbBookPop .68s cubic-bezier(.18,.72,.25,1) both;
  animation-delay:var(--book-delay,0s);
}
.product-card.book-pop.is-visible:hover{
  transform:translate3d(0,-7px,0) scale(1.012);
  box-shadow:0 20px 38px rgba(41,39,95,.14);
}
.product-card.book-pop .cover{transition:transform .45s cubic-bezier(.2,.75,.2,1),box-shadow .45s ease}
.product-card.book-pop.is-visible:hover .cover{transform:translateY(-3px);box-shadow:0 18px 32px rgba(63,59,176,.14)}
@keyframes kbBookPop{
  0%{opacity:0;transform:translate3d(0,48px,0) scale(.94) rotateX(4deg)}
  70%{opacity:1;transform:translate3d(0,-4px,0) scale(1.01) rotateX(0)}
  100%{opacity:1;transform:none}
}
.scroll-reveal{opacity:1;transform:none}
.scroll-reveal.is-visible{animation:kbRevealUp .58s cubic-bezier(.18,.72,.25,1) both}
@keyframes kbRevealUp{
  0%{opacity:.35;transform:translateY(22px)}
  100%{opacity:1;transform:none}
}
@media(prefers-reduced-motion:reduce){
  .product-card.book-pop.is-visible,.scroll-reveal.is-visible{animation:none!important}
}


/* =========================================================
   PERFORMANCE PASS — smooth scrolling with many book cards
   ========================================================= */
.site-header{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.latest-slide-bg{transform:scale(1.02)!important;transition:none!important}
.latest-slide.active .latest-slide-bg{transform:scale(1.02)!important}
.home-merch{content-visibility:auto;contain-intrinsic-size:620px}
.product-grid{perspective:none}
.product-card{contain:layout paint;backface-visibility:hidden}
.product-card .cover img{transform:none!important;transition:none!important}
.product-card:hover .cover img{transform:none!important}
.product-card.book-pop{transition:transform .22s ease,box-shadow .22s ease}
.product-card.book-pop.is-visible{animation:kbBookPopFast .42s cubic-bezier(.2,.72,.25,1) both;animation-delay:var(--book-delay,0s)}
@keyframes kbBookPopFast{0%{opacity:.72;transform:translate3d(0,22px,0) scale(.985)}100%{opacity:1;transform:none}}
.scroll-reveal,.scroll-reveal.is-visible{animation:none!important}
@media(max-width:600px){.product-card.book-pop.is-visible{animation-duration:.34s}}
@media(prefers-reduced-motion:reduce){.product-card.book-pop.is-visible{animation:none!important}}

/* Search autocomplete */
.search{position:relative;z-index:40}
.search-suggestions{position:absolute;top:calc(100% + 8px);right:0;left:0;background:#fff;border:1px solid rgba(84,80,218,.14);border-radius:14px;box-shadow:0 18px 45px rgba(31,30,74,.16);overflow:hidden;max-height:390px;overflow-y:auto;z-index:1000}
.search-suggestion-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid #f0f1f6;background:#fff;min-height:66px;transition:background .15s ease,transform .15s ease}
.search-suggestion-item:last-child{border-bottom:0}
.search-suggestion-item:hover,.search-suggestion-item.active{background:#f6f5ff}
.search-suggestion-cover{width:42px;height:54px;flex:0 0 42px;border-radius:7px;overflow:hidden;background:#eef0f6;display:grid;place-items:center}
.search-suggestion-cover img{width:100%;height:100%;object-fit:cover;display:block}
.search-suggestion-placeholder{font-size:20px}
.search-suggestion-copy{min-width:0;flex:1;text-align:right;display:flex;flex-direction:column;gap:2px}
.search-suggestion-copy strong{font-size:13px;color:#20204b;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-suggestion-copy small{font-size:11px;color:#7b8198;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-suggestion-price{font-size:11px;font-weight:800;color:#5450da;white-space:nowrap}
@media(max-width:900px){.search-suggestions{top:calc(100% + 5px);max-height:330px}}

/* Customer accounts & reviews */
.account-link{font-weight:700}
.account-avatar-mini{display:inline-flex!important;width:34px;height:34px;padding:0!important;border-radius:50%;overflow:hidden;align-items:center;justify-content:center;background:#ecebff;color:#403bb4;font-weight:800;vertical-align:middle}
.account-avatar-mini img{width:100%;height:100%;object-fit:cover;display:block}
.auth-section{padding-top:55px;padding-bottom:70px}
.auth-shell{max-width:980px;margin:0 auto;display:grid;grid-template-columns:1.25fr .75fr;gap:22px;align-items:stretch}
.auth-card,.auth-side,.profile-card,.review-form-card{background:#fff;border:1px solid rgba(84,80,218,.12);border-radius:24px;box-shadow:0 16px 50px rgba(41,39,95,.08)}
.auth-card{padding:34px}
.auth-side{padding:36px;background:linear-gradient(145deg,rgba(28,22,116,.42),rgba(48,28,190,.30)),url("../images/login-books-background.png") center center/cover no-repeat;color:#fff;display:flex;flex-direction:column;justify-content:center;min-height:430px;position:relative;isolation:isolate;overflow:hidden}.auth-side>*{position:relative;z-index:1}.auth-side h2,.auth-side p,.auth-side-badge{text-shadow:0 2px 12px rgba(12,8,70,.55)}
.auth-brand{display:flex;gap:16px;align-items:center;margin-bottom:26px}
.auth-brand h1{margin:0 0 6px;font-size:30px;color:#29275f}
.auth-brand p{margin:0;color:#777}
.auth-icon{width:54px;height:54px;border-radius:17px;display:flex;align-items:center;justify-content:center;background:#5450da;color:#fff;font-weight:900;box-shadow:0 10px 24px rgba(84,80,218,.25)}
.auth-form{display:grid;gap:16px}
.auth-submit{width:100%;margin-top:4px}
.auth-switch{text-align:center;margin-top:20px;color:#666}
.auth-switch a{color:#4a46c9;font-weight:800}
.auth-side-badge{display:inline-flex;align-self:flex-start;border:1px solid rgba(255,255,255,.3);padding:7px 13px;border-radius:99px;margin-bottom:20px}
.auth-side h2{font-size:32px;line-height:1.25;margin:0 0 14px;color:#fff}
.auth-side p{color:rgba(255,255,255,.82);line-height:1.9;margin:0}
.auth-two{grid-template-columns:1fr 1fr}
.profile-section{padding-top:42px;padding-bottom:70px}
.profile-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:24px}
.profile-hero h1{margin:5px 0 7px;color:#29275f}
.profile-hero p{margin:0;color:#777}
.eyebrow{display:block;color:#5450da;font-size:13px;font-weight:900;letter-spacing:.04em}
.btn-outline{background:#fff!important;color:#3f3bb0!important;border:1px solid rgba(84,80,218,.22)!important}
.profile-grid{display:grid;grid-template-columns:320px 1fr;gap:22px}
.profile-card{padding:28px}
.profile-avatar-card{text-align:center}
.profile-avatar-wrap{width:128px;height:128px;margin:0 auto 16px}
.profile-avatar{width:128px;height:128px;border-radius:50%;object-fit:cover;display:block;border:5px solid #f0efff;box-shadow:0 10px 28px rgba(41,39,95,.12)}
.profile-avatar-placeholder{display:flex;align-items:center;justify-content:center;background:#5450da;color:#fff;font-size:48px;font-weight:900}
.profile-avatar-card h2{margin:0 0 5px;color:#29275f}
.avatar-form{display:grid;gap:10px;margin-top:22px}
.upload-label{display:block;padding:11px 14px;border:1px dashed rgba(84,80,218,.35);border-radius:12px;color:#403bb4;font-weight:800;cursor:pointer;background:#faf9ff}
.upload-label input{display:block;width:100%;margin-top:8px;font-weight:400}
.btn-small{padding:10px 15px!important}
.card-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.card-title h2{margin:0;color:#29275f;font-size:20px}
.card-title span{font-size:12px;color:#777}
.profile-divider{border:0;border-top:1px solid #eee;margin:30px 0}
.notice.success{background:#ecfbf2;border-color:#bfe9cf;color:#187a42}
.reviews-section{padding-top:35px}
.rating-summary{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid rgba(84,80,218,.1);padding:9px 14px;border-radius:14px}
.rating-summary strong{font-size:22px;color:#29275f}
.rating-summary small{color:#777}
.stars-static,.review-stars{color:#f2a51a;letter-spacing:1px;font-size:18px;white-space:nowrap}
.reviews-layout{display:grid;grid-template-columns:1fr 340px;gap:22px;align-items:start}
.reviews-list{display:grid;gap:12px}
.review-card{background:#fff;border:1px solid rgba(84,80,218,.1);border-radius:18px;padding:18px 20px}
.review-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.review-user{display:flex;align-items:center;gap:10px}
.review-user img,.review-avatar-placeholder{width:42px;height:42px;border-radius:50%;object-fit:cover;display:flex;align-items:center;justify-content:center;background:#ecebff;color:#403bb4;font-weight:900}
.review-user div{display:grid;gap:2px}
.review-user small{color:#999;font-size:11px}
.review-card p{margin:13px 0 0;line-height:1.9;color:#444}
.review-form-card{padding:22px}
.review-form-title h3{margin:0 0 5px;color:#29275f}
.review-form-title p{margin:0 0 18px;color:#777;font-size:13px}
.review-form{display:grid;gap:15px}
.star-picker{display:flex;direction:rtl;justify-content:flex-start;gap:2px}
.star-picker input{position:absolute;opacity:0;pointer-events:none}
.star-picker label{font-size:34px;line-height:1;cursor:pointer;color:#d9d7e8;transition:color .15s ease,transform .15s ease}
.star-picker label:hover,.star-picker label:hover~label,.star-picker input:checked~label{color:#f2a51a;transform:translateY(-1px)}
.review-login{text-align:center;padding:14px 4px}
.review-login-icon{display:flex;width:52px;height:52px;border-radius:16px;background:#fff5dc;color:#f2a51a;align-items:center;justify-content:center;font-size:28px;margin:0 auto 12px}
.review-login h3{margin:0 0 7px;color:#29275f}
.review-login p{color:#777;line-height:1.8;font-size:13px}
.review-empty{text-align:center;padding:35px 20px}
.review-empty h3{margin:0 0 7px;color:#29275f}
.review-empty p{margin:0;color:#888}
@media(max-width:900px){
.auth-shell{grid-template-columns:1fr}.auth-side{min-height:240px}.profile-grid{grid-template-columns:1fr}.reviews-layout{grid-template-columns:1fr}
}
@media(max-width:640px){
.auth-card,.auth-side,.profile-card,.review-form-card{border-radius:18px}.auth-card{padding:22px}.auth-side{padding:25px}.auth-two{grid-template-columns:1fr}.profile-hero{align-items:flex-start;flex-direction:column}.rating-summary{align-self:flex-start}
}

.orders-card{grid-column:1 / -1}
.orders-mini{display:grid}
.order-mini-row{display:grid;grid-template-columns:1fr auto auto;gap:18px;align-items:center;padding:14px 0;border-bottom:1px solid #eee}
.order-mini-row:last-child{border-bottom:0}
.order-mini-row>div{display:grid;gap:4px}
.order-mini-row small{color:#999;font-size:11px}
.order-status-mini{padding:6px 10px;border-radius:99px;background:#f0efff;color:#403bb4;font-size:12px;font-weight:800}
@media(max-width:640px){.order-mini-row{grid-template-columns:1fr auto}.order-mini-row strong{grid-column:1 / -1}}
/* Google Sign-In */
.auth-divider{display:flex;align-items:center;gap:12px;margin:20px 0 14px;color:#999;font-size:12px;font-weight:800}
.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#ececf4;flex:1}
.auth-divider span{padding:0 4px}
.google-signin-wrap{display:flex;justify-content:center;min-height:44px}
@media(max-width:520px){.google-signin-wrap>div{width:100%!important}.google-signin-wrap iframe{max-width:100%!important}}

.avatar-editor{margin:14px 0;padding:14px;background:#f7f8fb;border:1px solid #e3e7ef;border-radius:14px}.avatar-crop-stage{width:220px;height:220px;max-width:100%;margin:0 auto 14px;border-radius:50%;overflow:hidden;border:4px solid #fff;box-shadow:0 4px 20px rgba(20,30,50,.15);background:#edf0f5}.avatar-crop-stage canvas{width:100%;height:100%;display:block}.avatar-editor label{display:block;font-size:13px;font-weight:700;margin:10px 0}.avatar-editor input[type=range]{width:100%;display:block;accent-color:#3154c7}.avatar-form .upload-label{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;background:#f1f4fb;border:1px dashed #b9c5df;border-radius:10px;cursor:pointer;margin-bottom:10px}.avatar-form input[type=file]{display:block;max-width:100%;margin-top:7px}


/* Side cart drawer */
.cart-drawer-overlay{position:fixed;inset:0;background:rgba(15,18,35,.48);z-index:9998;backdrop-filter:blur(2px)}
.cart-drawer-overlay[hidden]{display:none}
.cart-drawer{position:fixed;z-index:9999;top:0;right:0;width:min(440px,94vw);height:100dvh;background:#fff;box-shadow:-18px 0 55px rgba(20,24,50,.2);transform:translateX(110%);transition:transform .28s ease;display:flex;flex-direction:column;visibility:hidden}
.cart-drawer.is-open{transform:translateX(0);visibility:visible}
.cart-drawer-open{overflow:hidden}
.cart-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:22px 20px;border-bottom:1px solid #ececf3;gap:12px}
.cart-drawer-head h2{font-size:19px;margin:0;color:#29275f}
.cart-drawer-close{border:0;background:#f2f3f8;color:#29275f;width:36px;height:36px;border-radius:50%;font-size:26px;line-height:1;cursor:pointer}
.cart-drawer-items{overflow:auto;padding:6px 20px;flex:1}
.cart-drawer-item{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #eeeef4;min-width:0}
.cart-drawer-item img{width:58px;height:76px;object-fit:cover;border-radius:8px;background:#f3f4f8;flex-shrink:0}
.cart-drawer-item-info{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1}
.cart-drawer-item-info strong{font-size:14px;line-height:1.6;color:#252442;overflow-wrap:anywhere}
.cart-drawer-item-info span{font-size:12px;color:#777}
.cart-drawer-line-total{font-size:12px;white-space:nowrap;color:#29275f}
.cart-drawer-empty{text-align:center;padding:32px 18px;color:#777}
.cart-drawer-foot{padding:18px 20px calc(18px + env(safe-area-inset-bottom));border-top:1px solid #ececf3;background:#fff;display:grid;gap:11px}
.cart-drawer-total{display:flex;align-items:center;justify-content:space-between;font-size:14px;margin-bottom:4px}
.cart-drawer-total strong{color:#29275f;font-size:17px}
.cart-drawer-foot .btn{display:block;text-align:center;text-decoration:none;width:100%;padding:13px}
.cart-drawer-view,.cart-drawer-continue{text-align:center;text-decoration:none;font-size:13px;padding:8px;border:0;background:transparent;color:#3154c7;cursor:pointer}
@media(prefers-reduced-motion:reduce){.cart-drawer{transition:none}}

/* Primary category navigation */
.site-header .header-row{flex-wrap:wrap}
.site-header nav.primary-nav{display:flex;align-items:center;gap:8px;max-width:100%;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;padding:8px 0}
.site-header nav.primary-nav>a{flex:0 0 auto;text-decoration:none}
@media(max-width:900px){.site-header nav.primary-nav{width:100%;order:3;justify-content:flex-start}.site-header nav.primary-nav>a{font-size:13px;padding:7px 9px}}


/* Primary navigation dropdowns */
.site-header nav.primary-nav{overflow:visible;}
.site-header nav.primary-nav .nav-item{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;}
.site-header nav.primary-nav .nav-main-link{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;text-decoration:none;}
.site-header nav.primary-nav .nav-chevron{font-size:14px;line-height:1;opacity:.75;}
.site-header nav.primary-nav .nav-submenu{display:none;position:absolute;top:100%;right:0;min-width:205px;max-height:70vh;overflow-y:auto;padding:7px;background:#fff;border:1px solid #e6e8ee;border-radius:12px;box-shadow:0 12px 32px rgba(20,25,40,.16);z-index:1000;white-space:normal;}
.site-header nav.primary-nav .nav-item:hover .nav-submenu,.site-header nav.primary-nav .nav-item:focus-within .nav-submenu{display:block;}
.site-header nav.primary-nav .nav-submenu a{display:block;padding:10px 12px;border-radius:8px;text-decoration:none;color:inherit;font-size:14px;line-height:1.5;}
.site-header nav.primary-nav .nav-submenu a:hover,.site-header nav.primary-nav .nav-submenu a:focus{background:#f3f5f9;}
@media(max-width:900px){.site-header nav.primary-nav{overflow-x:auto;overflow-y:visible;}.site-header nav.primary-nav .nav-submenu{position:fixed;top:auto;right:12px;left:12px;max-width:calc(100vw - 24px);max-height:60vh;}}


/* FINAL FIX: primary navigation dropdown layout */
.site-header .header-row nav.primary-nav{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:wrap !important;
  gap:8px 14px !important;
  width:100% !important;
  max-width:100% !important;
  overflow:visible !important;
  white-space:normal !important;
  position:relative !important;
  isolation:isolate;
}
.site-header .header-row nav.primary-nav > a,
.site-header .header-row nav.primary-nav > .nav-item{
  display:inline-flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  position:relative !important;
  white-space:nowrap !important;
}
.site-header .header-row nav.primary-nav .nav-submenu{
  display:none !important;
  position:absolute !important;
  top:calc(100% + 8px) !important;
  right:0 !important;
  left:auto !important;
  min-width:230px !important;
  width:max-content !important;
  max-width:min(320px, calc(100vw - 24px)) !important;
  max-height:65vh !important;
  overflow-y:auto !important;
  padding:8px !important;
  background:#fff !important;
  border:1px solid #e5e7eb !important;
  border-radius:12px !important;
  box-shadow:0 14px 34px rgba(15,23,42,.18) !important;
  white-space:normal !important;
  z-index:99999 !important;
}
.site-header .header-row nav.primary-nav .nav-item:hover > .nav-submenu,
.site-header .header-row nav.primary-nav .nav-item:focus-within > .nav-submenu{
  display:block !important;
}
.site-header .header-row nav.primary-nav .nav-submenu a{
  display:block !important;
  width:100% !important;
  box-sizing:border-box !important;
  padding:10px 12px !important;
  margin:0 !important;
  border-radius:8px !important;
  color:#202536 !important;
  text-decoration:none !important;
  text-align:right !important;
  white-space:normal !important;
  line-height:1.5 !important;
  transform:none !important;
}
.site-header .header-row nav.primary-nav .nav-submenu a:hover,
.site-header .header-row nav.primary-nav .nav-submenu a:focus{
  background:#f1f3f9 !important;
}
.site-header .header-row nav.primary-nav .nav-item.has-submenu > .nav-main-link{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
}
@media(max-width:900px){
  .site-header .header-row nav.primary-nav{
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:visible !important;
    justify-content:flex-start !important;
    white-space:nowrap !important;
    padding:10px 2px !important;
  }
  .site-header .header-row nav.primary-nav .nav-submenu{
    position:fixed !important;
    top:auto !important;
    right:12px !important;
    left:12px !important;
    bottom:auto !important;
    width:auto !important;
    max-width:none !important;
    max-height:60vh !important;
  }
}


/* v17: keep dropdown reachable while moving pointer from root item to submenu */
.site-header .header-row nav.primary-nav .nav-item.has-submenu {
  position: relative !important;
  align-self: stretch;
}
.site-header .header-row nav.primary-nav .nav-item.has-submenu > .nav-submenu {
  top: 100% !important;
  margin-top: 0 !important;
}
/* Invisible hover bridge prevents tiny layout gaps from closing the menu */
.site-header .header-row nav.primary-nav .nav-item.has-submenu > .nav-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
  background: transparent;
}
.site-header .header-row nav.primary-nav .nav-item.has-submenu:hover > .nav-submenu,
.site-header .header-row nav.primary-nav .nav-item.has-submenu:focus-within > .nav-submenu,
.site-header .header-row nav.primary-nav .nav-item.has-submenu:focus > .nav-submenu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.site-header .header-row nav.primary-nav .nav-submenu {
  pointer-events: auto;
}
.site-header .header-row nav.primary-nav .nav-submenu a {
  transform: none !important;
}
/* On narrow screens, keep the menu in the same hover/focus region rather than
   positioning it as a viewport-fixed panel that loses pointer ownership. */
@media (max-width: 900px) {
  .site-header .header-row nav.primary-nav {
    overflow: visible !important;
  }
  .site-header .header-row nav.primary-nav .nav-item.has-submenu > .nav-submenu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    width: min(88vw, 320px);
    max-width: calc(100vw - 24px) !important;
    max-height: 60vh;
    overflow-y: auto;
  }
}


/* v18: balanced two-row store header */
.site-header {
  background: #fff;
  border-top: 4px solid #a20f50;
  box-shadow: 0 4px 18px rgba(20, 28, 48, .06);
}
.site-header > .container.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: clamp(16px, 2.4vw, 34px);
  row-gap: 0;
  min-height: 0;
  padding-top: 12px;
  padding-bottom: 0;
}
.site-header .header-row > .logo {
  order: 1;
  flex: 0 0 170px;
  min-height: 54px;
  justify-content: flex-start;
  gap: 10px;
}
.site-header .header-row > .search {
  order: 2;
  flex: 1 1 360px;
  width: auto;
  max-width: 560px;
  margin-inline: auto;
}
.site-header .header-row > nav.primary-nav {
  order: 3;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 24px);
  margin-top: 8px;
  padding: 8px 4px 10px;
  border-top: 1px solid #f0edf2;
  overflow: visible;
  white-space: nowrap;
  font-size: 14px;
}
.site-header nav.primary-nav > a,
.site-header nav.primary-nav .nav-main-link {
  color: #22283a;
  text-decoration: none;
  padding: 7px 2px;
  line-height: 1.4;
  transition: color .15s ease;
}
.site-header nav.primary-nav > a:hover,
.site-header nav.primary-nav .nav-main-link:hover {
  color: #a20f50;
}
.site-header nav.primary-nav .nav-item {
  align-self: stretch;
}
.site-header nav.primary-nav .nav-main-link {
  height: 100%;
}
.site-header .search input {
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
}
.site-header .search button {
  min-height: 42px;
  background: #4b43c7;
}
.site-header .logo-fallback-text {
  line-height: 1.15;
}
.site-header .logo-fallback-text small {
  letter-spacing: 1.8px;
}
@media (max-width: 900px) {
  .site-header > .container.header-row {
    column-gap: 14px;
    padding-top: 8px;
  }
  .site-header .header-row > .logo {
    flex: 0 0 auto;
    min-height: 44px;
  }
  .site-header .header-row > .search {
    flex: 1 1 220px;
    max-width: none;
  }
  .site-header .header-row > nav.primary-nav {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    min-height: 44px;
    gap: 16px;
    margin-top: 6px;
    padding: 7px 2px 9px;
    scrollbar-width: none;
  }
  .site-header .header-row > nav.primary-nav::-webkit-scrollbar {
    display: none;
  }
}
@media (max-width: 560px) {
  .site-header .header-row > .logo {
    flex: 1 1 auto;
    order: 1;
  }
  .site-header .header-row > .search {
    order: 2;
    flex: 0 0 100%;
    max-width: none;
    margin-top: 8px;
  }
  .site-header .header-row > nav.primary-nav {
    order: 3;
  }
}


/* v19: balanced header actions for cart and customer login */
.site-header .header-row {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.site-header .header-row > .logo { grid-column: 1; grid-row: 1; }
.site-header .header-row > .search { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }
.site-header .header-row > .header-actions { grid-column: 3; grid-row: 1; }
.site-header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.site-header .header-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  color: var(--text, #182033);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, border-color .18s ease;
}
.site-header .header-action-link:hover,
.site-header .header-action-link:focus-visible {
  background: #f8f5fa;
  border-color: var(--primary, #a01850);
}
.site-header .header-action-icon { font-size: 18px; line-height: 1; }
.site-header .header-cart-link .cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary, #a01850);
  color: #fff;
  font-size: 11px;
}
@media (max-width: 900px) {
  .site-header .header-row {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }
  .site-header .header-row > .logo { grid-column: 1; grid-row: 1; }
  .site-header .header-row > .header-actions { grid-column: 2; grid-row: 1; }
  .site-header .header-row > .search { grid-column: 1 / -1; grid-row: 2; }
  .site-header .header-actions { gap: 6px; }
  .site-header .header-action-link { min-height: 38px; padding: 7px 9px; font-size: 12px; }
}

/* Compact category cards and progressive disclosure */
.category-grid .category-tile[hidden]{display:none!important}
.category-tile{min-height:132px;padding:16px 14px 14px;border-radius:16px}
.category-icon{width:48px;height:48px;border-radius:13px;margin-bottom:9px}
.category-icon svg{width:29px;height:29px}
.category-tile-title{font-size:14px}
.category-grid{gap:12px}
.category-more-wrap{display:flex;justify-content:center;margin-top:20px}
.category-more{border:0;background:#4b43d0;color:#fff;padding:10px 22px;border-radius:11px;font-weight:800;font-size:14px;cursor:pointer;box-shadow:0 7px 18px rgba(75,67,208,.16)}
.category-more:hover{background:#3932b7}
@media(max-width:760px){.category-tile{min-height:120px;padding:13px 10px}.category-tile-title{font-size:13px}.category-icon{width:42px;height:42px}}

/* Category grid: keep extra categories hidden until the button is pressed */
.category-tile[hidden]{display:none!important}
.category-more-wrap{display:flex;justify-content:center;margin:14px 0 4px}
.category-more{display:inline-flex;align-items:center;justify-content:center;border:1px solid #4b43d0;background:#4b43d0;color:#fff;padding:9px 20px;border-radius:10px;font-weight:800;font-size:14px;cursor:pointer;box-shadow:0 5px 14px rgba(75,67,208,.18)}
.category-more:hover{background:#3932b7;color:#fff}
.category-grid{gap:12px}

/* Category grid: force collapsed items hidden and use compact cards */
.category-tile[hidden], .category-tile-extra[hidden] { display: none !important; }
.category-grid { gap: 10px !important; }
.category-tile { min-height: 112px !important; padding: 10px 9px 9px !important; border-radius: 15px !important; }
.category-icon { width: 48px !important; height: 48px !important; margin-bottom: 8px !important; }
.category-tile-title { font-size: 15px !important; }
.category-more-wrap { display:flex; justify-content:center; margin:14px 0 4px; }
button.category-more { appearance:none; border:1px solid #d7d9ff; border-radius:10px; background:#5145ff; color:#fff; padding:10px 22px; font:inherit; font-weight:700; cursor:pointer; box-shadow:0 4px 12px rgba(81,69,255,.16); }
button.category-more:hover { background:#4035df; }

/* Final category visibility safeguard */
.category-tile-extra[hidden], .category-tile[hidden] { display: none !important; }
.category-more-wrap { display:flex !important; justify-content:center !important; width:100%; margin:16px 0 8px !important; }
button.category-more { display:inline-flex !important; align-items:center; justify-content:center; min-height:40px; padding:9px 22px !important; border:0 !important; border-radius:10px !important; background:#5145ff !important; color:#fff !important; font:inherit; font-weight:700; cursor:pointer; }
.category-tile { min-height:108px !important; padding:10px 9px !important; }
.category-icon { width:44px !important; height:44px !important; margin-bottom:7px !important; }
.category-tile-title { font-size:14px !important; }

/* Category showcase polished layout */
.category-grid#categoryGrid { display:grid !important; grid-template-columns:repeat(5,minmax(0,1fr)) !important; gap:14px !important; align-items:stretch !important; width:100% !important; }
#categoryGrid > .category-tile { box-sizing:border-box; width:100%; min-width:0; min-height:112px !important; padding:12px 10px !important; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; border:1px solid #e1e4f5; border-radius:16px; background:linear-gradient(145deg,#fff 0%,#f8f8ff 100%); box-shadow:0 4px 14px rgba(45,55,120,.04); text-decoration:none; }
#categoryGrid > .category-tile:hover { border-color:#b9b5ff; box-shadow:0 9px 22px rgba(79,70,229,.10); transform:translateY(-2px); }
#categoryGrid > .category-tile[hidden], #categoryGrid > .category-tile-extra[hidden] { display:none !important; }
#categoryGrid .category-icon { width:44px !important; height:44px !important; margin:0 auto 7px !important; border-radius:13px; }
#categoryGrid .category-tile-title { font-size:14px !important; line-height:1.5; font-weight:700; }
#categoryGrid .category-tile-count { font-size:12px !important; margin-top:3px; color:#777eaa; }
.category-more-wrap { display:flex !important; justify-content:center !important; width:100%; margin:18px auto 10px !important; }
button#categoryMoreButton { appearance:none; border:1px solid #5145ff !important; border-radius:12px !important; background:linear-gradient(135deg,#6258ff,#4b43d0) !important; color:#fff !important; padding:10px 24px !important; min-height:42px; font-size:14px; font-weight:700; box-shadow:0 6px 16px rgba(81,69,255,.20); cursor:pointer; transition:transform .2s,box-shadow .2s; }
button#categoryMoreButton:hover { transform:translateY(-1px); box-shadow:0 9px 20px rgba(81,69,255,.27); }
@media(max-width:1000px){.category-grid#categoryGrid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}}
@media(max-width:760px){.category-grid#categoryGrid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;} #categoryGrid > .category-tile{min-height:105px !important;}}

/* Category cards: 10 initially, with a polished top toggle */
.category-more-wrap{display:flex!important;justify-content:flex-start!important;width:100%;margin:0 0 14px!important}
.category-more-wrap-top{justify-content:flex-end!important;margin:0 0 14px!important}
.category-more{display:inline-flex!important;align-items:center;justify-content:center;gap:10px;min-height:42px;padding:10px 18px!important;border:1px solid rgba(79,70,229,.16)!important;border-radius:12px!important;background:linear-gradient(135deg,#5145e5 0%,#6d5dfc 100%)!important;color:#fff!important;font:inherit;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 6px 16px rgba(79,70,229,.2);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
.category-more:hover{filter:brightness(1.04);transform:translateY(-1px);box-shadow:0 9px 20px rgba(79,70,229,.26)}
.category-more:focus-visible{outline:3px solid rgba(99,102,241,.35);outline-offset:3px}
.category-more-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:6px;background:rgba(255,255,255,.16);font-size:17px;line-height:1}
.category-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.category-tile{min-height:118px!important;padding:11px 10px!important;border-radius:16px!important}
@media(max-width:900px){.category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.category-more-wrap-top{margin-bottom:12px!important}.category-more{min-height:40px;padding:9px 15px!important}}

/* Button visibility and layout fix */
.category-more-wrap-top{display:flex!important;justify-content:flex-end!important;align-items:center!important;width:100%!important;margin:0 0 14px!important;} #categoryMoreButton{appearance:none!important;-webkit-appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;min-height:44px!important;padding:10px 20px!important;border:0!important;border-radius:12px!important;background:linear-gradient(135deg,#5145e5,#6d5dfc)!important;color:#fff!important;font-family:inherit!important;font-size:14px!important;font-weight:800!important;cursor:pointer!important;box-shadow:0 6px 16px rgba(79,70,229,.22)!important;} #categoryGrid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important;} #categoryGrid>.category-tile[hidden]{display:none!important;} @media(max-width:900px){#categoryGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important}} @media(max-width:600px){#categoryGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Align category more button to the left, matching Latest Books section */
.category-more-wrap-top { display:flex !important; justify-content:flex-start !important; align-items:center !important; width:100% !important; margin:0 0 14px !important; }
#categoryMoreButton { margin-inline-start:0 !important; margin-inline-end:auto !important; }

/* Explicitly align category More button to the visual left edge */
.category-more-wrap.category-more-wrap-top{
  width:100% !important;
  display:flex !important;
  direction:ltr !important;
  justify-content:flex-start !important;
  align-items:center !important;
  text-align:left !important;
  margin:0 0 12px 0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}
.category-more-wrap-top .category-more{
  margin:0 auto 0 0 !important;
  float:none !important;
  position:static !important;
  min-height:44px !important;
  padding:10px 20px !important;
  border:0 !important;
  border-radius:12px !important;
  background:linear-gradient(135deg,#5145e5,#6d5dfc) !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:800 !important;
  box-shadow:0 6px 16px rgba(79,70,229,.22) !important;
}

/* Final override: category button matches Latest Books and sits at visual left */
.category-showcase .category-more-wrap-top{display:flex!important;justify-content:flex-start!important;direction:ltr!important;width:100%!important;margin:0 0 14px!important;padding:0!important;box-sizing:border-box!important}
.category-showcase #categoryMoreButton{margin:0 auto 0 0!important;background:#29245f!important;color:#fff!important;border:0!important;border-radius:9px!important;min-height:40px!important;padding:10px 16px!important;box-shadow:0 4px 10px rgba(41,36,95,.16)!important}


/* Ketabika product-cover fit fix: show the complete book cover without cropping */
.product-card .cover {
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  overflow: hidden !important;
}
.product-card .cover img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  padding: 0 !important;
  margin: 0 auto !important;
  transform: none !important;
}
.product-card:hover .cover img,
.product-card.book-pop.is-visible:hover .cover img {
  transform: none !important;
}
/* Keep cover images complete on small screens as well */
@media (max-width: 600px) {
  .product-card .cover { padding: 7px !important; }
  .product-card .cover img { object-fit: contain !important; }
}


/* Ketabika product-cover sizing fix v8: scale portrait covers up to the full frame without cropping */
.product-card .cover{height:220px!important;min-height:220px!important;aspect-ratio:auto!important;padding:8px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;background:#fff!important;box-sizing:border-box!important}
.product-card .cover img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center center!important;flex:1 1 auto!important;border-radius:5px!important;box-shadow:none!important}
.product-card .cover a{width:100%;height:100%;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0}
@media(max-width:700px){.product-card .cover{height:200px!important;min-height:200px!important;padding:6px!important}.product-card .cover img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}}

/* Product covers: enlarge portrait book jackets while keeping every edge visible (v9) */
.product-card .cover{
  height:260px!important; min-height:260px!important; aspect-ratio:auto!important;
  padding:6px!important; display:flex!important; align-items:center!important;
  justify-content:center!important; overflow:hidden!important; background:#fff!important;
  box-sizing:border-box!important;
}
.product-card .cover > img,
.product-card .cover a > img{
  display:block!important; width:auto!important; height:100%!important;
  max-width:100%!important; max-height:100%!important;
  object-fit:contain!important; object-position:center!important;
  padding:0!important; margin:0 auto!important; flex:0 1 auto!important;
  border-radius:5px!important; box-shadow:none!important; transform:none!important;
}
.product-card .cover > a{
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  min-width:0; min-height:0; padding:0; margin:0;
}
.product-card:hover .cover img,.product-card.book-pop.is-visible:hover .cover img{transform:none!important}
@media(max-width:700px){
  .product-card .cover{height:230px!important;min-height:230px!important;padding:5px!important}
  .product-card .cover > img,.product-card .cover a > img{height:100%!important;width:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
}


/* Ketabika balanced product covers v11: controlled size, no excessive zoom */
.product-card .cover {
  width:100% !important;
  height:220px !important;
  min-height:220px !important;
  aspect-ratio: 3 / 4 !important;
  padding:8px !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  background:#fff !important;
  border-radius:10px 10px 0 0 !important;
}
.product-card .cover > img,
.product-card .cover a > img {
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  padding:0 !important;
  margin:0 auto !important;
  border-radius:4px !important;
  box-shadow:none !important;
  transform:none !important;
}
.product-card .cover > a {
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
}
.product-card:hover .cover img,
.product-card.book-pop.is-visible:hover .cover img { transform:none !important; }
@media(max-width:700px) {
  .product-card .cover { height:200px !important; min-height:200px !important; padding:6px !important; }
}


/* Ketabika final cover frame tuning v12: consistent portrait thumbnail, centered crop for composite images */
.product-card .cover {
  width: 100% !important;
  height: 190px !important;
  min-height: 190px !important;
  aspect-ratio: 3 / 4 !important;
  padding: 8px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
.product-card .cover > img,
.product-card .cover a > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  transform: none !important;
}
.product-card .cover > a {
  display: block !important; width: 100% !important; height: 100% !important;
  overflow: hidden !important; padding: 0 !important; margin: 0 !important;
}
.product-card:hover .cover img,
.product-card.book-pop.is-visible:hover .cover img { transform: none !important; }
@media (max-width: 700px) {
  .product-card .cover { height: 180px !important; min-height: 180px !important; padding: 6px !important; }
}


/* Ketabika cover sizing: smaller, balanced thumbnails (v13) */
.product-grid .product-card .cover {
  height: 168px !important; min-height: 168px !important; aspect-ratio: auto !important;
  padding: 8px !important; display:flex !important; align-items:center !important; justify-content:center !important;
  overflow:hidden !important; background:#fff !important;
}
.product-grid .product-card .cover > img,
.product-grid .product-card .cover > a > img {
  display:block !important; width:auto !important; height:auto !important;
  max-width:100% !important; max-height:152px !important; object-fit:contain !important;
  object-position:center center !important; margin:0 auto !important; padding:0 !important;
  transform:none !important; box-shadow:none !important;
}
.product-grid .product-card .cover > a {
  width:100% !important; height:100% !important; display:flex !important;
  align-items:center !important; justify-content:center !important; overflow:hidden !important;
}
.product-grid .product-card:hover .cover img { transform:none !important; }
@media(max-width:700px) {
  .product-grid .product-card .cover { height:156px !important; min-height:156px !important; padding:6px !important; }
  .product-grid .product-card .cover > img,
  .product-grid .product-card .cover > a > img { max-height:142px !important; max-width:100% !important; }
}

/* Remove the visible navigation scrollbar while keeping horizontal swipe/scroll available on small screens. */
.site-header nav.primary-nav,
.site-header .header-row > nav.primary-nav {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.site-header nav.primary-nav::-webkit-scrollbar,
.site-header .header-row > nav.primary-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}


/* Global scrollbar visibility fix: hide browser/page scrollbar indicators without disabling scrolling. */
html, body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}


/* FINAL FIX: remove the visible vertical scrollbar gutter seen at the far left.
   Keep normal wheel/touch scrolling; hide only scrollbar visuals on every element. */
html, body { scrollbar-width: none !important; -ms-overflow-style: none !important; }
*, *::before, *::after { scrollbar-width: none !important; -ms-overflow-style: none !important; }
::-webkit-scrollbar, *::-webkit-scrollbar, *::before::-webkit-scrollbar, *::after::-webkit-scrollbar {
  width: 0 !important; height: 0 !important; display: none !important; background: transparent !important;
}
::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track, ::-webkit-scrollbar-button {
  display: none !important; width: 0 !important; height: 0 !important; background: transparent !important;
}

/* Ketabika home promotional banner: replaces the rotating latest-five-books hero */
.latest-hero{display:none!important}
.ketabika-promo-hero{position:relative;isolation:isolate;overflow:hidden;min-height:310px;background:linear-gradient(105deg,#d8d9ff 0%,#f6f6ff 48%,#f0f1ff 100%);border-top:1px solid #dfe1ff;border-bottom:1px solid #dfe1ff;color:#3435b8}
.promo-hero-inner{position:relative;display:grid;grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr);align-items:center;min-height:310px;gap:28px;padding-top:20px;padding-bottom:20px}
.promo-hero-copy{position:relative;z-index:2;text-align:right;padding:10px 5% 10px 0}
.promo-eyebrow{display:block;font-size:13px;color:#5354d7;margin-bottom:12px;font-weight:700}
.promo-hero-copy h1{font-size:clamp(30px,3.2vw,46px);line-height:1.2;margin:0 0 12px;color:#3034ae;font-weight:800;letter-spacing:-.6px}
.promo-hero-copy p{font-size:16px;line-height:1.8;color:#6669bf;margin:0 0 18px}
.promo-shop-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 25px;border-radius:28px;background:linear-gradient(120deg,#5148e8,#6255f4);color:#fff!important;text-decoration:none;font-weight:700;box-shadow:0 8px 18px #4d49db30}
.promo-book-art{height:265px;position:relative;overflow:hidden;border-radius:0 48% 48% 0;background:radial-gradient(ellipse at 65% 80%,#b8baff 0,transparent 45%),linear-gradient(100deg,#6c6be7,#b8baff 54%,#e4e5ff);display:flex;align-items:flex-end;padding:0 8% 22px;gap:7px}
.promo-book{height:65px;border-radius:4px 5px 2px 2px;box-shadow:0 10px 18px #25228c40;border-bottom:7px solid #292a9f;position:relative}
.promo-book:before{content:"";position:absolute;left:8px;right:8px;top:12px;height:2px;background:#dfe0ff;box-shadow:0 7px #dfe0ff,0 14px #dfe0ff;opacity:.8}
.book-one{width:35%;height:86px;background:linear-gradient(90deg,#292d9e,#6568ee)}.book-two{width:30%;height:120px;background:linear-gradient(90deg,#eeeaff,#aaaefb)}.book-three{width:28%;height:155px;background:linear-gradient(90deg,#3736bb,#7778ff)}
.promo-open-book{position:absolute;left:17%;top:22px;width:48%;height:75px;filter:drop-shadow(0 8px 8px #29288b45);display:flex;transform:rotate(-3deg)}
.promo-open-book span{width:50%;background:linear-gradient(145deg,#fff,#dfe1ff);border-radius:7px 2px 4px 3px;transform:skewY(5deg);border-bottom:5px solid #a3a5e9}.promo-open-book span+span{transform:skewY(-5deg);border-radius:2px 7px 3px 4px}
.promo-mug{position:absolute;bottom:22px;left:57%;width:62px;height:55px;border-radius:8px 8px 18px 18px;background:linear-gradient(100deg,#3937b8,#7475ff);color:#cfd0ff;display:grid;place-items:center;font-size:23px;box-shadow:0 8px 15px #24228c40}.promo-mug:after{content:"";position:absolute;right:-16px;top:11px;width:18px;height:23px;border:6px solid #5b5ce0;border-left:0;border-radius:0 16px 16px 0}
.promo-plant{position:absolute;left:4%;top:18px;font-size:90px;color:#4142b8;opacity:.55;transform:rotate(-20deg)}.promo-line-art{position:absolute;right:1%;top:22%;font-size:46px;line-height:.65;color:#a4a6ff;transform:rotate(-10deg);pointer-events:none}
@media(max-width:700px){.promo-hero-inner{grid-template-columns:1fr;gap:0;padding:0 0 22px}.promo-book-art{order:2;height:155px;border-radius:0 0 35% 0;padding-bottom:10px}.promo-open-book{height:46px;top:10px}.promo-book{transform:scale(.7);transform-origin:bottom}.promo-mug{transform:scale(.7);transform-origin:bottom}.promo-hero-copy{order:1;text-align:center;padding:26px 12px 12px}.promo-hero-copy h1{font-size:30px}.promo-hero-copy p{font-size:14px}.promo-line-art{display:none}}


/* HERO IMAGE FIX v2: use the supplied full-width library background */
.ketabika-promo-hero{min-height:clamp(300px,32vw,470px)!important;background:#f4f4ff url("../images/ketabika-hero-background.png") center/cover no-repeat!important;border-top:0!important;border-bottom:1px solid #dfe1ff!important;color:#292f9f!important}
.promo-hero-inner{min-height:clamp(300px,32vw,470px)!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:0!important;padding:32px clamp(20px,5vw,76px)!important}
.promo-book-art{display:none!important}
.promo-hero-copy{grid-column:2!important;grid-row:1!important;justify-self:stretch!important;align-self:center!important;text-align:right!important;padding:24px 2% 24px 4%!important;max-width:700px!important;background:linear-gradient(90deg,rgba(248,248,255,0),rgba(248,248,255,.14))!important;border-radius:20px!important}
.promo-eyebrow{color:#3436a8!important;font-size:14px!important;margin-bottom:14px!important;text-shadow:0 1px 8px #fff8}
.promo-hero-copy h1{color:#292f9f!important;font-size:clamp(32px,4vw,58px)!important;line-height:1.22!important;text-shadow:0 2px 12px #fff9!important;margin-bottom:18px!important}
.promo-hero-copy p{color:#343b9f!important;font-size:clamp(15px,1.35vw,20px)!important;line-height:1.9!important;text-shadow:0 1px 10px #fff9!important;margin-bottom:24px!important}
.promo-shop-btn{padding:14px 30px!important;min-height:50px!important;font-size:16px!important;box-shadow:0 8px 22px #3734b533!important}
.promo-line-art{display:none!important}
@media(max-width:700px){.ketabika-promo-hero,.promo-hero-inner{min-height:360px!important}.ketabika-promo-hero{background-position:38% center!important}.promo-hero-inner{grid-template-columns:1fr!important;padding:24px 18px!important}.promo-hero-copy{grid-column:1!important;max-width:100%!important;padding:22px!important;background:rgba(248,248,255,.78)!important;backdrop-filter:blur(2px)!important}.promo-hero-copy h1{font-size:32px!important}.promo-hero-copy p{font-size:15px!important}}


/* HERO COPY POSITION FIX v3: move text into the bright right-hand area of the supplied banner */
@media (min-width: 701px){.ketabika-promo-hero .promo-hero-copy{transform:translateX(360px)!important;}}
@media (max-width: 700px){.ketabika-promo-hero .promo-hero-copy{transform:none!important;}}

/* FINAL OVERRIDE: place promo text on the light right half of the supplied banner */
.ketabika-promo-hero .promo-hero-copy{grid-column:1!important;justify-self:end!important;width:min(50%,700px)!important;max-width:700px!important;margin-left:auto!important;margin-right:0!important;text-align:right!important;transform:none!important;background:rgba(248,248,255,.42)!important;border-radius:18px!important;padding:24px clamp(16px,2vw,34px)!important;box-sizing:border-box!important}
@media(max-width:700px){.ketabika-promo-hero .promo-hero-copy{width:100%!important;max-width:100%!important;margin:0!important;text-align:right!important;background:rgba(248,248,255,.84)!important}}


/* VERIFIED FIX: remove fixed 1180px container constraint across desktop layout */
html, body { width:100%; max-width:100%; margin-left:0; margin-right:0; }
.container,
main > .container,
footer > .container,
.category-section > .container,
.products-section > .container,
section .container {
  width: min(1320px, calc(100% - 36px)) !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.site-header > .container,
.promo-hero-inner {
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.site-header {
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  left:0 !important;
  right:0 !important;
}
.site-header > .header-row,
.site-header > .container.header-row {
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left: clamp(12px, 2vw, 32px) !important;
  padding-right: clamp(12px, 2vw, 32px) !important;
}
.site-header .primary-nav {
  width:100% !important;
  max-width:none !important;
}
@media (max-width:700px) {
  .container, main > .container, .site-header > .container, footer > .container,
  .promo-hero-inner, .category-section > .container, .products-section > .container {
    width: calc(100% - 20px) !important;
  }
  .site-header > .header-row, .site-header > .container.header-row {
    padding-left:10px !important;
    padding-right:10px !important;
  }
}

/* Cart item removal controls */
.cart-drawer-remove,.cart-remove-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #f0d7dc;background:#fff5f6;color:#c7354a;border-radius:9px;cursor:pointer;flex-shrink:0;width:36px;height:36px;font-size:17px;transition:background .2s,transform .2s}
.cart-drawer-remove:hover,.cart-remove-button:hover{background:#ffe5e9;transform:translateY(-1px)}
.cart-drawer-remove:disabled{opacity:.5;cursor:wait}
.cart-table th:last-child,.cart-table td:last-child{text-align:center;white-space:nowrap}

/* Compact, readable product pagination */
.pagination{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;direction:rtl;margin:28px auto 8px;padding:8px 0;max-width:100%}
.pagination a,.pagination .page-nav,.pagination .page-ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 10px;border:1px solid #deddf0;border-radius:10px;background:#fff;color:var(--kb-ink,#27245f);font-size:14px;line-height:1;white-space:nowrap}
.pagination a{transition:background .18s,border-color .18s,color .18s,transform .18s}
.pagination a:hover{border-color:var(--kb-primary,#5146e5);color:var(--kb-primary,#5146e5);transform:translateY(-1px)}
.pagination a.active{background:linear-gradient(135deg,var(--kb-primary,#5146e5),var(--kb-primary-dark,#3730a3));border-color:var(--kb-primary,#5146e5);color:#fff;font-weight:700;box-shadow:0 4px 12px rgba(84,80,218,.18)}
.pagination .page-nav{padding:0 13px;font-weight:700}
.pagination .page-nav.disabled{opacity:.4;background:#f7f7fb}
.pagination .page-ellipsis{min-width:20px;padding:0;border-color:transparent;background:transparent;letter-spacing:2px}
@media(max-width:600px){.pagination{gap:5px}.pagination a,.pagination .page-nav,.pagination .page-ellipsis{min-width:34px;height:35px;padding:0 8px;font-size:13px}.pagination .page-nav{padding:0 9px}}
