/* =====================================================================
   belhaif.ae  —  Main stylesheet
   Aesthetic: refined statesman — deep navy, gold accents, Cairo type.
   Works for both RTL (Arabic) and LTR (English).
   ===================================================================== */

:root{
  --navy:#0e2748;
  --navy-deep:#081a32;
  --blue:#2e6ca6;
  --gold:#b88a2e;
  --gold-soft:#e3c684;
  --ink:#1f2733;
  --muted:#5a6470;
  --paper:#f6f3ec;
  --paper-2:#efe9dc;
  --line:#ddd4c0;
  --white:#ffffff;
  --shadow:0 18px 40px -22px rgba(14,39,72,.40);
}

/* ---- base ----------------------------------------------------------- */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Cairo',-apple-system,'Segoe UI',Tahoma,sans-serif;
  color:var(--ink);
  background:var(--paper);
  line-height:1.9;
  -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:var(--blue);transition:color .2s;}
a:hover{color:var(--gold);}
img{width:200px;display:block;}
h1,h2,h3,h4{font-weight:800;line-height:1.4;color:var(--navy);}
section{position:relative;}

@keyframes ba-spin { to { transform: rotate(360deg); } }

/* ---- material icons sizing ----------------------------------------- */
.material-icons-outlined{vertical-align:middle;line-height:1;}

