/* =====================================================================
   قالب «حكاية» — hikaya 1.0.0
   شريطٌ علويّ وسلايدر بلون المتجر، وأزرارٌ بلون مميّز فاتح، وبطاقاتٌ بيضاء
   بحدودٍ رماديّة رفيعة، وأقسامٌ كثيرة متتابعة على خلفيّة بيضاء.
   ألوان الهويّة في :root وحدها؛ وكلّ ما عداها محايد.
   ===================================================================== */

:root {
	--store-primary: #04535C;
	--store-primary-dark: #02414F;
	--store-accent: #9EE872;
	--store-bg: #FFFFFF;
	--store-text: #161C24;

	--soft: #F4F6F8;
	--line: #DFE3E8;
	--muted: #495057;
	--white: #FFFFFF;
	--gold: #F5A524;
	--gold-off: #D5DAE0;

	--font: "Tajawal", system-ui, sans-serif;
	--r: 10px;
	--r-sm: 6px;
	--r-lg: 16px;
	--r-pill: 999px;
	--container: 1380px;
	--gutter: 24px;
	--gap: 18px;
	--bpr: 5;
	--shadow: 0 10px 30px rgba(22, 28, 36, .08);
	--primary-soft: color-mix(in srgb, var(--store-primary) 8%, #fff);
}

body[data-books-per-row="3"] { --bpr: 3; }
body[data-books-per-row="4"] { --bpr: 4; }
body[data-books-per-row="5"] { --bpr: 5; }
body[data-books-per-row="6"] { --bpr: 6; }
body[data-corners="sharp"] { --r: 0px; --r-sm: 0px; --r-lg: 0px; --r-pill: 0px; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 180px; }
body {
	margin: 0;
	background: var(--store-bg);
	color: var(--store-text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.7;
	overflow-x: clip;
}
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; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { color: var(--muted); font-weight: 400; }
code { font-family: ui-monospace, monospace; font-size: .9em; background: var(--soft); padding: 1px 6px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: var(--r-sm);
	font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap;
	border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: var(--white); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-accent { background: var(--store-accent); color: var(--store-primary-dark); }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 85%, #fff); }
.btn-outline { background: var(--white); color: var(--store-text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--store-primary); color: var(--store-primary); }
.btn-light { background: var(--white); color: var(--store-primary-dark); }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 16px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-xs { min-height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-xs .icon { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: not-allowed; }

.round-btn {
	display: inline-grid; place-items: center; position: relative;
	width: 44px; height: 44px; border-radius: 50%; flex: none;
	background: var(--soft); color: var(--store-text); transition: background .2s, color .2s;
}
.round-btn:hover { background: var(--line); }
.round-dark { background: var(--store-primary); color: var(--white); }
.round-dark:hover { background: var(--store-primary-dark); }
.round-outline { background: var(--white); border: 1px solid var(--line); }
.round-soft { background: var(--soft); color: var(--store-primary); }
.round-white { background: var(--white); box-shadow: var(--shadow); }
.round-glass { background: rgba(255, 255, 255, .16); color: var(--white); }
.round-glass:hover { background: rgba(255, 255, 255, .28); }
.round-btn[aria-pressed="true"] .icon { fill: currentColor; }

.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--store-primary); font-size: 14px; }
.link-more .icon { width: 16px; height: 16px; }
.pill { display: inline-block; padding: 1px 10px; border-radius: var(--r-pill); background: var(--store-accent); color: var(--store-primary-dark); font-weight: 700; font-size: 12.5px; line-height: 1.6; }

/* ---------------------------------------------------------------- topbar */
.topbar { background: var(--store-primary); color: var(--white); font-size: 13.5px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 42px; }
.topbar-help { display: flex; align-items: center; gap: 8px; }
.topbar-help .icon { width: 17px; height: 17px; }
.topbar-msg { font-weight: 500; text-align: center; }
.topbar-msg:empty { display: none; }
.topbar-links { display: flex; gap: 20px; }
.topbar-links a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 40; }
.header-main { border-bottom: 1px solid var(--line); }
.header-main-inner { display: flex; align-items: center; gap: 28px; min-height: 92px; }
.menu-toggle { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 48px; height: 48px; border-radius: 12px; }
.brand-name { font-size: 23px; font-weight: 800; color: var(--store-primary); letter-spacing: -.2px; }
.header-search {
	flex: 1; max-width: 640px; display: flex; align-items: center; gap: 8px;
	height: 48px; padding-inline: 16px 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white);
}
.header-search:focus-within { border-color: var(--store-primary); }
.header-search button { display: grid; place-items: center; color: var(--muted); }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; }
.header-search input::placeholder { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.head-action { display: flex; align-items: center; gap: 10px; }
.head-action .round-btn { width: 48px; height: 48px; }
.head-action-text { display: flex; flex-direction: column; line-height: 1.35; }
.head-action-text small { color: var(--muted); font-size: 13px; }
.head-action-text b { font-size: 14.5px; font-weight: 700; }
.cart-count {
	position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: 10px; background: var(--store-accent); color: var(--store-primary-dark);
	font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
}

.header-nav { border-bottom: 1px solid var(--line); }
.header-nav-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.cats-menu { position: relative; }
.cats-btn {
	display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px;
	background: var(--store-primary); color: var(--white); border-radius: var(--r-sm); font-weight: 700;
}
.cats-btn .icon:first-child { color: var(--store-accent); }
.cats-btn .chev { width: 16px; height: 16px; transition: transform .2s; }
.cats-menu.is-open .chev { transform: rotate(180deg); }
.cats-panel {
	position: absolute; top: calc(100% + 8px); inset-inline-start: 0; width: 270px; padding: 8px;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; z-index: 50;
}
.cats-menu.is-open .cats-panel, .cats-menu:hover .cats-panel { opacity: 1; visibility: visible; transform: none; }
.cats-panel a { display: block; padding: 9px 12px; border-radius: var(--r-sm); font-weight: 500; }
.cats-panel a:hover { background: var(--soft); color: var(--store-primary); }
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-links a { display: block; padding: 10px 14px; font-weight: 700; border-radius: var(--r-sm); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--store-primary); background: var(--primary-soft); }
.nav-support { display: flex; align-items: center; gap: 12px; line-height: 1.35; }
.nav-support small { display: block; color: var(--muted); font-size: 13px; }
.nav-support b { font-weight: 700; font-size: 15px; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(22, 28, 36, .45); opacity: 0; visibility: hidden; transition: .25s; z-index: 90; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(330px, 86vw); padding: 18px;
	background: var(--white); z-index: 100; overflow-y: auto; transform: translateX(105%); transition: transform .3s; visibility: hidden;
	display: flex; flex-direction: column; gap: 14px;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.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: 19px; }
