/* ==========================================================================
   مرجان — قالب متجر كتب لمنصّة ناشر
   كلّ التنسيق هنا، بلا Tailwind ولا مكتبات. ألوان الهويّة متغيّراتٌ يختارها الناشر،
   وما عداها ألوانٌ محايدة.
   ========================================================================== */
:root {
	--store-primary: #1E2A4A;
	--store-primary-dark: #131C33;
	--store-accent: #E2725B;
	--store-bg: #FFFFFF;
	--store-text: #172033;

	--on-accent: #1B1712;
	--muted: #4E5561;
	--soft: #5B6270;
	--line: #E3E8EF;
	--tint: #F5F8FA;
	--stage: #EDF1F5;
	--gold: #F5B301;
	--gold-pale: #F9DE95;
	--ok: #1D7046;
	--radius: 16px;
	--radius-sm: 10px;
	--pill: 999px;
	--shadow: 0 6px 24px rgba(17, 24, 39, .08);
	--shadow-lg: 0 20px 50px rgba(17, 24, 39, .14);
	--font: 'Tajawal', system-ui, sans-serif;
}
body[data-corners="sharp"] { --radius: 0px; --radius-sm: 0px; --pill: 4px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--store-accent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
[data-option]:empty { display: none; }

/* ---------------------------------------------------------------- icons */
.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; }
.stars .off { color: var(--gold-pale); }
.star-gold { color: var(--gold); }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rating b { font-weight: 700; }
.rating > span:not(.stars) { color: var(--muted); }
.rating a { color: var(--muted); text-decoration: underline; }

/* type dots — fixed colours (rule 6) */
.type-dot { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(17, 24, 39, .22); flex-shrink: 0; }
.type-dot .icon { width: 15px; height: 15px; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: var(--pill); border: 1.5px solid transparent; font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; white-space: nowrap; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-accent { background: var(--store-accent); color: var(--on-accent); }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 86%, #000); }
.btn-outline { background: #fff; color: var(--store-primary); border-color: var(--store-primary); }
.btn-outline:hover { background: var(--store-primary); color: #fff; }
.btn-sm { padding: 8px 15px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { background: #E5E7EB; color: #4B5563; border-color: #E5E7EB; cursor: not-allowed; }
.btn:hover .icon-arrow { transform: translateX(-3px); }
.icon-arrow { transition: transform .2s; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; position: relative; color: var(--store-text); transition: background .2s; }
.icon-btn:hover { background: var(--tint); }
.icon-btn .icon { width: 21px; height: 21px; }
.count { position: absolute; top: 1px; inset-inline-end: -1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--store-accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; text-decoration: underline; }

/* badges, price, stock */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; line-height: 1.3; }
.badge-sale { background: var(--store-primary); color: #fff; }
.badge-new { background: var(--store-accent); color: var(--on-accent); }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-weight: 800; font-size: 17px; color: var(--store-primary); }
.price del { color: var(--soft); font-weight: 500; font-size: 13px; }
.price-lg { font-size: 28px; }
.price-lg del { font-size: 16px; }
.stock { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; border: 1px solid currentColor; color: var(--ok); background: #EEF8F2; font-size: 12px; font-weight: 700; white-space: nowrap; }
.stock.is-out { color: #4B5563; background: #F3F4F6; }

/* curved underline under the first word of a heading (theme.js wraps it in .u) */
.u { position: relative; display: inline-block; z-index: 0; }
.u::after { content: ""; position: absolute; inset-inline: -2px; bottom: -4px; height: 12px; border-bottom: 4px solid var(--store-accent); border-radius: 0 0 50% 50% / 0 0 100% 100%; z-index: -1; }

/* ---------------------------------------------------------------- topbar + header */
.topbar { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); background: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.tb-contact, .tb-links { display: flex; align-items: center; gap: 22px; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--store-text); }
.topbar .icon { width: 15px; height: 15px; }
.topbar b { font-weight: 500; color: var(--store-text); }
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--store-text); flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > button { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; font-size: 15px; font-weight: 500; background: none; border: 0; cursor: pointer; position: relative; color: var(--store-text); }
.nav-list > li > button .icon { width: 15px; height: 15px; }
.nav-list > li > a:hover, .nav-list > li > button:hover, .nav-list [aria-current="page"] { color: var(--store-primary); font-weight: 700; }
.nav-list [aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 18px; height: 5px; transform: translateX(-50%); background: radial-gradient(circle, var(--store-accent) 2px, transparent 2.5px) 0 0 / 6px 5px repeat-x; }
.dropdown { position: absolute; top: 100%; inset-inline-start: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; z-index: 10; }
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown, .has-drop.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.dropdown a:hover { background: var(--tint); color: var(--store-primary); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.account { margin-inline-start: 8px; }
.account .icon { width: 17px; height: 17px; }
.menu-toggle { display: none; }
.search-pop { display: none; border-top: 1px solid var(--line); background: #fff; padding: 12px 0; }
.site-header.search-open .search-pop { display: block; }
.search-pop-in { display: flex; gap: 10px; }
.search-pop input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--pill); padding: 10px 18px; background: var(--tint); }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 20, 35, .5); opacity: 0; visibility: hidden; transition: .25s; z-index: 80; }
.drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(330px, 88vw); background: #fff; z-index: 90; transform: translateX(105%); visibility: hidden; transition: transform .3s, visibility .3s; overflow-y: auto; padding: 18px; }
body.drawer-open .drawer { transform: none; visibility: visible; }
body.drawer-open .drawer-backdrop, body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-head .brand { font-size: 18px; }
.drawer-head .brand img { width: 36px; height: 36px; }
.drawer-search { display: flex; gap: 8px; margin-bottom: 14px; }
.drawer-search input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--pill); padding: 9px 14px; }
.drawer-nav > li > a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-nav [aria-current="page"] { color: var(--store-primary); font-weight: 800; }
.drawer-nav .sub { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.drawer-nav .sub a { padding: 5px 12px; border-radius: var(--pill); background: var(--tint); font-size: 13px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; background: #fff; }
.hero-stage { position: relative; background: var(--store-primary-dark); }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; opacity: 0; visibility: hidden; transition: opacity .8s, visibility .8s; overflow: hidden; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 16, 34, .62) 0%, rgba(10, 16, 34, .42) 55%, rgba(10, 16, 34, .66) 100%); }
.slide-inner { position: relative; z-index: 2; text-align: center; color: #fff; padding: 96px 0 168px; display: flex; flex-direction: column; align-items: center; }
.slide-title { font-size: 52px; font-weight: 800; line-height: 1.35; max-width: 880px; text-wrap: balance; }
.title-capsule { display: inline-block; width: 150px; height: 58px; vertical-align: middle; margin: -8px 6px 0; border-radius: var(--pill); border: 3px solid var(--store-accent); background: var(--store-accent) center 78% / 260% auto no-repeat; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.slide-text { font-size: 18px; max-width: 640px; margin: 16px 0 26px; color: rgba(255, 255, 255, .92); }
.hero-dots { position: absolute; bottom: 124px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 10px; height: 10px; border-radius: 6px; border: 0; padding: 0; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .3s, background .3s; }
.hero-dots button[aria-current="true"] { width: 28px; background: var(--store-accent); }
.hero-search-wrap { position: relative; z-index: 5; margin-top: -96px; }
.hero-search { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 18px 20px 20px; }
.hs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hs-radios { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hs-radio { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.hs-radio input { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; margin: 0; border-radius: 50%; border: 1.5px solid #9AA3AF; display: grid; place-content: center; cursor: pointer; }
.hs-radio input::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--store-accent); transform: scale(0); transition: transform .15s; }
.hs-radio input:checked { border-color: var(--store-accent); }
.hs-radio input:checked::before { transform: scale(1); }
.hs-note { font-weight: 700; font-size: 15px; }
.hs-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: stretch; }
.hs-cell { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); margin-inline-start: -1px; cursor: text; min-width: 0; }
.hs-cell:first-child { border-start-start-radius: var(--radius-sm); border-end-start-radius: var(--radius-sm); margin-inline-start: 0; }
.hs-cell:nth-child(3) { border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); }
.hs-lbl { font-size: 13px; color: var(--muted); }
.hs-cell input, .hs-cell select { border: 0; background: transparent; padding: 2px 0; font-size: 18px; font-weight: 700; width: 100%; min-width: 0; outline-offset: 4px; }
.hs-cell input::placeholder { color: var(--soft); font-weight: 500; }
.hs-cell small { font-size: 12px; color: var(--muted); }
.hs-btn { margin-inline-start: 14px; border-radius: var(--radius-sm); padding-inline: 34px; font-size: 16px; }

