/* Book Store list (views/bookstore.php) and cart (views/cart.php), layout Step 8, 2026-10-27.
   Brand kit colours/fonts (same tokens as home.css); scoped under .gbs. */
.gbs {
	--forest: #2f4a3c; --forest-hover: #253b30; --forest-tint: #e4ece7; --rice: #5f6b2b;
	--grain: #e1d18c; --grain-ink: #3a3410; --link: #176f9c; --ink: #404040; --muted: #61655f;
	--paper: #f7f5ee; --surface: #fff; --line: #e2dccd; --danger: #a83a2c; --success: #2e7d4f;
	--serif: "Noto Serif", "Noto Serif Devanagari", Georgia, "Times New Roman", serif;
	--sans: "Noto Sans", "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
	color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; margin: 0 0 24px;
}
.gbs *, .gbs *::before, .gbs *::after { box-sizing: border-box; }
.gbs a { color: var(--link); text-decoration: none; }
.gbs a:hover, .gbs a:focus { color: #0f5378; text-decoration: underline; }
.gbs h1, .gbs h2, .gbs h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; margin: 0; text-wrap: balance; }
:where(.gbs) p { margin: 0; }
.gbs .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gbs :focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* Buttons */
.gbs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--forest);
	background: var(--forest); color: #fff !important; font: 600 14.5px/1.3 var(--sans); cursor: pointer; text-decoration: none !important; }
.gbs-btn:hover, .gbs-btn:focus { background: var(--forest-hover); border-color: var(--forest-hover); }
.gbs-btn.ghost { background: var(--surface); color: var(--forest) !important; border-color: var(--line); }
.gbs-btn.ghost:hover, .gbs-btn.ghost:focus { border-color: var(--forest); background: var(--forest-tint); }
.gbs-btn[disabled] { opacity: .6; cursor: default; }

/* Hero: text + search on the left, featured book on the right */
.gbs-hero { margin: 20px 0 22px; padding: 28px 32px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line);
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; align-items: center; }
.gbs-hero.solo { grid-template-columns: minmax(0, 1fr); }
.gbs-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rice); margin-bottom: 8px; }
.gbs-eyebrow a { color: var(--rice); }
.gbs-hero h1 { font-size: 32px; line-height: 1.22; color: var(--forest); }
.gbs-lead { margin-top: 10px; font-size: 16.5px; color: var(--muted); max-width: 40em; }
.gbs-search { margin-top: 18px; display: flex; height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 560px; }
.gbs-search:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-tint); }
.gbs-search input { flex: 1; min-width: 0; border: 0; padding: 0 14px; font: 16px var(--sans); color: var(--ink); outline: 0; background: transparent; }
.gbs-search button { flex: none; border: 0; padding: 0 18px; background: var(--forest); color: #fff; font: 600 15px var(--sans); cursor: pointer; }
.gbs-search button:hover { background: var(--forest-hover); }

.gbs-feat { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.gbs-feat img { width: 96px; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; border: 1px solid #eee; background: #f6f2ea; display: block; }
.gbs-feat .k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rice); }
.gbs-feat .t { display: block; font: 600 18px/1.3 var(--serif); color: var(--ink); margin: 2px 0 2px; }
.gbs-feat .by { font-size: 13.5px; color: var(--muted); }
.gbs-feat .pr { margin: 6px 0 10px; font-size: 14px; color: var(--muted); }
.gbs-feat .pr b { font-size: 18px; color: var(--forest); }
.gbs-feat .pr s { margin-left: 4px; }
.gbs-feat .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gbs-feat .gbs-btn { padding: 7px 14px; font-size: 14px; }

/* Toolbar: chips + selects */
.gbs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
/* Tab bar: All books · New arrivals · Offers | languages (Step 8d) */
.gbs-tabs { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line);
	border-radius: 14px; box-shadow: 0 2px 10px rgba(47, 74, 60, .08); }
.gbs-tabs::-webkit-scrollbar { display: none; }
.gbs-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 10px;
	font: 600 15px/1 var(--sans); color: var(--ink) !important; text-decoration: none !important; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.gbs-tab .fa { font-size: 15px; color: var(--rice); }