.drawer-nav a { display: block; padding: 10px 4px; font-weight: 700; border-bottom: 1px solid var(--soft); }
.drawer-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-cats a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 14px; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: 48px; }
.section-tight { padding-block: 28px; }
.section-flush { padding-block: 0; }
.section-soft { background: var(--soft); }
.section-top-line { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head.center { flex-direction: column; justify-content: center; text-align: center; gap: 6px; margin-bottom: 30px; }
.section-title { font-size: 28px; font-weight: 800; line-height: 1.3; }
h3.section-title { font-size: 20px; }
.section-sub { color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; background: var(--store-primary); color: var(--white); overflow: hidden; }
.hero-track { display: grid; }
.slide { grid-area: 1 / 1; position: relative; min-height: 600px; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slide::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(to left, var(--store-primary) 0%, var(--store-primary) 44%, color-mix(in srgb, var(--store-primary) 70%, transparent) 58%, transparent 78%);
}
.slide-inner { position: relative; z-index: 2; }
.slide-text { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.slide-text h2 { font-size: 50px; line-height: 1.25; font-weight: 800; }
.slide-text p { font-size: 17px; max-width: 470px; }
.slide-text .btn { margin-top: 8px; }
.hero-controls { position: absolute; bottom: 22px; inset-inline: 0; display: flex; justify-content: center; z-index: 3; }
.hero-dots { display: flex; gap: 8px; padding: 8px 12px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .22); }
.hero-dots button { width: 9px; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .7); transition: width .3s, background .3s; }
.hero-dots button[aria-current="true"] { width: 34px; background: var(--store-accent); }
.hero-arrows { position: absolute; bottom: 14px; inset-inline: 0; display: flex; justify-content: flex-end; gap: 8px; z-index: 3; pointer-events: none; }
.hero-arrows .round-btn { pointer-events: auto; }

/* ---------------------------------------------------------------- categories */
.section-cats { padding-block: 56px 28px; }
.cat-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 18px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.cat-img { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; background: var(--soft); margin-bottom: 8px; transition: transform .25s, box-shadow .25s; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile:hover .cat-img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--store-primary); }
.cat-tile b { font-weight: 700; font-size: 15.5px; }
.cat-tile small { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- book card */
.book-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; transition: box-shadow .25s, border-color .25s; min-width: 0; }
.book-card:hover { box-shadow: var(--shadow); }
.book-media { position: relative; background: var(--soft); border-radius: var(--r-sm); padding: 18px 16%; }
.cover-wrap { position: relative; }
.book-cover { display: block; }
.book-cover img, .cover-wrap > img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 18px rgba(22, 28, 36, .18); }
.type-dot {
	position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 2;
	display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff;
	box-shadow: 0 0 0 2px #fff;
}
.type-dot .icon { width: 17px; height: 17px; }
.type-dot-sm { width: 24px; height: 24px; bottom: 4px; inset-inline-start: 4px; }
.type-dot-sm .icon { width: 13px; height: 13px; }
.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; }
.book-badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; z-index: 2; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.badge-sale { background: var(--store-primary-dark); color: #fff; }
.badge-new { background: var(--store-accent); color: var(--store-primary-dark); }
.book-wish {
	position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; display: grid; place-items: center;
	width: 32px; height: 32px; border-radius: 50%; background: var(--white); color: var(--store-text);
	border: 1px solid var(--line); transition: color .2s, border-color .2s;
}
.book-wish .icon { width: 17px; height: 17px; }
.book-wish:hover, .book-wish[aria-pressed="true"] { color: var(--store-primary); border-color: var(--store-primary); }
.book-wish[aria-pressed="true"] .icon { fill: currentColor; }
/* النظرة السريعة (quick-view): زرٌّ تحت المفضّلة، والنافذة من المنصّة */
.book-quick {
	position: absolute; top: 46px; inset-inline-end: 8px; z-index: 2; display: grid; place-items: center;
	width: 32px; height: 32px; border-radius: 50%; background: var(--white); color: var(--store-text);
	border: 1px solid var(--line); transition: color .2s, border-color .2s, opacity .2s;
}
.book-quick .icon { width: 17px; height: 17px; }
.book-quick:hover { color: var(--store-primary); border-color: var(--store-primary); }
@media (hover: hover) { .book-quick { opacity: 0; } .book-card:hover .book-quick, .book-quick:focus-visible { opacity: 1; } }
.stock-band {
	position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); z-index: 2;
	padding: 6px 4px; text-align: center; font-weight: 700; font-size: 13px;
	background: rgba(22, 28, 36, .82); color: #fff;
}
.book-card.is-out .book-cover img { filter: grayscale(.55); opacity: .85; }
.book-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 4px 2px; flex: 1; }
.book-title { font-size: 15px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { color: var(--store-primary); }
.book-author { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-cta { margin-top: auto; }
.book-body .price { margin-bottom: 10px; }

.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; }
.stars .off { color: var(--gold-off); }
.rating-lg .stars .icon { width: 19px; height: 19px; }
.rating-lg { font-size: 14.5px; }

.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-weight: 800; font-size: 16px; color: var(--store-text); }
.price del { font-size: 13.5px; }
.price-lg { font-size: 28px; }
.price-lg del { font-size: 18px; }