/* ---------------------------------------------------------------- sections */
.section { padding: 76px 0; }
.section-sm { padding: 48px 0; }
.tint { background: var(--tint); }
.section-head { text-align: center; margin-bottom: 34px; }
.section-title { font-size: 33px; font-weight: 800; line-height: 1.35; }
.section-sub { color: var(--muted); font-size: 16px; max-width: 560px; margin: 10px auto 0; }
.section-more { text-align: center; margin-top: 34px; }

/* categories mosaic: 4 then 3 */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.mosaic-item { position: relative; display: block; border-radius: var(--radius); overflow: hidden; grid-column: span 3; height: 226px; isolation: isolate; }
.mosaic-item:nth-child(n+5) { grid-column: span 4; height: 248px; }
.mosaic-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mosaic-item:hover img { transform: scale(1.06); }
.mosaic-tag { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--store-text); border-radius: var(--pill); padding: 8px 18px; font-weight: 800; font-size: 15px; text-align: center; line-height: 1.3; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); white-space: nowrap; display: flex; flex-direction: column; }
.mosaic-tag small { font-size: 12px; font-weight: 500; color: var(--muted); }

/* slanted accent band with the four types */
.type-band-wrap { padding: 56px 0 0; }
.type-band { background: var(--store-accent); color: var(--on-accent); clip-path: polygon(2.5% 0, 100% 0, 97.5% 100%, 0 100%); padding: 30px 7%; text-align: center; border-radius: 4px; }
.tb-text { font-size: 19px; font-weight: 800; margin-bottom: 18px; }
.tb-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; }
.tb-type { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--store-text); border-radius: var(--pill); padding: 6px 18px 6px 8px; font-weight: 700; font-size: 15px; transition: transform .2s; }
.tb-type:hover { transform: translateY(-2px); }
.tb-type .type-dot { width: 32px; height: 32px; box-shadow: none; }

