/* ==========================================================================
   مَهد — قالب متجر كتب الأطفال والوسائل التعليميّة لمنصّة «ناشر»
   أبيض ناعم، وحوافّ متموّجة وغيوم، وباستيلٌ من لونَي المتجر، وبطاقةٌ بإطارٍ متدرّج.
   كلّ ألوان الهويّة من المتغيّرات الخمسة؛ وما سواها محايدٌ أو مشتقٌّ منها بـ color-mix.
   ========================================================================== */

:root {
	--store-primary: #0E7FA6;
	--store-primary-dark: #0B6E90;
	--store-accent: #CF3563;
	--store-bg: #FFFFFF;
	--store-text: #202326;

	/* محايدات */
	--muted: #5F646A;
	--line: #E4E7EA;
	--soft: #F5F6F7;
	--gold: #F4B400;
	--footer: #1F2226;
	--on-dark: #C9CED4;

	/* باستيلٌ مشتقّ من لونَي المتجر */
	--tint-blue: color-mix(in srgb, var(--store-primary) 9%, #fff);
	--tint-blue-2: color-mix(in srgb, var(--store-primary) 18%, #fff);
	--tint-pink: color-mix(in srgb, var(--store-accent) 8%, #fff);
	--tint-pink-2: color-mix(in srgb, var(--store-accent) 16%, #fff);
	--tint-lilac: color-mix(in srgb, color-mix(in srgb, var(--store-primary), var(--store-accent)) 10%, #fff);
	--accent-ink: color-mix(in srgb, var(--store-accent) 80%, #000);
	--frame: linear-gradient(150deg, color-mix(in srgb, var(--store-accent) 50%, #fff), color-mix(in srgb, var(--store-primary) 50%, #fff));

	--r: 12px;
	--r-sm: 8px;
	--pill: 999px;
	--font: 'Baloo Bhaijaan 2', system-ui, sans-serif;
	--container: 1240px;
	--shadow: 0 6px 20px rgba(32, 35, 38, .08);
}

[data-corners="sharp"] { --r: 0px; --r-sm: 0px; --pill: 0px; }

[data-books-per-row="3"] { --per: 3; --per-side: 3; }
[data-books-per-row="4"] { --per: 4; --per-side: 3; }
[data-books-per-row="5"] { --per: 5; --per-side: 4; }
[data-books-per-row="6"] { --per: 6; --per-side: 5; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.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; }
.skip-link { position: absolute; top: -60px; inset-inline-start: 12px; z-index: 100; background: var(--store-text); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon.star { fill: var(--gold); stroke: var(--gold); stroke-width: 1; }
.icon.star.off { fill: #DADDE1; stroke: #DADDE1; }
.icon-arrow { width: 16px; height: 16px; }

/* ------------------------------------------------------------- buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 8px 20px;
	border: 1.5px solid transparent; border-radius: var(--r-sm);
	font-weight: 600; font-size: 14.5px; line-height: 1.2; white-space: nowrap;
	transition: background .2s, color .2s, border-color .2s;
}
.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: #fff; }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 82%, #000); }
.btn-outline { background: #fff; border-color: var(--store-primary); color: var(--store-primary-dark); }
.btn-outline:hover { background: var(--tint-blue); }
.btn-dark { background: var(--store-text); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--store-accent); }
.btn-sm { min-height: 34px; padding: 5px 14px; font-size: 13.5px; }
.btn-lg { min-height: 48px; padding: 10px 24px; font-size: 15.5px; }
.btn-block { width: 100%; }
.icon-btn {
	position: relative; display: inline-grid; place-items: center;
	width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--store-text);
}
.icon-btn:hover { color: var(--store-primary); }
.icon-btn .icon { width: 23px; height: 23px; }
.icon-btn-lg { width: 48px; height: 48px; border: 1.5px solid var(--line); }
.icon-btn[aria-pressed="true"] .icon { fill: var(--store-accent); stroke: var(--store-accent); }
.bubble {
	position: absolute; top: 1px; inset-inline-end: -1px;
	min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
	background: var(--store-accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--store-primary-dark); }
.link-more .icon { width: 16px; height: 16px; }
.link-more:hover { color: var(--store-accent); }
.field {
	width: 100%; min-height: 42px; padding: 8px 12px;
	border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
.field:focus { border-color: var(--store-primary); outline: none; }

/* ------------------------------------------------------------- top bar with a scalloped edge */
.topbar { position: relative; z-index: 3; background: var(--store-accent); color: #fff; font-size: 13px; }
.topbar::after {
	content: ""; position: absolute; inset-inline: 0; top: 100%; height: 8px;
	background: radial-gradient(circle at 50% 0, var(--store-accent) 6px, transparent 6.6px) 0 0 / 14px 8px repeat-x;
}
[data-show-waves="false"] .topbar::after { display: none; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.tb-links, .tb-social { display: flex; align-items: center; gap: 16px; }
.tb-links a:hover, .tb-social a:hover { text-decoration: underline; }
.tb-social .icon { width: 16px; height: 16px; }
.tb-note { font-weight: 600; text-align: center; }
.tb-note:empty { display: none; }

/* ------------------------------------------------------------- header */
/* الصفّ الأوّل (الشعار والبحث والأيقونات) يبقى مثبّتًا أعلى الشاشة؛ صفّ القائمة والسحاب يمرّان.
   الرأس نفسه display: contents ليكون مرجعُ التثبيت الصفحةَ كلّها، وخلفيّة كلّ صفٍّ تمتدّ بعرض الشاشة. */
.site-header { display: contents; }
.hd-main, .hd-nav { border-image: linear-gradient(#fff 0 0) fill 0 / 0 / 0 100vmax; }
.site-header > .cloud-rule { background: #fff; }
.hd-main { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 26px; padding-block: 20px 12px; transition: filter .25s; }
.hd-stuck .hd-main { filter: drop-shadow(0 6px 10px rgba(32, 35, 38, .07)); }
.menu-toggle { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand-name { font-size: 25px; font-weight: 800; color: var(--store-primary-dark); line-height: 1; }
.hd-search {
	flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
	border-bottom: 1.5px solid var(--line); padding-bottom: 4px;
}
.hd-search:focus-within { border-color: var(--store-primary); }
.hd-select { border: 0; background: transparent; padding: 6px 4px; max-width: 150px; color: var(--muted); font-size: 14px; }
.hd-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 10px; border-inline-start: 1px solid var(--line); }
.hd-search input:focus { outline: none; }
.hd-search-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; display: grid; }
.hd-search-btn:hover { color: var(--store-primary); }
.hd-call { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hd-call .icon { width: 30px; height: 30px; stroke-width: 1.4; color: var(--store-primary-dark); }
.hd-call small { display: block; font-size: 13px; color: var(--muted); line-height: 1.2; }
.hd-call b { font-size: 15px; line-height: 1.2; }
.hd-icons { display: flex; gap: 4px; }

.hd-nav { display: flex; align-items: center; gap: 22px; padding-bottom: 10px; }
.cat-menu { position: relative; }
.cat-btn {
	display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 18px;
	border: 0; border-radius: var(--r-sm); background: var(--store-accent); color: #fff; font-weight: 600; font-size: 15px;
}
.cat-btn:hover { background: color-mix(in srgb, var(--store-accent) 85%, #000); }
.drop {
	position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 20; min-width: 240px;
	padding: 8px; background: #fff; border-radius: var(--r); box-shadow: 0 14px 34px rgba(32, 35, 38, .16);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop, .has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 8px 12px; border-radius: var(--r-sm); }
.drop a:hover { background: var(--tint-pink); color: var(--accent-ink); }
.nav-list { display: flex; gap: 24px; flex: 1; }
.nav-list a { font-size: 15.5px; font-weight: 500; padding-block: 8px; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--store-primary-dark); }
.nav-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--store-primary); }
.nav-track { display: inline-flex; align-items: center; gap: 6px; padding-inline-start: 16px; border-inline-start: 1px solid var(--line); font-weight: 500; }
.nav-track:hover { color: var(--store-primary-dark); }

/* cloud rule: under the header and at the bottom of page heads */
.cloud-rule { height: 42px; line-height: 0; overflow: hidden; }
.cloud-rule svg { width: 100%; height: 100%; display: block; }
.cloud-rule .cr-front { fill: var(--tint-blue); stroke: var(--tint-blue-2); stroke-width: 2; }
.cloud-rule .cr-back { fill: color-mix(in srgb, var(--store-primary) 5%, #fff); }
.cloud-rule-flip { margin-top: 24px; }
.cloud-rule-flip .cr-front { fill: var(--store-bg); stroke: none; }
.cloud-rule-flip .cr-back { fill: color-mix(in srgb, var(--store-primary) 14%, #fff); }
[data-show-waves="false"] .cloud-rule { display: none; }
[data-show-waves="false"] .hd-nav { border-image: linear-gradient(to top, var(--line) 1px, #fff 1px) fill 0 / 0 / 0 100vmax; }

/* drawer */
.drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(86vw, 330px);
	background: #fff; padding: 16px; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(32, 35, 38, .45); opacity: 0; visibility: hidden; transition: .25s; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.drawer-head .brand-name { font-size: 20px; }
.drawer-label { margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 8px 14px; border-bottom: 1px solid var(--line); }
.drawer-cats a { display: inline-block; padding: 4px 12px; border-radius: var(--pill); background: var(--tint-pink); font-size: 14px; }
.drawer-nav a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--soft); font-weight: 500; }
.drawer-phone { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; color: var(--store-primary-dark); }

/* ------------------------------------------------------------- sections */
.section { padding-block: 34px; }
.section-tight { padding-block: 16px; }
.section-top-0 { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title { font-size: 24px; font-weight: 700; line-height: 1.3; }
.section-sub { color: var(--muted); font-size: 14.5px; margin-top: 2px; }

/* ------------------------------------------------------------- banners */
.bn { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--tint-blue); isolation: isolate; }
.bn > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .5s; }
.bn:hover > img { transform: scale(1.04); }
.bn-body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; max-width: 62%; }
.bn-eyebrow {
	display: inline-block; align-self: flex-start; padding: 1px 10px; border-radius: var(--pill);
	background: #FFE7A3; color: var(--store-text); font-size: 12.5px; font-weight: 600;
}
.bn-title { font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--store-text); }
.bn-text { font-size: 14px; color: #3D4146; }
.bn-big {
	display: inline-block; margin-top: 6px; padding: 2px 16px 2px 22px; border-radius: 0 var(--pill) var(--pill) 0;
	background: var(--store-accent); color: #fff; font-size: 30px; font-weight: 800; line-height: 1.3; margin-inline-start: -18px;
}
.bn-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent-ink); }
.bn:hover .bn-cta { text-decoration: underline; }

/* ------------------------------------------------------------- hero grid */
.hero-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr) 236px; gap: 24px; padding-top: 14px; min-height: 470px; }
.bn-tall { min-height: 470px; }
.bn-tall .bn-body { max-width: 100%; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 24px; }
.bn-side .bn-body { max-width: 100%; }
.hero { position: relative; min-width: 0; }
.slider { position: relative; height: 100%; border-radius: var(--r); overflow: hidden; background: var(--tint-blue); }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: 470px; display: flex; align-items: center; isolation: isolate; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
/* the cloud behind the copy: a white cloud silhouette in the reading side */
.slide::before {
	content: ""; position: absolute; z-index: -1; inset-block: 12% 18%; inset-inline-start: -6%; width: 64%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, .78), rgba(255, 255, 255, .55) 70%, transparent);
	border-radius: 50%;
}
.slide-body { padding: 34px 40px 60px; max-width: 470px; }
.slide-body h2 { font-size: 36px; font-weight: 800; line-height: 1.2; margin-block: 10px 10px; }
.slide-body h2 em { font-style: normal; color: #fff; background: var(--store-accent); padding: 0 8px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.slide-body p { color: #33373C; margin-bottom: 18px; font-size: 15px; }
/* scalloped bottom edge of the slider */
.slider::after {
	content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 16px; pointer-events: none;
	background: radial-gradient(circle at 50% 100%, var(--store-bg) 10px, transparent 10.6px) 0 0 / 26px 16px repeat-x;
}
[data-show-waves="false"] .slider::after { display: none; }
.slider-nav { position: absolute; bottom: 24px; inset-inline-start: 40px; display: flex; align-items: center; gap: 8px; }
.slider-arrow { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: var(--store-text); display: grid; place-items: center; box-shadow: var(--shadow); }
.slider-arrow .icon { width: 18px; height: 18px; }
.slider-dots { display: flex; gap: 6px; }
.slider-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 5px; background: rgba(32, 35, 38, .25); transition: width .2s; }
.slider-dots button[aria-current="true"] { width: 24px; background: var(--store-primary); }
/* hiding home_hero keeps a sane page: the tall banner and the pair share the row */
.hero-grid:not(:has(.hero)) { grid-template-columns: 1fr 2fr; min-height: 0; }
.hero-grid:not(:has(.hero)) .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
.hero-grid:not(:has(.hero)) .bn-tall { min-height: 300px; }

/* ------------------------------------------------------------- categories box + new arrivals */
.split { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.cat-box { background: var(--tint-blue); border-radius: var(--r); padding: 18px 16px; }
.cat-box h2 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.cat-box a { display: flex; align-items: center; gap: 10px; padding: 7px 2px; font-size: 14.5px; }
.cat-box a:hover { color: var(--store-primary-dark); }
.cat-box .icon { width: 19px; height: 19px; }
.cat-box-top { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--tint-blue-2); }
.hot { margin-inline-start: auto; padding: 0 8px; border-radius: 4px; background: var(--store-accent); color: #fff; font-size: 11.5px; font-weight: 600; }
.cat-box-list span { flex: 1; }
.cat-box-list .chev { width: 15px; height: 15px; color: var(--muted); }

/* ------------------------------------------------------------- book card */
.book-grid { display: grid; grid-template-columns: repeat(var(--per, 5), minmax(0, 1fr)); gap: 26px 18px; }
.grid-side { grid-template-columns: repeat(var(--per-side, 4), minmax(0, 1fr)); }
.split .grid-side { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bcard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.bcard-media {
	position: relative; padding: 12px; border-radius: var(--r);
	border: 1.5px solid transparent;
	background: linear-gradient(#fff, #fff) padding-box, var(--frame) border-box;
}
[data-card-style="soft"] .bcard-media { border-color: transparent; background: var(--tint-blue); }
[data-card-style="soft"] .bcard:nth-child(even) .bcard-media { background: var(--tint-pink); }
[data-card-style="plain"] .bcard-media { border: 0; background: transparent; padding: 0; }
.bcard-cover { display: block; }
.bcard-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 12px rgba(32, 35, 38, .14); }
.type-dot {
	position: absolute; top: 6px; inset-inline-start: 6px; z-index: 2;
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff;
	box-shadow: 0 0 0 2px #fff;
}
.type-dot .icon { width: 16px; height: 16px; }
.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; }
.type-dot-sm { width: 24px; height: 24px; top: 4px; inset-inline-start: 4px; }
.type-dot-sm .icon { width: 13px; height: 13px; }
.type-dot-xs { position: static; width: 20px; height: 20px; box-shadow: none; }
.type-dot-xs .icon { width: 12px; height: 12px; }
.kit-row > .type-dot { position: static; }
.bcard-badges { position: absolute; top: 42px; inset-inline-start: 6px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: var(--pill); font-size: 12px; font-weight: 700; line-height: 1.6; }
.badge-sale { background: var(--store-accent); color: #fff; }
.badge-new { background: var(--store-primary); color: #fff; }
/* the wishlist icon hangs on a string, like a gift tag */
.hang { position: absolute; top: -1.5px; inset-inline-end: 14px; z-index: 3; display: flex; flex-direction: column; align-items: center; transition: opacity .25s, transform .25s; }
.hang::before { content: ""; width: 1.5px; height: 16px; background: color-mix(in srgb, var(--store-primary) 55%, #fff); }
.hang::after { content: ""; position: absolute; top: 14px; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--store-primary) 55%, #fff); background: #fff; }
.hang-btn {
	display: grid; place-items: center; width: 32px; height: 32px; margin-top: 2px; border-radius: 50%;
	border: 1.5px solid var(--tint-blue-2); background: #fff; color: var(--store-text); box-shadow: 0 3px 8px rgba(32, 35, 38, .1);
}
.hang-btn .icon { width: 16px; height: 16px; }
.hang-btn:hover { color: var(--store-accent); }
.hang-btn[aria-pressed="true"] .icon { fill: var(--store-accent); stroke: var(--store-accent); }
/* زرّ السلّة: إطار القالب الأصليّ نفسه، ظاهرٌ دائمًا تحت التقييم، ويُدفع وحده إلى أسفل البطاقة لتتساوى الأزرار في الصفّ */
.bcard-add {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 36px; margin-top: auto; padding: 4px 8px;
	border: 1.5px solid var(--store-primary); border-radius: var(--r-sm); background: #fff; color: var(--store-primary-dark);
	font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s;
}
.bcard-rate { margin-bottom: 10px; }
.bcard-add .icon { width: 16px; height: 16px; }
.bcard-add:hover { background: var(--store-primary); color: #fff; }
.bcard-add:disabled { border-color: var(--line); background: var(--soft); color: var(--muted); cursor: not-allowed; }
@media (hover: hover) {
	.hang { opacity: 0; transform: translateY(-8px); }
	.bcard:hover .hang, .bcard:focus-within .hang { opacity: 1; transform: none; }
}
.stock-band {
	position: absolute; inset-inline: 12px; bottom: 34%; z-index: 2; padding: 4px; text-align: center;
	background: rgba(32, 35, 38, .86); color: #fff; font-size: 13px; font-weight: 600;
}
.is-out .bcard-cover img { filter: grayscale(.6); opacity: .75; }
.bcard-title { margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.bcard-title a:hover { color: var(--store-primary-dark); }
.bcard-author { font-size: 13px; color: var(--muted); line-height: 1.4; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 2px; }
.price b { color: var(--store-accent); font-weight: 700; font-size: 15px; }
.price del { color: var(--muted); font-size: 13px; }
.price-lg b { font-size: 26px; }
.price-lg del { font-size: 16px; }
.bcard-rate { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.rating { display: inline-flex; gap: 1px; }
.rating .icon { width: 14px; height: 14px; }
.rating-lg .icon { width: 19px; height: 19px; }
.count { font-size: 12.5px; color: var(--muted); }

/* small card */
.mini-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mini { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); background: linear-gradient(#fff, #fff) padding-box, var(--frame) border-box; border: 1.5px solid transparent; }
.mini-cover { position: relative; flex: 0 0 74px; }
.mini-cover img { width: 74px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.mini-body { min-width: 0; }
.mini .bcard-title { margin-top: 0; }

/* ------------------------------------------------------------- wide banner */
.bn-wide { position: relative; display: grid; place-items: center; min-height: 160px; padding: 18px; border-radius: var(--r); overflow: hidden; isolation: isolate; text-align: center; background: var(--tint-blue); }
.bn-wide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.bn-wide-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 26px; border-radius: var(--pill); background: rgba(255, 255, 255, .72); }
.bn-wide b { font-size: 24px; font-weight: 800; color: var(--store-primary-dark); line-height: 1.3; }
.bn-wide span span, .bn-wide-body > span { font-size: 14.5px; color: var(--store-text); }

/* ------------------------------------------------------------- pastel category cards */
.pcat-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; }
.pcat-row-sm { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pcat {
	display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px 14px;
	border-radius: var(--r); background: var(--tint-blue); text-align: center; transition: transform .2s;
}
.pcat:nth-child(4n+2) { background: var(--tint-pink); }
.pcat:nth-child(4n+3) { background: var(--tint-lilac); }
.pcat:nth-child(4n+4) { background: color-mix(in srgb, var(--store-primary) 5%, color-mix(in srgb, var(--store-accent) 5%, #fff)); }
.pcat:hover { transform: translateY(-3px); }
.pcat-img { display: block; width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; margin-bottom: 8px; }
.pcat-img img { width: 100%; height: 100%; object-fit: cover; }
.pcat b { font-size: 15px; font-weight: 600; }
.pcat small { font-size: 12.5px; color: var(--muted); }
.pcat-sm .pcat-img { width: 72px; height: 72px; }

/* ------------------------------------------------------------- three row banners */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.trio-pair { display: contents; }
.bn-row { min-height: 150px; }
.bn-row .bn-body { max-width: 58%; }
.bn-row .bn-cta { padding: 4px 12px; border-radius: 4px; background: var(--store-primary); color: #fff; font-size: 12.5px; }

/* ------------------------------------------------------------- collection: mosaic + tabs */
.coll { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 26px; align-items: stretch; }
.mosaic { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.mosaic-pair { display: grid; grid-template-rows: 1.4fr 1fr; gap: 16px; }
.bn-mos .bn-body, .bn-mos-tall .bn-body { max-width: 100%; }
.bn-mos .bn-title, .bn-mos-tall .bn-title { font-size: 18px; }
.bn-mos .bn-big { font-size: 24px; }
.coll-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 18px; }
.tabs [role="tab"] { border: 0; background: none; padding: 4px 0; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs [role="tab"][aria-selected="true"] { color: var(--store-primary-dark); border-color: var(--store-primary); }
.grid-coll { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 16px; }

/* ------------------------------------------------------------- newsletter */
.newsletter { padding-block: 26px; }
.nl-box {
	position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 26px;
	padding: 22px 30px 22px 110px; border-radius: var(--r); background: var(--tint-blue); overflow: hidden;
}
.nl-art { width: 130px; height: auto; }
.nl-horn { fill: var(--store-primary); }
.nl-mouth { fill: var(--store-primary-dark); }
.nl-handle { fill: none; stroke: var(--store-primary-dark); stroke-width: 6; stroke-linejoin: round; }
.nl-waves { fill: none; stroke: var(--store-accent); stroke-width: 5; stroke-linecap: round; }
.nl-stars { position: absolute; top: 0; inset-inline-end: 22px; width: 70px; height: 96px; }
.nl-stars path { stroke: color-mix(in srgb, var(--store-primary) 45%, #fff); stroke-width: 1.5; fill: none; }
.nl-stars use { fill: var(--gold); stroke: var(--gold); }
.nl-text h2 { font-size: 23px; font-weight: 700; line-height: 1.3; }
.nl-text h2 span { color: var(--accent-ink); }
.nl-text p { color: var(--muted); font-size: 14.5px; }
.nl-field { display: flex; gap: 8px; padding: 6px; background: #fff; border-radius: var(--r-sm); }
.nl-field input { flex: 1; min-width: 0; border: 0; padding: 6px 10px; background: transparent; }
.nl-field input:focus { outline: none; }
[data-show-newsletter="false"] .newsletter { display: none; }

/* ------------------------------------------------------------- promo cards (slider) */
.promo-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.promo { position: relative; display: flex; align-items: flex-start; aspect-ratio: 440 / 520; border-radius: var(--r); overflow: hidden; isolation: isolate; background: var(--tint-pink); }
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .5s; }
.promo:hover img { transform: scale(1.05); }
.promo-body { display: flex; flex-direction: column; align-items: flex-start; padding: 16px; gap: 2px; }
.promo-body small { font-size: 13px; font-weight: 600; color: var(--store-primary-dark); }
.promo-body b { font-size: 20px; font-weight: 800; line-height: 1.25; color: var(--accent-ink); }
.promo-body > span:not(.bn-cta) { font-size: 13.5px; color: #3D4146; }
.promo .bn-cta { padding: 3px 12px; border-radius: 4px; background: var(--store-primary); color: #fff; font-size: 12.5px; }

/* ------------------------------------------------------------- educational sub-categories */
.edu-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.edu { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.edu-img { display: block; width: 100%; padding: 8px; border-radius: var(--r); border: 1.5px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--frame) border-box; margin-bottom: 8px; }
.edu-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--r) - 4px); transition: transform .3s; }
.edu:hover img { transform: scale(1.04); }
.edu b { font-size: 15px; font-weight: 600; }
.edu small { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------- trust bar (wavy edges) */
.trust { position: relative; margin-block: 30px; padding-block: 26px; background: var(--tint-pink); }
.trust::before, .trust::after {
	content: ""; position: absolute; inset-inline: 0; height: 10px;
	background: radial-gradient(circle at 50% 100%, var(--tint-pink) 8px, transparent 8.6px) 0 0 / 22px 10px repeat-x;
}
.trust::before { bottom: 100%; }
.trust::after { top: 100%; transform: scaleY(-1); }
[data-show-waves="false"] .trust::before, [data-show-waves="false"] .trust::after { display: none; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.trust-item { display: flex; align-items: center; justify-content: center; gap: 14px; }
.trust-item + .trust-item { border-inline-start: 1.5px dashed var(--tint-pink-2); }
.trust-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fff; color: var(--store-accent); }
.trust-ic .icon { width: 25px; height: 25px; }
.trust h3 { font-size: 16.5px; font-weight: 700; }
.trust p { font-size: 13.5px; color: var(--muted); }
[data-show-trust-bar="false"] .trust { display: none; }

/* ------------------------------------------------------------- featured: books around a tall banner */
.feat { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 24px 16px; }
.feat-items { display: contents; }
.bn-feat { grid-column: 4 / span 2; grid-row: 1 / span 2; min-height: 420px; }
.bn-feat .bn-body { max-width: 100%; padding: 22px; }
.bn-feat .bn-title { font-size: 24px; color: var(--accent-ink); }
.bn-feat .bn-cta { padding: 5px 14px; border-radius: 4px; background: var(--store-primary); color: #fff; }

/* ------------------------------------------------------------- authors in gradient rings */
.author-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.acard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.acard-ring { display: block; width: 132px; max-width: 100%; aspect-ratio: 1; padding: 4px; border-radius: 50%; background: var(--frame); margin-bottom: 8px; transition: transform .25s; }
.acard-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid #fff; }
.acard:hover .acard-ring { transform: rotate(-6deg); }
.acard b { font-size: 15.5px; font-weight: 600; }
.acard small { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------- footer */
.site-footer { margin-top: 30px; background: var(--footer); color: var(--on-dark); font-size: 14px; }
.ft-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr 1.4fr; gap: 28px; padding-block: 44px 30px; }
.ft-col h2 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.ft-col li { margin-bottom: 7px; }
.ft-col a:hover { color: #fff; text-decoration: underline; }
.ft-contact p, .ft-phone { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ft-contact .icon { width: 18px; height: 18px; margin-top: 2px; color: color-mix(in srgb, var(--store-primary) 45%, #fff); }
.ft-phone { font-size: 19px; font-weight: 700; color: #fff; }
.social { display: flex; gap: 8px; margin-top: 12px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; }
.social a:hover { background: var(--store-accent); text-decoration: none; }
.social .icon { width: 18px; height: 18px; }
.ft-about p { line-height: 1.7; }
.pay { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pay li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 6px; background: #fff; color: var(--store-text); font-size: 12.5px; font-weight: 600; margin: 0; }
.pay .icon { width: 16px; height: 16px; }
.ft-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.ft-bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; flex-wrap: wrap; }
.brand-light .brand-name { color: #fff; font-size: 21px; }
.brand-light img { width: 36px; height: 36px; border-radius: 10px; }

/* ------------------------------------------------------------- page head, breadcrumb */
.page-head { padding-top: 26px; background: var(--tint-blue); }
.page-head h1 { font-size: 32px; font-weight: 800; line-height: 1.25; margin-top: 6px; }
.page-head p { color: #3D4146; margin-top: 4px; max-width: 680px; }
.page-head .cloud-rule-flip { margin-top: 12px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #A3A8AE; }
.breadcrumb a:hover { color: var(--store-primary-dark); }
.page-head .breadcrumb { color: #4A4F55; }

/* ------------------------------------------------------------- category listing */
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 14px; }
.filters-head { display: none; }
.fbox { padding: 16px; border-radius: var(--r); background: var(--tint-blue); }
.fbox h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.fbox h3 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.fcats a { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14.5px; }
.fcats a[aria-current="page"] { color: var(--store-primary-dark); font-weight: 700; }
.fcats a:hover { color: var(--store-primary-dark); }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14.5px; cursor: pointer; }
.check .count { margin-inline-start: auto; }
.check input, .age-chips input { accent-color: var(--store-primary); width: 16px; height: 16px; }
.age-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.age-chips label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); background: #fff; font-size: 13.5px; cursor: pointer; }
.price-range { display: flex; align-items: center; gap: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 10px 14px; border-radius: var(--r); border: 1.5px solid var(--line); }
.toolbar p { font-size: 14px; color: var(--muted); }
.toolbar p b { color: var(--store-text); }
.filters-toggle { display: none; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort .field { width: auto; min-height: 36px; padding: 4px 10px; color: var(--store-text); }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: var(--r-sm); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; }
.pagination span { border-color: transparent; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }
.pagination a[aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.pagination .icon { width: 17px; height: 17px; }

/* ------------------------------------------------------------- product page (sticky info) */
.pdp-sec { padding-top: 20px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 16px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gal-item { position: relative; margin: 0; padding: 18px; border-radius: var(--r); border: 1.5px solid transparent; background: linear-gradient(var(--tint-blue), var(--tint-blue)) padding-box, var(--frame) border-box; }
.gal-item:nth-child(2) { background: linear-gradient(var(--tint-pink), var(--tint-pink)) padding-box, var(--frame) border-box; }
.gal-item img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 10px 24px rgba(32, 35, 38, .18); }
.gal-item figcaption { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.gal-item .type-dot { top: 10px; inset-inline-start: 10px; width: 36px; height: 36px; }
.gal-item .type-dot .icon { width: 19px; height: 19px; }
.gal-item .bcard-badges { top: 52px; inset-inline-start: 10px; }
.pdp-info { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 10px; }
.pdp-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag { padding: 1px 12px; border-radius: var(--pill); background: var(--tint-pink); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.pdp-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pdp-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdp-title h1 { font-size: 32px; font-weight: 800; line-height: 1.25; }
.age-badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: var(--pill);
	background: var(--store-accent); color: #fff; font-weight: 700; font-size: 14.5px;
}
.age-badge .icon { width: 18px; height: 18px; }
.pdp-author { color: var(--muted); }
.pdp-author a { color: var(--store-primary-dark); font-weight: 600; }
.pdp-rate { display: flex; align-items: center; gap: 8px; }
.pdp-price { display: flex; align-items: center; gap: 12px; }
.pdp-lead { color: #3D4146; }
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.chips li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 12px 6px; border-radius: var(--r); background: var(--tint-blue); }
.chips li:nth-child(even) { background: var(--tint-pink); }
.chip-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--store-primary-dark); margin-bottom: 4px; }
.chips li:nth-child(even) .chip-ic { color: var(--store-accent); }
.chips small { font-size: 12.5px; color: var(--muted); }
.chips b { font-size: 14px; font-weight: 700; line-height: 1.35; }
.buybox { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); border: 1.5px solid var(--line); }
.stock { display: inline-flex; align-items: center; gap: 6px; color: #2E7A57; font-weight: 600; font-size: 14px; }
.buy-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-btns .btn-primary { flex: 1; }
.perks li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding-block: 2px; }
.perks .icon { width: 18px; height: 18px; color: var(--store-primary-dark); }
.pdp-more { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 40px; }
.pdp-block { padding: 22px; border-radius: var(--r); border: 1.5px solid var(--line); }
.reviews-block { margin-top: 24px; }
.block-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--tint-blue-2); }
.prose p + p { margin-top: 10px; }
.prose { color: #33373C; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 8px 6px; text-align: start; border-bottom: 1px dashed var(--line); }
.spec-table th { color: var(--muted); font-weight: 500; width: 40%; }
.reviews-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; }
.rev-summary { display: flex; align-items: center; gap: 10px; }
.rev-summary strong { font-size: 40px; line-height: 1; }
.rev-summary > span:last-child { color: var(--muted); font-size: 13.5px; }
.rating-bars { margin-block: 12px 16px; }
.rating-bars li { display: grid; grid-template-columns: 56px 1fr 38px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding-block: 2px; }
.bar { height: 7px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-form { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r); background: var(--tint-blue); }
.review-form h3 { font-size: 17px; font-weight: 700; }
.review-form p { font-size: 13.5px; color: var(--muted); }
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; }
.sp-label { font-size: 14px; margin-inline-end: 6px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { cursor: pointer; }
.star-pick .icon { width: 24px; height: 24px; fill: #DADDE1; stroke: #DADDE1; }
.star-pick label:hover .icon, .star-pick label:hover ~ label .icon, .star-pick input:checked ~ label .icon { fill: var(--gold); stroke: var(--gold); }
.star-pick input:focus-visible + label { outline: 2px solid var(--store-primary); }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review { padding: 14px 16px; border-radius: var(--r); border: 1.5px solid var(--line); }
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-top > div { flex: 1; }
.review-top b { display: block; font-size: 15px; }
.review-top small { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.review-top small .icon { width: 14px; height: 14px; color: #2E7A57; }
.review-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tint-pink); color: var(--accent-ink); font-weight: 700; }
.review p { color: #33373C; font-size: 14.5px; }
[data-show-reviews="false"] .reviews-block { display: none; }

/* ------------------------------------------------------------- author */
.author-hero { position: relative; padding-top: 26px; background: var(--tint-blue); overflow: hidden; }
.ah-clouds { position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; opacity: .8; pointer-events: none; }
.ah-clouds use[href="#i-star"] { fill: var(--gold); }
.author-hero .container { position: relative; }
.ah-in { display: flex; align-items: center; gap: 30px; margin-top: 16px; }
.ah-ring { flex: 0 0 180px; aspect-ratio: 1; padding: 5px; border-radius: 50%; background: var(--frame); }
.ah-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #fff; }
.ah-in h1 { font-size: 34px; font-weight: 800; line-height: 1.2; margin-block: 6px 4px; }
.ah-count { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: var(--pill); background: #fff; font-size: 14px; color: var(--store-primary-dark); }
.ah-in p { margin-top: 10px; max-width: 720px; color: #33373C; }

/* ------------------------------------------------------------- cart */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.cart-list { border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cart-headrow, .cart-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 110px 120px 110px 40px; align-items: center; gap: 14px; padding: 12px 16px; }
.cart-headrow { grid-template-columns: minmax(0, 1fr) 110px 120px 110px 40px; background: var(--tint-blue); font-weight: 600; font-size: 14px; }
.cart-row + .cart-row { border-top: 1px solid var(--line); }
.cart-cover img { width: 76px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; border: 1.5px solid var(--tint-blue-2); }
.cart-info h3 { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.cart-info p { font-size: 13px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; width: max-content; }
.qty button { width: 32px; height: 36px; border: 0; background: var(--soft); font-size: 17px; }
.qty button:hover { background: var(--tint-blue); }
.qty input { width: 42px; height: 36px; border: 0; text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-total { color: var(--store-text); }
.cart-remove .icon { width: 19px; height: 19px; }
.cart-remove:hover { color: var(--store-accent); }
.cart-under { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.empty-cart { text-align: center; padding: 40px 16px; }
.empty-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--tint-pink); color: var(--store-accent); }
.summary { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r); background: var(--tint-blue); }
.summary h2 { font-size: 20px; font-weight: 700; }
.coupon { display: flex; gap: 8px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); background: #fff; font-size: 13px; }
.coupon-applied button { border: 0; background: none; color: var(--store-accent); font-weight: 600; text-decoration: underline; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; padding-block: 2px; }
.summary-total { padding-top: 10px; border-top: 1.5px dashed var(--tint-blue-2); font-size: 18px; font-weight: 800; }
.note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.note .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------- 404 */
.nf { padding-block: 40px 20px; text-align: center; }
.nf-in { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.nf-art { width: 250px; }
.nf-cloud { fill: var(--tint-blue); stroke: var(--tint-blue-2); stroke-width: 3; }
.nf-eye { fill: var(--store-text); }
.nf-mouth { fill: none; stroke: var(--store-text); stroke-width: 3.5; stroke-linecap: round; }
.nf-drop { fill: var(--store-primary); }
.nf-code { font-size: 60px; font-weight: 800; line-height: 1; color: var(--store-accent); }
.nf h1 { font-size: 28px; font-weight: 800; }
.nf p { max-width: 520px; color: var(--muted); }
.nf-search { display: flex; gap: 8px; width: min(100%, 460px); margin-block: 8px; }

/* ------------------------------------------------------------- components page */
.kit { border-bottom: 1px dashed var(--line); }
.kit-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.kit-note { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.kit-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kit-cards { --per: 4; }
.kit-gap { margin-top: 22px; }
.kit-reviews { max-width: 760px; }
.kit .author-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kit .edu-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ==================================================================== responsive */
@media (max-width: 1180px) {
	.hd-call { display: none; }
	.nav-list { gap: 16px; }
	.nav-list li:nth-child(n+6) { display: none; }
	.hero-grid { grid-template-columns: 200px minmax(0, 1fr) 200px; gap: 16px; }
	.coll { grid-template-columns: 320px minmax(0, 1fr); }
	.grid-coll { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.grid-coll > .bcard:nth-child(n+9) { display: none; }
	.split .grid-side { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.split .grid-side > .bcard:nth-child(n+9) { display: none; }
	.feat { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.bn-feat { grid-column: 3 / span 2; }
	.feat-items > .bcard:nth-child(n+9) { display: none; }
	.ft-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
	.tb-links, .tb-social { display: none; }
	.topbar-in { justify-content: center; }
	.hd-main { flex-wrap: wrap; gap: 8px 12px; padding-block: 14px 10px; }
	.menu-toggle { display: inline-grid; }
	.brand { margin-inline-end: auto; }
	.hd-search { order: 5; flex: 1 0 100%; }
	.hd-nav { display: none; }
	[data-show-waves="false"] .hd-main { border-image: linear-gradient(to top, var(--line) 1px, #fff 1px) fill 0 / 0 / 0 100vmax; }
	.hero-grid { grid-template-columns: 1fr 1fr; min-height: 0; }
	.hero { grid-column: 1 / -1; order: -1; }
	.slide { min-height: 380px; }
	.bn-tall { min-height: 260px; }
	.hero-grid .hero-side { grid-template-rows: auto; }
	.bn-side { min-height: 122px; }
	.split { grid-template-columns: minmax(0, 1fr); }
	.cat-box { padding: 12px; }
	.cat-box h2 { display: none; }
	.cat-box-top { display: none; }
	.cat-box-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
	.cat-box-list a { white-space: nowrap; padding: 6px 12px; background: #fff; border-radius: var(--pill); }
	.cat-box-list .chev { display: none; }
	.book-grid, .grid-side, .split .grid-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.split .grid-side > .bcard:nth-child(n+7) { display: none; }
	.pcat-row, .pcat-row-sm { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.pcat { flex: 0 0 130px; scroll-snap-align: start; }
	.trio { grid-template-columns: 1fr; }
	.coll { grid-template-columns: minmax(0, 1fr); }
	.mosaic { grid-template-columns: 1fr 1fr; }
	.mosaic-pair { grid-template-rows: auto; grid-template-columns: 1fr; }
	.bn-mos { min-height: 150px; }
	.bn-mos-tall { min-height: 316px; }
	.grid-coll { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid-coll > .bcard:nth-child(n+7) { display: none; }
	.nl-box { grid-template-columns: 100px minmax(0, 1fr); padding: 20px; padding-inline-end: 90px; }
	.nl-field { grid-column: 1 / -1; }
	.nl-art { width: 100px; }
	.promo-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.promo { flex: 0 0 230px; scroll-snap-align: start; }
	.edu-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.feat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bn-feat { grid-column: 1 / -1; grid-row: auto; min-height: 220px; order: 3; }
	.bn-feat .bn-body { max-width: 60%; }
	.feat-items > .bcard:nth-child(n+7) { display: none; }
	.author-row { display: flex; overflow-x: auto; gap: 14px; scrollbar-width: none; }
	.acard { flex: 0 0 120px; }
	.acard-ring { width: 110px; }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(88vw, 340px);
		padding: 16px; background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: .25s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; }
	.filters-head h2 { font-size: 18px; }
	.filters-toggle { display: inline-flex; }
	.pdp { grid-template-columns: 1fr; }
	.pdp-info { position: static; }
	.pdp-more { grid-template-columns: 1fr; }
	.reviews-layout { grid-template-columns: 1fr; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.ft-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	.section { padding-block: 24px; }
	.section-tight { padding-block: 12px; }
	.section-title { font-size: 20px; }
	.hide-sm { display: none; }
	.brand-name { font-size: 21px; }
	.brand img { width: 38px; height: 38px; }
	.hd-select { display: none; }
	.hd-search input { border: 0; padding-inline: 4px; }
	.cloud-rule { height: 30px; }
	.slide { min-height: 340px; align-items: flex-start; }
	.slide::before { inset: 0; width: 100%; border-radius: 0; background: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, .5) 60%, transparent); }
	.slide-body { padding: 22px 20px 70px; }
	.slide-body h2 { font-size: 25px; }
	.slide-body p { font-size: 14px; }
	.slider-nav { inset-inline-start: 20px; bottom: 22px; }
	.hero-grid { grid-template-columns: 1fr; }
	.bn-tall { min-height: 200px; }
	.bn-tall .bn-body { max-width: 70%; }
	.hero-grid .hero-side { grid-template-columns: 1fr 1fr; gap: 12px; }
	.bn-side .bn-body { padding: 12px; }
	.bn-side .bn-title { font-size: 16px; }
	.bn-side .bn-text { display: none; }
	.book-grid, .grid-side, .split .grid-side, .grid-coll, .kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.grid-coll > .bcard:nth-child(n+5) { display: none; }
	.split .grid-side > .bcard:nth-child(n+5) { display: none; }
	.bcard-media { padding: 8px; }
	.bcard-add { font-size: 13px; gap: 4px; }
	.bn-wide b { font-size: 18px; }
	.bn-wide-body { border-radius: var(--r); padding: 8px 14px; }
	.bn-row .bn-body { max-width: 70%; }
	.mosaic { grid-template-columns: 1fr; }
	.mosaic-pair { grid-template-columns: 1fr 1fr; }
	.bn-mos-tall { min-height: 170px; }
	.bn-mos .bn-body { padding: 12px; }
	.bn-mos .bn-text { display: none; }
	.bn-mos .bn-big { font-size: 20px; }
	.nl-box { grid-template-columns: 1fr; padding: 18px; padding-top: 22px; text-align: center; }
	.nl-art { width: 80px; margin-inline: auto; }
	.nl-stars { width: 50px; height: 70px; inset-inline-end: 10px; }
	.nl-text h2 { font-size: 19px; }
	.edu-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.trust-grid { grid-template-columns: 1fr; gap: 12px; }
	.trust-item { justify-content: flex-start; }
	.trust-item + .trust-item { border-inline-start: 0; border-top: 1.5px dashed var(--tint-pink-2); padding-top: 12px; }
	.feat { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.feat-items > .bcard:nth-child(n+5) { display: none; }
	.bn-feat { min-height: 200px; }
	.mini-row { grid-template-columns: 1fr; }
	.ft-grid { grid-template-columns: 1fr; gap: 22px; padding-block: 32px 20px; }
	.page-head h1 { font-size: 25px; }
	.toolbar { flex-wrap: wrap; }
	.toolbar p { order: 3; flex-basis: 100%; }
	.gallery { gap: 10px; }
	.gal-item { padding: 10px; }
	.pdp-title h1 { font-size: 25px; }
	.chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.buy-btns .btn { flex: 1 1 100%; }
	.buy-btns .icon-btn-lg { flex: 0 0 48px; }
	.buy-btns .btn-primary { flex: 1 1 calc(100% - 58px); }
	.pdp-block { padding: 16px; }
	.ah-in { flex-direction: column; text-align: center; gap: 14px; }
	.ah-ring { flex-basis: auto; width: 140px; }
	.ah-in h1 { font-size: 26px; }
	.ah-in p { text-align: start; }
	.cart-headrow { display: none; }
	.cart-row { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "c i r" "c p p" "c q t"; gap: 6px 12px; }
	.cart-cover { grid-area: c; align-self: start; }
	.cart-cover img { width: 64px; }
	.cart-info { grid-area: i; }
	.cart-price { grid-area: p; }
	.qty { grid-area: q; }
	.cart-total { grid-area: t; justify-self: end; }
	.cart-remove { grid-area: r; align-self: start; }
	.coupon-applied { flex-wrap: wrap; }
	.nf-code { font-size: 46px; }
	.nf h1 { font-size: 22px; }
	.kit .author-row { display: flex; }
	.kit .edu-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- ميزات المنصّة المعتمدة */
/* النظرة السريعة (quick-view): بطاقةٌ ثانية معلّقة تحت القلب */
.hang-qv { margin-top: 6px; }
.hang-qv:hover { color: var(--store-primary-dark); }

/* الباقات (home_bundles) */
.bundle-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bundle { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 22px 22px; text-align: center; border-radius: var(--r); background: var(--tint-blue); }
.bundle:nth-child(3n+2) { background: var(--tint-pink); }
.bundle:nth-child(3n) { background: var(--tint-lilac); }
.bundle-covers { display: flex; justify-content: center; margin-bottom: 10px; }
.bundle-covers img { width: 30%; max-width: 104px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; border: 3px solid #fff; box-shadow: 0 8px 18px rgba(32, 35, 38, .18); }
.bundle-covers img:nth-child(1) { transform: rotate(-7deg) translateX(-14px); }
.bundle-covers img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-6px); }
.bundle-covers img:nth-child(3) { transform: rotate(7deg) translateX(14px); }
.bundle-saving { order: 5; margin-top: 4px; padding: 2px 12px; border-radius: var(--pill); background: var(--accent-ink); color: #fff; font-size: 13px; font-weight: 700; }
.bundle-title { font-size: 19px; font-weight: 700; line-height: 1.35; }
.bundle-books { font-size: 13.5px; color: var(--muted); }
.bundle .price { margin-top: 2px; }
.bundle-add { order: 6; margin-top: 10px; width: 100%; }

/* الخصم حسب الكمّيّة (book.qty_discount) */
.qty-deal { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 5px 14px; border-radius: var(--pill); background: var(--tint-pink); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.qty-deal .icon { width: 16px; height: 16px; }

.bundle .price b { color: var(--accent-ink); }

/* تبويبات صفّ الكتب (القاعدة 16): يختفي الشريط إن لم يختر الناشر غير مصدرٍ واحد */
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ---------------------------------------------------------------- الإصدار الثاني: أقسامٌ جديدة في الرئيسيّة */
.bn-tall > img, .bn-mos-tall > img, .bn-feat > img { object-position: center bottom; }

/* شريط الثقة: صار بعد الواجهة مباشرةً، وأنحف */
.trust { margin-block: 28px 10px; padding-block: 14px; }
.trust-ic { width: 42px; height: 42px; }
.trust-ic .icon { width: 21px; height: 21px; }
.trust h3 { font-size: 15.5px; }
.trust p { font-size: 13px; }

/* عروض الأسبوع بعدّادٍ واحد (offer.ends_at): شريطٌ أزرق فاتح بحافّتين متموّجتين */
.deals { position: relative; margin-block: 34px; background: var(--tint-blue); }
.deals::before, .deals::after {
	content: ""; position: absolute; inset-inline: 0; height: 10px;
	background: radial-gradient(circle at 50% 100%, var(--tint-blue) 8px, transparent 8.6px) 0 0 / 22px 10px repeat-x;
}
.deals::before { bottom: 100%; }
.deals::after { top: 100%; transform: scaleY(-1); }
[data-show-waves="false"] .deals::before, [data-show-waves="false"] .deals::after { display: none; }
.deals-in { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: center; }
.deals-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.deals-intro .section-sub { color: #3D4146; }
.deals-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.deals .price b { color: var(--accent-ink); }
.deals-track .bcard-media { background: linear-gradient(#fff, #fff) padding-box, var(--frame) border-box; }
.countdown { display: flex; flex-direction: column; gap: 6px; margin-block: 6px; }
.countdown[hidden] { display: none; }
.cd-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); }
.cd-label .icon { width: 17px; height: 17px; }
.cd-units { display: flex; gap: 6px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 4px 4px; border-radius: var(--r-sm); background: #fff; box-shadow: 0 3px 10px rgba(32, 35, 38, .06); }
.cd-unit b { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--store-primary-dark); font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 11.5px; color: var(--muted); }

/* كتاب الأسبوع: كتابٌ واحد كبير في لوحةٍ ليلكيّة */
.pick {
	position: relative; display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-areas: "cover kicker" "cover body";
	align-content: center; gap: 4px 48px; padding: 30px 40px; border-radius: var(--r); overflow: hidden; isolation: isolate;
	background: linear-gradient(120deg, var(--tint-pink-2), var(--tint-blue) 70%);
}
.pick-items, .pick-book { display: contents; }
.pick-deco { position: absolute; z-index: -1; inset-inline-end: 24px; bottom: 10px; width: 300px; fill: #fff; opacity: .9; }
.pick-deco .pick-star { fill: var(--gold); }
.pick-kicker { grid-area: kicker; align-self: end; justify-self: start; padding: 1px 12px; border-radius: var(--pill); background: #FFE7A3; font-size: 14px; font-weight: 700; }
.pick-cover { grid-area: cover; position: relative; display: block; height: 400px; }
.pick-cover img { position: absolute; top: 10px; width: 230px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; border: 4px solid #fff; box-shadow: 0 12px 26px rgba(32, 35, 38, .2); }
.pick-front { inset-inline-start: 0; z-index: 1; transform: rotate(4deg); }
.pick-back { inset-inline-start: 140px; transform: rotate(-7deg) translateY(20px); }
.pick-cover .type-dot { top: 0; inset-inline-start: -6px; z-index: 2; width: 36px; height: 36px; }
.pick-cover:hover .pick-front { transform: rotate(2deg) translateY(-4px); }
.pick-body { grid-area: body; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 600px; }
.pick-title { font-size: 30px; font-weight: 800; line-height: 1.25; }
.pick-title a:hover { color: var(--store-primary-dark); }
.pick-author { color: var(--muted); }
.pick-author a { color: var(--store-primary-dark); font-weight: 600; }
.pick-desc { color: #33373C; }
.pick-desc p + p { margin-top: 6px; }
.pick-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: var(--pill); background: #fff; font-size: 13.5px; }
.pick-facts .icon { width: 16px; height: 16px; color: var(--store-primary-dark); }
.pick-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 6px; }
.pick-buy .icon-btn-lg { background: #fff; }

/* آراء الأهل على الكتب (reviews.items) */
.home-reviews { background: var(--tint-pink); }
.store-score { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--pill); background: #fff; }
.store-score b { font-size: 22px; font-weight: 800; line-height: 1; }
.store-score small { font-size: 13px; color: var(--muted); }
.hrev-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hrev { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 20px; border-radius: var(--r); background: #fff; }
.hrev::after { content: "”"; position: absolute; top: 4px; inset-inline-end: 18px; font-size: 64px; line-height: 1; color: var(--tint-pink-2); }
.hrev blockquote { margin: 0; color: #33373C; font-size: 14.5px; }
.hrev figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.hrev figcaption b { display: block; font-size: 14.5px; }
.hrev figcaption small { font-size: 12.5px; color: var(--muted); }
[data-show-reviews="false"] .home-reviews { display: none; }

/* أحدث المقالات (latest_posts) وصفحتا المدوّنة */
.post-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--r); border: 1.5px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--frame) border-box; overflow: hidden; }
.post-media { display: block; overflow: hidden; }
.post-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.post-date { font-size: 12.5px; color: var(--muted); }
.post-title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { font-size: 14px; color: #3D4146; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.blog-grid .post-card:first-child { grid-column: span 2; grid-row: span 2; }
.blog-grid .post-card:first-child .post-media img { aspect-ratio: auto; height: 100%; min-height: 260px; }
.blog-grid .post-card:first-child .post-media { flex: 1; }
.blog-grid .post-card:first-child .post-title { font-size: 22px; }
.article { max-width: 760px; margin-inline: auto; }
.article-cover { margin: 0 0 20px; border-radius: var(--r); overflow: hidden; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { font-size: 16.5px; line-height: 1.9; color: #2B2F33; }
.article-body p + p, .article-body h2 + p { margin-top: 12px; }
.article-body h2 { margin-top: 26px; font-size: 21px; font-weight: 700; }
.article-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-block: 18px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; color: #4A4F55; font-size: 14px; }

/* صفحة الكتاب: اختيار الصيغة، والتوصيل والدفع، والكمّيّة */
.formats { display: flex; flex-direction: column; gap: 6px; }
.formats-label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.formats-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.format-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: #fff; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt[aria-current="page"] { border-color: var(--store-primary); background: var(--tint-blue); }
.format-name { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.format-price { font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.buy-btns .qty { height: 48px; }
.buy-btns .qty button { height: 100%; width: 38px; }
.buy-btns .qty input { height: 100%; }
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; padding-top: 10px; border-top: 1.5px dashed var(--line); }

/* صفحة التصنيف: الفلاتر المختارة وتبديل العرض */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.active-filters:not(:has(.fchip)) { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 12px; border-radius: var(--pill); background: var(--tint-pink); color: var(--accent-ink); font-size: 13.5px; font-weight: 600; }
.fchip .icon { width: 15px; height: 15px; }
.fchip:hover { background: var(--tint-pink-2); }
.fclear { font-size: 13.5px; font-weight: 600; color: var(--store-primary-dark); text-decoration: underline; }
.toolbar-end { display: flex; align-items: center; gap: 12px; }
.view-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.view-switch button { display: grid; place-items: center; width: 36px; height: 34px; border: 0; background: #fff; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--store-primary); color: #fff; }
.view-switch .icon { width: 18px; height: 18px; }
.rate-opts .rating .icon { width: 15px; height: 15px; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.book-grid.is-list .bcard { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; column-gap: 20px; align-items: start; padding: 12px; border-radius: var(--r); border: 1.5px solid var(--line); }
.book-grid.is-list .bcard-media { grid-row: 1 / -1; }
.book-grid.is-list .bcard-title { margin-top: 4px; font-size: 17px; }
.book-grid.is-list .bcard-add { grid-column: 3; grid-row: 1 / -1; align-self: center; width: auto; padding-inline: 18px; margin: 0; }
.book-grid.is-list .bcard-rate { margin-bottom: 0; }

/* صفحة المؤلّف: الأعمال صفٌّ يُمرَّر أفقيًّا بلا صفٍّ أخير نصف فارغ */
.works-tools { display: flex; align-items: center; gap: 14px; }
.works-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 18px) / 5); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 10px; }
.works-row > .bcard { scroll-snap-align: start; }
.works-nav { display: flex; gap: 6px; }
.works-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; }
.works-nav button:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }
.works-nav button:disabled { opacity: .4; cursor: default; }
.works-nav[hidden] { display: none; }
.works-nav .icon { width: 18px; height: 18px; }

@media (max-width: 1180px) {
	.deals-in { grid-template-columns: 210px minmax(0, 1fr); }
	.slide::before { inset-inline-start: -10%; width: 84%; background: radial-gradient(closest-side, rgba(255, 255, 255, .92), rgba(255, 255, 255, .8) 70%, transparent); }
	.works-row { grid-auto-columns: calc((100% - 3 * 18px) / 4); }
}
@media (max-width: 1023px) {
	.deals-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.deals-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 20px; }
	.deals-intro > * { grid-column: 1; }
	.deals-intro .countdown { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
	.deals-track, .hrev-row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 220px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.deals-track > *, .hrev-row > * { scroll-snap-align: start; }
	.hrev-row { grid-auto-columns: 300px; }
	.pick { grid-template-columns: 250px minmax(0, 1fr); gap: 4px 28px; padding: 24px; }
	.pick-cover { height: 300px; }
	.pick-cover img { width: 170px; }
	.pick-back { inset-inline-start: 80px; }
	.bn-feat .bn-body { margin: 14px; padding: 14px 16px; border-radius: var(--r); background: rgba(255, 255, 255, .86); }
	.pick-deco { width: 200px; }
	.post-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
	.post-title { font-size: 15.5px; }
	.blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.works-row { grid-auto-columns: calc((100% - 2 * 18px) / 3); }
}
@media (max-width: 640px) {
	.trust { margin-block: 18px 4px; padding-block: 10px; }
	.trust-grid { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-item { flex: 0 0 auto; scroll-snap-align: start; gap: 10px; padding-inline: 12px; }
	.trust-item + .trust-item { border-top: 0; padding-top: 0; border-inline-start: 1.5px dashed var(--tint-pink-2); }
	.trust-ic { width: 36px; height: 36px; }
	.trust h3 { font-size: 14.5px; white-space: nowrap; }
	.trust p { font-size: 12.5px; white-space: nowrap; }
	/* الواجهة في الهاتف: الصورة فوق النصّ لا خلفه، والبانرات الثلاثة في صفٍّ واحد قصير */
	.slide { flex-direction: column; align-items: stretch; min-height: 0; }
	.slide > img { position: static; z-index: 0; height: auto; aspect-ratio: 16 / 9; object-position: left center; }
	.slide::before { display: none; }
	.slide-body { padding: 14px 18px 62px; max-width: none; }
	.slider-nav { bottom: 18px; inset-inline-start: 18px; }
	.hero-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.hero-grid .hero-side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
	.bn-tall { min-height: 0; }
	.bn-tall .bn-body, .bn-side .bn-body { padding: 12px; max-width: 100%; }
	.bn-tall .bn-text { display: none; }
	.bn-tall .bn-title { font-size: 16px; }
	.bn-tall .bn-big { font-size: 20px; margin-inline-start: -12px; }
	.bn-side { min-height: 118px; }
	.deals { margin-block: 26px; }
	.deals-intro { grid-template-columns: minmax(0, 1fr); }
	.deals-intro .countdown { grid-column: 1; grid-row: auto; }
	.cd-unit { min-width: 46px; }
	.deals-track { grid-auto-columns: 46%; gap: 12px; }
	.pick { grid-template-columns: 1fr; grid-template-areas: "kicker" "cover" "body"; justify-items: center; text-align: center; padding: 20px 16px; gap: 10px; }
	.pick-kicker { justify-self: center; }
	.pick-cover { width: 250px; height: 270px; }
	.pick-cover img { width: 150px; }
	.pick-back { inset-inline-start: 96px; }
	.bn-feat .bn-body { max-width: 100%; }
	.pick-body { align-items: center; }
	.pick-title { font-size: 24px; }
	.pick-facts, .pick-buy { justify-content: center; }
	.pick-deco { width: 160px; inset-inline-end: -20px; }
	.hrev-row { grid-auto-columns: 84%; gap: 12px; }
	.section-head:has(.store-score) { flex-wrap: wrap; align-items: center; }
	.post-row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.post-row > * { scroll-snap-align: start; }
	.blog-grid { grid-template-columns: 1fr; }
	.blog-grid .post-card:first-child { grid-column: auto; grid-row: auto; }
	.blog-grid .post-card:first-child .post-media img { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
	.article-body { font-size: 15.5px; }
	.article-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.formats-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	.format-opt { padding: 6px 8px; }
	.perks { grid-template-columns: 1fr; }
	.buy-btns .qty { flex: 0 0 auto; }
	.buy-btns .qty ~ .btn-primary { flex: 1 1 0; }
	.buy-btns .btn-accent { flex: 1 1 calc(100% - 58px); }
	.mini-row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.mini-row > * { scroll-snap-align: start; }
	.view-switch { display: none; }
	.works-row { grid-auto-columns: calc((100% - 12px) / 2.2); gap: 12px; }
	.book-grid.is-list .bcard { grid-template-columns: 96px minmax(0, 1fr); }
	.book-grid.is-list .bcard-add { grid-column: 2; grid-row: auto; justify-self: start; }
}

/* تحت المعلومات: الوصف بعرض الصفحة في عمودين، والتفاصيل في عمودين، فلا يبقى صندوقٌ أقصر من جاره */
.pdp-more { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.pdp-more .prose { columns: 2 320px; column-gap: 40px; }
.spec-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.spec-table tr { display: grid; grid-template-columns: 40% minmax(0, 1fr); }
.spec-table th { width: auto; }
.formats:not(:has(.format-opt + .format-opt)) { display: none; }
.post-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1.5px dashed var(--line); }
@media (max-width: 640px) { .spec-table tbody { grid-template-columns: minmax(0, 1fr); } .post-row-2 { grid-template-columns: none; } .works-tools .sort span { display: none; } }

/* صفوفٌ قصيرة من خمسة كتب (المقترحات، والسلّة، و404): لا صفّ أخير ناقص بأيّ عددٍ في الصفّ */
[data-books-per-row="6"] .row-one { grid-template-columns: repeat(5, minmax(0, 1fr)); }
[data-books-per-row="3"] .row-one > .bcard:nth-child(n+4), [data-books-per-row="4"] .row-one > .bcard:nth-child(n+5) { display: none; }
@media (min-width: 1024px) { [data-books-per-row="6"] .listing .grid-side > .bcard:nth-child(n+11) { display: none; } }
@media (max-width: 1023px) {
	.row-one > .bcard:nth-child(n+4) { display: none; }
	.bundle-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
	.bundle { padding: 20px 14px 16px; }
	.bundle-title { font-size: 16.5px; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	body[data-books-per-row] .row-one > .bcard:nth-child(-n+4) { display: flex; }
	.row-one > .bcard:nth-child(n+5) { display: none; }
	.bundle-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.bundle-row > * { scroll-snap-align: start; }
}

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