/* card styles */
body[data-card-style="soft"] .book-card { background: var(--soft); border-color: transparent; }
body[data-card-style="soft"] .book-media { background: var(--white); }
body[data-card-style="minimal"] .book-card { border-color: transparent; padding: 0; }
body[data-card-style="minimal"] .book-card:hover { box-shadow: none; }
body[data-card-style="minimal"] .book-cta { background: var(--white); color: var(--store-primary); border-color: var(--store-primary); }
body[data-card-style="minimal"] .book-cta:hover { background: var(--store-primary); color: #fff; }
body[data-card-style="minimal"] .book-cta[disabled] { background: var(--soft); color: var(--muted); border-color: var(--line); }

/* grids and rows */
.book-grid { display: grid; grid-template-columns: repeat(var(--bpr), minmax(0, 1fr)); gap: var(--gap); }
.book-row {
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - (var(--bpr) - 1) * var(--gap)) / var(--bpr));
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.book-row::-webkit-scrollbar { display: none; }
.book-row > * { scroll-snap-align: start; }
.book-row.is-compact { --bpr: 6; }
.book-card.is-compact .book-media { padding: 14px 18%; }
.book-card.is-compact .book-body .price { margin-bottom: 4px; }
.row-arrows { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.row-progress { height: 5px; margin-top: 22px; border-radius: 3px; background: color-mix(in srgb, var(--store-accent) 35%, #fff); overflow: hidden; }
.row-progress span { display: block; height: 100%; width: 40%; background: var(--store-primary); border-radius: 3px; transition: width .2s, margin .2s; }

/* mini (horizontal) card */
.mini-list { display: flex; flex-direction: column; gap: 14px; }
.book-mini { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.mini-media { position: relative; flex: none; width: 92px; padding: 8px 12px; background: var(--soft); border-radius: var(--r-sm); align-self: flex-start; }
.mini-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 4px 10px rgba(22, 28, 36, .18); }
.mini-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mini-body .book-title { font-size: 14.5px; min-height: 0; }
.mini-body .book-author { font-size: 13px; }
.mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.mini-foot .price { font-size: 15px; }

/* ---------------------------------------------------------------- banners */
.banner { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); isolation: isolate; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .6s; }
.banner:hover > img { transform: scale(1.03); }
.banner-title { display: block; font-weight: 800; line-height: 1.3; }
.banner-text { display: block; font-size: 14.5px; }
.banner-panel { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--white); color: var(--store-text); border-radius: var(--r); padding: 22px 24px; }
.banner-panel .banner-title { color: var(--store-primary); }
.banner-panel .banner-text { color: var(--muted); }
.banner-panel .btn { margin-top: 6px; }
.banner-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

.banner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.banner-main { min-height: 560px; background: var(--soft); }
.banner-main .banner-panel { inset-inline: 22px; bottom: 22px; padding: 28px; }
.banner-main .banner-title { font-size: 36px; }
.banner-pair { display: grid; grid-template-rows: 1fr 1fr; gap: 22px; }
.banner-color { min-height: 269px; display: flex; align-items: center; padding: 28px; color: #fff; background: #2b3138; }
.banner-color::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgba(0, 0, 0, .28), transparent 65%); }
.banner-color .banner-copy { max-width: 52%; }
.banner-color .banner-title { font-size: 26px; }

.banner-wide { min-height: 320px; display: flex; align-items: center; padding: 36px 44px; border: 1px solid var(--line); background: var(--white); }
.banner-wide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, #fff 0%, #fff 38%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 64%); }
.banner-wide .banner-copy { max-width: 44%; }
.banner-wide .banner-title { font-size: 30px; color: var(--store-primary); }
.banner-wide .banner-text { color: var(--muted); }
.banner-wide-2::after { background: linear-gradient(to right, #fff 0%, #fff 54%, rgba(255, 255, 255, .7) 60%, rgba(255, 255, 255, 0) 68%); }
.banner-wide-2 .banner-copy { max-width: 36%; margin-inline-start: 36%; }
.banner-wide-2 > img { object-position: right center; }
.stamp { position: absolute; inset-inline-end: 6%; top: 50%; transform: translateY(-50%); width: 136px; height: 136px; display: grid; place-items: center; }
.stamp > svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 24s linear infinite; }
.stamp-ring { fill: #fff; stroke: var(--line); stroke-width: 1; }
.stamp-text { font: 700 10.5px var(--font); fill: var(--store-primary); letter-spacing: .3px; }
.stamp-core { position: relative; width: 62px; height: 62px; border-radius: 50%; background: var(--store-primary); color: var(--store-accent); display: grid; place-items: center; }
.stamp-core .icon { width: 28px; height: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }

.season-grid { display: grid; grid-template-columns: 1fr 1fr .95fr; gap: 22px; align-items: start; }
.season-col .section-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.season:not(:has(.season-col)) { display: none; }
.banner-tall { min-height: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding: 30px 26px; color: #fff; background: #2b2018; }
.banner-tall::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .35) 34%, transparent 55%); }
.banner-tall .banner-copy { align-items: center; }
.banner-tall .banner-title { font-size: 28px; }

.promo-strip {
	position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: center; gap: 28px;
	padding: 34px 40px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white);
}
.promo-big { font-size: 108px; font-weight: 800; line-height: 1; color: color-mix(in srgb, var(--store-primary) 14%, #fff); letter-spacing: -2px; }
.promo-title { font-size: 34px; font-weight: 800; color: var(--store-primary); line-height: 1.2; }
.promo-copy p { color: var(--muted); margin-top: 6px; }
/* كود الخصم القابل للنسخ (banner.coupon) */
.promo-copy .promo-code { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-weight: 700; color: var(--store-text); }
.promo-code code { padding: 3px 12px; border: 1.5px dashed var(--store-primary); border-radius: var(--r-sm); background: var(--primary-soft); color: var(--store-primary); font-family: inherit; font-size: 16px; letter-spacing: .06em; }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); font-size: 13px; font-weight: 700; color: var(--store-text); cursor: pointer; transition: border-color .2s, color .2s; }
.copy-btn .icon { width: 15px; height: 15px; }
.copy-btn:hover, .copy-btn.is-done { border-color: var(--store-primary); color: var(--store-primary); }

.ess-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: dense; gap: var(--gap); }
.ess-items { display: contents; }
.banner-ess { grid-column: 2 / span 3; grid-row: 1; min-height: 380px; background: var(--soft); }
.banner-ess .banner-panel { inset-inline-start: 22px; bottom: 22px; max-width: 320px; }
.banner-ess .banner-title { font-size: 24px; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.banner-card { aspect-ratio: 1 / 1; background: var(--soft); }
.banner-card .banner-panel { inset-inline: 18px; bottom: 18px; }
.banner-card .banner-title { font-size: 24px; }

/* ---------------------------------------------------------------- authors */
.author-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.author-panel { background: var(--white); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); }
.ap-head { display: flex; align-items: center; gap: 14px; }
.ap-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.ap-name { flex: 1; min-width: 0; }
.ap-name h3 { font-size: 18px; font-weight: 800; }
.ap-name h3 a:hover { color: var(--store-primary); }
.ap-name p { color: var(--muted); font-size: 14px; }
.ap-bio { background: var(--soft); border-radius: var(--r); padding: 14px 16px; color: var(--store-text); font-size: 14.5px; }