/* ---------------------------------------------------------------- book grid + card */
body { --cols: 4; }
body[data-books-per-row="3"] { --cols: 3; }
body[data-books-per-row="5"] { --cols: 5; }
body[data-books-per-row="6"] { --cols: 6; }
.book-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 24px; }
.book-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(17, 24, 39, .12); }
.bc-stage { position: relative; background: var(--stage); padding: 24px 0 20px; display: flex; justify-content: center; }
.bc-cover { position: relative; display: block; width: 56%; }
.bc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 8px 8px 3px; box-shadow: 0 12px 22px rgba(17, 24, 39, .28); transition: transform .3s; }
.book-card:hover .bc-cover img { transform: rotate(-1.5deg) scale(1.02); }
.bc-cover .type-dot { position: absolute; bottom: -8px; inset-inline-start: -12px; }
.bc-stage .badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; }
.rating-chip { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; background: #fff; color: var(--store-text); border-radius: var(--pill); padding: 3px 9px; font-size: 13px; font-weight: 800; box-shadow: 0 2px 6px rgba(17, 24, 39, .1); }
.rating-chip .icon { width: 14px; height: 14px; color: var(--gold); }
.kit-row .rating-chip { position: static; }
.bc-tools { position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.bc-tools .icon-btn { width: 36px; height: 36px; background: #fff; box-shadow: 0 2px 8px rgba(17, 24, 39, .12); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s, color .2s; }
.bc-tools .icon-btn:hover { color: var(--store-primary); background: #fff; }
.bc-tools .icon { width: 18px; height: 18px; }
.book-card:hover .bc-tools .icon-btn, .bc-tools .icon-btn:focus-visible, .bc-tools .fav[aria-pressed="true"] { opacity: 1; transform: none; }
[data-action="wishlist"][aria-pressed="true"] { color: #C2410C; }
[data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }
@media (hover: none) { .bc-tools .icon-btn { opacity: 1; transform: none; } }
.bc-body { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 18px; }
.bc-title { font-size: 17px; font-weight: 800; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-title a:hover { color: var(--store-primary); }
.bc-author { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; color: var(--muted); margin-top: 4px; }
.bc-author::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--store-accent); }
.bc-reviews { font-size: 12px; }
.bc-pill { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-width: 0; padding: 5px 12px; border-radius: var(--pill); background: var(--tint); border: 1px solid var(--line); font-size: 13px; color: var(--store-text); }
.bc-pill .icon { width: 14px; height: 14px; color: var(--muted); }
.bc-author { margin-bottom: 4px; }
.bc-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.bc-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
.bc-foot .price { flex: 1; }
.bc-cart { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--store-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.bc-cart:hover { background: var(--store-accent); color: var(--on-accent); }
.bc-cart .icon { width: 18px; height: 18px; }
.bc-cart:disabled { background: #E5E7EB; color: #6B7280; cursor: not-allowed; }
.book-card.is-out .bc-cover img { filter: grayscale(.7); opacity: .8; }

body[data-card-style="framed"] .book-card { box-shadow: none; border: 1px solid var(--line); }
body[data-card-style="framed"] .bc-stage { margin: 8px 8px 0; border-radius: calc(var(--radius) - 6px); }
body[data-card-style="minimal"] .book-card { background: transparent; box-shadow: none; overflow: visible; }
body[data-card-style="minimal"] .book-card:hover { transform: none; }
body[data-card-style="minimal"] .bc-stage { border-radius: var(--radius); }
body[data-card-style="minimal"] .bc-body { padding: 14px 4px 0; }

/* full-cover card («وصل حديثًا») */
.cover-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2 / 3; box-shadow: var(--shadow); isolation: isolate; }
.cover-card .cc-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cover-card:hover .cc-link img { transform: scale(1.05); }
.stamp { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; background: #fff; color: var(--store-primary); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 800; line-height: 1.2; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.cover-card > .type-dot { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; }
.cc-body { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 44px 14px 14px; background: linear-gradient(180deg, rgba(10, 14, 28, 0) 0%, rgba(10, 14, 28, .86) 38%, rgba(10, 14, 28, .96) 100%); color: #fff; }
.cc-tag { display: inline-block; background: var(--store-accent); color: var(--on-accent); border-radius: var(--pill); padding: 1px 9px; font-size: 11.5px; font-weight: 700; margin-bottom: 4px; }
.cc-title { font-size: 17px; font-weight: 800; line-height: 1.4; }
.cc-title a:hover { text-decoration: underline; }
.cc-author { font-size: 13px; color: rgba(255, 255, 255, .9); margin-top: 2px; }
.cc-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cc-foot .price { flex: 1; }
.cc-rate { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 800; }
.cc-rate .icon { width: 14px; height: 14px; color: var(--gold); }
.cc-foot .bc-cart { background: var(--store-accent); color: var(--on-accent); }
.cc-foot .bc-cart:hover { background: #fff; color: var(--store-primary); }
.price-light, .price-light span { color: #fff; font-size: 15px; }
.price-light del { color: #E5E7EB; }

/* ---------------------------------------------------------------- authors (portrait in front of a coloured circle) */
.author-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.author-card { --tone: var(--store-accent); display: flex; flex-direction: column; align-items: center; text-align: center; background: color-mix(in srgb, var(--tone) 11%, #fff); border-radius: calc(var(--radius) + 4px); padding: 26px 18px 22px; transition: transform .25s; }
.author-card:nth-child(4n+2) { --tone: var(--store-primary); }
.author-card:nth-child(4n+3) { --tone: color-mix(in srgb, var(--store-accent) 60%, var(--store-primary)); }
.author-card:nth-child(4n+4) { --tone: color-mix(in srgb, var(--store-accent) 55%, #F5B301); }
.author-card:hover { transform: translateY(-4px); }
.author-fig { position: relative; display: block; width: 168px; aspect-ratio: 1; border-radius: 0 0 50% 50%; overflow: hidden; margin-bottom: 14px; }
.author-fig::before { content: ""; position: absolute; inset: 0; top: 0; border-radius: 50%; background: color-mix(in srgb, var(--tone) 70%, #fff); }
.author-fig img { position: relative; width: 100%; height: 100%; object-fit: cover; object-position: bottom; transition: transform .35s; }
.author-card:hover .author-fig img { transform: scale(1.05); }
.ac-body small { color: var(--muted); font-size: 13px; }
.ac-body h3 { font-size: 18px; font-weight: 800; margin: 2px 0 6px; }
.ac-count { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; background: #fff; padding: 4px 12px; border-radius: var(--pill); }
.ac-count .icon { width: 15px; height: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- trust bar */
.trust-section { padding: 30px 0 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trust-card { --tone: var(--store-accent); display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); border: 1.5px solid color-mix(in srgb, var(--tone) 45%, #fff); background: color-mix(in srgb, var(--tone) 8%, #fff); }
.trust-card:nth-child(2) { --tone: var(--store-primary); }
.trust-card:nth-child(3) { --tone: color-mix(in srgb, var(--store-accent) 50%, var(--store-primary)); }
.tc-icon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--tone); color: #fff; flex-shrink: 0; }
.trust-card:first-child .tc-icon { color: var(--on-accent); }
.tc-icon .icon { width: 20px; height: 20px; }
.trust-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 1px; }
.trust-card p { font-size: 13px; line-height: 1.5; color: var(--muted); }
body[data-show-trust-bar="false"] .trust-section { display: none; }

/* ---------------------------------------------------------------- story banner */
.story { background: var(--tint); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.story-text h2 { font-size: 35px; font-weight: 800; line-height: 1.45; }
.story-text p { color: var(--muted); font-size: 16px; margin: 16px 0 18px; max-width: 540px; }
.story-points { display: grid; gap: 10px; margin-bottom: 26px; }
.story-points li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.story-points .icon { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--store-accent); color: var(--on-accent); stroke-width: 2.4; }
.story-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.story-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 380px; }
.story-ring { position: absolute; width: min(440px, 88%); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -52%); border-radius: 50%; background: linear-gradient(180deg, var(--store-accent) 0%, color-mix(in srgb, var(--store-accent) 35%, transparent) 70%, transparent 100%); -webkit-mask: radial-gradient(circle, transparent 55%, #000 56%); mask: radial-gradient(circle, transparent 55%, #000 56%); }
.story-visual img { position: relative; width: min(520px, 100%); }

/* marquee */
.marquee { background: var(--store-primary); overflow: hidden; padding: 18px 0; }
.mq-track { display: flex; width: max-content; animation: mq 40s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-list { display: flex; }
.mq-list li { display: inline-flex; align-items: center; gap: 26px; padding-inline-end: 26px; color: #fff; font-size: 20px; font-weight: 700; white-space: nowrap; }
.mq-list li::after { content: ""; width: 11px; height: 11px; background: var(--store-accent); transform: rotate(45deg); border-radius: 2px; }
@keyframes mq { to { transform: translateX(50%); } }
.marquee:has(.mq-list:empty) { display: none; }

/* reviews: heading on one side, 2×2 grid on the other */
.reviews-split { display: grid; grid-template-columns: 5fr 7fr; gap: 50px; align-items: center; }
.rs-head .section-title { text-align: start; }
.rs-head p { color: var(--muted); font-size: 16px; margin: 14px 0 24px; max-width: 420px; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 4px 16px rgba(17, 24, 39, .05); display: flex; flex-direction: column; gap: 12px; }
.rc-who { display: flex; align-items: center; gap: 12px; }
.rc-avatar { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--store-accent) 22%, #fff); color: var(--store-primary-dark); font-weight: 800; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-who b { display: block; font-size: 16px; }
.rc-who small { color: var(--muted); font-size: 13px; }
.review-card p { font-size: 15px; line-height: 1.75; flex: 1; }
body[data-show-reviews="false"] .reviews-section { display: none; }

/* wide navy banner with the diagonal accent stripe */
.wide-banner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; background: var(--store-primary); border-radius: calc(var(--radius) + 6px); overflow: hidden; padding: 50px 56px; min-height: 330px; isolation: isolate; }
.wb-text { position: relative; z-index: 2; color: #fff; }
.wb-text h2 { font-size: 34px; font-weight: 800; line-height: 1.4; }
.wb-text p { color: rgba(255, 255, 255, .88); font-size: 16px; margin: 14px 0 24px; max-width: 500px; }
.wb-visual { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.wb-stripe { position: absolute; width: 170%; height: 128px; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); background: var(--store-accent); }
.wb-visual img { position: relative; width: min(430px, 100%); }

/* recent mini cards */
.mini-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.mini-card { display: flex; flex-direction: column; gap: 10px; }
.mc-cover { position: relative; display: block; border-radius: var(--radius-sm); background: var(--stage); padding: 14px 18%; }
.mc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: 0 8px 16px rgba(17, 24, 39, .22); }
.mc-cover .type-dot { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; }
.mc-cover .type-dot .icon { width: 13px; height: 13px; }
.mc-title { font-size: 14px; font-weight: 800; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-author { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.mini-card .price { font-size: 15px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: linear-gradient(180deg, #F1F4F7 0%, color-mix(in srgb, var(--store-accent) 13%, #fff) 100%); border-top: 1px solid var(--line); padding-top: 62px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr 1.6fr; gap: 32px; }
.footer-about p { color: var(--muted); margin-top: 14px; max-width: 300px; }
.site-footer h2 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.footer-col li + li { margin-top: 9px; }
.footer-col a { color: #374151; }
.footer-col a:hover { color: var(--store-primary); text-decoration: underline; }
.footer-news p { color: var(--muted); margin: -6px 0 12px; }
.nl-field { display: flex; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--pill); padding: 5px; }
.nl-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 14px; }
.contact-h { margin-top: 24px; }
.contact-list { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.contact-list a { display: flex; align-items: center; gap: 10px; }
.contact-list .ci { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--store-primary); border: 1px solid var(--line); }
.contact-list .ci .icon { width: 18px; height: 18px; }
.contact-list small { display: block; color: var(--muted); font-size: 12px; }
.contact-list b { font-weight: 700; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 44px; padding: 20px 0; border-top: 1px solid rgba(17, 24, 39, .1); color: var(--muted); font-size: 13px; }
.social { display: flex; gap: 8px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--store-primary); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); transition: .2s; }
.social a:hover { background: var(--store-primary); color: #fff; }
.social .icon { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- inner pages */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--soft); }
.breadcrumb a { color: var(--store-text); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb.on-dark { color: rgba(255, 255, 255, .88); margin: 14px 0 0; justify-content: center; }
.breadcrumb.on-dark a { color: #fff; }
.breadcrumb.on-dark li + li::before { color: rgba(255, 255, 255, .7); }
.page-head { position: relative; display: flex; align-items: center; min-height: 236px; overflow: hidden; color: #fff; text-align: center; background: var(--store-primary); isolation: isolate; }
.page-head > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--store-primary) 84%, transparent); }
.page-head .container { padding: 40px 0; }
.page-head h1 { font-size: 38px; font-weight: 800; line-height: 1.35; }
.ph-sub { color: rgba(255, 255, 255, .9); font-size: 16px; margin-top: 6px; }
.page-head-plain { min-height: 190px; align-items: flex-start; }
.page-head-plain .container { padding: 38px 0 80px; }
.ph-kicker { font-size: 15px; color: rgba(255, 255, 255, .9); font-weight: 700; }

.strip-wrap { margin-bottom: 30px; }
.strip-title { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.cat-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--pill); padding: 5px 16px 5px 6px; font-size: 14px; font-weight: 700; transition: border-color .2s; }
.cat-chip:hover { border-color: var(--store-primary); }
.cat-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.cat-chip small { color: var(--muted); font-weight: 500; font-size: 12px; }

.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 18px; position: sticky; top: 92px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.filters-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.filters-head .icon-btn { display: none; }
.filter-group { border-top: 1px solid var(--line); }
.filter-group summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; cursor: pointer; font-weight: 800; list-style: none; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary .icon { width: 16px; height: 16px; transition: transform .2s; }
.filter-group[open] summary .icon { transform: rotate(180deg); }
.filter-body { padding-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--store-primary); width: 16px; height: 16px; margin: 0; }
.check .type-dot { width: 22px; height: 22px; border-width: 0; box-shadow: none; }
.check .type-dot .icon { width: 12px; height: 12px; }
.check .n { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.check .stars .icon { width: 14px; height: 14px; }
.range input { width: 100%; accent-color: var(--store-primary); }
.range-vals { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.filters .btn-block { margin-top: 8px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.toolbar p { flex: 1; color: var(--muted); font-size: 14px; }
.toolbar p b { color: var(--store-text); }
.tools { display: flex; align-items: center; gap: 10px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { width: 38px; height: 38px; border: 0; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.view-toggle button[aria-pressed="true"] { background: var(--store-primary); color: #fff; }
.view-toggle .icon { width: 18px; height: 18px; }
.select { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; background: #fff; }
.filter-open-btn { display: none; }
.listing-grid { --cols: 3; }
.listing.is-list .listing-grid { grid-template-columns: 1fr; }
.listing.is-list .book-card { flex-direction: row; }
.listing.is-list .bc-stage { width: 220px; flex-shrink: 0; align-items: center; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 38px; }
.pagination a, .pagination span { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: #fff; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary); }
.pagination [aria-current="page"] { background: var(--store-primary); color: #fff; border-color: var(--store-primary); }
.pagination .gap { border: 0; background: transparent; }
.pagination .icon { width: 18px; height: 18px; }

/* product */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; }
.box-title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.pdp-top { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 30px; align-items: start; }
.gallery { display: flex; gap: 12px; }
.thumbs { display: flex; flex-direction: column; gap: 10px; width: 62px; flex-shrink: 0; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-accent); }
.thumbs img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.gallery-main { flex: 1; background: var(--stage); border-radius: var(--radius); padding: 30px 0; display: flex; justify-content: center; }
.gm-cover { position: relative; width: 74%; }
.gm-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: 0 16px 30px rgba(17, 24, 39, .3); }
.gm-cover .type-dot { position: absolute; top: -12px; inset-inline-end: -12px; width: 38px; height: 38px; z-index: 2; }
.gm-cover .type-dot .icon { width: 18px; height: 18px; }
.type-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--tint); border: 1px solid var(--line); border-radius: var(--pill); padding: 4px 14px 4px 5px; font-size: 14px; color: var(--muted); }
.type-tag .type-dot { width: 26px; height: 26px; box-shadow: none; border: 0; }
.type-tag .type-dot .icon { width: 13px; height: 13px; }
.type-tag a { color: var(--store-text); font-weight: 700; }
.pdp-info h1 { font-size: 32px; font-weight: 800; line-height: 1.35; margin: 14px 0 6px; }
.pdp-author { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.pdp-author a { color: var(--store-primary); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.pdp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.prose p { font-size: 16px; line-height: 1.9; color: #374151; }
.prose p + p { margin-top: 12px; }
.prose.short p { font-size: 15px; color: var(--muted); }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.spec { display: flex; align-items: center; gap: 12px; background: var(--tint); border-radius: 12px; padding: 14px; }
.spec-ic { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--store-primary); flex-shrink: 0; }
.spec-ic .icon { width: 19px; height: 19px; }
.spec small { display: block; color: var(--muted); font-size: 13px; }
.spec b { font-size: 15px; }
.pdp-reviews { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.rv-summary { background: var(--tint); border-radius: var(--radius); padding: 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rv-summary strong { font-size: 46px; font-weight: 800; line-height: 1; color: var(--store-primary); }
.rv-summary p { font-size: 14px; color: var(--muted); }
.rv-summary .rv-note { font-size: 13px; margin-bottom: 6px; }
.review-list { display: grid; gap: 14px; }
.review-list .review-card { box-shadow: none; }
.review-form { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.review-form h3 { font-size: 17px; font-weight: 800; }
.review-form fieldset { border: 0; padding: 0; margin: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--gold-pale); }
.star-input label .icon { width: 28px; height: 28px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 3px solid var(--store-accent); border-radius: 4px; }
.textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; background: #fff; }
.buy-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.pdp-aside { position: sticky; top: 92px; }
.bb-head { display: flex; align-items: center; justify-content: space-between; }
.lbl { font-size: 14px; color: var(--muted); }
.bb-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.buy-actions { display: grid; gap: 10px; }
.buy-row { display: flex; gap: 10px; }
.buy-row .btn { flex: 1; }
.fav-lg { width: 50px; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.buy-facts { margin-top: 18px; border-top: 1px solid var(--line); }
.buy-facts li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.buy-facts li:last-child { border-bottom: 0; }
.buy-facts span { color: var(--muted); }
.why-list { margin-top: 16px; background: var(--tint); border-radius: var(--radius); padding: 14px 18px; }
.why-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.why-list .icon { color: var(--store-primary); width: 20px; height: 20px; }

/* author */
.author-section { padding-top: 0; }
.author-profile { position: relative; margin-top: -70px; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); padding: 30px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; align-items: center; }
.author-fig-lg { --tone: var(--store-accent); width: 230px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--store-primary); font-weight: 700; font-size: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--store-accent); }
.ap-body h1 { font-size: 34px; font-weight: 800; margin: 6px 0 10px; }
.ap-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; font-size: 15px; }
.ap-stats span { display: inline-flex; align-items: center; gap: 6px; }
.ap-stats .icon { width: 18px; height: 18px; }

/* cart */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 28px; align-items: start; }
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cart-head h1 { font-size: 30px; font-weight: 800; }
.cart-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.ci-cover { position: relative; display: block; background: var(--stage); border-radius: var(--radius-sm); padding: 10px 12px; }
.ci-cover img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 5px 5px 2px; box-shadow: 0 6px 12px rgba(17, 24, 39, .22); }
.ci-cover .type-dot { position: absolute; bottom: -6px; inset-inline-start: -6px; width: 26px; height: 26px; }
.ci-cover .type-dot .icon { width: 13px; height: 13px; }
.ci-info h3 { font-size: 17px; font-weight: 800; }
.ci-info .bc-pill { margin: 8px 0; }
.ci-info .price { display: flex; }
.ci-end { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--pill); padding: 2px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qty button:hover { background: var(--tint); }
.qty .icon { width: 16px; height: 16px; }
.qty input { width: 42px; border: 0; text-align: center; font-weight: 800; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ci-total { font-size: 17px; color: var(--store-primary); }
.ci-remove { background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.ci-remove .icon { width: 16px; height: 16px; }
.cart-empty { text-align: center; padding: 44px 20px; border: 2px dashed var(--line); border-radius: var(--radius); }
.cart-empty h2 { font-size: 22px; }
.cart-empty p { color: var(--muted); margin: 8px 0 18px; }
.summary { position: sticky; top: 92px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.summary h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--pill); padding: 9px 16px; }
.applied { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.applied .icon { width: 15px; height: 15px; }
.applied b { color: var(--store-text); }
.applied button { background: none; border: 0; padding: 0; color: var(--store-primary); text-decoration: underline; cursor: pointer; font-size: 13px; }
.sum-rows { margin: 8px 0 18px; }
.sum-rows li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sum-rows .total { font-size: 19px; font-weight: 800; border-bottom: 0; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.secure-note .icon { width: 16px; height: 16px; }

/* 404 */
.nf { background: color-mix(in srgb, var(--store-accent) 10%, #fff); padding: 64px 0 70px; text-align: center; overflow: hidden; }
.nf-art { position: relative; height: 230px; max-width: 560px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; }
.nf-stripe { position: absolute; left: -12%; right: -12%; top: 50%; height: 66px; background: var(--store-accent); transform: translateY(-50%) rotate(-8deg); }
.nf-num { position: relative; font-size: 190px; font-weight: 800; line-height: 1; color: var(--store-primary); letter-spacing: 4px; }
.nf-page { position: absolute; top: 14%; left: 57%; width: 70px; height: 92px; background: #fff repeating-linear-gradient(180deg, transparent 0 14px, #E5E7EB 14px 16px) 10px 14px / 50px 64px no-repeat; border-radius: 4px; box-shadow: 0 10px 24px rgba(17, 24, 39, .22); transform: rotate(16deg); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(10deg) translateY(-10px); } }
.nf h1 { font-size: 30px; font-weight: 800; }
.nf p { color: var(--muted); font-size: 16px; max-width: 520px; margin: 10px auto 0; }
.nf-search { display: flex; gap: 6px; max-width: 520px; margin: 24px auto 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--pill); padding: 5px; }
.nf-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; }

/* components page */
.kit-intro { padding: 48px 0 20px; }
.kit-intro h1 { font-size: 36px; font-weight: 800; margin: 8px 0 10px; }
.kit-intro p { color: var(--muted); max-width: 760px; font-size: 16px; }
.kit-block { padding: 32px 0; border-top: 1px solid var(--line); }
.kit-block > .container > h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.kit-note { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.kit-note code { background: var(--tint); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.kit-label { font-weight: 800; font-size: 14px; }
.kit-types { display: flex; flex-wrap: wrap; gap: 26px; }
.kit-types figure { margin: 0; text-align: center; display: grid; justify-items: center; gap: 6px; font-size: 13px; }
.kit-types .type-dot { width: 44px; height: 44px; }
.kit-types .type-dot .icon { width: 20px; height: 20px; }
.kit-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.kit-cats .mosaic-item { grid-column: auto; height: 200px; }
.kit-block .author-grid, .kit-block .review-grid { max-width: 820px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
	.nav-list > li > a, .nav-list > li > button { padding: 10px 10px; font-size: 14px; }
	.footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
	.footer-news { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
	.footer-news > h2:first-child, .footer-news > p, .footer-news .nl-field { grid-column: 1; }
	.footer-news .contact-h { grid-column: 2; grid-row: 1; margin-top: 0; }
	.footer-news .contact-list { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
}
@media (max-width: 1080px) {
	.main-nav { display: none; }
	.menu-toggle { display: inline-flex; }
	.header-in { justify-content: space-between; }
	body[data-books-per-row="5"], body[data-books-per-row="6"] { --cols: 4; }
	.slide-title { font-size: 44px; }
	.pdp { grid-template-columns: minmax(0, 1fr) 300px; }
	.pdp-top { grid-template-columns: 1fr; }
	.gallery { max-width: 420px; }
}
@media (max-width: 960px) {
	body[data-books-per-row] { --cols: 3; }
	.mini-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 23%; overflow-x: auto; padding-bottom: 6px; }
	.trust-grid { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-card { flex: 0 0 46%; scroll-snap-align: start; }
	.section { padding: 60px 0; }
	.section-title { font-size: 28px; }
	.hs-fields { grid-template-columns: 1fr 1fr; gap: 10px; }
	.hs-cell, .hs-cell:first-child, .hs-cell:nth-child(3) { margin: 0; border-radius: var(--radius-sm); }
	.hs-cell:first-child { grid-column: 1 / -1; }
	.hs-btn { grid-column: 1 / -1; margin: 0; padding: 14px; }
	.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.mosaic-item, .mosaic-item:nth-child(n+5) { grid-column: auto; height: 190px; }
	.mosaic-item:nth-child(7):last-child { grid-column: 1 / -1; }
	.author-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.story-grid, .reviews-split { grid-template-columns: 1fr; gap: 34px; }
	.story-visual { min-height: 0; order: -1; }
	.story-visual img { width: min(420px, 90%); }
	.rs-head { text-align: center; }
	.rs-head .section-title { text-align: center; }
	.rs-head p { margin-inline: auto; }
	.wide-banner { grid-template-columns: 1fr; padding: 36px 30px 0; text-align: center; }
	.wb-text p { margin-inline: auto; }
	.wb-visual { min-height: 260px; }
	.listing { grid-template-columns: 1fr; }
	.filters { position: fixed; top: 0; bottom: 0; right: 0; width: min(340px, 88vw); z-index: 90; border-radius: 0; overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .3s, visibility .3s; }
	body.filters-open .filters { transform: none; visibility: visible; }
	.filters-head .icon-btn { display: inline-flex; }
	.filter-open-btn { display: inline-flex; }
	.pdp, .cart-layout { grid-template-columns: 1fr; }
	.pdp { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
	.pdp-main { display: contents; }
	.pdp-main > * { order: 3; }
	.pdp-main > .pdp-top { order: 1; }
	.pdp-aside { order: 2; margin-bottom: 22px; }
	.pdp-aside, .summary { position: static; }
	.author-profile { grid-template-columns: 1fr; text-align: center; }
	.ap-stats { justify-content: center; }
	.footer-grid { grid-template-columns: 1fr 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	body[data-books-per-row], .listing-grid { --cols: 2; }
	.container { width: calc(100% - 32px); }
	.book-grid { gap: 14px; }
	.hide-sm { display: none !important; }
	.topbar-in { min-height: 36px; font-size: 12px; }
	.tb-contact span:not([data-slot]) { display: none; }
	.header-in { min-height: 62px; gap: 10px; }
	.brand { font-size: 18px; }
	.brand img { width: 36px; height: 36px; }
	.account { display: none; }
	.slide-img { position: relative; height: 190px; }
	.slide::after { inset: 0 0 auto; height: 190px; background: linear-gradient(180deg, rgba(10, 16, 34, 0) 55%, rgba(10, 16, 34, .45) 100%); }
	.slide-inner { background: var(--store-primary-dark); padding: 24px 0 112px; }
	.slide-title { font-size: 30px; }
	.title-capsule { width: 84px; height: 36px; margin-top: -4px; border-width: 2px; }
	.slide-text { font-size: 15px; }
	.hero-dots { bottom: auto; top: 166px; }
	.hero-search-wrap { margin-top: -86px; }
	.hero-search { padding: 14px; }
	.hs-top { margin-bottom: 10px; }
	.hs-note { display: none; }
	.hs-radios { gap: 6px 14px; }
	.hs-radios { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.hs-radio { flex-shrink: 0; }
	.hs-fields { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
	.hs-cell:first-child { grid-column: auto; }
	.hs-cell:not(:first-child), .hs-cell small { display: none; }
	.hs-cell { padding: 8px 14px; }
	.hs-btn { grid-column: auto; padding: 0 18px; }
	.hs-cell input, .hs-cell select { font-size: 16px; }
	.section { padding: 48px 0; }
	.section-sm { padding: 36px 0; }
	.section-title { font-size: 24px; }
	.section-sub { font-size: 15px; }
	.section-head { margin-bottom: 24px; }
	.mosaic { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
	.mosaic-item, .mosaic-item:nth-child(n+5), .mosaic-item:nth-child(7):last-child { grid-column: auto; height: 132px; scroll-snap-align: start; }
	.mosaic-tag { padding: 6px 12px; font-size: 13px; }
	.type-band-wrap { padding-top: 40px; }
	.trust-section { padding-top: 22px; }
	.trust-grid { gap: 10px; }
	.trust-card { flex-basis: 78%; padding: 10px 12px; }
	.tc-icon { width: 36px; height: 36px; }
	.trust-card p { font-size: 12.5px; }
	.type-band { clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%); padding: 22px 8%; }
	.tb-text { font-size: 16px; }
	.tb-types { gap: 8px; }
	.tb-type { font-size: 13px; padding: 4px 12px 4px 5px; gap: 6px; }
	.tb-type .type-dot { width: 26px; height: 26px; }
	.bc-stage { padding: 18px 0 14px; }
	.bc-cover { width: 62%; }
	.bc-body { padding: 12px; }
	.bc-title { font-size: 15px; }
	.bc-author { font-size: 13px; }
	.bc-reviews { display: none; }
	.bc-pill { font-size: 12px; padding: 4px 9px; max-width: 100%; }
	.bc-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.bc-foot { gap: 6px; padding-top: 5px; }
	.bc-foot .price { font-size: 15px; }
	.bc-meta { margin-top: 8px; }
	.bc-meta .stock { font-size: 11px; padding: 1px 6px; }
	.bc-pill { overflow: hidden; }
	.bc-cart { width: 40px; height: 40px; } /* لمسٌ مريح في الجوّال، والشكل الأصليّ نفسه */
	.rating-chip { font-size: 12px; padding: 2px 7px; top: 8px; inset-inline-end: 8px; }
	.bc-stage .badge { top: 8px; inset-inline-start: 8px; font-size: 11px; padding: 3px 8px; }
	.cc-body { padding: 50px 12px 12px; }
	.cc-title { font-size: 15px; }
	.cc-author { font-size: 12px; }
	.stamp { top: 10px; inset-inline-start: 10px; font-size: 12px; padding: 5px 8px; }
	.cover-card > .type-dot { top: 10px; inset-inline-end: 10px; }
	.author-grid { gap: 14px; }
	.author-card { padding: 18px 10px 16px; }
	.author-fig { width: 116px; }
	.ac-body h3 { font-size: 16px; }
	.ac-count { font-size: 12px; padding: 3px 9px; }
	.story-text h2 { font-size: 26px; }
	.review-grid { grid-template-columns: 1fr; gap: 14px; }
	.mq-list li { font-size: 16px; }
	.wb-text h2 { font-size: 26px; }
	.wide-banner { padding: 30px 20px 0; }
	.wb-visual { min-height: 210px; }
	.wb-stripe { height: 90px; }
	.mini-row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; overflow-x: auto; padding-bottom: 6px; }
	.footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
	.footer-news { grid-column: 1 / -1; display: block; }
	.footer-news .contact-h { margin-top: 22px; }
	.footer-bottom { justify-content: center; text-align: center; }
	.page-head { min-height: 190px; }
	.page-head h1 { font-size: 28px; }
	.page-head-plain { min-height: 160px; }
	.toolbar p { flex-basis: 100%; order: 3; }
	.tools { margin-inline-start: auto; }
	.listing.is-list .book-card { flex-direction: column; }
	.listing.is-list .bc-stage { width: auto; }
	.box { padding: 18px; }
	.pdp-info h1 { font-size: 25px; }
	.spec-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.spec { padding: 10px; gap: 8px; }
	.spec-ic { width: 34px; height: 34px; }
	.pdp-reviews { grid-template-columns: 1fr; }
	.author-profile { padding: 22px 16px; margin-top: -60px; }
	.author-fig-lg { width: 180px; }
	.ap-body h1 { font-size: 27px; }
	.cart-head h1 { font-size: 24px; }
	.cart-item { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
	.ci-end { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
	.nf-art { height: 160px; }
	.nf-num { font-size: 120px; }
	.nf-stripe { height: 46px; }
	.nf-page { width: 50px; height: 66px; background-size: 34px 44px; background-position: 8px 10px; }
	.nf h1 { font-size: 23px; }
	.kit-intro h1 { font-size: 28px; }
	.kit-cats { grid-template-columns: 1fr; }
	.kit-block .author-grid, .kit-block .review-grid { grid-template-columns: 1fr 1fr; }
	.kit-block .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
	.mini-row { grid-auto-columns: 46%; }
	.tb-contact b { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.mq-track { width: auto; }
	.mq-list { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
}

/* ==== ميزات المنصّة (الملحق 8) ==== */
/* المدوّنة: بطاقة المقال وصفحتا blog.html وpost.html */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; min-width: 0; background: transparent; border: none; border-radius: var(--radius); box-shadow: none; overflow: hidden; }
.post-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; padding-top: 14px; }
.post-date { font-size: .82rem; color: var(--muted); font-weight: 500; }
.post-title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.5; color: var(--store-text); }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--store-primary); }
.post-excerpt { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.post-more { margin-top: 4px; font-size: .88rem; font-weight: 700; color: var(--store-primary); text-decoration: none; }
.post-more:hover { text-decoration: underline; }
.blog-section { padding: 8px 0 56px; }
.post-grid-page { row-gap: 36px; }
.post-page { padding: 8px 0 24px; }
.post-article { max-width: 760px; margin-inline: auto; }
.post-header { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.post-back { font-size: .88rem; font-weight: 700; color: var(--store-primary); text-decoration: none; }
.post-back::before { content: "→ "; }
.post-page-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; font-weight: 800; color: var(--store-text); }
.post-figure { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-content { font-size: 1.02rem; line-height: 2; color: var(--store-text); }
.post-content p { margin: 0 0 1.1em; }
.blog-related { padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 991px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid > .post-card:nth-child(3):last-child { display: none; }
}
@media (max-width: 600px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.post-grid > .post-card:nth-child(3):last-child { display: flex; }
}

/* بطاقة المقال بالصورة الكاملة وختم التاريخ، كبطاقات «آخر الأخبار» في المرجع */
.post-card--cover { position: relative; aspect-ratio: 4 / 5; box-shadow: var(--shadow); isolation: isolate; }
.post-card--cover .post-media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.post-card--cover .post-stamp { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; background: #fff; color: var(--store-primary); border-radius: 10px; padding: 7px 11px; font-size: 13px; font-weight: 800; line-height: 1.2; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.post-card--cover .post-body { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 90px 20px 20px; background: linear-gradient(180deg, rgba(10, 14, 28, 0) 0%, rgba(10, 14, 28, .82) 40%, rgba(10, 14, 28, .95) 100%); }
.post-card--cover .post-title { color: #fff; }
.post-card--cover .post-title a:hover { color: #fff; text-decoration: underline; }
.post-card--cover .post-excerpt { color: rgba(255, 255, 255, .9); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-all { text-align: center; margin-top: 30px; }
.blog-section { padding-top: 48px; }
.post-crumbs { padding-top: 28px; }
.post-page-title { font-size: clamp(27px, 3.4vw, 38px); }
.blog-related .section-head { margin-top: 24px; }
@media (max-width: 600px) { .post-card--cover { aspect-ratio: 1 / 1; } }

/* الأسئلة الشائعة */
.faq-wrap { max-width: 860px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; cursor: pointer; font-weight: 800; font-size: 17px; color: var(--store-primary); list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-ico { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); }
.faq-ico::before, .faq-ico::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--store-primary); transition: transform .25s; }
.faq-ico::after { transform: rotate(90deg); }
.faq-item[open] .faq-ico { background: var(--store-accent); }
.faq-item[open] .faq-ico::before, .faq-item[open] .faq-ico::after { background: var(--on-accent); }
.faq-item[open] .faq-ico::after { transform: rotate(0); }
.faq-a { padding: 0 22px 18px; color: var(--muted); font-size: 15.5px; line-height: 1.85; }

/* تقييم المتجر الإجماليّ بجانب الآراء */
.store-rating { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; }
.sr-score { font-size: 46px; font-weight: 800; line-height: 1; color: var(--store-primary); }
.store-rating .stars .icon { width: 18px; height: 18px; }
.store-rating small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }

/* ==== الإصدار الثاني: أقسامٌ جديدة في الرئيسيّة ==== */
/* صفٌّ كامل دائمًا: rows-2 صفّان، وrow-1 صفٌّ واحد، أيًّا كان عدد الكتب في الصفّ */
.rows-2 > :nth-child(n+9), .row-1 > :nth-child(n+5) { display: none; }
body[data-books-per-row="3"] .rows-2 > :nth-child(n+7), body[data-books-per-row="3"] .row-1 > :nth-child(n+4) { display: none; }
body[data-books-per-row="5"] .rows-2 > :nth-child(-n+10), body[data-books-per-row="6"] .rows-2 > *,
body[data-books-per-row="5"] .row-1 > :nth-child(-n+5), body[data-books-per-row="6"] .row-1 > * { display: flex; }

/* تبويبات صفّ الكتب (القاعدة 16) */
.row-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.row-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: var(--pill); border: 1.5px solid var(--line); background: #fff; color: var(--store-text); font-weight: 700; font-size: 14px; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.row-tab:hover { border-color: var(--store-primary); }
.row-tab[aria-selected="true"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.row-tab img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* عرض الأسبوع: كتابٌ واحد كبير وعدّادٌ واحد للقسم */
.deal { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 48px; align-items: center; background: color-mix(in srgb, var(--store-accent) 12%, #fff); border-radius: calc(var(--radius) + 6px); padding: 40px 48px; overflow: hidden; isolation: isolate; }
.deal::before { content: ""; position: absolute; width: 360px; aspect-ratio: 1; inset-inline-end: -120px; top: -150px; border-radius: 50%; border: 46px solid color-mix(in srgb, var(--store-accent) 22%, #fff); z-index: -1; }
.deal-kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--store-primary); color: #fff; border-radius: var(--pill); padding: 5px 14px; font-size: 13px; font-weight: 700; }
.deal-kicker .icon { width: 16px; height: 16px; }
.deal-title { font-size: 34px; font-weight: 800; line-height: 1.35; margin: 14px 0 6px; }
.deal-sub { color: var(--muted); font-size: 16px; max-width: 420px; }
.countdown { display: flex; gap: 10px; margin-top: 22px; }
.countdown[hidden] { display: none; }
.cd-unit { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; padding: 10px 8px; border-radius: var(--radius-sm); background: var(--store-primary); color: #fff; line-height: 1.2; }
.cd-unit b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: rgba(255, 255, 255, .85); }
.deal-book { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: center; background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.deal-cover { position: relative; display: flex; justify-content: center; padding: 18px 0; }
.deal-ring { position: absolute; width: 96%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--store-accent); }
.deal-cover img { position: relative; width: 74%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 8px 8px 3px; box-shadow: 0 16px 28px rgba(17, 24, 39, .32); transition: transform .3s; }
.deal-book:hover .deal-cover img { transform: rotate(-2deg) scale(1.03); }
.deal-cover .type-dot { position: absolute; bottom: 8px; inset-inline-start: 8px; }
.deal-cover .badge { position: absolute; top: 4px; inset-inline-end: 4px; }
.deal-book-title { font-size: 25px; font-weight: 800; line-height: 1.4; }
.deal-book-title a:hover { color: var(--store-primary); }
.deal-body .pdp-author { margin: 4px 0 6px; }
.deal-desc { color: var(--muted); font-size: 15px; line-height: 1.8; margin: 10px 0 16px; }
.deal-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.deal-price { margin-top: 8px; }
.deal-buy .fav-lg { width: 46px; height: 46px; }

/* الدوّار الأفقيّ: سهمان على الحافّتين في الحاسوب، واللمس يمرّره */
.carousel { position: relative; }
.carousel-track { --cc: 5; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cc) - 1) * 22px) / var(--cc)); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 14px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
.works-track { --cc: var(--cols); }
.carousel-btn { position: absolute; top: calc(50% - 30px); z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--store-primary); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .2s, background .2s; }
.carousel-btn:hover { background: var(--store-primary); color: #fff; }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }
.carousel-btn .icon { width: 20px; height: 20px; }
.carousel-btn.prev { inset-inline-start: -22px; }
.carousel-btn.next { inset-inline-end: -22px; }

/* صفحة المؤلّف: أعماله في دوّارٍ أفقيّ */
.works-section { padding-top: 12px; }
.works-track > .book-card { box-shadow: 0 4px 16px rgba(17, 24, 39, .07); }

/* صفحة التصنيف: المرشّحات المختارة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.active-filters .af-label { font-size: 14px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 14px; border-radius: var(--pill); background: color-mix(in srgb, var(--store-primary) 8%, #fff); border: 1px solid color-mix(in srgb, var(--store-primary) 22%, #fff); font-size: 13px; font-weight: 700; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { border-color: var(--store-primary); }
.af-clear { font-size: 13px; color: var(--muted); text-decoration: underline; }

/* صفحة الكتاب: اختيار الصيغة والكمّيّة */
.formats-box { margin: 4px 0 16px; }
.formats-label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt.is-current { border-color: var(--store-accent); background: color-mix(in srgb, var(--store-accent) 8%, #fff); }
.format-opt .type-dot { width: 28px; height: 28px; border: 0; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-weight: 800; font-size: 14px; }
.format-price { font-size: 13px; color: var(--store-primary); font-weight: 700; }
.qty-row { display: flex; gap: 10px; }
.qty-row .btn { flex: 1; min-width: 0; padding-inline: 14px; }
.qty-row .qty { padding: 4px; }
.qty-row .qty input { width: 38px; }

@media (max-width: 1080px) {
	body[data-books-per-row="5"] .rows-2 > :nth-child(n+9), body[data-books-per-row="6"] .rows-2 > :nth-child(n+9),
	body[data-books-per-row="5"] .row-1 > :nth-child(n+5), body[data-books-per-row="6"] .row-1 > :nth-child(n+5) { display: none; }
	.carousel-track { --cc: 4; }
	.works-track { --cc: 4; }
	.deal { grid-template-columns: 1fr; padding: 34px; }
	.carousel-btn.prev { inset-inline-start: -8px; }
	.carousel-btn.next { inset-inline-end: -8px; }
}
@media (max-width: 960px) {
	body[data-books-per-row] .rows-2 > :nth-child(n+7), body[data-books-per-row] .row-1 > :nth-child(n+4) { display: none; }
	.carousel-track, .works-track { --cc: 3; }
}
@media (max-width: 760px) {
	body[data-books-per-row] .row-1 > :nth-child(-n+4) { display: flex; }
	body[data-books-per-row] .rows-2 > :nth-child(n+5), body[data-books-per-row] .row-1 > :nth-child(n+5) { display: none; }
	.carousel-track, .works-track { --cc: 2.2; gap: 14px; grid-auto-columns: calc((100% - 2 * 14px) / 2.2); }
	.carousel-btn { display: none; }
	.cover-track { grid-auto-columns: calc((100% - 14px) / 1.65); }
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.row-tab { flex-shrink: 0; padding: 7px 14px; font-size: 13px; }
	.deal { padding: 24px 16px; border-radius: var(--radius); }
	.deal::before { width: 220px; border-width: 30px; top: -110px; inset-inline-end: -90px; }
	.deal-title { font-size: 26px; }
	.deal-sub { font-size: 15px; }
	.countdown { gap: 8px; margin-top: 16px; }
	.cd-unit { min-width: 0; flex: 1; padding: 8px 4px; }
	.cd-unit b { font-size: 21px; }
	.deal-book { grid-template-columns: 1fr; gap: 14px; padding: 18px 16px; }
	.deal-cover { max-width: 210px; margin: 0 auto; width: 100%; }
	.deal-book-title { font-size: 21px; }
	.deal-buy .btn { flex: 1; }
	.active-filters { margin-top: 0; }
	.qty-row .btn { padding-inline: 12px; }
}

/* نصّ الرأي: أربعة أسطر على الأكثر، والنصّ الكامل في title (الملحق، البند 5) */
[data-slot="review.text"] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