.gbs-tab b { font-size: 12.5px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.gbs-tab:hover, .gbs-tab:focus-visible { background: var(--forest-tint); color: var(--forest) !important; }
.gbs-tab.on { background: var(--forest); color: #fff !important; box-shadow: 0 2px 6px rgba(47, 74, 60, .25); }
.gbs-tab.on .fa { color: var(--grain); }
.gbs-tab.on b { background: rgba(255, 255, 255, .16); border-color: transparent; color: #fff; }
.gbs-tab.new .fa { color: #c79a1e; }
.gbs-tab.new b { background: #fbf3df; border-color: #e3cf9f; color: var(--grain-ink); }
.gbs-tab.offer { background: #fbf3df; }
.gbs-tab.offer .fa { color: #b23b2e; }
.gbs-tab.offer b { background: #b23b2e; border-color: #b23b2e; color: #fff; }
.gbs-tab.offer:hover, .gbs-tab.offer:focus-visible { background: #f6e6bf; color: #7a2a20 !important; }
.gbs-tab.lang span { font-family: var(--serif); font-size: 15.5px; }
.gbs-tab-sep { flex: none; width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
@media (min-width: 768px) { .gbs-tab { flex: 1 0 auto; justify-content: center; } }
/* Tablets: an even 3 + 3 grid instead of a ragged wrap (Step 8e) */
@media (min-width: 768px) and (max-width: 1199px) {
	.gbs-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gbs-tab { min-width: 0; }
	.gbs-tab-sep { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gbs-tab { transition: none; } }
.gbs-sel { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gbs-sel label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.gbs-sel select { height: 38px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 8px; font: 14px var(--sans); color: var(--ink); }
.gbs-filter-btn { display: none; }
.gbs-count { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.gbs-count a { margin-left: 8px; }

/* Grid of book cards: same card as site/bookstore_new and site/bookstore_offers (.gbo-book), Step 8c 2026-10-27 */
.gbs-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1199px) { .gbs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .gbs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gbs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.gbs-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px;
	box-shadow: 0 2px 8px rgba(47, 74, 60, .08); transition: border-color .15s ease, transform .15s ease; }
.gbs-card:hover, .gbs-card:focus-within { border-color: var(--forest); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .gbs-card, .gbs-card:hover { transition: none; transform: none; } }
.gbs-card .cv { display: block; position: relative; }
/* height:auto so the 2:3 box wins over the height="" attribute (that attribute stretched covers to 300px tall) */
.gbs-card .cv img { width: 100%; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; background: #f6f2ea; border: 1px solid #eee; display: block; }
.gbs-badge { position: absolute; top: 8px; font-size: 12.5px; font-weight: 700; line-height: 1.5; border-radius: 12px; padding: 2px 9px; }
.gbs-badge.new { left: 8px; background: var(--forest); color: #fff; }
.gbs-badge.pre { left: 8px; background: var(--grain); color: var(--grain-ink); }
.gbs-badge.off { right: 8px; background: #b23b2e; color: #fff; }
.gbs-card .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 0 2px;
	font-size: 14px; line-height: 1.3; font-weight: 600; color: #222 !important; text-decoration: none; }
.gbs-card .t:hover, .gbs-card .t:focus { color: var(--forest) !important; text-decoration: underline; }
.gbs-card .by { font-size: 12.5px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbs-card .pb { font-size: 12px; color: #888; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbs-price { margin-top: auto; border-top: 1px dashed var(--line); padding-top: 5px; font-size: 12.5px; color: #555; }
.gbs-price .n { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #888; }
.gbs-price .s { font-size: 15px; font-weight: 700; color: var(--forest); }
.gbs-price .l { color: #999; margin-left: 5px; }
.gbs-price .u { display: block; font-size: 11.5px; color: #888; }
.gbs-card .gbs-btn { margin-top: 8px; width: 100%; padding: 5px 8px; font-size: 13px; border-radius: 4px; font-weight: 400; }
.gbs-card .gbs-btn:not(.ghost):hover, .gbs-card .gbs-btn:not(.ghost):focus { background: #e3cf9f; border-color: #e3cf9f; color: var(--forest) !important; }
.gbs-card .na { margin-top: 8px; font-size: 13px; color: #888; text-align: center; padding: 5px 4px; border: 1px dashed var(--line); border-radius: 4px; }

/* Pages */
.gbs-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 6px; padding: 0; list-style: none; }
.gbs-pages a, .gbs-pages span { display: inline-block; min-width: 38px; padding: 7px 10px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; }
.gbs-pages .cur { background: var(--forest); border-color: var(--forest); color: #fff; font-weight: 600; }
.gbs-pages .gap { border: 0; background: none; min-width: 0; padding: 7px 2px; color: var(--muted); }
.gbs-none { border: 1px dashed var(--line); border-radius: 12px; padding: 32px 20px; text-align: center; color: var(--muted); background: var(--paper); }
.gbs-none strong { display: block; color: var(--forest); font-size: 18px; font-family: var(--serif); margin-bottom: 6px; }
.gbs-fine { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 991px) { .gbs-hero { grid-template-columns: minmax(0, 1fr); } .gbs-feat { max-width: 520px; } }

/* Phones: Filters button toggles the selects */
@media (max-width: 767px) {
	.gbs-hero { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; gap: 18px; margin-top: 12px; }
	.gbs-hero h1 { font-size: 25px; }
	.gbs-lead { font-size: 15px; }
	.gbs-feat { grid-template-columns: 72px minmax(0, 1fr); }
	.gbs-feat img { width: 72px; }
	.gbs-tabs { border-radius: 12px; padding: 5px; gap: 4px; }
	.gbs-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
	.gbs-tab { height: 42px; padding: 0 8px; gap: 6px; font-size: 14px; justify-content: center; min-width: 0; }
	.gbs-tab .lg, .gbs-tab-sep { display: none; }
	.gbs-filter-btn { display: inline-flex; }
	.gbs-sel { display: none; width: 100%; }
	.gbs-sel.open { display: flex; }
	.gbs-sel label { width: 100%; justify-content: space-between; }
	.gbs-sel select { flex: 1; max-width: none; }
}

/* Cart (views/cart.php) */
.gbs-cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.gbs > h1 { font-size: 28px; color: var(--forest); margin: 20px 0 16px; }
.gbs-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.gbs-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; padding: 16px; border-top: 1px solid var(--line); align-items: start; }
.gbs-item:first-child { border-top: 0; }
.gbs-item img { width: 72px; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; border: 1px solid #eee; background: #f6f2ea; display: block; }
.gbs-item .ph { width: 72px; aspect-ratio: 2/3; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--rice); font-size: 22px; }
.gbs-item .n { font: 600 16.5px/1.35 var(--serif); color: var(--ink); }
.gbs-item .n a { color: var(--ink); }
.gbs-item .m { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.gbs-item .up { font-size: 14px; margin-top: 4px; }
.gbs-item .up s { color: var(--muted); margin-left: 4px; }
.gbs-item .off { color: var(--danger); font-weight: 600; margin-left: 4px; font-size: 13px; }
.gbs-item .ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.gbs-step { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 36px; }
.gbs-step button { width: 34px; border: 0; background: var(--paper); font-size: 18px; color: var(--ink); cursor: pointer; }
.gbs-step button:hover { background: var(--forest-tint); }
.gbs-step input { width: 52px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 15px var(--sans); -moz-appearance: textfield; }
.gbs-step input::-webkit-inner-spin-button, .gbs-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.gbs-rm { background: none; border: 0; padding: 0; color: var(--danger); font-size: 14px; cursor: pointer; }
.gbs-rm:hover { text-decoration: underline; }
.gbs-item .tot { font-weight: 700; font-size: 16.5px; color: var(--ink); white-space: nowrap; text-align: right; }
.gbs-sum { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; position: sticky; top: 16px; }
.gbs-sum h2 { font-size: 19px; margin-bottom: 10px; }
.gbs-sum dl { margin: 0; }
.gbs-sum .r { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.gbs-sum .r dt { font-weight: 400; color: var(--muted); }
.gbs-sum .r dd { margin: 0; text-align: right; }
.gbs-sum .r.sub { font-size: 13px; padding: 2px 0 2px 10px; }
.gbs-sum .r.save dd { color: var(--success); }
.gbs-sum .r.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 700; }
.gbs-sum .r.total dt { color: var(--ink); font-weight: 700; }
.gbs-sum .gbs-btn { width: 100%; margin-top: 14px; padding: 12px 16px; font-size: 16px; }
.gbs-sum .note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.gbs-sum .note .fa { color: var(--rice); width: 16px; }
.gbs-msg { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; font-size: 14.5px; border: 1px solid var(--line); background: var(--surface); }
.gbs-msg.ok { border-color: #b9d8c4; background: #eef6f0; color: #1f5a37; }
.gbs-msg.info { border-color: #e3cf9f; background: #fbf3df; color: var(--grain-ink); }
.gbs-empty { text-align: center; padding: 40px 16px; margin-top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.gbs-empty .fa { font-size: 40px; color: var(--rice); }
.gbs-empty h1 { font-size: 26px; margin: 12px 0 6px; color: var(--forest); }
.gbs-empty p { color: var(--muted); margin-bottom: 18px; }
.gbs-empty .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gbs-more { margin-top: 28px; }
.gbs-more h2 { font-size: 21px; margin-bottom: 12px; }
@media (max-width: 991px) {
	.gbs-cart { grid-template-columns: minmax(0, 1fr); }
	.gbs-sum { position: static; }
}
@media (max-width: 520px) {
	.gbs-item { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding: 14px 12px; }
	.gbs-item img, .gbs-item .ph { width: 60px; }
	.gbs-item .tot { grid-column: 2; text-align: left; }
	.gbs > h1 { font-size: 24px; }
}