/* ---------------------------------------------------------------- trust bar + footer */
.trust-bar { background: var(--store-primary); color: #fff; }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-block: 26px; }
.trust-list li { display: flex; align-items: center; gap: 14px; line-height: 1.4; }
.trust-list small { display: block; font-size: 14px; }
.trust-list b { font-size: 15.5px; }
.trust-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--store-accent); color: var(--store-primary-dark); display: grid; place-items: center; flex: none; }
body[data-show-trust-bar="false"] .trust-bar { display: none; }

.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; padding-block: 48px 36px; }
.footer-about { display: flex; flex-direction: column; gap: 16px; }
.footer-about p { color: var(--muted); max-width: 360px; }
.social { display: flex; gap: 8px; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--store-text); }
.social a:hover { color: var(--store-primary); border-color: var(--store-primary); }
.social .icon { width: 18px; height: 18px; }
.footer-title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--store-primary); }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.footer-contact li + li { margin-top: 10px; }
.footer-contact .icon { color: var(--store-primary); margin-top: 3px; }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; font-size: 14px; color: var(--muted); flex-wrap: wrap; padding-block: 12px; }
.footer-bottom ul { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--store-primary); }

.mobile-bar { display: none; }

/* ---------------------------------------------------------------- inner pages */
.crumb-bar { border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 14px; font-size: 14px; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--store-text); }
.breadcrumb a:hover { color: var(--store-primary); }
.breadcrumb .icon { width: 16px; height: 16px; }
.breadcrumb li + li::before { content: "•"; margin-inline-end: 8px; color: var(--muted); }