/* ---- generic helpers ----------------------------------------------- */
.ba-section{padding:80px 0;}
.ba-section.alt{background:var(--paper-2);}
.ba-section.navy{background:var(--navy);color:#e7eef6;}
.ba-kicker{
  display:inline-flex;align-items:center;gap:9px;
  color:var(--gold);font-weight:700;font-size:.85rem;
  letter-spacing:1px;margin-bottom:12px;text-transform:uppercase;
}
.ba-kicker::before{content:"";width:26px;height:2px;background:var(--gold);}
.ba-shead{margin-bottom:44px;}
.ba-shead h2{font-size:clamp(1.55rem,3vw,2.3rem);}
.ba-shead h2 em{font-style:normal;color:var(--gold);}
.ba-shead p{color:var(--muted);max-width:65ch;margin-top:8px;}
.navy .ba-shead h2{color:#fff;}
.navy .ba-shead p{color:#c2cdda;}

/* ---- buttons -------------------------------------------------------- */
.ba-btn{
  display:inline-flex;align-items:center;gap:8px;
  font-weight:700;font-size:.96rem;font-family:inherit;
  padding:13px 30px;border-radius:6px;border:1px solid transparent;
  cursor:pointer;transition:transform .22s,box-shadow .22s,background .22s;
}
.ba-btn-primary{background:var(--gold);color:var(--navy-deep);}
.ba-btn-primary:hover{transform:translateY(-3px);box-shadow:0 14px 26px -12px rgba(184,138,46,.6);color:var(--navy-deep);}
.ba-btn-navy{background:var(--navy);color:#fff;}
.ba-btn-navy:hover{background:var(--navy-deep);color:#fff;transform:translateY(-3px);}
.ba-btn-ghost{border-color:var(--line);color:var(--navy);background:transparent;}
.ba-btn-ghost:hover{border-color:var(--gold);color:var(--gold);}
.ba-btn-light{border-color:rgba(227,198,132,.5);color:var(--gold-soft);background:transparent;}
.ba-btn-light:hover{background:rgba(227,198,132,.12);color:var(--gold-soft);}
.ba-btn[disabled]{opacity:.5;cursor:not-allowed;transform:none;}

/* ---- top bar -------------------------------------------------------- */
.ba-topbar{
  background:var(--navy-deep);color:#aebccd;
  font-size:.8rem;padding:7px 0;
}
.ba-topbar-tag{color:#9fb0c4;}
.ba-lang-switch a{color:#aebccd;font-weight:700;}
.ba-lang-switch a.on{color:var(--gold-soft);}
.ba-lang-switch span{margin:0 6px;color:#5a6a7e;}

.ba-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;          /* keeps the z-index stacking local */
}

/* video layer */
.ba-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;        /* clicks pass through to the page */
  overflow: hidden;
}

/* scale the iframe to always cover the hero (16:9 -> cover) */
.ba-hero-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;             /* 16:9 of width */
  min-height: 100%;
  min-width: 177.78vh;         /* 16:9 of height */
  transform: translate(-50%, -50%);
  border: 0;
}

/* dark overlay so text stays readable */
.ba-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(10, 22, 40, 0.85) 0%,
    rgba(10, 22, 40, 0.55) 60%,
    rgba(10, 22, 40, 0.30) 100%
  );
}

/* make sure hero text sits above both layers */
.ba-hero .container {
  position: relative;
  z-index: 1;
}

/* ---- navbar --------------------------------------------------------- */
.ba-nav{
  background:var(--white);
  border-bottom:1px solid var(--line);
  box-shadow:0 4px 18px -12px rgba(0,0,0,.25);
  padding:10px 0;
}
.ba-brand{display:flex;align-items:center;gap:12px;}
.ba-brand-mark{
  width:44px;height:44px;border-radius:8px;
  background:var(--navy);color:var(--gold-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:1.4rem;font-weight:900;flex-shrink:0;
}
.ba-brand-text strong{
  display:block;color:var(--navy);font-size:.98rem;font-weight:800;line-height:1.3;
}
.ba-brand-text small{display:block;color:var(--muted);font-size:.72rem;}
.ba-menu{gap:2px;}
.ba-menu .nav-link{
  color:var(--ink);font-weight:600;font-size:.95rem;
  padding:8px 14px !important;border-radius:6px;position:relative;
}
.ba-menu .nav-link:hover{color:var(--gold);}
.ba-menu .nav-link.active{color:var(--navy);}
.ba-menu .nav-link.active::after{
  content:"";position:absolute;left:14px;right:14px;bottom:2px;
  height:2px;background:var(--gold);border-radius:2px;
}
.ba-cart-btn{
  position:relative;display:inline-flex;align-items:center;
  margin-inline-start:14px;width:44px;height:44px;border-radius:8px;
  background:var(--paper-2);color:var(--navy);justify-content:center;
}
.ba-cart-btn:hover{background:var(--navy);color:var(--gold-soft);}
.ba-cart-count{
  position:absolute;top:-6px;inset-inline-end:-6px;
  background:var(--gold);color:var(--navy-deep);
  font-size:.7rem;font-weight:900;
  min-width:20px;height:20px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;padding:0 5px;
}
.navbar-toggler{border:none;padding:4px;}
.navbar-toggler:focus{box-shadow:none;}
.navbar-toggler .material-icons-outlined{font-size:30px;color:var(--navy);}

/* ---- hero ----------------------------------------------------------- */
.ba-hero{
  background:
    radial-gradient(ellipse at 80% 10%,rgba(46,108,166,.32),transparent 55%),
    radial-gradient(ellipse at 5% 95%,rgba(184,138,46,.20),transparent 50%),
    linear-gradient(155deg,var(--navy-deep),var(--navy) 60%,#10325c);
  color:#fff;padding:90px 0;position:relative;overflow:hidden;
}
.ba-hero::before{
  content:"";position:absolute;inset:0;
  background-image:
    repeating-linear-gradient(45deg,rgba(255,255,255,.022) 0 2px,transparent 2px 26px);
  pointer-events:none;
}
.ba-hero .row{position:relative;z-index:2;}
.ba-hero-eyebrow{
  display:inline-flex;align-items:center;gap:10px;
  color:var(--gold-soft);font-weight:700;font-size:.82rem;
  letter-spacing:1px;margin-bottom:20px;text-transform:uppercase;
}
.ba-hero-eyebrow::before{content:"";width:32px;height:2px;background:var(--gold);}
.ba-hero h1{
  color:#fff;font-size:clamp(2rem,4.3vw,3.3rem);
  font-weight:900;line-height:1.3;margin-bottom:14px;
}
.ba-hero h1 .nm{color:var(--gold-soft);}
.ba-hero-roles{
  display:flex;flex-wrap:wrap;gap:8px;margin:22px 0 26px;padding:0;list-style:none;
}
.ba-hero-roles li{
  font-size:.82rem;font-weight:500;padding:6px 14px;border-radius:30px;
  background:rgba(255,255,255,.07);border:1px solid rgba(227,198,132,.28);
  color:#e8eef6;
}
.ba-hero-lead{
  color:#cdd9e6;font-size:1.05rem;max-width:48ch;
  border-inline-start:3px solid var(--gold);padding-inline-start:18px;
}
.ba-hero-cta{margin-top:30px;display:flex;gap:14px;flex-wrap:wrap;}

/* portrait placeholder box */
.ba-portrait{
  position:relative;max-width:380px;margin-inline:auto;
}
.ba-portrait .ph{
  aspect-ratio:4/4.7;border-radius:10px;
  border:1px solid rgba(227,198,132,.4);
  box-shadow:0 30px 60px -22px rgba(0,0,0,.6);
  position:relative;z-index:1;overflow:hidden;
}
.ba-portrait .ph img{width:100%;height:100%;object-fit:cover;}
.ba-portrait::before{
  content:"";position:absolute;top:20px;inset-inline-end:-20px;
  width:100%;height:100%;border:2px solid var(--gold);
  border-radius:10px;z-index:0;
}
.ba-portrait .badge-years{
  position:absolute;z-index:2;inset-inline-start:-16px;bottom:28px;
  background:var(--gold);color:var(--navy-deep);
  padding:14px 20px;border-radius:7px;text-align:center;
  box-shadow:0 14px 28px -10px rgba(0,0,0,.5);
}
.ba-portrait .badge-years b{display:block;font-size:1.7rem;line-height:1;font-weight:900;}
.ba-portrait .badge-years small{font-size:.72rem;font-weight:700;}

/* ---- image placeholder (generic gray box) -------------------------- */
.ba-imgph{
  background:
    repeating-linear-gradient(45deg,#e4ddcb 0 14px,#ded6c1 14px 28px);
  border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;
  color:#a99f86;
}
.ba-imgph .material-icons-outlined{font-size:48px;}

/* ---- stats strip ---------------------------------------------------- */
.ba-stats{background:var(--navy-deep);}
.ba-stats .row{margin:0;}
.ba-stat{
  text-align:center;padding:30px 12px;
  border-inline-start:1px solid rgba(255,255,255,.07);
}
.ba-stat:first-child{border-inline-start:none;}
.ba-stat .num{font-size:2.1rem;font-weight:900;color:var(--gold-soft);line-height:1;}
.ba-stat .lbl{font-size:.82rem;color:#aebccd;margin-top:8px;}

/* ---- cards ---------------------------------------------------------- */
.ba-card{
  background:var(--white);border:1px solid var(--line);
  border-radius:10px;padding:30px 26px;height:100%;
  transition:transform .32s,box-shadow .32s,border-color .32s;
  position:relative;overflow:hidden;
}
.ba-card::after{
  content:"";position:absolute;top:0;inset-inline-start:0;
  width:100%;height:3px;background:linear-gradient(90deg,var(--gold),transparent);
  transform:scaleX(0);transform-origin:inline-start;transition:transform .4s;
}
.ba-card:hover{transform:translateY(-6px);box-shadow:var(--shadow);border-color:var(--gold-soft);}
.ba-card:hover::after{transform:scaleX(1);}
.ba-card .ic{
  width:54px;height:54px;border-radius:50%;background:var(--navy);
  display:flex;align-items:center;justify-content:center;margin-bottom:18px;
}
.ba-card .ic .material-icons-outlined{color:var(--gold-soft);font-size:26px;}
.ba-card h3{font-size:1.15rem;margin-bottom:8px;}
.ba-card p{color:var(--muted);font-size:.96rem;margin:0;}

/* ---- page banner ---------------------------------------------------- */
.ba-banner{
  background:
    radial-gradient(ellipse at 85% 0%,rgba(46,108,166,.3),transparent 55%),
    linear-gradient(155deg,var(--navy-deep),var(--navy));
  color:#fff;padding:64px 0;text-align:center;position:relative;overflow:hidden;
}
.ba-banner::before{
  content:"";position:absolute;inset:0;
  background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.02) 0 2px,transparent 2px 28px);
}
.ba-banner .ba-kicker{color:var(--gold-soft);justify-content:center;}
.ba-banner h1{color:#fff;font-size:clamp(1.8rem,3.6vw,2.7rem);position:relative;}
.ba-banner p{color:#c2cdda;max-width:60ch;margin:10px auto 0;position:relative;}

/* ---- timeline ------------------------------------------------------- */
.ba-timeline{position:relative;padding-inline-start:30px;}
.ba-timeline::before{
  content:"";position:absolute;top:6px;bottom:6px;inset-inline-start:7px;
  width:2px;background:linear-gradient(var(--gold),var(--blue));
}
.ba-tl-item{position:relative;padding-bottom:30px;}
.ba-tl-item:last-child{padding-bottom:0;}
.ba-tl-item::before{
  content:"";position:absolute;inset-inline-start:-30px;top:5px;
  width:16px;height:16px;border-radius:50%;
  background:var(--paper);border:3px solid var(--gold);
  box-shadow:0 0 0 4px rgba(184,138,46,.14);
}
.alt .ba-tl-item::before{background:var(--paper-2);}
.ba-tl-item .yr{color:var(--blue);font-weight:800;font-size:.9rem;}
.ba-tl-item h4{font-size:1.08rem;margin:3px 0 4px;}
.ba-tl-item p{color:var(--muted);font-size:.95rem;margin:0;}

/* ---- quote ---------------------------------------------------------- */
.ba-quote{
  background:var(--navy);color:#eaf0f7;border-radius:10px;
  padding:34px 32px;position:relative;overflow:hidden;box-shadow:var(--shadow);
}
.ba-quote::before{
  content:"\201D";position:absolute;top:-20px;inset-inline-start:20px;
  font-size:7rem;color:rgba(227,198,132,.22);font-family:Georgia,serif;
}
.ba-quote .qt{font-size:1.2rem;line-height:2;position:relative;z-index:1;}
.ba-quote .qa{
  margin-top:16px;color:var(--gold-soft);font-weight:700;font-size:.86rem;
  border-top:1px solid rgba(255,255,255,.13);padding-top:14px;
}

/* ---- book cards (library) ------------------------------------------ */
.ba-book{
  background:var(--white);border:1px solid var(--line);
  border-radius:10px;overflow:hidden;height:100%;
  display:flex;flex-direction:column;
  transition:transform .3s,box-shadow .3s;
}
.ba-book:hover{transform:translateY(-6px);box-shadow:var(--shadow);}
.ba-book-cover{aspect-ratio:3/4;width:100%;}
.ba-book-body{padding:20px;display:flex;flex-direction:column;flex:1;}
.ba-book-body h3{font-size:1.1rem;margin-bottom:4px;}
.ba-book-author{color:var(--gold);font-size:.84rem;font-weight:600;margin-bottom:8px;}
.ba-book-desc{color:var(--muted);font-size:.9rem;flex:1;}
.ba-book-foot{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:14px;padding-top:14px;border-top:1px solid var(--line);
}
.ba-book-price{font-size:1.2rem;font-weight:900;color:var(--navy);}
.ba-stock-tag{font-size:.78rem;font-weight:700;padding:3px 10px;border-radius:20px;}
.ba-stock-in{background:#e6f4ea;color:#1f7a3d;}
.ba-stock-out{background:#f6e6e6;color:#a33;}

/* ---- forms ---------------------------------------------------------- */
.ba-form label{font-weight:700;font-size:.9rem;color:var(--navy);margin-bottom:6px;}
.ba-form .form-control,.ba-form .form-select{
  border:1px solid var(--line);border-radius:7px;
  padding:11px 14px;font-family:inherit;font-size:.95rem;
}
.ba-form .form-control:focus,.ba-form .form-select:focus{
  border-color:var(--gold);box-shadow:0 0 0 .2rem rgba(184,138,46,.15);
}
.ba-panel{
  background:var(--white);border:1px solid var(--line);
  border-radius:10px;padding:30px;
}

/* ---- alerts --------------------------------------------------------- */
.ba-alert{
  border-radius:8px;padding:14px 18px;font-weight:600;font-size:.95rem;
  display:flex;align-items:center;gap:10px;margin-bottom:20px;
}
.ba-alert-ok{background:#e6f4ea;color:#1f7a3d;border:1px solid #b5dcc1;}
.ba-alert-err{background:#f9e7e7;color:#a33;border:1px solid #e3bcbc;}
.ba-alert-info{background:#e7eef6;color:#23527a;border:1px solid #bcd0e3;}

/* ---- cart table ----------------------------------------------------- */
.ba-cart-table{width:100%;border-collapse:collapse;}
.ba-cart-table th{
  background:var(--navy);color:#fff;font-size:.85rem;font-weight:700;
  padding:12px 14px;text-align:start;
}
.ba-cart-table td{
  padding:14px;border-bottom:1px solid var(--line);
  background:var(--white);vertical-align:middle;
}
.ba-cart-thumb{width:60px;height:78px;border-radius:5px;}
.ba-qty-input{width:72px;text-align:center;}
.ba-summary{
  background:var(--white);border:1px solid var(--line);
  border-radius:10px;padding:24px;
}
.ba-summary .row-line{
  display:flex;justify-content:space-between;padding:8px 0;
  color:var(--muted);font-size:.95rem;
}
.ba-summary .row-total{
  display:flex;justify-content:space-between;
  padding:14px 0 4px;margin-top:8px;border-top:2px solid var(--navy);
  font-size:1.2rem;font-weight:900;color:var(--navy);
}

/* ---- footer --------------------------------------------------------- */
.ba-footer{background:var(--navy-deep);color:#aebccd;padding:54px 0 0;}
.ba-foot-brand{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.ba-foot-brand strong{color:#fff;font-size:1.05rem;}
.ba-foot-about{font-size:.92rem;color:#9fb0c4;max-width:42ch;}
.ba-foot-title{
  color:var(--gold-soft);font-size:.95rem;font-weight:700;margin-bottom:16px;
}
.ba-foot-links,.ba-foot-contact{list-style:none;padding:0;margin:0;}
.ba-foot-links li{margin-bottom:9px;}
.ba-foot-links a{color:#aebccd;font-size:.92rem;}
.ba-foot-links a:hover{color:var(--gold-soft);}
.ba-foot-contact li{
  display:flex;align-items:center;gap:10px;margin-bottom:11px;font-size:.92rem;
}
.ba-foot-contact .material-icons-outlined{color:var(--gold);font-size:20px;}
.ba-foot-contact a{color:#aebccd;}
.ba-foot-bottom{
  margin-top:40px;border-top:1px solid rgba(255,255,255,.08);
  padding:18px 0;text-align:center;font-size:.85rem;color:#8090a3;
}

/* ---- reveal animation ---------------------------------------------- */
[data-rv]{opacity:0;transform:translateY(26px);transition:opacity .7s,transform .7s;}
[data-rv].in{opacity:1;transform:none;}

/* ---- responsive ----------------------------------------------------- */
@media(max-width:991px){
  .ba-nav .ba-menu{margin:14px 0;}
  .ba-cart-btn{margin:6px 0;}
  .ba-hero{padding:64px 0;}
  .ba-section{padding:56px 0;}
  .ba-stat{border-top:1px solid rgba(255,255,255,.07);}
}
@media(max-width:575px){
  .ba-stat{border-inline-start:none;}
  .ba-hero h1{font-size:1.9rem;}
  .ba-portrait .badge-years{inset-inline-start:6px;}
}



/* --- book card cover (library grid) --- */
.ba-book-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: var(--paper-2, #f0ece4);
}
.ba-book-cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ba-book-cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.ba-book-cover-ph .material-icons-outlined {
  font-size: 56px; color: var(--muted, #b3a98f);
}
.ba-book-titlelink { color: inherit; text-decoration: none; }
.ba-book-titlelink:hover { text-decoration: underline; }

/* --- breadcrumb --- */
.ba-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .9rem; color: var(--muted); margin-bottom: 20px;
}
.ba-breadcrumb a { color: var(--navy, #1a3a5c); text-decoration: none; }
.ba-breadcrumb .material-icons-outlined { font-size: 18px; }

/* --- book detail layout --- */
.ba-bookpage {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}
.ba-bookpage-cover {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2, #f0ece4);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.ba-bookpage-cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ba-bookpage-cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.ba-bookpage-cover-ph .material-icons-outlined {
  font-size: 90px; color: var(--muted, #b3a98f);
}
.ba-bookpage-info h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 6px;
}
.ba-bookpage-author { color: var(--muted); font-size: 1.05rem; margin-bottom: 14px; }
.ba-bookpage-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ba-bookpage-price {
  font-size: 1.8rem; font-weight: 800;
  color: var(--gold, #c8a04e); margin-bottom: 20px;
}

/* metadata grid */
/* metadata cards — each label sits directly above its value */
.ba-bookmeta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.ba-meta-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--paper, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}
.ba-meta-label {
  font-size: .72rem;
  color: var(--muted, #8a8270);
  letter-spacing: .03em;
}
.ba-meta-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy, #1a3a5c);
  line-height: 1.4;
}
.ba-meta-isbn {
  font-size: .9rem;       /* ISBN is long — slightly smaller so it fits */
}

.ba-bookpage-buy { display: flex; gap: 10px; max-width: 360px; }

/* full description block */
.ba-bookpage-desc { margin-top: 40px; max-width: 760px; }
.ba-bookpage-desc h2 { font-size: 1.3rem; margin-bottom: 12px; }
.ba-bookpage-desc p { color: var(--muted); line-height: 1.9; }

/* =========================================================
 *  Reusable sidebar  —  ba-sidebar
 * ========================================================= */
.ba-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;                 /* sits below a sticky header; adjust to taste */
}

.ba-sb-card {
  background:  #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 20px;
}

/* section title inside a card */
.ba-sb-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy, #1a3a5c);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.ba-sb-title .material-icons-outlined {
  font-size: 20px;
  color: var(--gold, #c8a04e);
}

/* full-width button inside a card */
.ba-sb-btn {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
}

/* --- author card --- */
.ba-sb-author { text-align: center; }
.ba-sb-author-img {
  width: 96px; height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-2, #f0ece4);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--gold, #c8a04e);
}
.ba-sb-author-img img { width: 100%; height: 100%; object-fit: cover; }
.ba-sb-author-img .material-icons-outlined {
  font-size: 44px; color: var(--muted, #b3a98f);
}
.ba-sb-author-name {
  font-size: 1.05rem; font-weight: 800;
  color: var(--navy, #1a3a5c); margin: 0 0 10px;
}
.ba-sb-author-roles {
  list-style: none; margin: 0; padding: 0;
  font-size: .82rem; color: var(--muted, #8a8270); line-height: 1.7;
}

/* --- featured books --- */
.ba-sb-books { list-style: none; margin: 0; padding: 0; }
.ba-sb-books li { margin-bottom: 12px; }
.ba-sb-books li:last-child { margin-bottom: 0; }
.ba-sb-book {
  display: flex; gap: 12px; align-items: center;
  text-decoration: none;
}
.ba-sb-book-cover {
  flex: 0 0 auto;
  width: 48px; height: 64px;
  border-radius: 6px; overflow: hidden;
  background: var(--paper-2, #f0ece4);
  display: flex; align-items: center; justify-content: center;
}
.ba-sb-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.ba-sb-book-cover .material-icons-outlined {
  font-size: 24px; color: var(--muted, #b3a98f);
}
.ba-sb-book-info { display: flex; flex-direction: column; gap: 3px; }
.ba-sb-book-title {
  font-size: .9rem; font-weight: 700;
  color: var(--navy, #1a3a5c); line-height: 1.4;
}
.ba-sb-book:hover .ba-sb-book-title { color: var(--gold, #c8a04e); }
.ba-sb-book-price {
  font-size: .85rem; font-weight: 800; color: var(--gold, #c8a04e);
}

/* --- quick links --- */
.ba-sb-links { list-style: none; margin: 0; padding: 0; }
.ba-sb-links li { border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.ba-sb-links li:last-child { border-bottom: none; }
.ba-sb-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 0;
  font-size: .92rem; font-weight: 600;
  color: var(--ink, #333); text-decoration: none;
}
.ba-sb-links a .material-icons-outlined {
  font-size: 18px; color: var(--gold, #c8a04e);
}
.ba-sb-links a:hover { color: var(--gold, #c8a04e); }
.ba-sb-links a.is-current { color: var(--gold, #c8a04e); font-weight: 800; }

/* --- contact CTA --- */
.ba-sb-cta { background: var(--navy, #1a3a5c); }
.ba-sb-cta .ba-sb-title {
  color: #fff; border-bottom-color: rgba(255, 255, 255, 0.15);
}
.ba-sb-contact {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0;
  font-size: .88rem; color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.ba-sb-contact .material-icons-outlined {
  font-size: 18px; color: var(--gold, #c8a04e);
}
.ba-sb-contact:hover { color: #fff; }

/* on small screens the sidebar stops sticking and stacks normally */
@media (max-width: 992px) {
  .ba-sidebar { position: static; }
}

/* =========================================================
 *  News grid cards
 * ========================================================= */
.ba-news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ba-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
}
.ba-news-card-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2, #f0ece4);
}
.ba-news-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .3s ease;
}
.ba-news-card:hover .ba-news-card-img img { transform: scale(1.05); }
.ba-news-card-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.ba-news-card-ph .material-icons-outlined {
  font-size: 48px; color: var(--muted, #b3a98f);
}
.ba-news-card-body {
  display: flex; flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}
.ba-news-card-meta {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: .78rem; color: var(--muted, #8a8270);
  margin-bottom: 8px;
}
.ba-news-card-meta .material-icons-outlined { font-size: 15px; }
.ba-news-dot { opacity: .6; }
.ba-news-card-body h3 {
  font-size: 1.05rem; line-height: 1.45;
  margin: 0 0 8px;
}
.ba-news-card-body h3 a {
  color: var(--navy, #1a3a5c); text-decoration: none;
}
.ba-news-card-body h3 a:hover { color: var(--gold, #c8a04e); }
.ba-news-card-excerpt {
  font-size: .88rem; color: var(--muted, #8a8270);
  line-height: 1.7; margin: 0 0 12px;
}
.ba-news-card-link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .85rem; font-weight: 800;
  color: var(--gold, #c8a04e); text-decoration: none;
}
.ba-news-card-link .material-icons-outlined { font-size: 17px; }

/* =========================================================
 *  News detail page
 * ========================================================= */
.ba-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .9rem; color: var(--muted); margin-bottom: 20px;
}
.ba-breadcrumb a { color: var(--navy, #1a3a5c); text-decoration: none; }
.ba-breadcrumb .material-icons-outlined { font-size: 18px; }

.ba-newspage { max-width: 820px; margin: 0 auto; }
.ba-newspage-head { margin-bottom: 20px; }
.ba-newspage-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: .85rem; color: var(--muted, #8a8270);
  margin-bottom: 10px;
}
.ba-newspage-meta .material-icons-outlined { font-size: 17px; }
.ba-newspage-head h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.35; margin: 0;
}
.ba-newspage-img {
  border-radius: 14px; overflow: hidden;
  margin-bottom: 24px;
  background: var(--paper-2, #f0ece4);
}
.ba-newspage-img img {
  width: 100%; display: block;
  max-height: 460px; object-fit: cover;
}
.ba-newspage-body {
  font-size: 1.05rem; line-height: 2;
  color: var(--ink, #333);
}
.ba-newspage-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ba-newsmore { margin-top: 50px; }
.ba-newsmore-title {
  font-size: 1.3rem; margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold, #c8a04e);
  display: inline-block;
}

/* account page */
.ba-acc-info { margin: 0 0 16px; }
.ba-acc-info div { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.ba-acc-info div:last-child { border-bottom: none; }
.ba-acc-info dt { font-size: .78rem; color: var(--muted, #8a8270); margin-bottom: 2px; }
.ba-acc-info dd { margin: 0; font-weight: 700; color: var(--navy, #1a3a5c); }

.ba-acc-orders { display: flex; flex-direction: column; gap: 12px; }
.ba-acc-order {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 14px 16px;
}
.ba-acc-order-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.ba-acc-order-no { font-weight: 800; color: var(--navy, #1a3a5c); }
.ba-acc-order-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; color: var(--muted, #8a8270);
}
.ba-acc-order-meta .material-icons-outlined { font-size: 15px; vertical-align: -3px; }
.ba-acc-order-total { font-weight: 800; color: var(--gold, #c8a04e); }

/* amber warning alert — if you don't already have it */
.ba-alert-warn {
  background: #fdf3d8;
  color: #7a5a10;
  border: 1px solid #e8cf8a;
}

/* account — order meta rows in the detail view */
.ba-acc-meta { display: flex; flex-direction: column; gap: 3px; }
.ba-acc-meta-lbl {
  font-size: .76rem; color: var(--muted, #8a8270);
}

/* account — order totals block */
.ba-acc-totals {
  margin: 14px 0 0;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 12px;
}
.ba-acc-totals div {
  display: flex; justify-content: space-between;
  padding: 4px 0;
}
.ba-acc-totals dt { margin: 0; color: var(--muted, #8a8270); }
.ba-acc-totals dd { margin: 0; font-weight: 700; }
.ba-acc-totals-grand dt,
.ba-acc-totals-grand dd {
  font-size: 1.1rem; font-weight: 800;
  color: var(--navy, #1a3a5c);
}
.ba-acc-totals-grand { border-top: 1px solid rgba(0,0,0,.06); margin-top: 4px; padding-top: 6px; }

/* responsive */
@media (max-width: 768px) {
  .ba-bookpage { grid-template-columns: 1fr; gap: 24px; }
  .ba-bookpage-cover { max-width: 260px; margin: 0 auto; }
  .ba-bookmeta { grid-template-columns: 1fr; }
}
