/* ── eThela.in — Main Stylesheet ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:  #042C53;
  --blue-mid:   #185FA5;
  --green:      #1D9E75;
  --green-dark: #0F6E56;
  --amber:      #EF9F27;
  --coral:      #D85A30;
  --text:       #1a1a1a;
  --text-muted: #666;
  --border:     #e2e2e2;
  --surface:    #f8f8f6;
  --white:      #ffffff;
  --radius:     10px;
  --radius-lg:  14px;
}

body { font-family: 'Inter', sans-serif; background: var(--surface); color: var(--text); min-height: 100vh; }

/* ── NAV ── */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; height: 62px; display: flex; align-items: center; gap: 1rem; }
.nav-brand { font-family: 'Lora', serif; font-size: 20px; font-weight: 600; color: var(--blue-dark); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-tag { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; background: var(--green); color: #fff; padding: 2px 8px; border-radius: 20px; }
.nav-search { flex: 1; max-width: 360px; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.nav-search input { flex: 1; border: none; background: none; outline: none; padding: 8px 12px; font-size: 13px; }
.nav-search button { border: none; background: none; padding: 8px 12px; cursor: pointer; font-size: 15px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-links a { font-size: 13px; color: var(--text); text-decoration: none; padding: 6px 4px; }
.nav-links a:hover { color: var(--blue-mid); }
.cart-link { position: relative; }
.cart-badge { background: var(--coral); color: #fff; font-size: 10px; border-radius: 50%; width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; position: absolute; top: -5px; right: -10px; font-weight: 600; }

/* ── BUTTONS ── */
.btn-primary { background: var(--blue-dark); color: #fff !important; border: none; border-radius: var(--radius); padding: 9px 20px; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary:hover { background: var(--blue-mid); color: #fff !important; }
/* Ensure nav Sign Up button is always visible */
.nav-links a.btn-primary { background: var(--green); color: #fff !important; padding: 8px 18px; }
.nav-links a.btn-primary:hover { background: var(--green-dark); color: #fff !important; }
.btn-outline { background: none; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 18px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-outline:hover { background: var(--surface); }
.btn-full { width: 100%; text-align: center; padding: 12px; font-size: 15px; }
.btn-download { background: var(--green); color: #fff; border: none; border-radius: var(--radius); padding: 8px 16px; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-download:hover { background: var(--green-dark); }
.btn-sm { background: var(--blue-dark); color: #fff; border: none; border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; text-decoration: none; }
.checkout-btn { background: var(--green); color: #fff; border: none; border-radius: var(--radius); padding: 14px; font-size: 15px; font-weight: 500; cursor: pointer; width: 100%; margin-top: 1rem; }
.checkout-btn:hover { background: var(--green-dark); }

/* ── FLASH / ALERTS ── */
.flash-messages { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.flash { padding: 10px 16px; border-radius: var(--radius); font-size: 13px; margin: 10px 0; }
.flash-success { background: #E1F5EE; color: #085041; border: 1px solid #9FE1CB; }
.flash-error   { background: #FCEBEB; color: #501313; border: 1px solid #F7C1C1; }
.flash-info    { background: #E6F1FB; color: #042C53; border: 1px solid #B5D4F4; }
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 1rem; }
.alert-error { background: #FCEBEB; color: #501313; border: 1px solid #F7C1C1; }

/* ── CONTAINER ── */
.container { max-width: 1140px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-title { font-family: 'Lora', serif; font-size: 26px; font-weight: 600; margin-bottom: 1.5rem; }
.back-link { font-size: 13px; color: var(--blue-mid); text-decoration: none; display: inline-block; margin-bottom: 1.5rem; }
.back-link:hover { text-decoration: underline; }

/* ── HERO ── */
main > .hero { max-width: 1140px; margin: 2rem auto 0; padding: 0 1.5rem; }
.hero { background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 60%, var(--green) 100%); border-radius: var(--radius-lg); padding: 3rem 2.5rem; color: #fff; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; }
.hero-content h1 { font-family: 'Lora', serif; font-size: 30px; margin-bottom: 10px; }
.hero-content p { font-size: 15px; opacity: 0.85; margin-bottom: 1.5rem; }
.hero-emoji { font-size: 80px; opacity: 0.6; }
.hero-cta { background: #fff; color: var(--blue-dark); font-weight: 600; padding: 11px 24px; }
.hero-cta:hover { background: #f0f4ff; }

/* ── STORE ── */
.store-section { max-width: 1140px; margin: 2rem auto; padding: 0 1.5rem 2rem; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn { border: 1px solid var(--border); background: var(--white); border-radius: 20px; padding: 5px 16px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted); text-decoration: none; }
.filter-btn:hover, .filter-btn.active { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }
.search-label { font-size: 14px; color: var(--text-muted); margin-bottom: 1rem; }
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.25rem; }
.book-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; display: block; transition: border-color 0.2s, box-shadow 0.2s; }
.book-card:hover { border-color: #aaa; box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.book-cover { height: 155px; display: flex; align-items: center; justify-content: center; position: relative; }
.cover-emoji { font-size: 54px; }
.book-info { padding: 12px; }
.book-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; line-height: 1.4; }
.book-author { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.book-footer { display: flex; align-items: center; justify-content: space-between; }
.book-price { font-size: 15px; font-weight: 600; color: var(--blue-dark); }
.book-price.free { color: var(--green-dark); }
.book-rating { font-size: 12px; color: var(--text-muted); }
.book-rating::before { content: '★'; color: var(--amber); }
.badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600; position: absolute; top: 8px; right: 8px; }
.badge-bestseller { background: #FAEEDA; color: #633806; }
.badge-new        { background: #E1F5EE; color: #085041; }
.badge-free       { background: #E1F5EE; color: #085041; }

/* ── BOOK DETAIL ── */
.book-detail-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; }
.detail-cover { border-radius: var(--radius-lg); height: 320px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.detail-info h1 { font-family: 'Lora', serif; font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.detail-author { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.detail-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--text-muted); }
.stars { color: var(--amber); font-size: 15px; }
.detail-price { font-size: 28px; font-weight: 700; color: var(--blue-dark); margin-bottom: 16px; }
.detail-price.free { color: var(--green-dark); }
.detail-desc { font-size: 14px; line-height: 1.75; color: var(--text-muted); margin-bottom: 1.25rem; }
.detail-meta { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.detail-meta > div { font-size: 13px; }
.detail-meta label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.detail-tags span { font-size: 11px; border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; color: var(--text-muted); }
.detail-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owned-badge { font-size: 13px; color: var(--green-dark); font-weight: 500; }

/* ── CART ── */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.cart-cover { width: 50px; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.cart-info { flex: 1; }
.cart-title a { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.cart-title a:hover { color: var(--blue-mid); }
.cart-author { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cart-price { font-size: 16px; font-weight: 600; color: var(--blue-dark); white-space: nowrap; }
.remove-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 18px; padding: 4px; }
.remove-btn:hover { color: var(--coral); }
.cart-summary { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.cart-summary h3 { font-size: 15px; font-weight: 600; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }
.summary-row.discount { color: var(--green-dark); }
.summary-row.total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.free-text { color: var(--green-dark); font-weight: 500; }

/* ── SUCCESS PAGE ── */
.success-box { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.success-icon { font-size: 60px; margin-bottom: 1rem; }
.success-box h1 { font-family: 'Lora', serif; font-size: 26px; margin-bottom: 8px; }
.success-box p { color: var(--text-muted); font-size: 14px; margin-bottom: 6px; }
.download-list { max-width: 640px; margin: 0 auto 2rem; }
.download-list h2 { font-size: 16px; font-weight: 600; margin-bottom: 1rem; }
.dl-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.dl-cover { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.dl-info { flex: 1; }
.dl-title { font-size: 14px; font-weight: 600; }
.dl-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── LIBRARY ── */
.library-grid { display: flex; flex-direction: column; gap: 12px; }
.library-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.lib-cover { width: 50px; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.lib-info { flex: 1; }
.lib-title { font-size: 14px; font-weight: 600; }
.lib-author { font-size: 12px; color: var(--text-muted); }
.lib-meta { font-size: 11px; color: #aaa; margin-top: 3px; }

/* ── AUTH ── */
.auth-container { max-width: 420px; margin: 3rem auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem 2rem 1.5rem; }
.auth-container h1 { font-family: 'Lora', serif; font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; color: var(--text-muted); }
.auth-form input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 14px; outline: none; }
.auth-form input:focus { border-color: var(--blue-mid); }
.auth-footer { font-size: 13px; color: var(--text-muted); margin-top: 1.25rem; text-align: center; }
.auth-footer a { color: var(--blue-mid); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 52px; margin-bottom: 1rem; }
.empty-state a { color: var(--blue-mid); }

/* ── ADMIN ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; }
.stat-num { font-size: 28px; font-weight: 700; color: var(--blue-dark); }
.stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.admin-nav { display: flex; gap: 10px; margin-bottom: 2rem; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.data-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--surface); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.status-badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.status-completed { background: #E1F5EE; color: #085041; }
.status-pending   { background: #FAEEDA; color: #633806; }
.status-admin     { background: #E6F1FB; color: #042C53; }
.status-toggle { border: none; border-radius: 20px; padding: 3px 12px; font-size: 11px; font-weight: 500; cursor: pointer; }
.status-toggle.active   { background: #E1F5EE; color: #085041; }
.status-toggle.inactive { background: #f0f0f0; color: #888; }
.admin-form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; }
.admin-form-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 1.25rem; }
.admin-form .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.admin-form .form-group { margin-bottom: 12px; }
.admin-form label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; outline: none; background: #fff; }
.admin-form input:focus, .admin-form select:focus { border-color: var(--blue-mid); }
.admin-form textarea { min-height: 80px; resize: vertical; }

/* ── FOOTER ── */
.site-footer { background: var(--blue-dark); color: rgba(255,255,255,0.6); margin-top: 4rem; }
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.footer-brand { color: #fff; font-weight: 500; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .book-detail-layout { grid-template-columns: 1fr; }
  .detail-cover { height: 220px; }
  .cart-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .hero { flex-direction: column; text-align: center; }
  .hero-emoji { display: none; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 1rem; }
  .nav-search { order: 3; max-width: 100%; width: 100%; }
}

/* ── ADMIN TOOLBAR (shown on every page for admins) ── */
.admin-toolbar { background: #1a1a2e; border-bottom: 2px solid #D85A30; }
.admin-toolbar-inner { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; height: 38px; display: flex; align-items: center; gap: 1.5rem; }
.admin-toolbar-label { color: #aaa; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }
.admin-toolbar-links { display: flex; gap: 4px; align-items: center; }
.admin-toolbar-links a { color: #ccc; font-size: 12px; text-decoration: none; padding: 4px 10px; border-radius: 4px; }
.admin-toolbar-links a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.admin-toolbar-links .atb-highlight { background: #D85A30; color: #fff !important; font-weight: 600; }
.admin-toolbar-links .atb-highlight:hover { background: #b84a24; }

/* ── NAV USER NAME ── */
.nav-user { font-size: 13px; color: var(--text-muted); }

/* ── ADMIN BOOKS PAGE extras ── */
.row-hidden td { opacity: 0.45; }
.price-input { width: 72px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; font-size: 13px; text-align: right; }
.price-input:focus { border-color: var(--blue-mid); outline: none; }
.price-save-btn { background: var(--green); color: #fff; border: none; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.price-save-btn:hover { background: var(--green-dark); }
.quick-price-form { margin: 0; }
.file-yes { color: var(--green-dark); font-size: 12px; font-weight: 500; }
.file-auto { color: #aaa; font-size: 12px; }
.btn-sm-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-sm-outline:hover { background: var(--surface); }
.btn-sm-danger { background: #c0392b; }
.btn-sm-danger:hover { background: #96281b; }
.upload-group { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem; }
.upload-group label { font-weight: 600; margin-bottom: 8px; }
.current-file { font-size: 13px; margin-bottom: 8px; color: var(--green-dark); }
.upload-group small { display: block; margin-top: 6px; color: #888; font-size: 12px; }

/* ── CATEGORY PAGE ── */
.admin-grid-2 { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 768px) { .admin-grid-2 { grid-template-columns: 1fr; } }

/* ── COVER IMAGE ── */
.book-cover img, .detail-cover img { display:block; }
.book-card { position: relative; }
.book-card .badge { position:absolute; top:8px; right:8px; z-index:2; }
.cover-preview-wrap { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.cover-preview-thumb { width:60px; height:80px; object-fit:cover; border-radius:6px; border:1px solid var(--border); }

/* ── PAYMENT ── */
.payment-methods { margin:1rem 0; padding:10px; background:var(--surface); border-radius:var(--radius); }
.pm-label { font-size:11px; color:var(--text-muted); margin-bottom:6px; font-weight:500; }
.pm-icons { display:flex; gap:8px; flex-wrap:wrap; }
.pm-icon { font-size:12px; background:#fff; border:1px solid var(--border); border-radius:6px; padding:4px 10px; color:var(--text); }

/* ── SETTINGS PAGE ── */
.settings-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 0; flex-wrap: wrap; }
.setting-info { flex: 1; min-width: 200px; }
.setting-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.setting-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.setting-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.setting-input-wrap { display: flex; align-items: center; gap: 6px; }
.setting-input { width: 90px; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; font-size: 14px; font-weight: 500; text-align: right; outline: none; }
.setting-input:focus { border-color: var(--blue-mid); }
.setting-unit { font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 26px; transition: 0.3s; }
.toggle-slider::before { content:''; position:absolute; width:20px; height:20px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:0.3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* Discount preview */
.discount-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin-top: 1rem; }
.preview-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.preview-box { display: flex; flex-direction: column; gap: 6px; }
.preview-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text); }
.preview-discount { color: var(--green-dark); font-weight: 500; }
.preview-total { font-weight: 700; font-size: 15px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }

/* Config summary */
.config-summary { display: flex; flex-direction: column; gap: 0; }
.config-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.config-row:last-child { border-bottom: none; }
.config-row span:first-child { color: var(--text-muted); }

/* ── NEW FEATURES CSS ────────────────────────────────────────────────────────── */

/* Hero search form */
.hero-search-form { display:flex;gap:8px;max-width:460px; }
.hero-search-form input { flex:1;border:none;border-radius:var(--radius);padding:11px 16px;font-size:14px;outline:none; }
.hero-search-form button { background:#fff;color:var(--blue-dark);border:none;border-radius:var(--radius);padding:11px 20px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap; }

/* Section headers */
.section-hdr { display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem; }
.section-hdr h2 { font-size:17px;font-weight:600; }
.see-all { font-size:13px;color:var(--blue-mid);text-decoration:none; }
.see-all:hover { text-decoration:underline; }

/* Browse controls */
.browse-top { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:1rem; }
.filter-form { display:flex;gap:8px;flex-wrap:wrap; }
.filter-form select { border:1px solid var(--border);border-radius:var(--radius);padding:6px 10px;font-size:13px;background:var(--white);color:var(--text);cursor:pointer; }

/* Sale prices */
.book-price-old { font-size:12px;color:#aaa;text-decoration:line-through;margin-right:4px; }
.book-price.sale { color:#c0392b; }
.detail-price-old { font-size:18px;color:#aaa;text-decoration:line-through;margin-right:8px; }
.detail-price.sale { color:#c0392b; }
.badge-sale { background:#FCEBEB;color:#501313; }
.book-series { font-size:11px;color:var(--blue-mid);margin-bottom:4px; }
.preorder-card { border:2px dashed var(--blue-mid); }
.preorder-date { font-size:11px;color:var(--blue-mid);margin-bottom:4px; }

/* Book detail enhancements */
.series-tag { font-size:12px;color:var(--blue-mid);font-weight:500;margin-bottom:8px; }
.price-block { margin-bottom:1rem;display:flex;align-items:baseline;gap:8px; }
.sale-banner { background:#c0392b;color:#fff;text-align:center;border-radius:0 0 var(--radius) var(--radius);padding:8px;font-size:13px;font-weight:600; }
.share-row { display:flex;align-items:center;gap:8px;margin-top:1.25rem; }
.share-btn { font-size:12px;padding:4px 12px;border-radius:20px;text-decoration:none;font-weight:500; }
.share-btn.whatsapp { background:#25D366;color:#fff; }
.share-btn.twitter { background:#1DA1F2;color:#fff; }
.wishlisted { color:#c0392b;border-color:#c0392b; }

/* Reviews */
.section-card { background:var(--white);border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.5rem;margin-top:2rem; }
.section-card-title { font-size:17px;font-weight:600;margin-bottom:1.25rem; }
.reviews-list { display:flex;flex-direction:column;gap:14px;margin-bottom:1.5rem; }
.review-card { background:var(--surface);border-radius:var(--radius);padding:14px; }
.review-header { display:flex;align-items:center;gap:10px;margin-bottom:6px; }
.review-stars { color:#EF9F27;font-size:15px; }
.review-meta { font-size:12px;color:var(--text-muted); }
.review-title { font-size:14px;font-weight:600;margin-bottom:4px; }
.review-body { font-size:13px;color:var(--text-muted);line-height:1.6; }
.review-form-wrap { border-top:1px solid var(--border);padding-top:1.25rem;margin-top:1rem; }
.review-form-wrap h3 { font-size:15px;font-weight:600;margin-bottom:1rem; }
.star-picker { display:flex;gap:4px;margin-bottom:1rem;cursor:pointer; }
.star-pick { font-size:28px;line-height:1;transition:color 0.1s; }

/* Series list */
.series-list { display:flex;gap:12px;flex-wrap:wrap; }
.series-item { display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:var(--radius);text-decoration:none;color:var(--text); }
.series-item.current { border-color:var(--blue-mid);background:rgba(24,95,165,0.06); }
.series-num { font-size:20px;font-weight:700;color:var(--blue-mid);width:28px;text-align:center; }

/* Coupon box */
.coupon-box { background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius);padding:12px;margin:1rem 0; }

/* Profile layout */
.profile-layout { display:grid;grid-template-columns:1fr 380px;gap:1.5rem;align-items:start; }
@media(max-width:900px){ .profile-layout{grid-template-columns:1fr;} }

/* Author page */
.author-header { display:flex;align-items:center;gap:1.5rem;margin-bottom:2rem;padding:1.5rem;background:var(--white);border:1px solid var(--border);border-radius:var(--radius-lg); }
.author-avatar-big { width:80px;height:80px;border-radius:50%;background:var(--blue-dark);color:#fff;font-size:32px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0; }

/* Notification badge */
.cart-link { position:relative;font-size:18px; }

/* ══════════════════════════════════════════════════════════════════════════════
   NEW FEATURES — v5: Advanced Filters, Trending, Customers Also Bought
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── ADVANCED FILTERS PANEL ────────────────────────────────────────────────── */
.adv-filters-panel {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem 1rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideDown 0.2s ease;
}
.adv-filters-panel.open { display: block; }

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.adv-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
  margin-bottom: 1rem;
}
.adv-filter-group { display: flex; flex-direction: column; gap: 5px; }
.adv-filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.adv-filter-group select,
.adv-filter-group input[type="number"],
.adv-filter-group input[type="date"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  width: 100%;
}
.adv-filter-group select:focus,
.adv-filter-group input:focus { border-color: var(--blue-mid); background: #fff; }

.adv-filters-actions { display: flex; gap: 10px; align-items: center; }

/* Toggle button states */
.adv-toggle { font-size: 12px; padding: 6px 14px; white-space: nowrap; }
.adv-toggle.adv-active {
  background: var(--blue-dark);
  color: #fff;
  border-color: var(--blue-dark);
}

/* Active filter chips */
.active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.active-filters-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.filter-chip {
  font-size: 11px;
  background: #E6F1FB;
  color: var(--blue-dark);
  border: 1px solid #B5D4F4;
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 500;
}

/* Language tag on book cards */
.book-lang-tag { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; }

/* ── TRENDING SECTION ───────────────────────────────────────────────────────── */
.badge-trending { background: #FEE9D1; color: #7A3500; }
.trending-card  { border-color: #FDD8B0; }
.trending-card:hover { border-color: #EF9F27; box-shadow: 0 4px 14px rgba(239,159,39,0.15); }
.trending-views {
  font-size: 10px;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ── CUSTOMERS ALSO BOUGHT ─────────────────────────────────────────────────── */
.also-bought-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.also-bought-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.18s, background 0.18s;
}
.also-bought-item:hover {
  border-color: var(--blue-mid);
  background: #fff;
}
.ab-cover { flex-shrink: 0; width: 48px; height: 60px; border-radius: 6px; overflow: hidden; }
.ab-cover .book-cover { width: 48px !important; height: 60px !important; border-radius: 6px; font-size: 22px; }
.ab-info  { flex: 1; min-width: 0; }
.ab-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-author { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ab-meta  { display: flex; align-items: center; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.ab-price { font-size: 14px; font-weight: 700; color: var(--blue-dark); }
.ab-price.free { color: var(--green-dark); }
.ab-rating { font-size: 12px; color: var(--text-muted); }
.ab-co-count {
  font-size: 10px;
  color: var(--green-dark);
  background: #E1F5EE;
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 500;
}
.ab-action { flex-shrink: 0; }

@media (max-width: 600px) {
  .adv-filters-grid { grid-template-columns: 1fr 1fr; }
  .also-bought-item { gap: 10px; padding: 10px; }
  .ab-action { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   v6 — Product Page: Gallery, Video Embed, TOC, Look Inside, Devices
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── BOOK DETAIL LEFT COLUMN ────────────────────────────────────────────────── */
.book-detail-left { display: flex; flex-direction: column; gap: 0; }

/* ── COVER GALLERY ──────────────────────────────────────────────────────────── */
.cover-gallery { display: flex; flex-direction: column; gap: 10px; }
.cover-gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3/4;
  max-height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.cover-gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.cover-gallery-main:hover img { transform: scale(1.03); }
.gallery-badge-3d {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(4,44,83,0.85); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.cover-gallery-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.gallery-thumb {
  width: 58px; height: 72px;
  border: 2px solid var(--border);
  border-radius: 6px; overflow: hidden;
  cursor: pointer; flex-shrink: 0;
  transition: border-color 0.2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: var(--blue-mid); }
.gallery-thumb.active { border-color: var(--blue-dark); box-shadow: 0 0 0 2px var(--blue-dark); }

/* ── LOOK INSIDE BUTTON ─────────────────────────────────────────────────────── */
.look-inside-btn { font-weight: 600; }

/* ── VIDEO EMBED ────────────────────────────────────────────────────────────── */
.video-embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── TABLE OF CONTENTS ──────────────────────────────────────────────────────── */
.toc-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  padding-bottom: 2px;
}
.toc-header:hover .section-card-title { color: var(--blue-mid); }
.toc-toggle-icon { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.toc-body { display: none; margin-top: 1.25rem; }
.toc-body.open { display: block; }
.toc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0;
}
.toc-item {
  font-size: 13px; color: var(--text);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  counter-increment: toc-counter;
  display: flex; align-items: baseline; gap: 10px;
}
.toc-item:last-child { border-bottom: none; }
.toc-item::before {
  content: counter(toc-counter);
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  min-width: 18px; text-align: right;
  flex-shrink: 0;
}
.toc-list { counter-reset: toc-counter; }
.toc-item.toc-chapter { font-weight: 600; color: var(--blue-dark); background: var(--surface); }
.toc-buy-cta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}

/* ── LOOK INSIDE MODAL ──────────────────────────────────────────────────────── */
.li-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 900;
  backdrop-filter: blur(3px);
}
.li-backdrop.open { display: block; }
.look-inside-modal {
  display: none; position: fixed;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(820px, 96vw);
  max-height: 90vh;
  background: var(--blue-dark);
  border-radius: var(--radius-lg);
  z-index: 910;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}
.look-inside-modal.open { display: flex; }
.li-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: #fff; flex-shrink: 0;
}
.li-close-btn {
  background: rgba(255,255,255,0.15); color: #fff;
  border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.li-close-btn:hover { background: rgba(255,255,255,0.3); }
.li-viewer {
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
  background: #1a1a2e;
}
.li-pages {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.li-page {
  display: none; position: absolute; inset: 0;
  align-items: center; justify-content: center;
}
.li-page.active { display: flex; }
.li-page img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.li-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 12px;
  background: rgba(0,0,0,0.3); flex-shrink: 0;
}
.li-nav-btn {
  background: rgba(255,255,255,0.15); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 7px 18px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 0.2s;
}
.li-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.3); }
.li-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.li-page-num { font-size: 13px; color: rgba(255,255,255,0.7); min-width: 100px; text-align: center; }
.li-iframe-wrap { flex: 1; }
.li-iframe-wrap iframe { width: 100%; height: 100%; border: none; }
.li-modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0; gap: 12px; flex-wrap: wrap;
}

/* ── COMPATIBLE DEVICES ─────────────────────────────────────────────────────── */
.compatible-devices {
  margin: 1rem 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.compat-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 10px;
}
.compat-list { display: flex; gap: 10px; flex-wrap: wrap; }
.compat-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
}
.compat-icon { font-size: 14px; }
.compat-name { font-weight: 500; }

/* ── ADMIN: EXTRA COVERS GRID ───────────────────────────────────────────────── */
.extra-covers-grid {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin: 10px 0;
}
.extra-cover-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.extra-cover-item img {
  width: 60px; height: 80px;
  object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cover-gallery-main { max-height: 260px; }
  .toc-buy-cta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .look-inside-modal { width: 98vw; max-height: 95vh; }
  .li-modal-footer { flex-direction: column; align-items: flex-start; }
  .compat-list { gap: 7px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   v7 — Pricing & Offers: Flash Sale, Bundle, PWYW, Preorder, Subscription
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── FLASH SALE COUNTDOWN ───────────────────────────────────────────────────── */
.flash-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #7A3500, #c0392b);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px 14px;
  font-size: 13px;
}
.countdown-label { opacity: 0.85; font-size: 12px; }
.countdown-timer {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 3px 10px;
}

/* ── PAY WHAT YOU WANT ──────────────────────────────────────────────────────── */
.pwyw-box {
  background: #E6F9F3;
  border: 1.5px solid #9FE1CB;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 1rem;
}
.pwyw-label { font-size: 13px; font-weight: 700; color: #0F6E56; margin-bottom: 4px; }
.pwyw-desc  { font-size: 12px; color: #444; margin-bottom: 10px; }
.pwyw-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pwyw-currency {
  font-size: 18px;
  font-weight: 700;
  color: #0F6E56;
}
.pwyw-input-row input {
  width: 130px;
  border: 1.5px solid #9FE1CB;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 18px;
  font-weight: 700;
  color: #0F6E56;
  background: #fff;
  outline: none;
}
.pwyw-input-row input:focus { border-color: #0F6E56; }

/* ── PRE-ORDER NOTICE ───────────────────────────────────────────────────────── */
.preorder-notice {
  background: #E6F1FB;
  border: 1px solid #B5D4F4;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: #042C53;
  margin-bottom: 1rem;
}

/* ── BUNDLE SAVINGS BADGE (cart) ────────────────────────────────────────────── */
.bundle-savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #E1F5EE;
  color: #085041;
  border: 1px solid #9FE1CB;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  margin-top: 4px;
}

/* ── SUBSCRIPTION PAGE ──────────────────────────────────────────────────────── */
.sub-nav-link {
  color: var(--coral) !important;
  font-weight: 600 !important;
}


/* ══════════════════════════════════════════════════════════════════════════════
   v8 — User Accounts: Profile, Streaks, Calendar, Lists, Highlights
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── PROFILE LAYOUT ─────────────────────────────────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: start; }
.profile-left, .profile-right { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── PROFILE HERO ───────────────────────────────────────────────────────────── */
.profile-hero-card { display: flex; align-items: center; gap: 16px; }
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar-img  { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.profile-avatar-init {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--blue-dark); color: #fff;
  font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.profile-hero-info { min-width: 0; }
.profile-name  { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-bio   { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.profile-since { font-size: 12px; color: var(--text-muted); }

/* ── STREAK ─────────────────────────────────────────────────────────────────── */
.streak-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.streak-item {
  text-align: center; padding: 14px 8px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.streak-item.streak-current {
  background: linear-gradient(135deg,#FFF3E0,#FFE0B2);
  border-color: #FFCC80;
}
.streak-num  { font-size: 28px; font-weight: 800; color: var(--blue-dark); line-height: 1; }
.streak-item.streak-current .streak-num { color: #E65100; }
.streak-lbl  { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.3; }
.streak-unit { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.streak-fire-badge {
  display: inline-block;
  background: linear-gradient(135deg,#FF6B35,#F7931E);
  color: #fff; border-radius: 20px;
  padding: 5px 16px; font-size: 12px; font-weight: 600;
}

/* ── GOAL BAR ───────────────────────────────────────────────────────────────── */
.goal-wrap { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.goal-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.goal-bar-bg { background: var(--border); border-radius: 20px; height: 12px; }
.goal-bar-fill { background: linear-gradient(90deg,#1D9E75,#34D399); height: 12px; border-radius: 20px; transition: width 0.5s; }
.goal-pct { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ── ACTIVITY CALENDAR ──────────────────────────────────────────────────────── */
.activity-cal-wrap { overflow-x: auto; }
.activity-cal { display: flex; gap: 3px; padding: 4px 0; min-width: max-content; }
.cal-week { display: flex; flex-direction: column; gap: 3px; }
.cal-day {
  width: 12px; height: 12px; border-radius: 2px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: default;
}
.cal-day.level-0 { background: var(--surface); }
.cal-day.level-1 { background: #C6E9D9; border-color: #9FE1CB; }
.cal-day.level-2 { background: #6DC9A6; border-color: #1D9E75; }
.cal-day.level-3 { background: #1D9E75; border-color: #156E52; }
.cal-day.level-4 { background: #0F6E56; border-color: #085041; }
.cal-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; }

/* ── MINI PROGRESS BAR ──────────────────────────────────────────────────────── */
.mini-progress-bar  { background: var(--border); border-radius: 20px; height: 5px; width: 100%; }
.mini-progress-fill { background: var(--blue-mid); height: 5px; border-radius: 20px; }

/* ── LISTS PAGE ─────────────────────────────────────────────────────────────── */
.lists-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; align-items: start; }
.lists-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.lists-nav     { display: flex; flex-direction: column; gap: 4px; }
.list-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.list-nav-item:hover { background: var(--surface); border-color: var(--border); }
.list-nav-item.active { background: #E6F1FB; border-color: var(--blue-mid); }
.list-nav-emoji { font-size: 20px; flex-shrink: 0; }
.list-nav-name  { font-size: 13px; font-weight: 600; }
.list-nav-meta  { font-size: 11px; color: var(--text-muted); }
.list-books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; }
.list-book-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
.list-overview-card {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.list-overview-card:hover { border-color: var(--blue-mid); box-shadow: 0 2px 8px rgba(24,95,165,0.1); }
.list-card-emoji { font-size: 36px; flex-shrink: 0; }

/* ── PROFILE LIST ROWS ──────────────────────────────────────────────────────── */
.list-profile-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s;
}
.list-profile-row:hover { border-color: var(--blue-mid); }
.list-profile-emoji { font-size: 18px; }
.list-profile-name  { font-size: 13px; font-weight: 600; }
.list-profile-meta  { font-size: 11px; color: var(--text-muted); }

/* ── HIGHLIGHT CARDS (profile) ──────────────────────────────────────────────── */
.highlight-profile-card {
  border-left: 4px solid #FFF9C4;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 12px;
}
.hl-border-yellow { border-color: #EFC94C; }
.hl-border-green  { border-color: #4CAF50; }
.hl-border-blue   { border-color: #2196F3; }
.hl-border-pink   { border-color: #E91E63; }
.hl-book-name { font-size: 11px; font-weight: 600; color: var(--blue-mid); margin-bottom: 4px; }
.hl-text      { font-size: 13px; font-style: italic; color: var(--text); }
.hl-note      { font-size: 12px; color: var(--green-dark); margin-top: 4px; }
.hl-date      { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* ── PURCHASE HISTORY ───────────────────────────────────────────────────────── */
.purchase-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); flex-wrap: wrap;
}
.purchase-ref   { font-size: 11px; font-family: monospace; color: var(--text-muted); }
.purchase-titles{ font-size: 13px; font-weight: 500; }
.purchase-meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .lists-layout   { grid-template-columns: 1fr; }
  .streak-grid    { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 600px) {
  .streak-grid { grid-template-columns: repeat(3,1fr); gap: 6px; }
  .streak-num  { font-size: 22px; }
  .cal-day     { width: 9px; height: 9px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   v10 — Payments & Commerce: EMI, Multi-currency, Invoice, Refunds, Gift
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── EMI SELECTOR ───────────────────────────────────────────────────────────── */
.emi-selector {
  margin-top: 1.25rem;
  padding: 14px;
  background: #FFF8E1;
  border: 1px solid #FFD54F;
  border-radius: var(--radius);
}
.emi-title {
  font-size: 13px; font-weight: 700;
  color: #E65100; margin-bottom: 10px;
}
.emi-plans {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.emi-plan {
  flex: 1; min-width: 70px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.emi-plan:hover { border-color: #FFB300; }
.emi-plan.selected {
  border-color: #E65100;
  background: #FFF3E0;
}
.emi-months { font-size: 13px; font-weight: 700; color: #E65100; }
.emi-amt    { font-size: 16px; font-weight: 800; color: #1a1a1a; }
.emi-label  { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── PAYMENT METHODS GRID ────────────────────────────────────────────────────── */
.payment-methods-grid {
  margin: 1rem 0;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.pm-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; }
.pm-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
}
.pm-icons-row { font-size: 20px; display: flex; gap: 8px; margin-bottom: 5px; }
.pm-name { font-size: 12px; font-weight: 500; color: var(--text); }

/* ── CURRENCY SELECTOR ───────────────────────────────────────────────────────── */
.currency-switcher { display: flex; align-items: center; gap: 6px; }
.currency-switcher select { font-size: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; background: var(--surface); }

/* ── REFUND FORM ─────────────────────────────────────────────────────────────── */
.refund-form-toggle { animation: fadeSlideDown 0.2s ease; }

/* ── GIFT BANNER ─────────────────────────────────────────────────────────────── */
.gift-info-box {
  background: #FFF3F5; border: 1px solid #F8BBD9;
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 12px; color: #880E4F; margin-bottom: 1rem;
}

/* ── MULTI-CURRENCY AMOUNT ───────────────────────────────────────────────────── */
.foreign-price {
  font-size: 11px; color: var(--text-muted);
  display: block; margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   v11 — Reviews & Social: Verified, Helpful Votes, Community, Challenges
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── VERIFIED PURCHASE BADGE ────────────────────────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #E6F9F3;
  color: #085041;
  border: 1px solid #9FE1CB;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── HELPFUL VOTES ──────────────────────────────────────────────────────────── */
.helpful-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.helpful-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.helpful-btn:hover { background: var(--white); border-color: var(--blue-mid); }

/* ── ADMIN REPLY ON REVIEW ───────────────────────────────────────────────────── */
.review-reply {
  background: #E6F1FB;
  border-left: 3px solid var(--blue-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
}
.review-reply-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

/* ── COPY LINK BUTTON ────────────────────────────────────────────────────────── */
.share-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 1rem; }
.share-btn { padding: 4px 10px; border-radius: 4px; font-size: 11px; text-decoration: none; display: inline-block; }
.share-btn.whatsapp { background: #25D366; color: #fff; }
.share-btn.twitter  { background: #1DA1F2; color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════════
   v12 — Notifications: Cards, Badge, Tabs
   ══════════════════════════════════════════════════════════════════════════════ */

.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background .15s;
}
.notif-card.notif-unread { background: #F0F6FF; }
.notif-card:hover { background: var(--surface); }
.notif-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.notif-text  { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.notif-meta  { font-size: 11px; color: var(--text-muted); }