.page-head { padding-block: 32px 8px; }
.page-head-inner { display: flex; align-items: center; gap: 20px; }
.page-head-img { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none; background: var(--soft); }
.page-head h1 { font-size: 32px; font-weight: 800; line-height: 1.3; }
.page-head p { color: var(--store-text); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { padding: 8px 18px; border-radius: var(--r-pill); border: 1px solid var(--line); font-weight: 500; font-size: 14.5px; background: var(--white); }
.chip:hover { border-color: var(--store-primary); color: var(--store-primary); }
.chip[aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.section-tight .cat-img { width: 84px; height: 84px; }

.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 14px; }
.filters-head { display: none; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 18px; font-weight: 800; }
.filter-box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.filter-box h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--store-primary); margin: 0; }
.check .count { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.stars-label { display: inline-flex; align-items: center; gap: 6px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.field { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); outline: 0; }
.field:focus { border-color: var(--store-primary); }
textarea.field { padding: 10px 12px; resize: vertical; }
.filters-backdrop { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.toolbar select { width: auto; min-width: 180px; }
.filters-toggle { display: none; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.page-btn { min-width: 42px; height: 42px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); font-weight: 700; }
.page-btn:hover { border-color: var(--store-primary); color: var(--store-primary); }
.page-btn[aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.page-btn .icon { width: 18px; height: 18px; }
.page-gap { color: var(--muted); }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.gallery { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
.thumbs { display: flex; flex-direction: column; gap: 12px; }
.thumbs button { padding: 8px 12px; border-radius: var(--r-sm); background: var(--soft); border: 2px solid transparent; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-primary); }
.thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.gallery-main { position: relative; background: var(--soft); border-radius: var(--r-lg); padding: 48px 22%; display: grid; place-items: center; }
.gallery-main .cover-wrap { width: 100%; max-width: 340px; }
.gallery-main .type-dot { width: 42px; height: 42px; bottom: 12px; inset-inline-start: 12px; }
.gallery-main .type-dot .icon { width: 22px; height: 22px; }
.gallery-next { position: absolute; top: 50%; inset-inline-end: 16px; transform: translateY(-50%); }
.pdp-info { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.pdp-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdp-type { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.pdp-type .type-dot { position: static; box-shadow: none; }
.pdp-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pdp-title-row h1 { font-size: 30px; font-weight: 800; line-height: 1.3; }
.pdp-author a { color: var(--store-primary); font-weight: 700; }
.pdp-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.disc-pill { display: inline-block; padding: 2px 10px; border-radius: 4px; background: var(--store-accent); color: var(--store-primary-dark); font-size: 13px; font-weight: 800; }
.pdp-info hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.pdp-option { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opt-label { font-weight: 700; }
.opt-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-pill { padding: 7px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.opt-pill.is-active { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.pdp-buy { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pdp-buy .btn { flex: 1 1 150px; }
.qty { display: inline-flex; align-items: center; height: 50px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.qty button { width: 42px; height: 100%; display: grid; place-items: center; color: var(--muted); }
.qty button:hover { color: var(--store-primary); }
.qty .icon { width: 17px; height: 17px; }
.qty input { width: 46px; height: 100%; border: 0; text-align: center; font-weight: 700; background: transparent; outline: 0; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 42px; }
.qty-sm button { width: 34px; }
.qty-sm input { width: 36px; }
.pdp-hint, .stock-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.stock-line { color: var(--store-primary); font-weight: 700; }
.pdp-hint .icon, .stock-line .icon { width: 18px; height: 18px; color: var(--store-primary); }
.pdp-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.meta-item { background: var(--soft); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.45; min-width: 0; }
.meta-item small { display: block; color: var(--muted); font-size: 12.5px; }
.meta-item b { font-size: 14px; overflow-wrap: anywhere; }
.sample-player { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r); background: var(--soft); }
.sp-track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.sp-track span { display: block; height: 100%; background: var(--store-primary); }
.sp-time { font-size: 13px; color: var(--muted); font-weight: 700; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.perks li { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.perks b { font-size: 16px; font-weight: 800; margin-top: 8px; }
.perks span:last-child { color: var(--muted); font-size: 14px; }
.perk-icon { width: 50px; height: 50px; border-radius: 50%; background: var(--store-primary); color: #fff; display: grid; place-items: center; }

.tabs { margin-top: 44px; }
.tab-list { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab-list button { padding: 12px 2px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tab-list button[aria-selected="true"] { color: var(--store-primary); border-color: var(--store-primary); }
.tab-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--store-primary); color: #fff; font-size: 12px; }
.tab-panel { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.panel-title { font-size: 19px; font-weight: 800; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.prose p + p { margin-top: 14px; }
.prose { max-width: 900px; font-size: 15.5px; line-height: 1.95; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 220px; font-weight: 700; background: var(--soft); }
.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 30px; align-items: start; }
.reviews-side { display: flex; flex-direction: column; gap: 18px; }
.reviews-summary { display: flex; flex-direction: column; gap: 4px; }
.reviews-summary strong { font-size: 44px; font-weight: 800; line-height: 1; }
.reviews-summary small { color: var(--muted); }
.rating-bars li { display: grid; grid-template-columns: 56px 1fr 40px; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.rating-bars li + li { margin-top: 6px; }
.bar { height: 7px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-form { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.review-form h3 { font-size: 16px; font-weight: 800; }
.note { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.note .icon { width: 16px; height: 16px; }
.star-pick { display: flex; gap: 2px; color: var(--gold); }
.star-pick .icon { width: 24px; height: 24px; }
.star-pick button[aria-checked="true"] ~ button { color: var(--gold-off); }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-top > div { flex: 1; line-height: 1.4; }
.review-top small { display: block; color: var(--muted); font-size: 13px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--store-primary-dark); display: grid; place-items: center; font-weight: 800; }
body[data-show-reviews="false"] .tab-reviews, body[data-show-reviews="false"] .reviews-panel { display: none; }

.buy-bar {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--white);
	border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(22, 28, 36, .1);
	transform: translateY(110%); transition: transform .3s;
}
.buy-bar.is-visible { transform: none; }
body[data-show-buy-bar="false"] .buy-bar { display: none; }
.buy-bar-inner { display: flex; align-items: center; gap: 16px; padding-block: 10px; }
.buy-bar img { width: 44px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; flex: none; }
.buy-bar-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.buy-bar-info b { font-weight: 800; }
.buy-bar-actions { display: flex; gap: 10px; }

/* author page */
.author-hero { display: flex; align-items: center; gap: 28px; background: var(--soft); border-radius: var(--r-lg); padding: 28px; }
.author-photo { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; flex: none; border: 4px solid #fff; }
.author-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.author-hero h1 { font-size: 32px; font-weight: 800; line-height: 1.25; }
.author-stats { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.author-stats b { color: var(--store-text); font-size: 18px; }
.author-bio { max-width: 820px; }
.author-hero > .btn { align-self: flex-start; }

/* cart */
.cart-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cart-head h1 { font-size: 30px; font-weight: 800; }
.cart-head p { color: var(--muted); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 26px; align-items: start; }
.cart-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 20px 20px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: start; font-size: 14px; color: var(--muted); font-weight: 700; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 16px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-book { display: flex; align-items: center; gap: 14px; }
.cart-cover { flex: none; width: 76px; padding: 8px 10px; background: var(--soft); border-radius: var(--r-sm); }
.cart-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.cart-book h3 { font-size: 15.5px; font-weight: 800; }
.cart-book p { color: var(--muted); font-size: 13.5px; }
.cart-book .pdp-type { margin-top: 4px; }
.cell-remove { text-align: end; }
.cart-under { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.summary { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.summary h2 { font-size: 19px; font-weight: 800; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.coupon { display: flex; gap: 8px; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--primary-soft); font-size: 14px; }
.coupon-applied span { display: inline-flex; align-items: center; gap: 6px; }
.coupon-applied .icon { width: 16px; height: 16px; color: var(--store-primary); }
.coupon-applied button { color: var(--store-primary-dark); font-weight: 700; text-decoration: underline; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; }
.summary-row span { color: var(--muted); }
.summary-total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 18px; }
.summary-total span { color: var(--store-text); font-weight: 800; }
.summary-total b { font-weight: 800; }
.empty-cart { text-align: center; padding: 44px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--primary-soft); color: var(--store-primary); display: grid; place-items: center; }
.empty-icon .icon { width: 34px; height: 34px; }
.empty-cart h2 { font-size: 22px; font-weight: 800; }
.empty-cart p { color: var(--muted); }

/* 404 */
.notfound { padding-block: 64px 56px; }
.notfound-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.nf-big { font-size: 180px; font-weight: 800; line-height: .9; color: color-mix(in srgb, var(--store-primary) 14%, #fff); letter-spacing: -4px; }
.notfound h1 { font-size: 34px; font-weight: 800; }
.notfound p { color: var(--muted); max-width: 520px; }
.nf-search { width: 100%; max-width: 520px; margin-top: 8px; }
.nf-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* components page */
.kit-intro { padding-block: 44px 20px; }
.kit-eyebrow { display: inline-block; padding: 3px 12px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--store-primary-dark); font-weight: 700; font-size: 13.5px; }
.kit-intro h1 { font-size: 36px; font-weight: 800; margin-top: 10px; }
.kit-intro p { color: var(--muted); max-width: 760px; margin-top: 6px; }
.kit-block { padding-block: 30px; border-top: 1px solid var(--line); }
.kit-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.kit-note { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.kit-label { font-weight: 700; font-size: 14px; color: var(--muted); }
.kit-dark { display: inline-flex; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--store-primary); }
.kit-type { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; }
.kit-type .type-dot { position: static; }
.kit-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kit-state { display: flex; flex-direction: column; gap: 8px; }
.kit-state .book-card { flex: 1; }
.kit-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kit-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center; }
.kit-cats { grid-template-columns: repeat(2, 1fr); }
.kit-block .section-head { margin-bottom: 18px; }

/* ---------------------------------------------------------------- responsive */
/* ---------------------------------------------------------------- المدوّنة (latest_posts، post.*) */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; transition: box-shadow .25s; }
.post-card:hover { box-shadow: var(--shadow); }
.post-media { display: block; overflow: hidden; border-radius: var(--r-sm); aspect-ratio: 16 / 9; background: var(--soft); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 6px 6px; flex: 1; }
.post-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.post-meta .icon { width: 16px; height: 16px; color: var(--store-primary); }
.post-title { font-size: 18px; font-weight: 800; line-height: 1.45; }
.post-title a:hover { color: var(--store-primary); }
.post-excerpt { font-size: 14.5px; color: var(--muted); }
.post-body .link-more { margin-top: auto; padding-top: 6px; }
.icon-flip { transform: scaleX(-1); }
.article { max-width: 820px; margin-inline: auto; }
.article-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.article-title { font-size: 34px; font-weight: 800; line-height: 1.35; }
.article-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.article-body { margin-top: 24px; font-size: 17px; line-height: 1.95; }
.article-body p + p { margin-top: 16px; }
.article-back { margin-top: 24px; }

/* ---------------------------------------------------------------- النشرة أعلى التذييل وقسيمة الترحيب (newsletter.offer) */
.footer-news { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 36px; padding: 24px 28px; border-radius: var(--r-lg); background: var(--primary-soft); }
.footer-news-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--store-primary); }
.footer-news-title .icon { width: 24px; height: 24px; }
.footer-news-copy p { margin-top: 4px; color: var(--muted); }
.footer-news-form { display: flex; flex-direction: column; gap: 8px; flex: 0 1 460px; min-width: 0; }
.footer-news-field { display: flex; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.footer-news-field input { flex: 1; min-width: 0; border: 0; padding-inline: 12px; background: transparent; outline-offset: -2px; }
.news-offer { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--store-primary); }
.news-offer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--store-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 35%, transparent); }

@media (max-width: 1240px) {
	.cat-row { grid-template-columns: repeat(4, 1fr); row-gap: 26px; }
	.header-main-inner { gap: 20px; }
	.nav-links a { padding: 10px 10px; }
	.slide-text h2 { font-size: 42px; }
	.promo-big { font-size: 80px; }
}

@media (max-width: 1100px) {
	.book-grid, .listing .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.book-row { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
	.book-row.is-compact { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
	.nav-support { display: none; }
	.season-grid { grid-template-columns: 1fr 1fr; }
	.banner-tall { grid-column: 1 / -1; min-height: 340px; height: auto; }
	.ess-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.banner-ess { grid-column: 1 / -1; }
	.ess-items > :nth-child(n+7) { display: none; }
	.pdp { grid-template-columns: 1fr; }
	.gallery-main { padding: 36px 26%; }
	.reviews-layout { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.kit-states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.trust-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
	:root { --gutter: 16px; --gap: 14px; }
	.topbar-inner { flex-direction: column; gap: 2px; padding-block: 8px; min-height: 0; }
	.topbar-links { display: none; }
	.header-main-inner { flex-wrap: wrap; gap: 12px; min-height: 0; padding-block: 10px; }
	.menu-toggle { display: inline-grid; }
	.brand { margin-inline: auto; }
	.header-actions { margin: 0; }
	.hide-md { display: none !important; }
	.header-search { order: 5; flex: 1 1 100%; max-width: none; }
	.header-nav { display: none; }
	.section { padding-block: 36px; }
	.section-title { font-size: 23px; }
	.slide { min-height: 0; flex-direction: column; align-items: stretch; }
	.slide::before { display: none; }
	.slide-img { position: relative; order: 2; height: 230px; object-position: 20% center; }
	.slide-inner { padding-block: 36px 30px; }
	.slide-text h2 { font-size: 32px; }
	.slide-text p { font-size: 15.5px; }
	.hero-controls { bottom: 12px; }
	.hero-arrows { display: none; }
	.banner-grid { grid-template-columns: 1fr; }
	.banner-main { min-height: 460px; }
	.banner-main .banner-title { font-size: 28px; }
	.banner-wide { flex-direction: column; align-items: stretch; padding: 0; min-height: 0; }
	.banner-wide > img { position: relative; height: 180px; z-index: 0; object-position: left center; }
	.banner-wide-2 > img { object-position: right center; }
	.banner-wide::after { display: none; }
	.banner-wide .banner-copy, .banner-wide-2 .banner-copy { max-width: none; margin: 0; padding: 22px; }
	.banner-wide .banner-title { font-size: 24px; }
	.stamp { position: absolute; top: 18px; inset-inline-end: 18px; transform: none; width: 104px; height: 104px; }
	.stamp-core { width: 48px; height: 48px; }
	.promo-strip { grid-template-columns: 1fr; gap: 12px; padding: 26px 22px; }
	.promo-big { font-size: 64px; }
	.promo-title { font-size: 28px; }
	.trio { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 14px; }
	.trio::-webkit-scrollbar { display: none; }
	.trio > * { scroll-snap-align: start; }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters-toggle { display: inline-flex; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(330px, 88vw); z-index: 100;
		background: var(--white); padding: 18px; overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .3s;
	}
	.filters-head { display: flex; }
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .filters-backdrop { display: block; position: fixed; inset: 0; background: rgba(22, 28, 36, .45); z-index: 90; }
	.perks { grid-template-columns: repeat(2, 1fr); }
	.cart-layout { grid-template-columns: 1fr; }
	.author-hero { flex-direction: column; text-align: center; }
	.author-hero-body { align-items: center; }
	.author-hero > .btn { align-self: center; }
	.mobile-bar {
		display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
		background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
	}
	.mobile-bar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; font-size: 12.5px; font-weight: 700; color: var(--store-text); }
	.mobile-bar a:first-child { color: var(--store-primary); box-shadow: inset 0 3px 0 var(--store-primary); }
	.mobile-bar .icon { width: 22px; height: 22px; }
	.mb-count { position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--store-primary); color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; }
	body { padding-bottom: 64px; }
	body[data-show-mobile-bar="false"] { padding-bottom: 0; }
	.buy-bar { bottom: 64px; }
	body[data-show-mobile-bar="false"] .buy-bar { bottom: 0; }
	.buy-bar-info .rating { display: none; }
}
body[data-show-mobile-bar="false"] .mobile-bar { display: none; }

@media (max-width: 1100px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid:not(.post-grid--blog) > :nth-child(3) { display: none; }
}
@media (max-width: 640px) {
	.post-grid { grid-template-columns: 1fr; }
	.post-grid:not(.post-grid--blog) > :nth-child(3) { display: flex; }
	.article-title { font-size: 26px; }
	.article-body { font-size: 16px; }
	.footer-news { padding: 20px 18px; }
	.footer-news-form { flex-basis: 100%; }

	.book-grid, .listing .book-grid, .kit-states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.book-row { grid-auto-columns: calc((100% - var(--gap)) / 2.15); }
	.book-row.is-compact { grid-auto-columns: calc((100% - 2 * var(--gap)) / 2.6); }
	.book-card { padding: 8px; }
	.book-media { padding: 14px 12%; }
	.book-cta { font-size: 13px; padding: 0 6px; gap: 5px; min-height: 40px; white-space: normal; }
	.book-cta .icon { display: none; }
	.book-title { font-size: 14px; }
	.cat-row { display: flex; overflow-x: auto; gap: 14px; scrollbar-width: none; }
	.cat-row::-webkit-scrollbar { display: none; }
	.cat-tile { flex: 0 0 92px; }
	.cat-img, .section-tight .cat-img { width: 80px; height: 80px; }
	.season-grid { grid-template-columns: minmax(0, 1fr); }
	.ess-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.banner-ess { min-height: 420px; }
	.banner-ess .banner-panel { inset-inline: 14px; bottom: 14px; max-width: none; padding: 16px; }
	.banner-color { padding: 22px; min-height: 220px; }
	.banner-color .banner-copy { max-width: 62%; }
	.banner-color .banner-title { font-size: 21px; }
	.banner-main .banner-panel { inset-inline: 14px; bottom: 14px; padding: 20px; }
	.banner-card .banner-panel { padding: 16px 18px; }
	.banner-card .banner-title { font-size: 20px; }
	.ap-head { flex-wrap: wrap; }
	.ap-head .btn { width: 100%; }
	.slide-text h2 { font-size: 28px; }
	.gallery { grid-template-columns: 1fr; }
	.thumbs { flex-direction: row; order: 2; }
	.thumbs button { width: 72px; }
	.gallery-main { padding: 28px 22%; }
	.pdp-info { padding: 18px; }
	.pdp-title-row h1 { font-size: 24px; }
	.price-lg { font-size: 24px; }
	.pdp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.perks { grid-template-columns: 1fr; }
	.tab-panel { padding: 18px; }
	.spec-table th { width: 40%; }
	.cart-box { padding: 4px 14px 16px; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
	.cart-table tr { position: relative; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { border: 0; padding: 4px 0; }
	.cart-table td[data-label] { display: flex; justify-content: space-between; align-items: center; }
	.cart-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 14px; }
	.cell-remove { position: absolute; top: 14px; inset-inline-end: 0; width: auto !important; }
	.cart-book { padding-inline-end: 52px; }
	.footer-grid { grid-template-columns: 1fr; gap: 26px; }
	.trust-list { grid-template-columns: 1fr 1fr; gap: 16px; }
	.trust-list li { flex-direction: column; text-align: center; gap: 8px; }
	.buy-bar-info b { display: none; }
	.buy-bar-actions .btn { padding: 0 12px; font-size: 14px; }
	.buy-bar-actions .btn .icon { display: none; }
	.nf-big { font-size: 120px; }
	.notfound h1 { font-size: 26px; }
	.kit-minis, .kit-split { grid-template-columns: 1fr; }
	.kit-dark { flex-wrap: wrap; }
	.toolbar select { min-width: 0; }
	.page-head h1 { font-size: 26px; }
	.coupon .btn { padding: 0 14px; }
}

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

/* ---------------------------------------------------------------- تبويبات صفّ الكتب (section.tabs، القاعدة 16) */
.row-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: -12px 0 26px; }
.row-tab { padding: 8px 20px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-weight: 700; font-size: 14.5px; color: var(--store-text); transition: border-color .2s, color .2s, background .2s; }
.row-tab:hover { border-color: var(--store-primary); color: var(--store-primary); }
.row-tab[aria-selected="true"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--white); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ---------------------------------------------------------------- عرض الأسبوع: كتابٌ واحد وعدّاد (offer.ends_at) */
.deal { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.75fr); border-radius: var(--r-lg); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.deal-head { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: 40px 36px; background: var(--store-primary); color: var(--white); overflow: hidden; isolation: isolate; }
.deal-head::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; inset-inline-end: -90px; bottom: -110px; background: rgba(255, 255, 255, .07); z-index: -1; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: var(--r-pill); background: var(--store-accent); color: var(--store-primary-dark); font-weight: 800; font-size: 13.5px; }
.deal-kicker .icon { width: 16px; height: 16px; }
.deal-title { font-size: 36px; font-weight: 800; line-height: 1.2; }
.deal-sub { font-size: 15.5px; max-width: 340px; }
.countdown { display: flex; gap: 8px; margin-top: 6px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 6px 6px; border-radius: var(--r); background: var(--store-primary-dark); line-height: 1.2; }
.cd-unit b { font-size: 26px; font-weight: 800; color: var(--store-accent); font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12.5px; }
.deal-items { display: flex; }
.deal-book { flex: 1; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 34px; align-items: center; padding: 30px 34px; }
.deal-media { position: relative; background: var(--soft); border-radius: var(--r); padding: 30px 18%; }
.deal-media .type-dot { width: 38px; height: 38px; }
.deal-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.deal-book-title { font-size: 28px; font-weight: 800; line-height: 1.3; }
.deal-book-title a:hover { color: var(--store-primary); }
.deal-body .book-author { white-space: normal; font-size: 15px; }
.deal-body .book-author span { color: var(--store-primary); font-weight: 700; }
.deal-desc { color: var(--store-text); font-size: 15px; max-width: 620px; }
.deal-desc p + p { margin-top: 6px; }
.deal-body .price-lg { margin-block: 2px 4px; }
.deal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 6px; }
.deal-actions .round-btn { width: 50px; height: 50px; }

/* ---------------------------------------------------------------- آراء القرّاء في الرئيسيّة (reviews.items) */
.reviews-row { display: flex; gap: var(--gap); align-items: stretch; }
.store-score { flex: 0 0 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 20px; border-radius: var(--r-lg); background: var(--store-primary); color: var(--white); }
.store-score strong { font-size: 54px; font-weight: 800; line-height: 1; }
.store-score .stars { color: var(--store-accent); }
.store-score .stars .icon { width: 20px; height: 20px; }
.store-score small { font-size: 14px; }
.quote-list { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--gap); }
.quote-card { margin: 0; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); position: relative; }
.quote-card::before { content: "”"; position: absolute; top: 4px; inset-inline-end: 18px; font-size: 76px; line-height: 1; font-weight: 800; color: color-mix(in srgb, var(--store-primary) 14%, #fff); }
.quote-card blockquote { margin: 0; font-size: 15px; line-height: 1.8; }
.quote-person { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.4; }
.quote-person b { display: block; font-weight: 800; font-size: 14.5px; }
.quote-person small { color: var(--muted); font-size: 13px; }
body[data-show-reviews="false"] .reviews-section { display: none; }

/* وصف البطاقة: يظهر في عرض القائمة وحده */
.book-desc { display: none; }

/* ---------------------------------------------------------------- عروضٌ أضيق: عرض الأسبوع والآراء والشرائط المرِنة */
@media (max-width: 1100px) {
	.deal { grid-template-columns: 1fr; }
	.deal-head { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 22px; padding: 26px 28px; }
	.deal-head .deal-title { font-size: 30px; }
	.deal-head .deal-sub { flex: 1 1 260px; max-width: none; }
	.deal-head .countdown { margin-top: 0; }
	.deal-book { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 26px; padding: 26px 28px; }
	.reviews-row { flex-direction: column; }
	.store-score { flex: none; flex-direction: row; flex-wrap: wrap; gap: 6px 14px; padding: 16px 20px; }
	.store-score strong { font-size: 38px; }
}
@media (max-width: 640px) {
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: -14px calc(var(--gutter) * -1) 20px; padding-inline: var(--gutter); }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; padding: 8px 16px; min-height: 40px; }
	.deal-head { padding: 22px 18px; gap: 10px; }
	.deal-head .deal-title { font-size: 26px; }
	.deal-sub { font-size: 14.5px; }
	.cd-unit { min-width: 0; flex: 1; }
	.countdown { width: 100%; }
	.cd-unit b { font-size: 22px; }
	.deal-book { grid-template-columns: 118px minmax(0, 1fr); gap: 16px; padding: 18px 16px; align-items: start; }
	.deal-media { padding: 14px 12px; }
	.deal-media .type-dot { width: 28px; height: 28px; bottom: 4px; inset-inline-start: 4px; }
	.deal-media .type-dot .icon { width: 15px; height: 15px; }
	.deal-media .book-badges { top: 4px; inset-inline-start: 4px; }
	.deal-book-title { font-size: 20px; }
	.deal-desc { font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
	.deal-desc p + p { display: none; }
	.deal-body .price-lg { font-size: 22px; }
	.deal-actions { grid-column: 1 / -1; width: 100%; }
	.deal-actions .btn { flex: 1; min-height: 46px; }
	.deal-actions .round-btn { width: 46px; height: 46px; }
	.quote-list { grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
	.quote-list::-webkit-scrollbar { display: none; }
	.quote-card { scroll-snap-align: start; padding: 18px; }
	.store-score { justify-content: center; }
	/* القائمتان والبانرات الثلاثة شرائطُ تُمرَّر بدل أعمدةٍ طويلة */
	.season-col .mini-list { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; }
	.season-col .mini-list::-webkit-scrollbar { display: none; }
	.season-col .book-mini { flex: 0 0 86%; scroll-snap-align: start; }
	.trio { grid-auto-columns: 78%; }
	.author-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 14px; }
	.author-grid::-webkit-scrollbar { display: none; }
	.author-panel { scroll-snap-align: start; }
	/* شريط الثقة: صفّان مدمجان */
	.trust-list { gap: 12px 10px; padding-block: 16px; }
	.trust-list li { flex-direction: row; text-align: start; gap: 10px; }
	.trust-icon { width: 38px; height: 38px; }
	.trust-icon .icon { width: 18px; height: 18px; }
	.trust-list small { font-size: 12.5px; }
	.trust-list b { font-size: 13.5px; }
}

/* ---------------------------------------------------------------- صفحة التصنيف: عمود التصفية والمرشّحات المختارة والقائمة */
.listing-side { display: flex; flex-direction: column; gap: 14px; }
.banner-side { min-height: 420px; display: flex; align-items: flex-end; padding: 24px 22px; color: #fff; background: var(--store-primary); }
.banner-side::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .2) 38%, transparent 55%); }
.banner-side .banner-title { font-size: 22px; }
.banner-side .banner-copy { gap: 8px; }
.view-switch { display: flex; gap: 6px; }
.view-switch button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--muted); background: var(--white); }
.view-switch button[aria-pressed="true"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--white); }
.view-switch .icon { width: 18px; height: 18px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; }
.active-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.active-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--store-primary-dark); font-size: 13.5px; font-weight: 700; border: 1px solid color-mix(in srgb, var(--store-primary) 18%, #fff); }
.active-chip .icon { width: 14px; height: 14px; }
.active-chip:hover { border-color: var(--store-primary); }
.active-clear { font-size: 13.5px; font-weight: 700; color: var(--store-primary); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1101px) { .listing .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* عرض القائمة: بطاقاتٌ أفقيّة في عمودين بوصفٍ قصير */
.listing .book-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.book-grid.is-list .book-card { flex-direction: row; gap: 16px; }
.book-grid.is-list .book-media { flex: 0 0 150px; align-self: flex-start; padding: 16px 14px; }
.book-grid.is-list .book-body { padding: 4px 0 2px; }
.book-grid.is-list .book-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13.5px; color: var(--muted); margin-block: 2px 4px; }
.book-grid.is-list .book-cta { align-self: flex-start; width: auto; padding-inline: 18px; }
@media (max-width: 900px) {
	.listing-side { display: contents; }
	.banner-side { display: none; }
}
@media (max-width: 640px) {
	.listing .book-grid.is-list { grid-template-columns: minmax(0, 1fr); }
	.book-grid.is-list .book-media { flex-basis: 112px; padding: 10px 8px; }
	.book-grid.is-list .book-cta .icon { display: block; }
	.view-switch button { width: 40px; height: 40px; }
	.active-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
	.active-filters::-webkit-scrollbar { display: none; }
	.active-chip, .active-label, .active-clear { flex: none; }
	.active-chip { min-height: 36px; }
}

/* ---------------------------------------------------------------- اختيار الصيغة (book.formats) */
.formats-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.formats { display: flex; flex-wrap: wrap; gap: 8px; }
.format-opt { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white); line-height: 1.3; transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt.is-current { border-color: var(--store-primary); box-shadow: inset 0 0 0 1px var(--store-primary); background: var(--primary-soft); }
.format-opt .type-dot { position: static; box-shadow: none; }
.format-name { font-weight: 700; font-size: 14px; }
.format-price { font-size: 13px; color: var(--muted); font-weight: 700; }
.formats-box:not(:has([data-repeat="format"] ~ .format-opt)) { display: none; }
/* المعرض بطول لوحة المعلومات فلا يبقى تحته فراغ */
.pdp { align-items: stretch; }
.gallery { align-items: stretch; }
.gallery-main { height: 100%; }
@media (max-width: 1100px) { .gallery-main { height: auto; } }
@media (max-width: 640px) {
	.formats-box { gap: 8px; }
	.formats { width: 100%; flex-wrap: nowrap; gap: 6px; }
	.format-opt { flex: 1; flex-direction: column; gap: 2px; padding: 8px 4px; text-align: center; min-width: 0; }
	.format-opt .type-dot { display: none; }
	.perks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
	.perks li { padding: 14px 10px; }
	.perk-icon { width: 40px; height: 40px; }
	.perks b { font-size: 14.5px; margin-top: 4px; }
	.perks span:last-child { font-size: 12.5px; }
}

.kit-gap { margin: 18px 0 10px; }
.kit-formats { max-width: 560px; }
.kit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1000px; }
@media (max-width: 640px) { .kit-list { grid-template-columns: minmax(0, 1fr); } }

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