:root{--olive:#536d2c;--olive-dark:#344b1e;--olive-light:#829b4d;--cream:#fbf1d9;--paper:#fff9ec;--ink:#343624;--muted:#77745f;--line:#e9dfc8}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:#fcf5e6;color:var(--ink);font-family:"Vazirmatn",Tahoma,sans-serif}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
.container{width:min(1440px,calc(100% - 48px));margin-inline:auto}
.site-header{background:var(--paper);box-shadow:0 3px 16px #51401b0b}
.topbar{min-height:96px;display:grid;grid-template-columns:300px minmax(220px,1fr) 180px;align-items:center;gap:30px}
.header-actions{display:flex;align-items:center;gap:18px}
.icon-action{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#f5ecd5;color:var(--olive-dark);font-size:23px;position:relative}
.icon-action small{position:absolute;top:-3px;right:-2px;background:var(--olive);color:white;border-radius:50%;font-size:10px;padding:2px 5px}
.search-box{height:48px;border:1px solid #e3d8bd;border-radius:28px;display:flex;align-items:center;padding:0 15px;background:#fffdf7}
.search-box input{border:0;outline:0;background:transparent;flex:1;min-width:0;color:var(--ink)}
.search-box button{border:0;background:transparent;color:var(--olive);font-size:28px;cursor:pointer}
.brand{display:flex;align-items:center;gap:12px;color:var(--olive-dark)}
.brand-mark{font-size:49px;line-height:1}
.brand strong{display:block;font-size:25px;font-weight:800}
.brand small{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.main-nav{background:var(--olive);color:#fff}
.nav-inner{min-height:53px;display:flex;align-items:center;justify-content:center;gap:clamp(18px,4vw,58px);overflow:auto;white-space:nowrap}
.nav-inner a{font-size:13px;opacity:.92;padding:8px 0}
.nav-inner a.active{background:var(--cream);color:var(--olive-dark);padding:8px 23px;border-radius:24px;font-weight:700}
.page-content{padding-top:20px}
.hero{min-height:370px;border-radius:26px;overflow:hidden;position:relative;background:radial-gradient(ellipse at 30% 45%,#a6bd67 0,#789849 38%,#3e5d22 100%);display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:42px 6%;color:#fff9e9}
.hero:before,.hero:after{content:"";position:absolute;border-radius:50%;background:#d8e3a433;filter:blur(1px)}
.hero:before{width:260px;height:260px;left:15%;top:-150px}
.hero:after{width:190px;height:190px;right:38%;bottom:-140px}
.hero-copy{position:relative;z-index:2;max-width:520px}
.eyebrow,.section-kicker{font-size:12px;color:#e7edc8;letter-spacing:.2px}
.hero h1{font-size:clamp(38px,5vw,62px);line-height:1.2;margin:10px 0 4px;font-weight:800}
.hero-lead{font-size:22px;font-weight:600;margin:0 0 10px}
.hero-description{font-size:14px;line-height:2;color:#f1f0d9;max-width:440px}
.primary-button,.light-button{display:inline-flex;align-items:center;gap:22px;border-radius:28px;padding:12px 22px;background:var(--cream);color:var(--olive-dark);font-size:13px;font-weight:700;margin-top:14px;box-shadow:0 5px 16px #1d321c25}
.hero-art{height:270px;position:relative;display:flex;align-items:center;justify-content:center;z-index:1}
.book-stack{position:absolute;left:17%;bottom:24px;width:230px;height:210px;transform:perspective(500px) rotateY(-12deg)}
.book{position:absolute;bottom:0;width:155px;height:205px;border-radius:5px 12px 12px 5px;box-shadow:10px 12px 20px #1d301d55;border:3px solid #e2d6a4}
.book-back{left:0;bottom:8px;background:linear-gradient(135deg,#e7d3a0,#9b773d);transform:rotate(-13deg)}
.book-middle{left:35px;background:linear-gradient(135deg,#405d2b,#193a27);transform:rotate(-5deg)}
.book-front{left:66px;background:linear-gradient(145deg,#718c46,#263e24);display:flex;flex-direction:column;justify-content:center;align-items:center;color:#f9e8b7;text-align:center;padding:15px}
.book-front span{font-size:27px;font-weight:800;line-height:1.5}
.book-front small{font-size:10px;margin-top:16px}
.headphones{position:absolute;right:17%;top:12px;width:150px;height:150px;border:19px solid #eadbb4;border-bottom-color:transparent;border-radius:90px 90px 30px 30px;color:#f4e9cb;font-size:56px;text-align:center;line-height:150px;transform:rotate(12deg);filter:drop-shadow(5px 8px 6px #26371d66)}
.phone-art{position:absolute;right:7%;bottom:15px;width:75px;height:145px;border:6px solid #202a22;border-radius:17px;background:linear-gradient(#b3c57d,#3f5d31);box-shadow:5px 8px 12px #17291666;display:flex;flex-direction:column;align-items:center;justify-content:space-around;color:#fff1c7;font-weight:700}
.phone-art b{background:#fff1c7;color:var(--olive);border-radius:50%;padding:5px 8px}
.leaf{position:absolute;color:#cbdc8b;font-size:76px;opacity:.85}
.leaf-one{left:5%;top:4px;transform:rotate(-25deg)}
.leaf-two{right:0;bottom:0;transform:rotate(35deg)}
.hero-dots{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);display:flex;gap:9px}
.hero-dots i{width:8px;height:8px;border-radius:50%;background:#e9e9cb88}
.hero-dots i.selected{background:#e9edc4}
.category-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:12px;margin:20px 0 42px}
.category-tile{min-height:105px;border-radius:18px;background:#fff9eb;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;border:1px solid #f1e8d5;transition:.2s}
.category-tile:hover{transform:translateY(-3px);box-shadow:0 9px 20px #66512a12}
.category-icon{font-size:32px;color:var(--olive)}
.category-tile strong{font-size:12px}
.content-section{margin:35px 0 48px}
.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}
.section-kicker{color:#8a9662}
.section-heading h2,.promo-band h2{font-size:24px;margin:4px 0 0;color:var(--olive-dark)}
.more-link{background:var(--olive);color:white;border-radius:25px;padding:10px 18px;font-size:12px}
.book-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.book-card{background:#fffaf0;border:1px solid var(--line);border-radius:20px;padding:15px;position:relative;min-width:0;box-shadow:0 5px 18px #54432208}
.favorite{position:absolute;top:22px;right:22px;z-index:2;border:0;background:#fff8e5d9;color:var(--olive);font-size:23px;width:34px;height:34px;border-radius:50%;cursor:pointer}
.cover{height:225px;max-width:175px;margin:0 auto 15px;border-radius:5px 12px 12px 5px;box-shadow:8px 9px 13px #302a1e35;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:16px;color:#f8e8bd;position:relative;overflow:hidden}
.cover:after{content:"";position:absolute;inset:7px;border:1px solid #fff5c966;pointer-events:none}
.cover strong{font-size:21px;line-height:1.6;z-index:1}
.cover small{font-size:10px;margin-top:8px;z-index:1}
.cover-ornament{font-size:36px;opacity:.65;margin-bottom:8px}
.cover-brand{position:absolute;bottom:13px;font-size:9px;opacity:.8}
.cover-green{background:linear-gradient(145deg,#647e38,#1c3b28)}
.cover-sand{background:linear-gradient(145deg,#cba35c,#78532d);color:#fff3d4}
.cover-dark{background:linear-gradient(145deg,#8c332a,#211d25)}
.cover-teal{background:linear-gradient(145deg,#2d756d,#123b42)}
.book-info{text-align:center}
.book-info>span{font-size:10px;color:#8c9666}
.book-info h3{font-size:15px;margin:4px 0}
.book-info p{font-size:11px;color:var(--muted);margin:0 0 8px}
.text-link{font-size:11px;color:var(--olive);font-weight:700}
.promo-band{border-radius:22px;padding:28px 5%;background:linear-gradient(100deg,#435f27,#78944a);color:#fff8e8;display:flex;align-items:center;justify-content:space-between;gap:20px}
.promo-band h2{color:#fff5dc}
.promo-band p{font-size:13px;color:#e6e9d2}
.promo-symbol{font-size:80px;opacity:.65}
.light-button{margin:0;white-space:nowrap}
.lower-section{margin-top:50px}
.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.feature-grid article{background:#fff9ec;border:1px solid var(--line);border-radius:18px;padding:22px}
.feature-grid article>span{font-size:32px;color:var(--olive)}
.feature-grid h3{font-size:16px;margin:8px 0}
.feature-grid p{font-size:12px;line-height:2;color:var(--muted);margin:0}
.site-footer{margin-top:55px;background:#293d20;color:#f4edda;padding:32px 0}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.footer-inner strong{font-size:21px}
.footer-inner p,.footer-inner small{font-size:11px;color:#d3d9c3}
.footer-links{display:flex;gap:22px;font-size:12px}
@media(max-width:900px){.topbar{grid-template-columns:220px minmax(220px,1fr) 150px;gap:12px}.brand strong{font-size:20px}.brand-mark{font-size:38px}.nav-inner{justify-content:flex-start}.hero{min-height:330px}.book-grid{grid-template-columns:repeat(2,1fr)}.category-strip{grid-template-columns:repeat(4,1fr)}}
@media(max-width:620px){.container{width:min(100% - 28px,500px)}.topbar{grid-template-columns:1fr auto;gap:10px;padding:12px 0}.brand{grid-column:1;grid-row:1}.header-actions{grid-column:2;grid-row:1;gap:7px}.icon-action{width:35px;height:35px;font-size:19px}.search-box{grid-column:1/-1;grid-row:2}.brand strong{font-size:18px}.brand small{font-size:9px}.brand-mark{font-size:32px}.nav-inner{min-height:46px;gap:22px}.nav-inner a{font-size:11px}.hero{grid-template-columns:1fr;min-height:500px;padding:28px 24px 45px}.hero-copy{align-self:start}.hero h1{font-size:42px}.hero-lead{font-size:18px}.hero-art{height:220px;margin-top:-5px}.book-stack{left:15%;transform:scale(.78);transform-origin:bottom left}.headphones{right:20%;transform:scale(.75)}.phone-art{right:8%;transform:scale(.8)}.category-strip{grid-template-columns:repeat(2,1fr);gap:8px;margin:14px 0 30px}.category-tile{min-height:90px}.category-icon{font-size:27px}.category-tile strong{font-size:11px}.section-heading h2,.promo-band h2{font-size:19px}.more-link{font-size:10px;padding:8px 12px}.book-grid{gap:10px}.book-card{padding:10px}.cover{height:185px;width:100%}.cover strong{font-size:17px}.book-info h3{font-size:13px}.promo-band{flex-wrap:wrap;padding:22px}.promo-symbol{font-size:52px}.light-button{font-size:11px;padding:10px 15px}.feature-grid{grid-template-columns:1fr}.footer-inner{display:grid;grid-template-columns:1fr}.footer-links{gap:15px;flex-wrap:wrap}}

/* Account pages share the bookstore palette and remain usable on small screens. */
.auth-page{min-height:calc(100vh - 40px);display:grid;place-items:center;padding:38px 18px}
.auth-card{width:min(100%,460px);background:#fffaf0;border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:0 16px 45px #493b1b12}
.auth-card-wide{width:min(100%,650px)}
.auth-brand{display:flex;align-items:center;gap:9px;color:var(--olive-dark);font-size:22px}
.auth-brand span{font-size:38px}
.auth-kicker{font-size:11px;color:#8a9662;margin:8px 0 0}
.auth-card h1{font-size:25px;margin:12px 0 5px;color:var(--olive-dark)}
.auth-description{font-size:13px;line-height:2;color:var(--muted);margin:0 0 22px}
.auth-form{display:grid;gap:10px}
.auth-form label{font-size:12px;font-weight:700}
.auth-form input{width:100%;height:49px;border:1px solid #e3d8bd;border-radius:12px;background:#fffdf7;padding:0 14px;outline:none;direction:ltr;text-align:right}
.auth-form input:focus{border-color:var(--olive);box-shadow:0 0 0 3px #536d2c18}
.auth-submit{width:100%;min-height:48px;border:0;border-radius:13px;background:var(--olive);color:white;font-weight:700;cursor:pointer;margin-top:8px}
.auth-submit:hover{background:var(--olive-dark)}
.auth-switch,.auth-home{display:block;text-align:center;font-size:12px;margin:20px 0 0;color:var(--muted)}
.auth-switch a,.auth-home{color:var(--olive);font-weight:700}
.form-errors,.field-error{font-size:12px;color:#a33b2e;line-height:1.9}
.form-message{font-size:12px;padding:10px 12px;border-radius:10px;margin:10px 0;background:#eef2e5;color:var(--olive-dark)}
.form-message.error{background:#fae9e4;color:#963c2e}
.dev-otp{display:grid;gap:5px;padding:14px;border:1px dashed #9aab6d;border-radius:13px;background:#f2f4e8;margin:16px 0;text-align:center}
.dev-otp span{font-size:30px;letter-spacing:8px;font-weight:800;color:var(--olive-dark);direction:ltr}
.dev-otp small{font-size:10px;color:var(--muted)}
.session-list{list-style:none;padding:0;margin:20px 0}
.session-list li{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--line);font-size:12px}
@media(max-width:520px){.auth-card{padding:25px 20px}.auth-card h1{font-size:22px}}

.auth-logout{background:#8e493d}
.auth-logout:hover{background:#71372e}

/* Profile and role-management controls reuse the shared authentication layout. */
.profile-mobile{display:grid;gap:7px;margin:0 0 18px}
.profile-mobile label{font-size:12px;font-weight:700}
.profile-mobile-value{padding:14px;border:1px solid #e3d8bd;border-radius:12px;background:#f4f1e5;font-weight:700}
.profile-mobile small{font-size:10px;line-height:1.8;color:var(--muted)}
.auth-card h2{font-size:16px;color:var(--olive-dark);margin:20px 0 10px}
.auth-form select{width:100%;border:1px solid #e3d8bd;border-radius:12px;background:#fffdf7;padding:12px;min-height:48px}
.auth-form select[multiple]{min-height:180px}

/* Profile dashboard: retain the existing olive, cream, and paper visual identity. */
.profile-site-header{border-bottom:1px solid var(--line)}
.profile-page{padding-top:28px;padding-bottom:4px}
.profile-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 4px 24px}
.profile-heading h1{font-size:clamp(25px,3vw,36px);color:var(--olive-dark);margin:2px 0 0;font-weight:800}
.profile-eyebrow{font-size:11px;color:var(--muted);margin:0}
.profile-breadcrumb{display:flex;align-items:center;gap:13px;padding:10px 18px;border:1px solid var(--line);border-radius:28px;background:#fffaf0;font-size:12px;color:var(--muted)}
.profile-breadcrumb strong{color:var(--olive-dark)}
.profile-breadcrumb span{font-size:20px;color:var(--olive-light)}
.profile-layout{display:grid;grid-template-columns:minmax(250px,31%) minmax(0,1fr);gap:24px;align-items:stretch;margin-bottom:24px}
.profile-sidebar,.profile-main-panel{background:#fffaf0;border:1px solid var(--line);border-radius:22px;box-shadow:0 8px 28px #51401b08}
.profile-sidebar{padding:25px 20px}
.profile-avatar{width:126px;height:126px;border-radius:50%;margin:0 auto 22px;display:grid;place-items:center;background:#e9edda;color:var(--olive);font-size:82px;line-height:1}
.profile-menu{display:grid;gap:6px}
.profile-menu-item{min-height:54px;display:flex;align-items:center;gap:13px;padding:9px 13px;border:0;border-radius:13px;background:transparent;color:var(--ink);font:inherit;text-align:right;width:100%}
.profile-menu-item>span{width:30px;text-align:center;font-size:24px;color:var(--olive-dark)}
.profile-menu-item strong{font-size:13px;font-weight:700;flex:1}
.profile-menu-item>b{font-size:22px;font-weight:400}
.profile-menu-item.active{background:#edf1df;color:var(--olive-dark)}
.profile-menu-item.is-placeholder{opacity:.67;cursor:default}
.profile-menu-item small{font-size:9px;color:var(--muted);white-space:nowrap}
.profile-logout-form{margin:0}
.profile-logout{cursor:pointer}
.profile-logout:hover{background:#f5e9df;color:#873f32}
.profile-logout:hover>span{color:#873f32}
.profile-main-panel{padding:28px 32px}
.profile-panel-heading{margin-bottom:22px}
.profile-panel-heading h2{font-size:21px;color:var(--olive-dark);margin:0 0 5px}
.profile-panel-heading p{font-size:12px;color:var(--muted);margin:0}
.profile-form{display:grid;gap:17px}
.profile-field{display:grid;gap:7px}
.profile-field label{font-size:13px;font-weight:700;color:var(--ink)}
.profile-field label span{font-size:11px;color:var(--muted);font-weight:400}
.profile-field input{width:100%;height:53px;border:1px solid #e3d8bd;border-radius:13px;background:#fffdf7;padding:0 16px;color:var(--ink);font:inherit;outline:none}
.profile-field input:focus{border-color:var(--olive);box-shadow:0 0 0 3px #536d2c18}
.profile-field input[readonly]{background:#f2efe4;color:var(--muted);cursor:not-allowed;text-align:right}
.profile-field input[name="email"]{text-align:left}
.profile-field small{font-size:10px;line-height:1.8;color:var(--muted)}
.profile-form-actions{display:flex;justify-content:flex-start;margin-top:2px}
.profile-save-button{min-width:220px;min-height:52px;padding:10px 25px;border:0;border-radius:13px;background:var(--olive);color:#fff;font:inherit;font-weight:800;cursor:pointer}
.profile-save-button:hover{background:var(--olive-dark)}
.profile-extra-links{display:flex;gap:20px;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:23px;padding-top:17px}
.profile-extra-links a{font-size:11px;color:var(--olive);font-weight:700}
.profile-footer{margin-top:0}
@media(max-width:760px){.profile-layout{grid-template-columns:1fr;gap:15px}.profile-sidebar{padding:18px}.profile-avatar{width:94px;height:94px;font-size:62px;margin-bottom:15px}.profile-menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.profile-menu-item{gap:7px;padding:8px}.profile-menu-item strong{font-size:11px}.profile-menu-item>span{width:23px;font-size:20px}.profile-menu-item small{display:none}.profile-main-panel{padding:23px 20px}}
@media(max-width:520px){.profile-page{padding-top:20px}.profile-heading{align-items:flex-start;flex-direction:column;margin-bottom:17px;gap:10px}.profile-breadcrumb{padding:8px 13px}.profile-main-panel{padding:20px 15px}.profile-panel-heading h2{font-size:18px}.profile-field input{height:49px}.profile-save-button{width:100%;min-width:0}.profile-form-actions{width:100%}.profile-menu-item{min-height:49px}.profile-extra-links{gap:12px}}

/* Global storefront shell: the same header, search bar, and green navigation appear on every page. */
.topbar{grid-template-columns:300px minmax(220px,1fr) 180px;gap:30px;min-height:96px}
.header-actions{justify-content:flex-start;gap:18px}
.icon-action{border:1px solid #eee4cd;background:#fbf4e4;transition:background .18s ease,transform .18s ease}
.icon-action:hover{background:#f0e8d2;transform:translateY(-1px)}
.icon-action svg,.search-box button svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.search-box{border:1.5px solid #d9cfb8;background:#fffaf0;min-width:0}
.search-box input{font-family:inherit;font-size:14px}
.search-box button{display:grid;place-items:center;padding:2px}
.main-nav{background:#24451d;box-shadow:0 3px 8px #182b1522}
.nav-inner{justify-content:space-between;gap:14px;min-height:58px}
.nav-inner a{font-size:14px;padding:17px 12px;border-inline-start:1px solid #ffffff18;flex:1;text-align:center}
.nav-inner a:first-child{border-inline-start:0}
.nav-inner a:hover{background:#ffffff12;opacity:1}
.nav-inner a.active{background:transparent;color:#fff;padding:17px 12px;border-radius:0;font-weight:700}
.site-footer{background:#24451d;margin-top:54px;padding:25px 0}
.footer-inner{gap:25px}
.footer-social{display:flex;align-items:center;gap:12px;direction:ltr}
.footer-social span{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#fffaf0;color:#24451d;font-size:17px;font-weight:800}
.footer-links{display:flex;align-items:center;gap:0}
.footer-links a{padding:0 20px;border-inline-start:1px solid #ffffff55;font-size:12px}
.footer-links a:first-child{border-inline-start:0}
.global-messages{padding-top:12px}
.form-message{line-height:1.9}

/* Shared page containers and catalog controls. */
.catalog-page,.categories-page,.detail-page,.library-page,.favorites-page{padding-top:30px;padding-bottom:20px}
.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 22px}
.page-title-row h1{font-size:clamp(22px,3vw,32px);margin:0;color:var(--olive-dark)}
.page-title-row>span{font-size:12px;color:var(--muted);white-space:nowrap}
.search-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:start}
.filter-panel{background:#fffaf0;border:1px solid var(--line);border-radius:20px;overflow:hidden}
.filter-panel h2{margin:0;background:#24451d;color:white;padding:16px 20px;font-size:19px}
.catalog-filters{padding:17px;display:grid;gap:13px}
.catalog-filters>label{display:grid;gap:6px;font-size:12px;font-weight:700}
.catalog-filters input:not([type=checkbox]),.catalog-filters select{width:100%;min-width:0;height:42px;border:1px solid var(--line);border-radius:10px;background:#fffdf7;padding:0 10px;color:var(--ink);font:inherit;font-size:12px}
.filter-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.filter-two label{display:grid;gap:6px;font-size:11px}
.check-filter{display:flex!important;align-items:center;gap:8px!important;font-size:12px}
.check-filter input{accent-color:var(--olive)}
.filter-submit{width:100%;justify-content:center;border:0;cursor:pointer;margin:4px 0 0}
.clear-filters{font-size:11px;color:var(--muted);text-align:center}
.search-results{min-width:0}
.search-query{font-size:13px;color:var(--muted);margin:0 0 15px}
.search-book-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.search-book-grid .book-card{padding:14px}
.search-book-grid .cover{width:100%;height:250px;max-width:190px}
.cover img,.detail-cover img,.library-cover img{width:100%;height:100%;object-fit:contain;display:block}
.cover:has(img){padding:0;background:#f4ecd9}
.cover:has(img):after{display:none}
.book-rating{color:#d89c18;font-size:12px;margin:7px 0}
.format-chips{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;margin:8px 0}
.format-chips span,.format-options span,.library-format{font-size:10px;background:#eef0df;color:var(--olive-dark);border-radius:20px;padding:5px 9px}
.pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin:30px auto 10px;color:var(--muted);font-size:12px}
.pagination a{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;font-size:22px;background:#fffaf0;color:var(--olive-dark)}
.empty-state{padding:35px 20px;text-align:center;border:1px solid var(--line);border-radius:18px;background:#fffaf0;color:var(--muted);line-height:2}
.empty-state h2{color:var(--olive-dark);font-size:18px}
.empty-state .primary-button{margin-top:12px}

/* Product detail and review presentation. */
.product-detail-panel{display:grid;grid-template-columns:minmax(260px,40%) minmax(0,1fr);gap:36px;padding:30px;background:#fffaf0;border:1px solid var(--line);border-radius:22px}
.product-cover-area{position:relative;display:grid;place-items:center;min-height:420px}
.detail-cover{width:min(100%,330px);height:420px;border-radius:8px 15px 15px 8px;overflow:hidden;box-shadow:12px 15px 22px #2c291b25;background:linear-gradient(145deg,#244c3c,#142e37);color:#fff0c7;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:25px}
.detail-cover strong{font-size:30px;line-height:1.7;margin:15px 0}
.detail-cover span{font-size:14px;opacity:.7}
.detail-cover small{font-size:12px}
.detail-favorite{position:absolute;top:0;left:10px;z-index:2}
.detail-favorite button{width:42px;height:42px;border:0;border-radius:50%;background:#fff8e7;color:#a94a35;font-size:27px;cursor:pointer}
.product-detail-info h1{font-size:clamp(26px,3.2vw,38px);margin:3px 0 12px;color:#171812}
.product-subtitle,.product-authors{font-size:14px;color:var(--muted);margin:7px 0}
.detail-rating{font-size:20px;color:#d99d18;margin:17px 0}
.detail-rating small{font-size:12px;color:var(--muted)}
.product-description{font-size:14px;line-height:2.3;color:#484839;margin:20px 0}
.format-options{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:18px 0}
.format-options strong{font-size:12px}
.format-purchase-list{display:grid;gap:9px;margin-top:22px}
.format-purchase-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fffdf7}
.format-purchase-row>div{display:grid;gap:5px}
.format-purchase-row>div strong{font-size:13px}
.format-purchase-row>div span{font-size:12px;color:var(--olive-dark);font-weight:700}
.format-purchase-row .primary-button,.format-purchase-row form{margin:0}
.format-purchase-row .primary-button{white-space:nowrap;border:0;cursor:pointer;font-size:11px;padding:10px 14px}
.future-store-note{font-size:10px;color:var(--muted);max-width:160px;text-align:left}
.reviews-panel{margin-top:28px;padding:26px;background:#fffaf0;border:1px solid var(--line);border-radius:22px}
.reviews-panel .section-heading{align-items:center}
.reviews-panel .section-heading h2{font-size:23px}
.review-form{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;align-items:center;padding:18px;border:1px solid var(--line);border-radius:15px;margin-bottom:20px}
.review-form label{font-size:12px;font-weight:700}
.review-form select,.review-form textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:#fffdf7;padding:10px;font:inherit;font-size:12px}
.review-form textarea{grid-column:1/-1;resize:vertical}
.review-form button{grid-column:1/-1;justify-self:start;border:0;cursor:pointer}
.review-list{display:grid;gap:12px}
.review-card{padding:17px;border:1px solid var(--line);border-radius:14px;background:#fffdf7}
.review-card-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.review-card-heading strong{font-size:13px}
.stars{color:#d99d18;letter-spacing:2px}
.verified-buyer{font-size:10px;color:var(--olive-dark);background:#e9efd9;border-radius:20px;padding:5px 9px}
.review-card>p,.admin-reply p{font-size:12px;line-height:2;color:#555443}
.admin-reply{border-right:3px solid var(--olive);padding:6px 12px;background:#f3f3e9}
.admin-reply strong{font-size:11px;color:var(--olive-dark)}
.report-form{display:flex;gap:8px;margin-top:10px}
.report-form input{flex:1;min-width:0;border:1px solid var(--line);border-radius:8px;padding:8px;font:inherit;font-size:10px}
.report-form button{border:0;background:transparent;color:#9b5143;font-size:10px;cursor:pointer}
.muted-note{font-size:12px;color:var(--muted)}

/* Category directory: all active categories intentionally fit in one unpaginated list. */
.categories-banner,.library-banner{min-height:175px;padding:25px 35px;border-radius:22px;background:#f4f0df;display:flex;align-items:center;justify-content:space-between;border-bottom:4px solid var(--olive);margin-bottom:28px}
.categories-banner h1,.library-banner h1{font-size:clamp(27px,4vw,40px);color:var(--olive-dark);margin:10px 0 2px}
.categories-banner p,.library-banner p{font-size:14px;color:var(--olive-dark);margin:0}
.categories-banner>div:first-child>span,.library-banner>div:first-child>span{font-size:11px;color:var(--muted)}
.categories-banner-art,.library-banner-art{font-size:76px;color:var(--olive);opacity:.55}
.categories-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:start}
.popular-categories{background:#fffaf0;border:1px solid var(--line);border-radius:18px;padding:18px}
.popular-categories h2{font-size:17px;color:var(--olive-dark);margin:0 0 10px}
.popular-categories>a{display:flex;justify-content:space-between;padding:14px 4px;border-bottom:1px solid var(--line);font-size:12px}
.popular-categories>a span{font-size:19px}
.category-aside-note{margin-top:20px;padding:18px;border-radius:14px;background:#eef0df;color:var(--olive-dark);font-size:12px;line-height:2}
.category-directory{min-width:0}
.category-directory .section-heading{align-items:center}
.category-directory .section-heading h2{font-size:21px}
.category-directory .section-heading>span{font-size:11px;color:var(--muted)}
.category-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.category-card{min-height:112px;padding:18px;border:1px solid var(--line);border-radius:17px;background:#fffaf0;display:grid;grid-template-columns:50px 1fr;grid-template-rows:1fr auto;align-items:center;gap:4px 12px;transition:.18s}
.category-card:hover{border-color:var(--olive-light);transform:translateY(-2px)}
.category-card-icon{grid-row:1/3;font-size:38px;color:var(--olive);text-align:center}
.category-card strong{font-size:14px}
.category-card small{font-size:10px;color:var(--muted);background:#eef0df;border-radius:20px;padding:4px 9px;justify-self:start}

/* Personal library and favorites. */
.library-banner{background:#eef0df;border:0;min-height:150px}
.library-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}
.library-tabs a{padding:12px 18px;border:1px solid var(--line);border-radius:14px;background:#fffaf0;font-size:12px;font-weight:700}
.library-tabs a.active{background:#24451d;color:white;border-color:#24451d}
.library-list{display:grid;gap:10px;padding:12px;background:#fffaf0;border:1px solid var(--line);border-radius:20px}
.library-item{display:grid;grid-template-columns:95px minmax(0,1fr) 170px;gap:18px;align-items:center;padding:12px;border-bottom:1px solid var(--line)}
.library-item:last-child{border-bottom:0}
.library-cover{width:90px;height:115px;display:grid;place-items:center;overflow:hidden;border-radius:6px;background:linear-gradient(145deg,#315b45,#172f34);color:#fff0c7;text-align:center;padding:8px;box-shadow:5px 7px 12px #302a1e22}
.library-cover strong{font-size:12px}
.library-item-info h2{font-size:16px;margin:0 0 5px}
.library-item-info p{font-size:11px;color:var(--muted);margin:0 0 7px}
.library-item-info small{font-size:10px;color:var(--muted);display:block;margin-bottom:8px}
.library-item-action{display:grid;justify-items:end;gap:10px}
.access-confirmed{font-size:10px;color:var(--olive-dark);background:#e8efd8;border-radius:20px;padding:7px 10px}
.library-item-action .primary-button{margin:0;font-size:11px;padding:10px 13px}
.favorite-heading-heart{color:#bd4a3b}
.favorites-page .book-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.favorites-page .cover{width:100%;height:270px;max-width:210px}
.favorite.is-favorite{color:#c34e3e}

@media(max-width:900px){.topbar{grid-template-columns:220px minmax(180px,1fr) 150px;gap:12px}.nav-inner{gap:2px}.nav-inner a{font-size:12px;padding-inline:6px}.search-layout,.categories-layout{grid-template-columns:240px minmax(0,1fr);gap:15px}.search-book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-detail-panel{gap:22px;padding:22px}.detail-cover{height:350px}.product-cover-area{min-height:350px}}
@media(max-width:650px){.container{width:min(100% - 28px,560px)}.topbar{grid-template-columns:1fr auto;gap:9px;padding:12px 0}.brand{grid-column:1;grid-row:1}.header-actions{grid-column:2;grid-row:1;gap:7px}.icon-action{width:36px;height:36px}.search-box{grid-column:1/-1;grid-row:2;height:44px}.brand-mark{font-size:34px}.brand strong{font-size:18px}.brand small{font-size:9px}.nav-inner{justify-content:flex-start;overflow-x:auto;min-height:47px}.nav-inner a,.nav-inner a.active{flex:0 0 auto;padding:13px 12px;font-size:11px}.footer-inner{display:grid;grid-template-columns:1fr;justify-items:center;text-align:center}.footer-links{flex-wrap:wrap;justify-content:center}.footer-links a{padding:4px 10px}.catalog-page,.categories-page,.detail-page,.library-page,.favorites-page{padding-top:20px}.search-layout,.categories-layout{grid-template-columns:1fr}.filter-panel{order:0}.search-results{order:1}.search-book-grid,.favorites-page .book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.search-book-grid .cover{height:205px}.categories-banner,.library-banner{padding:20px;min-height:130px}.categories-banner-art,.library-banner-art{font-size:48px}.category-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.category-card{padding:12px;min-height:100px;grid-template-columns:35px 1fr}.category-card strong{font-size:11px}.category-card-icon{font-size:28px}.product-detail-panel{grid-template-columns:1fr;padding:18px;gap:20px}.product-cover-area{min-height:260px}.detail-cover{height:300px;width:220px}.product-detail-info h1{font-size:26px}.product-description{font-size:12px}.format-purchase-row{align-items:flex-start}.reviews-panel{padding:17px}.review-form{grid-template-columns:1fr}.review-form textarea,.review-form button{grid-column:auto}.library-tabs{display:grid;grid-template-columns:repeat(2,1fr)}.library-tabs a{text-align:center;padding:10px 8px;font-size:10px}.library-item{grid-template-columns:72px minmax(0,1fr);gap:12px}.library-cover{width:70px;height:95px}.library-item-action{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center}.library-item-info h2{font-size:13px}.favorites-page .cover{height:210px}.page-title-row{align-items:flex-start}.page-title-row h1{font-size:22px}}

/* Match the reference layout direction: filters/sidebar and book cover stay on the left. */
.search-layout,.categories-layout,.product-detail-panel{direction:ltr}
.search-layout>.filter-panel,.search-layout>.search-results,.categories-layout>.popular-categories,.categories-layout>.category-directory,.product-detail-panel>.product-cover-area,.product-detail-panel>.product-detail-info{direction:rtl}
.rating-label{font-size:12px;font-weight:700}
.rating-picker{display:flex;align-items:center;gap:4px;direction:rtl}
.rating-picker label{cursor:pointer}
.rating-picker input{position:absolute;opacity:0;pointer-events:none}
.rating-picker span{font-size:28px;line-height:1;color:#c8c2ae;transition:color .15s}
.rating-picker:has(input[value="1"]:checked) label:nth-child(-n+1) span,.rating-picker:has(input[value="2"]:checked) label:nth-child(-n+2) span,.rating-picker:has(input[value="3"]:checked) label:nth-child(-n+3) span,.rating-picker:has(input[value="4"]:checked) label:nth-child(-n+4) span,.rating-picker:has(input[value="5"]:checked) label:nth-child(-n+5) span{color:#d99d18}
.rating-picker label:hover span,.rating-picker label:hover~label span{color:#d99d18}
@media(max-width:650px){.search-layout,.categories-layout,.product-detail-panel{direction:rtl}.search-layout>.filter-panel,.search-layout>.search-results,.categories-layout>.popular-categories,.categories-layout>.category-directory,.product-detail-panel>.product-cover-area,.product-detail-panel>.product-detail-info{direction:rtl}}
.personal-shelves{margin-top:28px;padding:22px;background:#fffaf0;border:1px solid var(--line);border-radius:18px}
.personal-shelves .section-heading h2{font-size:20px}
.shelf-create-form{display:grid;grid-template-columns:1fr 1.5fr auto;gap:9px}
.shelf-create-form input{min-width:0;height:43px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:#fffdf7;font:inherit;font-size:11px}
.shelf-create-form button{margin:0;border:0;cursor:pointer;white-space:nowrap}
.shelf-links{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}
.shelf-links a{display:flex;gap:10px;align-items:center;padding:10px 13px;border-radius:12px;background:#eef0df;color:var(--olive-dark);font-size:11px}
.shelf-links a span{font-size:9px;color:var(--muted)}
.shelf-links small{font-size:11px;color:var(--muted)}
.remove-shelf-item{border:1px solid #e5cfc5;background:#fff6f2;color:#934838;border-radius:10px;padding:9px 12px;font:inherit;font-size:10px;cursor:pointer}
.shelf-add-help{font-size:11px;color:var(--muted);margin-top:15px}
@media(max-width:650px){.shelf-create-form{grid-template-columns:1fr}.shelf-create-form button{width:100%}}
.add-to-shelf-form{display:flex;gap:5px;align-items:center}
.add-to-shelf-form select{max-width:105px;min-width:0;border:1px solid var(--line);border-radius:8px;padding:7px;background:#fffdf7;font:inherit;font-size:9px}
.add-to-shelf-form button{border:0;background:transparent;color:var(--olive);font:inherit;font-size:9px;cursor:pointer;white-space:nowrap}
@media(max-width:650px){.add-to-shelf-form{flex:1}.add-to-shelf-form select{max-width:none;flex:1}}
.audio-chapter-list{display:grid;gap:7px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#f6f2e6}
.audio-chapter-list strong{font-size:11px;color:var(--olive-dark)}
.audio-chapter-list a{font-size:11px;color:var(--olive);padding:5px 0;border-bottom:1px solid #e7dfcc}
.audio-chapter-list a:last-child{border-bottom:0}
.review-page{padding-top:28px;padding-bottom:20px}
.review-product-panel,.review-submit-panel{background:#fffaf0;border:1px solid var(--line);border-radius:20px;padding:24px;margin-bottom:18px}
.review-product-panel{display:grid;grid-template-columns:230px minmax(0,1fr);gap:28px;align-items:center;min-height:300px}
.review-product-cover{height:260px;width:190px;justify-self:center;border-radius:7px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,#315b45,#172f34);color:#fff0c7;text-align:center;padding:15px;box-shadow:8px 10px 16px #302a1e22}
.review-product-cover img{width:100%;height:100%;object-fit:contain}
.review-product-cover strong{font-size:22px;line-height:1.8}
.review-product-info h1{font-size:30px;color:var(--olive-dark);margin:0 0 10px}
.review-product-info>p{font-size:14px;color:var(--muted)}
.review-product-stars{font-size:36px;letter-spacing:5px;color:#d99d18;margin:18px 0}.review-product-stars small{font-size:12px;color:var(--muted);letter-spacing:0}
.review-product-info .verified-buyer{display:inline-block;margin-bottom:18px}
.review-product-info .text-link{display:block}
.review-submit-panel h2{font-size:21px;color:var(--olive-dark);margin:0 0 20px}
.dedicated-review-form{grid-template-columns:120px minmax(0,1fr);padding:0;border:0;margin:0}
.dedicated-review-form textarea{min-height:140px}
.dedicated-review-form button{min-width:230px;min-height:50px;justify-self:start}
.review-page-link{display:inline-flex;margin:0}
@media(max-width:650px){.review-product-panel{grid-template-columns:1fr;text-align:center;gap:16px}.review-product-cover{width:160px;height:220px}.review-product-info h1{font-size:24px}.review-product-stars{font-size:29px}.dedicated-review-form{grid-template-columns:1fr}.dedicated-review-form button{width:100%;min-width:0}}
.review-product-panel{direction:ltr}
.review-product-panel>.review-product-cover,.review-product-panel>.review-product-info{direction:rtl}
.my-review-list{display:grid;gap:10px}
.my-review-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;border:1px solid var(--line);border-radius:15px;background:#fffaf0}
.my-review-card h2{font-size:15px;margin:0 0 6px;color:var(--olive-dark)}
.my-review-card p{font-size:11px;line-height:1.9;color:var(--muted);margin:7px 0 0}
.review-status{white-space:nowrap;border-radius:18px;padding:7px 10px;font-size:10px;background:#f1eddc;color:var(--muted)}
.status-approved{background:#e7efda;color:var(--olive-dark)}
.status-rejected{background:#f7e8e2;color:#984638}
@media(max-width:650px){.my-review-card{align-items:flex-start;flex-direction:column;gap:10px}}

/* Refined catalog interactions: accessible heart states, compact/list views and pagination. */
.favorite{display:grid;place-items:center}
.favorite svg,.detail-favorite svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.favorite.is-favorite svg,.detail-favorite button.is-favorite svg{fill:currentColor;stroke:currentColor}
.favorite.is-favorite{color:#c34e3e}
.book-card .cover{display:flex}
.book-info h3 a:hover,.library-item-info h2 a:hover{color:var(--olive)}
.product-title-row{display:flex;align-items:center;justify-content:space-between;gap:14px}
.product-title-row h1{min-width:0}
.detail-favorite{position:static;flex:0 0 auto}
.detail-favorite button{width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:#fffaf0;color:#bd4a3b;cursor:pointer;transition:transform .18s,background .18s}
.detail-favorite button:hover{transform:translateY(-2px);background:#f8e9e3}
.detail-favorite svg{width:23px;height:23px}
.product-preview-action{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0;padding:14px 16px;border:1px solid var(--line);border-radius:15px;background:#fffaf0}
.product-preview-action small{font-size:11px;color:var(--muted)}
.preview-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 17px;border-radius:12px;background:var(--olive);color:#fff;font-size:12px;font-weight:700}
.preview-button.is-unavailable{background:#e8e4d8;color:#817c6b;cursor:not-allowed}
.catalog-view-toolbar{display:flex;align-items:center;gap:7px;margin:0 0 13px;color:var(--muted);font-size:11px}
.view-mode-button{width:36px;height:34px;border:1px solid var(--line);border-radius:10px;background:#fffaf0;color:var(--olive-dark);font-size:19px;cursor:pointer}
.view-mode-button.active{background:var(--olive);border-color:var(--olive);color:white}
.search-book-grid.view-list{grid-template-columns:1fr}
.search-book-grid.view-list .book-card{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;gap:16px;text-align:right}
.search-book-grid.view-list .cover{grid-row:1;grid-column:1;width:110px;height:150px;margin:0}
.search-book-grid.view-list .book-info{text-align:right}
.search-book-grid.view-compact{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.search-book-grid.view-compact .book-card{padding:9px}
.search-book-grid.view-compact .cover{height:175px}
.search-book-grid.view-compact .book-info p,.search-book-grid.view-compact .book-rating,.search-book-grid.view-compact .format-chips{display:none}
.numbered-pagination{display:flex;flex-wrap:wrap;gap:6px}
.numbered-pagination a,.numbered-pagination .current-page{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);border-radius:11px;background:#fffaf0;color:var(--olive-dark);font-size:12px}
.numbered-pagination .current-page{background:var(--olive);border-color:var(--olive);color:#fff;font-weight:800}
.numbered-pagination .page-arrow{font-size:20px}
.numbered-pagination .page-ellipsis{min-width:22px;text-align:center;align-self:center}
.library-favorites-grid{margin-bottom:20px}
.library-header-action svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:900px){
 .search-book-grid.view-compact{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
 .product-title-row{align-items:flex-start}
 .product-title-row h1{font-size:23px}
 .detail-favorite button{width:40px;height:40px}
 .product-preview-action{align-items:flex-start;flex-direction:column}
 .search-book-grid.view-list .book-card{grid-template-columns:86px minmax(0,1fr);gap:10px;padding:10px}
 .search-book-grid.view-list .cover{width:80px;height:115px}
 .search-book-grid.view-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
 .search-book-grid.view-compact .cover{height:170px}
 .numbered-pagination a,.numbered-pagination .current-page{width:32px;height:32px}
 .library-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
 .library-favorites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .library-header-action svg{width:19px;height:19px}
}

.detail-favorite button{color:#9a927e}
.detail-favorite button.is-favorite{color:#c34e3e}


/* Functional catalog view modes and inline favorite controls. */
.favorite-inline-form{position:static;display:inline-flex;align-items:center;justify-content:center;margin:0 0 7px;z-index:auto}
.favorite-inline-form .favorite{position:static;inset:auto;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:#fffaf0;color:#9a927e;font-size:0;box-shadow:none}
.favorite-inline-form .favorite svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}
.favorite-inline-form .favorite.is-favorite{color:#c34e3e}
.favorite-inline-form .favorite.is-favorite svg{fill:currentColor;stroke:currentColor}
.detail-cover-wrap{display:flex;align-items:center;justify-content:center;gap:14px;direction:rtl;max-width:100%}
.detail-favorite-cover{position:static;flex:0 0 auto}
.detail-favorite-cover button{width:46px;height:46px;border:1px solid var(--line);border-radius:50%;background:#fffaf0;color:#9a927e;display:grid;place-items:center;cursor:pointer;transition:background .18s,transform .18s}
.detail-favorite-cover button:hover{background:#f5eee0;transform:translateY(-2px)}
.detail-favorite-cover button.is-favorite{color:#c34e3e}
.detail-favorite-cover svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8}
.detail-favorite-cover button.is-favorite svg{fill:currentColor;stroke:currentColor}
.search-book-grid.view-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.search-book-grid.view-list{display:grid;grid-template-columns:1fr}
.search-book-grid.view-list .book-card{grid-template-columns:120px minmax(0,1fr)}
.search-book-grid.view-list .book-info{min-width:0}
.search-book-grid.view-compact{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.search-book-grid.view-compact .book-info h3{font-size:11px}
@media(max-width:900px){.search-book-grid.view-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.search-book-grid.view-compact{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.detail-cover-wrap{gap:9px}.detail-favorite-cover button{width:40px;height:40px}.search-book-grid.view-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.search-book-grid.view-list .book-card{grid-template-columns:82px minmax(0,1fr)}.search-book-grid.view-list .cover{width:78px;height:112px}.search-book-grid.view-compact{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* EPUB reader */
.epub-reader-page{padding-top:24px;padding-bottom:50px}
.epub-reader-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;padding:18px 22px;background:#fff;border:1px solid var(--line);border-radius:18px}
.epub-reader-header span{color:var(--muted);font-size:11px}.epub-reader-header h1{margin:5px 0 0;font-size:19px}
.epub-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:14px 16px;margin-bottom:16px;background:#fff;border:1px solid var(--line);border-radius:15px}
.epub-toolbar button,.epub-page-controls button{border:1px solid var(--line);border-radius:10px;background:#f8f7f1;color:var(--olive-dark);padding:9px 13px;font:inherit;cursor:pointer}
.epub-toolbar button[aria-expanded="true"],.epub-page-controls button:not(:disabled){background:var(--olive);border-color:var(--olive);color:#fff}
.epub-control{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted)}.epub-control select{max-width:125px;padding:7px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}.epub-control input{width:92px;accent-color:var(--olive)}.epub-control output{min-width:30px;color:var(--ink);font-variant-numeric:tabular-nums}
.epub-reader-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}.epub-reader-layout:has(.epub-toc:not([hidden])){grid-template-columns:250px minmax(0,1fr)}
.epub-toc{max-height:760px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px}.epub-toc h2{font-size:15px;margin:0 0 12px}.epub-toc nav{display:grid;gap:5px}.epub-toc-link{display:block;width:100%;padding:9px 10px;text-align:right;border:0;border-radius:8px;background:#f8f7f1;color:var(--ink);font:inherit;font-size:12px;cursor:pointer}.epub-toc-link:hover{background:#e9eddf}
.epub-reading-area{position:relative;min-width:0;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px}.epub-viewer{height:min(72vh,850px);min-height:480px;overflow:hidden;background:#fff;color:#25251f}.epub-loading,.epub-error{padding:35px;text-align:center;color:var(--muted)}.epub-error{color:#a33}.epub-page-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px;border-top:1px solid var(--line);font-size:12px}.epub-page-controls button:disabled{opacity:.4;cursor:not-allowed}.epub-reader-note{font-size:11px;color:var(--muted);text-align:center;margin-top:12px}
/* Orders and checkout */
.orders-page{padding-top:28px;padding-bottom:55px}.orders-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start}.cart-items,.cart-summary,.checkout-form,.order-detail-panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}.cart-items{display:grid;gap:14px}.cart-item{display:grid;grid-template-columns:82px minmax(0,1fr) auto;gap:15px;align-items:center;padding-bottom:14px;border-bottom:1px solid var(--line)}.cart-item:last-child{border:0;padding-bottom:0}.cart-item-cover{width:82px;height:112px;display:grid;place-items:center;overflow:hidden;border-radius:9px;background:#f2eee3;font-size:11px}.cart-item-cover img{width:100%;height:100%;object-fit:cover}.cart-item-info h2{font-size:15px;margin:0 0 7px}.cart-item-info p,.cart-item-info strong{font-size:12px;color:var(--muted)}.cart-item-actions{display:grid;gap:9px;justify-items:end}.cart-item-actions form{display:flex;align-items:center;gap:6px}.cart-item-actions input{width:65px;padding:7px;border:1px solid var(--line);border-radius:8px}.cart-item-actions button{border:0;background:transparent;color:var(--olive);font:inherit;font-size:11px;cursor:pointer}.cart-summary{display:grid;gap:14px;position:sticky;top:18px}.cart-summary h2,.checkout-form h2,.order-detail-panel h2{font-size:16px;margin:0 0 5px}.cart-summary>div,.order-line{display:flex;justify-content:space-between;gap:12px;font-size:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}.cart-summary>div strong,.order-line strong{white-space:nowrap}.cart-total,.order-total{font-weight:800;color:var(--olive-dark)}.cart-summary small,.muted-note{font-size:11px;line-height:1.9;color:var(--muted)}.checkout-form{display:grid;gap:16px}.checkout-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.checkout-form label{display:grid;gap:6px;font-size:12px}.checkout-form input,.checkout-form textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:9px;font:inherit}.field-wide{grid-column:1/-1}.order-list{display:grid;gap:10px}.order-list-item{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:12px;font-size:12px}.order-list-item>div{display:grid;gap:5px}.order-list-item small{color:var(--muted)}.order-detail-panel{display:grid;gap:14px}.order-detail-panel h2:not(:first-child){padding-top:12px;border-top:1px solid var(--line)}
.review-card .text-link{display:inline-block;margin-top:8px;font-size:11px}.my-review-card{padding:15px 0;border-bottom:1px solid var(--line)}.my-review-card>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px}.my-review-card .review-form{margin-top:10px}
@media(max-width:850px){.orders-layout{grid-template-columns:1fr}.cart-summary{position:static}.epub-reader-layout:has(.epub-toc:not([hidden])){grid-template-columns:1fr}.epub-toc{max-height:300px}}
@media(max-width:600px){.epub-reader-header{align-items:flex-start;flex-direction:column}.epub-toolbar{gap:11px}.epub-control{width:calc(50% - 8px);justify-content:space-between}.epub-viewer{height:68vh;min-height:420px}.epub-page-controls{font-size:10px}.cart-item{grid-template-columns:65px minmax(0,1fr);gap:10px}.cart-item-cover{width:65px;height:92px}.cart-item-actions{grid-column:2;display:flex;justify-content:space-between;justify-items:stretch}.checkout-fields{grid-template-columns:1fr}.order-list-item{align-items:flex-start;flex-direction:column}.orders-page{padding-top:18px}}
