:root {
	--green-dark: #092C27;
	--green: #1F4D3A;
	--cream: #F7F1E6;
	--beige: #E8D9BF;
	--gold: #C49A4A;
	--charcoal: #263238;
	--white-warm: #FFFDF8;
	--ink: #10211f;
	--muted: #6b746f;
	--line: rgba(9, 44, 39, .14);
	--shadow-soft: 0 18px 50px rgba(9, 44, 39, .12);
	--shadow-card: 0 14px 32px rgba(38, 50, 56, .12);
	--radius: 8px;
	--font-ui: "Inter", Arial, sans-serif;
	--font-display: "Playfair Display", Georgia, serif;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 1.6;
}

body.no-scroll {
	overflow: hidden;
}

img {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
a,
select {
	cursor: pointer;
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
	color: var(--ink);
	padding: 12px 14px;
	outline: 0;
	transition: border-color .2s ease, box-shadow .2s ease;
}

textarea {
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
}

main {
	min-height: 50vh;
}

.container {
	width: min(100% - 32px, 1240px);
	margin: 0 auto;
}

.narrow-container {
	width: min(100% - 32px, 920px);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.site-header {
	position: fixed;
	top: 12px;
	left: 0;
	right: 0;
	z-index: 50;
	transition: transform .2s ease, background .2s ease;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 72px;
	padding: 0 18px;
	border: 1px solid rgba(255, 253, 248, .12);
	border-radius: var(--radius);
	background: rgba(5, 24, 21, .82);
	backdrop-filter: blur(16px);
	color: var(--white-warm);
	box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}

.site-header.is-scrolled .header-inner {
	background: rgba(9, 44, 39, .94);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: max-content;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	color: var(--white-warm);
}

.brand svg {
	width: 34px;
	height: 34px;
	stroke-width: 1.7;
}

.brand strong,
.brand small {
	display: block;
	line-height: 1;
}

.brand strong {
	font-weight: 800;
}

.brand small {
	font-size: 11px;
	font-weight: 700;
	margin-top: 4px;
}

.main-nav {
	display: none;
	align-items: center;
	gap: 28px;
	font-size: 14px;
	font-weight: 700;
}

.main-nav a {
	position: relative;
	color: rgba(255, 253, 248, .9);
}

.main-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -10px;
	width: 100%;
	height: 2px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .2s ease;
}

.main-nav a:hover::after {
	transform: scaleX(1);
}

.header-actions {
	display: none;
	align-items: center;
	gap: 8px;
}

.icon-button {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 253, 248, .16);
	border-radius: 50%;
	background: rgba(255, 253, 248, .06);
	color: inherit;
	transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.icon-button:hover {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--green-dark);
	transform: translateY(-1px);
}

.icon-button svg {
	width: 20px;
	height: 20px;
}

.badge-button span {
	position: absolute;
	top: -4px;
	right: -4px;
	display: grid;
	place-items: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 99px;
	background: var(--gold);
	color: var(--green-dark);
	font-size: 11px;
	font-weight: 800;
}

.nav-toggle {
	color: var(--white-warm);
}

.flash-wrap {
	position: fixed;
	top: 100px;
	left: 0;
	right: 0;
	z-index: 60;
	pointer-events: none;
}

.flash {
	width: fit-content;
	max-width: 100%;
	padding: 12px 16px;
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	font-weight: 700;
	pointer-events: auto;
}

.flash + .flash {
	margin-top: 8px;
}

.flash.is-success {
	background: #eaf6ee;
	color: #14532d;
	border: 1px solid #b7dfc1;
}

.flash.is-error {
	background: #fff0ee;
	color: #8a1f11;
	border: 1px solid #efb8ae;
}

.hero-section {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 650px;
	padding: 150px 0 86px;
	background: var(--green-dark) url("../img/library-hero.png") center / cover no-repeat;
	color: var(--white-warm);
	overflow: hidden;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(3, 18, 16, .86) 0%, rgba(6, 30, 26, .68) 44%, rgba(6, 30, 26, .18) 100%),
		linear-gradient(0deg, rgba(3, 18, 16, .28), rgba(3, 18, 16, .08));
}

.hero-content {
	position: relative;
	max-width: 1240px;
}

.eyebrow {
	margin: 0 0 12px;
	color: var(--gold);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.section-heading h2,
.promo-inner h2,
.testimonial-copy blockquote,
.book-detail-info h1,
.admin-title-row h1,
.admin-login-card h1 {
	font-family: var(--font-display);
	line-height: 1.05;
}

.hero-content h1 {
	max-width: 620px;
	margin: 0;
	font-size: 48px;
}

.hero-content > p:not(.eyebrow) {
	max-width: 520px;
	margin: 22px 0 0;
	color: rgba(255, 253, 248, .88);
	font-size: 18px;
}

.hero-actions,
.form-actions,
.cart-update-actions,
.admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.hero-actions {
	margin-top: 32px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 12px 18px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-weight: 800;
	line-height: 1;
	transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn svg {
	width: 18px;
	height: 18px;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(9, 44, 39, .14);
}

.btn-primary {
	background: var(--green);
	border-color: var(--green);
	color: var(--white-warm);
}

.btn-primary:hover {
	background: var(--green-dark);
	border-color: var(--green-dark);
}

.btn-outline,
.btn-outline-light,
.btn-ghost {
	background: transparent;
	color: var(--green-dark);
	border-color: var(--line);
}

.btn-outline-light {
	color: var(--white-warm);
	border-color: rgba(255, 253, 248, .46);
}

.btn-outline:hover,
.btn-ghost:hover {
	background: var(--white-warm);
	border-color: var(--gold);
}

.btn-outline-light:hover {
	background: var(--white-warm);
	color: var(--green-dark);
}

.btn-small {
	min-height: 38px;
	padding: 10px 12px;
	font-size: 13px;
}

.full-width {
	width: 100%;
}

.benefit-strip {
	background: rgba(255, 253, 248, .86);
	border-bottom: 1px solid var(--line);
}

.benefit-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1px;
}

.benefit-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 0;
	min-height: 82px;
}

.benefit-item svg,
.why-item svg,
.admin-stat svg {
	width: 28px;
	height: 28px;
	color: var(--green);
	stroke-width: 1.7;
}

.benefit-item strong,
.benefit-item span {
	display: block;
}

.benefit-item strong {
	font-size: 14px;
}

.benefit-item span {
	color: var(--muted);
	font-size: 13px;
}

.section {
	padding: 70px 0;
}

.section.is-soft {
	background: rgba(255, 253, 248, .48);
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 28px;
}

.section-heading h2 {
	margin: 0;
	font-size: 32px;
	color: var(--green-dark);
}

.section-heading a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--green);
	font-weight: 800;
	font-size: 14px;
}

.section-heading a svg {
	width: 18px;
	height: 18px;
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.category-tile {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 150px;
	overflow: hidden;
	border-radius: var(--radius);
	color: var(--white-warm);
	box-shadow: var(--shadow-card);
	isolation: isolate;
}

.category-tile img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
	z-index: -2;
}

.category-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(9, 44, 39, .18), rgba(4, 18, 16, .84));
	z-index: -1;
}

.category-tile:hover img {
	transform: scale(1.04);
}

.category-tile strong {
	width: 100%;
	padding: 18px;
	font-size: 15px;
	line-height: 1.25;
}

.category-icon {
	position: absolute;
	top: 14px;
	left: 14px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 253, 248, .13);
	backdrop-filter: blur(8px);
}

.category-icon svg {
	width: 19px;
	height: 19px;
}

.book-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.book-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid rgba(9, 44, 39, .1);
	border-radius: var(--radius);
	background: var(--white-warm);
	box-shadow: 0 10px 28px rgba(9, 44, 39, .08);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.book-card:hover {
	transform: translateY(-4px);
	border-color: rgba(196, 154, 74, .45);
	box-shadow: var(--shadow-card);
}

.book-cover {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	background: var(--beige);
	overflow: hidden;
}

.book-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.availability {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 5px 9px;
	border-radius: 99px;
	font-size: 12px;
	font-weight: 800;
}

.book-cover .availability {
	position: absolute;
	left: 10px;
	top: 10px;
}

.is-available {
	background: #eaf6ee;
	color: #14532d;
}

.is-out {
	background: #fff0ee;
	color: #8a1f11;
}

.is-soon {
	background: #fff8e5;
	color: #7a4f07;
}

.book-card-body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 14px;
	flex: 1;
	padding: 14px;
}

.book-card h3 {
	margin: 0 0 4px;
	color: var(--green-dark);
	font-size: 15px;
	line-height: 1.25;
}

.book-card p {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
}

.book-meta-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 14px;
}

.book-meta-line strong {
	color: var(--green-dark);
}

.book-meta-line span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--gold);
	font-weight: 800;
}

.book-meta-line svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.book-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.inline-form {
	display: inline;
}

.favorite-toggle {
	width: 38px;
	height: 38px;
	color: var(--green-dark);
	border-color: var(--line);
	background: var(--cream);
}

.favorite-toggle.is-active,
.favorite-form .is-active {
	color: #8a1f11;
	border-color: #efb8ae;
	background: #fff0ee;
}

.promo-band {
	padding: 8px 0 64px;
}

.promo-inner {
	display: grid;
	grid-template-columns: 1fr;
	overflow: hidden;
	min-height: 300px;
	border-radius: var(--radius);
	background: var(--green-dark);
	color: var(--white-warm);
	box-shadow: var(--shadow-soft);
}

.promo-image {
	min-height: 220px;
	background: linear-gradient(90deg, rgba(9, 44, 39, .2), rgba(9, 44, 39, .74)), url("../img/library-hero.png") center / cover no-repeat;
}

.promo-inner > div:last-child {
	padding: 34px;
}

.promo-inner h2 {
	margin: 0;
	font-size: 34px;
}

.promo-inner p:not(.eyebrow) {
	max-width: 440px;
	color: rgba(255, 253, 248, .82);
}

.why-grid {
	display: grid;
	grid-template-columns: 1fr;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.why-item {
	padding: 26px 0;
	border-bottom: 1px solid var(--line);
}

.why-item:last-child {
	border-bottom: 0;
}

.why-item h3 {
	margin: 14px 0 6px;
	color: var(--green-dark);
	font-size: 16px;
}

.why-item p {
	margin: 0;
	color: var(--muted);
}

.testimonial-section {
	position: relative;
	min-height: 380px;
	padding: 74px 0;
	background:
		linear-gradient(90deg, rgba(5, 24, 21, .94), rgba(9, 44, 39, .72), rgba(9, 44, 39, .36)),
		url("../img/library-hero.png") center / cover no-repeat;
	color: var(--white-warm);
}

.testimonial-copy {
	max-width: 560px;
}

.testimonial-copy svg {
	width: 36px;
	height: 36px;
	color: var(--gold);
}

.testimonial-copy blockquote {
	margin: 16px 0;
	font-size: 28px;
}

.testimonial-copy cite {
	font-style: normal;
	font-weight: 800;
}

.newsletter-section {
	padding: 30px 0;
	background: var(--white-warm);
	border-top: 1px solid var(--line);
}

.newsletter-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	align-items: center;
}

.newsletter-inner h2 {
	margin: 0 0 4px;
	font-family: var(--font-display);
	font-size: 25px;
	color: var(--green-dark);
}

.newsletter-inner p {
	margin: 0;
	color: var(--muted);
}

.newsletter-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.site-footer {
	padding: 54px 0 24px;
	background: var(--green-dark);
	color: rgba(255, 253, 248, .82);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px;
}

.footer-brand {
	color: var(--white-warm);
	margin-bottom: 14px;
}

.site-footer h3 {
	margin: 0 0 14px;
	color: var(--white-warm);
	font-size: 15px;
}

.site-footer a {
	display: block;
	margin: 8px 0;
	color: rgba(255, 253, 248, .78);
}

.site-footer p {
	margin: 8px 0;
	max-width: 300px;
}

.site-footer p svg,
.social-links svg {
	width: 18px;
	height: 18px;
	vertical-align: middle;
	margin-right: 8px;
	color: var(--gold);
}

.social-links {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.social-links a {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 253, 248, .06);
}

.social-links svg {
	margin: 0;
}

.footer-bottom {
	margin-top: 36px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 253, 248, .12);
	font-size: 13px;
}

.page-hero {
	padding: 132px 0 56px;
	background:
		linear-gradient(90deg, rgba(9, 44, 39, .96), rgba(9, 44, 39, .82)),
		url("../img/library-hero.png") center / cover no-repeat;
	color: var(--white-warm);
}

.compact-hero {
	min-height: 250px;
}

.page-hero h1 {
	margin: 14px 0 0;
	font-size: 42px;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	color: rgba(255, 253, 248, .72);
	font-size: 13px;
}

.breadcrumbs a {
	color: var(--white-warm);
	font-weight: 800;
}

.catalog-section,
.cart-section,
.book-detail-section {
	padding: 56px 0 78px;
}

.catalog-shell {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

.filters-panel {
	display: none;
	align-self: start;
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(255, 253, 248, .72);
	box-shadow: 0 16px 42px rgba(9, 44, 39, .08);
}

.filter-header,
.catalog-toolbar,
.summary-line,
.summary-total,
.panel-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.filter-header h2,
.filters-panel h3 {
	margin: 0;
	color: var(--green-dark);
}

.filter-header h2 {
	font-size: 18px;
}

.filter-header a,
.panel-heading a {
	color: var(--green);
	font-weight: 800;
	font-size: 13px;
}

.filters-panel label,
.admin-form label {
	display: block;
	margin: 16px 0 7px;
	color: var(--charcoal);
	font-weight: 800;
	font-size: 13px;
}

.search-field {
	position: relative;
}

.search-field input {
	padding-right: 42px;
}

.search-field svg {
	position: absolute;
	right: 12px;
	top: 50%;
	width: 18px;
	height: 18px;
	color: var(--muted);
	transform: translateY(-50%);
}

.category-filter-list {
	display: grid;
	gap: 8px;
	margin: 10px 0 20px;
}

.category-filter-list a {
	padding: 8px 10px;
	border-radius: var(--radius);
	color: var(--muted);
	font-weight: 700;
}

.category-filter-list a:hover,
.category-filter-list a.is-active {
	background: var(--cream);
	color: var(--green-dark);
}

.check-row {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 10px 0 !important;
	color: var(--charcoal);
}

.check-row input {
	width: 17px;
	height: 17px;
	padding: 0;
	accent-color: var(--green);
}

.mobile-filters {
	margin-bottom: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
}

.mobile-filters summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px;
	font-weight: 800;
}

.mobile-filters summary svg {
	width: 18px;
	height: 18px;
}

.mobile-filters form {
	display: grid;
	gap: 10px;
	padding: 0 14px 14px;
}

.catalog-toolbar {
	margin-bottom: 22px;
}

.catalog-toolbar p {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
}

.sort-form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sort-form label {
	color: var(--muted);
	font-size: 13px;
	font-weight: 800;
}

.sort-form select {
	min-width: 180px;
}

.catalog-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pagination-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 34px;
}

.pagination-nav a {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--white-warm);
	color: var(--green-dark);
	font-weight: 800;
}

.pagination-nav a.is-active,
.pagination-nav a:hover {
	background: var(--green);
	color: var(--white-warm);
	border-color: var(--green);
}

.pagination-nav svg {
	width: 18px;
	height: 18px;
}

.empty-state {
	display: grid;
	place-items: center;
	gap: 12px;
	min-height: 340px;
	padding: 40px 24px;
	text-align: center;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
}

.empty-state.wide {
	grid-column: 1 / -1;
}

.empty-state svg {
	width: 46px;
	height: 46px;
	color: var(--gold);
}

.empty-state h2 {
	margin: 0;
	color: var(--green-dark);
	font-family: var(--font-display);
	font-size: 30px;
}

.empty-state p {
	margin: 0 0 10px;
	color: var(--muted);
}

.book-detail-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px;
	align-items: start;
}

.book-gallery {
	display: grid;
	grid-template-columns: 70px 1fr;
	gap: 16px;
}

.thumb-rail {
	display: grid;
	gap: 10px;
	align-content: start;
}

.thumb-rail img {
	width: 70px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
}

.detail-cover {
	display: grid;
	place-items: center;
	min-height: 420px;
	padding: 26px;
	border-radius: var(--radius);
	background: linear-gradient(145deg, rgba(255, 253, 248, .98), rgba(232, 217, 191, .58));
	box-shadow: var(--shadow-soft);
}

.detail-cover img {
	width: min(100%, 420px);
	max-height: 620px;
	object-fit: contain;
	filter: drop-shadow(0 24px 24px rgba(9, 44, 39, .24));
}

.book-detail-info {
	padding: 4px 0;
}

.book-detail-info h1 {
	margin: 0 0 8px;
	color: var(--green-dark);
	font-size: 42px;
}

.detail-author {
	margin: 0 0 14px;
	color: var(--charcoal);
	font-weight: 700;
}

.rating-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 14px 0;
}

.stars {
	display: inline-flex;
	gap: 2px;
	color: var(--gold);
}

.stars svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.rating-row small {
	color: var(--muted);
}

.detail-price {
	margin: 14px 0 8px;
	color: var(--green-dark);
	font-size: 30px;
	font-weight: 900;
}

.detail-status {
	margin-bottom: 18px;
}

.detail-description {
	margin: 18px 0 22px;
	color: var(--charcoal);
}

.spec-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 24px 0;
}

.spec-grid div {
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(255, 253, 248, .66);
}

.spec-grid svg {
	width: 18px;
	height: 18px;
	color: var(--green);
}

.spec-grid span,
.spec-grid strong {
	display: block;
}

.spec-grid span {
	margin-top: 6px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 800;
}

.spec-grid strong {
	color: var(--green-dark);
	font-size: 14px;
}

.detail-actions {
	display: grid;
	gap: 12px;
	max-width: 500px;
}

.add-cart-form {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 12px;
}

.quantity-control {
	display: grid;
	grid-template-columns: 42px 1fr 42px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
	overflow: hidden;
}

.quantity-control button {
	display: grid;
	place-items: center;
	border: 0;
	background: transparent;
	color: var(--green-dark);
}

.quantity-control input {
	border: 0;
	border-left: 1px solid var(--line);
	border-right: 1px solid var(--line);
	border-radius: 0;
	text-align: center;
}

.quantity-control svg {
	width: 17px;
	height: 17px;
}

.favorite-form .btn {
	width: 100%;
}

.detail-benefits {
	border-top: 1px solid var(--line);
}

.related-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cart-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: start;
}

.cart-items form {
	display: grid;
	gap: 14px;
}

.cart-row {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: 14px;
	align-items: center;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
	box-shadow: 0 12px 30px rgba(9, 44, 39, .07);
}

.cart-cover img {
	width: 88px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--radius);
	background: var(--beige);
}

.cart-info h2 {
	margin: 0 0 4px;
	font-size: 18px;
	color: var(--green-dark);
}

.cart-info p,
.cart-subtotal span,
.cart-quantity label {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
}

.cart-info strong,
.cart-subtotal strong {
	color: var(--green-dark);
}

.cart-quantity,
.cart-subtotal {
	grid-column: 1 / -1;
}

.cart-quantity input {
	max-width: 110px;
}

.remove-button {
	grid-column: 1 / -1;
	color: #8a1f11;
	border-color: #efb8ae;
	background: #fff0ee;
}

.cart-summary {
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
	box-shadow: var(--shadow-card);
}

.cart-summary h2 {
	margin: 0 0 18px;
	font-family: var(--font-display);
	color: var(--green-dark);
}

.summary-line {
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
}

.summary-line span,
.summary-line strong {
	color: var(--muted);
}

.summary-total {
	padding: 18px 0;
	color: var(--green-dark);
}

.summary-total strong {
	font-size: 24px;
}

.admin-shell {
	background: var(--cream);
}

.admin-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--green-dark);
	color: var(--white-warm);
	box-shadow: 0 10px 26px rgba(9, 44, 39, .16);
}

.admin-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 74px;
}

.admin-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
	font-size: 14px;
	font-weight: 800;
}

.admin-nav a {
	color: rgba(255, 253, 248, .8);
}

.admin-main {
	min-height: calc(100vh - 74px);
}

.admin-flash {
	position: static;
	padding: 18px 0 0;
	pointer-events: auto;
}

.admin-section {
	padding: 42px 0 70px;
}

.admin-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 24px;
}

.admin-title-row h1 {
	margin: 0;
	color: var(--green-dark);
	font-size: 40px;
}

.admin-stat-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.admin-stat {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
	box-shadow: 0 12px 28px rgba(9, 44, 39, .08);
}

.admin-stat span,
.admin-stat strong {
	display: block;
}

.admin-stat span {
	margin-top: 12px;
	color: var(--muted);
	font-weight: 800;
}

.admin-stat strong {
	color: var(--green-dark);
	font-size: 34px;
	line-height: 1;
}

.admin-panels {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

.admin-panel,
.admin-table-wrap,
.admin-editor-form,
.admin-login-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white-warm);
	box-shadow: var(--shadow-card);
}

.admin-panel {
	padding: 20px;
}

.panel-heading {
	margin-bottom: 12px;
}

.panel-heading h2 {
	margin: 0;
	color: var(--green-dark);
	font-size: 20px;
}

.mini-list,
.category-admin-list {
	display: grid;
	gap: 10px;
}

.mini-list a,
.category-admin-list a {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 10px;
	border-radius: var(--radius);
	background: var(--cream);
}

.category-admin-list a {
	grid-template-columns: 1fr auto;
}

.mini-list img {
	width: 48px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 6px;
}

.mini-list span,
.category-admin-list span {
	color: var(--green-dark);
	font-weight: 800;
}

.mini-list small {
	display: block;
	color: var(--muted);
	font-weight: 600;
}

.admin-table-wrap {
	overflow-x: auto;
}

.admin-table {
	width: 100%;
	min-width: 860px;
	border-collapse: collapse;
}

.admin-table th,
.admin-table td {
	padding: 14px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: middle;
}

.admin-table th {
	color: var(--green-dark);
	font-size: 13px;
}

.table-book {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 260px;
}

.table-book img {
	width: 48px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 6px;
	background: var(--beige);
}

.table-book span,
.table-book small {
	display: block;
}

.table-book span {
	color: var(--green-dark);
	font-weight: 800;
}

.table-book small {
	color: var(--muted);
	font-weight: 600;
	max-width: 320px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.flag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.flag-list span {
	padding: 4px 7px;
	border-radius: 99px;
	background: var(--cream);
	color: var(--green);
	font-size: 11px;
	font-weight: 800;
}

.table-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.table-actions .icon-button {
	color: var(--green-dark);
	border-color: var(--line);
	background: var(--cream);
}

.table-actions .danger {
	color: #8a1f11;
	background: #fff0ee;
	border-color: #efb8ae;
}

.admin-form {
	display: grid;
	gap: 12px;
}

.admin-editor-form {
	padding: 22px;
}

.form-grid {
	display: grid;
	gap: 14px;
}

.flags-grid {
	align-items: center;
}

.current-image {
	width: 120px;
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--cream);
}

.current-image img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 6px;
}

.current-image.wide-preview {
	width: 220px;
}

.current-image.wide-preview img {
	aspect-ratio: 4 / 3;
}

.single-check {
	width: fit-content;
}

.admin-login-section {
	display: grid;
	place-items: center;
	min-height: calc(100vh - 74px);
	padding: 40px 16px;
}

.admin-login-card {
	width: min(100%, 440px);
	padding: 30px;
}

.admin-login-card h1 {
	margin: 0 0 10px;
	color: var(--green-dark);
	font-size: 34px;
}

.admin-login-card p:not(.eyebrow) {
	margin: 0 0 20px;
	color: var(--muted);
}

.demo-credentials {
	margin-top: 16px;
	padding: 12px;
	border-radius: var(--radius);
	background: var(--cream);
	color: var(--charcoal);
	font-size: 13px;
}

.chatbot-widget {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 80;
	display: grid;
	justify-items: end;
	gap: 12px;
	pointer-events: none;
}

.chatbot-widget > * {
	pointer-events: auto;
}

.chatbot-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 18px;
	border: 1px solid rgba(255, 253, 248, .2);
	border-radius: 999px;
	background: var(--green-dark);
	color: var(--white-warm);
	box-shadow: 0 16px 42px rgba(9, 44, 39, .28);
	font-weight: 900;
	transition: transform .2s ease, background .2s ease;
}

.chatbot-toggle:hover {
	background: var(--green);
	transform: translateY(-2px);
}

.chatbot-toggle svg {
	width: 21px;
	height: 21px;
}

.chatbot-panel {
	display: none;
	width: min(calc(100vw - 32px), 390px);
	overflow: hidden;
	border: 1px solid rgba(255, 253, 248, .32);
	border-radius: var(--radius);
	background: var(--white-warm);
	box-shadow: 0 24px 70px rgba(9, 44, 39, .28);
}

.chatbot-widget.is-open .chatbot-panel {
	display: block;
}

.chatbot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px;
	background: var(--green-dark);
	color: var(--white-warm);
}

.chatbot-header strong,
.chatbot-header span {
	display: block;
}

.chatbot-header strong {
	font-family: var(--font-display);
	font-size: 21px;
	line-height: 1.1;
}

.chatbot-header span {
	color: rgba(255, 253, 248, .72);
	font-size: 12px;
	font-weight: 700;
}

.chatbot-header .icon-button {
	width: 36px;
	height: 36px;
	color: var(--white-warm);
}

.chatbot-messages {
	display: grid;
	gap: 10px;
	max-height: 340px;
	padding: 16px;
	overflow-y: auto;
	background: linear-gradient(180deg, rgba(247, 241, 230, .88), rgba(255, 253, 248, .98));
}

.chatbot-message {
	max-width: 86%;
	padding: 11px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-line;
}

.chatbot-message.bot {
	justify-self: start;
	background: var(--white-warm);
	border: 1px solid var(--line);
	color: var(--charcoal);
}

.chatbot-message.user {
	justify-self: end;
	background: var(--green);
	color: var(--white-warm);
}

.chatbot-message.is-loading {
	color: var(--muted);
}

.chatbot-suggestions {
	display: flex;
	gap: 8px;
	padding: 0 16px 12px;
	overflow-x: auto;
	background: var(--white-warm);
}

.chatbot-suggestions button {
	flex: 0 0 auto;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--cream);
	color: var(--green-dark);
	padding: 8px 11px;
	font-size: 12px;
	font-weight: 800;
}

.chatbot-suggestions button:hover {
	border-color: var(--gold);
	background: var(--white-warm);
}

.chatbot-whatsapp {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 16px 12px;
	min-height: 40px;
	border-radius: var(--radius);
	background: #1f8f4d;
	color: #fff;
	font-weight: 900;
}

.chatbot-whatsapp[hidden] {
	display: none;
}

.chatbot-whatsapp svg {
	width: 17px;
	height: 17px;
}

.chatbot-form {
	display: grid;
	grid-template-columns: 1fr 46px;
	gap: 8px;
	padding: 14px 16px 16px;
	border-top: 1px solid var(--line);
	background: var(--white-warm);
}

.chatbot-form input {
	min-height: 44px;
}

.chatbot-form button {
	display: grid;
	place-items: center;
	border: 0;
	border-radius: var(--radius);
	background: var(--green);
	color: var(--white-warm);
	transition: background .2s ease, transform .2s ease;
}

.chatbot-form button:hover {
	background: var(--green-dark);
	transform: translateY(-1px);
}

.chatbot-form button:disabled {
	opacity: .65;
	cursor: wait;
	transform: none;
}

.chatbot-form svg {
	width: 18px;
	height: 18px;
}

.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .5s ease, transform .5s ease;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (min-width: 640px) {
	.hero-content h1 {
		font-size: 62px;
	}

	.category-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.book-grid,
	.catalog-grid,
	.related-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.benefit-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.newsletter-form {
		grid-template-columns: 1fr auto;
	}

	.cart-row {
		grid-template-columns: 88px 1fr 130px 120px 42px;
	}

	.cart-quantity,
	.cart-subtotal,
	.remove-button {
		grid-column: auto;
	}

	.form-grid.two {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.form-grid.three {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.form-grid.four {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 860px) {
	.nav-toggle {
		display: none;
	}

	.main-nav,
	.header-actions {
		display: flex;
	}

	.hero-section {
		min-height: 690px;
	}

	.category-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.category-tile {
		min-height: 168px;
	}

	.home-book-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.promo-inner {
		grid-template-columns: 1.15fr 1fr;
	}

	.promo-image {
		min-height: 320px;
	}

	.why-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.why-item {
		padding: 28px 26px;
		border-right: 1px solid var(--line);
		border-bottom: 0;
	}

	.why-item:last-child {
		border-right: 0;
	}

	.newsletter-inner {
		grid-template-columns: 1fr minmax(360px, 520px);
	}

	.footer-grid {
		grid-template-columns: 1.4fr .8fr .9fr 1fr;
	}

	.catalog-shell {
		grid-template-columns: 270px 1fr;
	}

	.filters-panel {
		position: sticky;
		top: 104px;
		display: block;
	}

	.mobile-filters {
		display: none;
	}

	.catalog-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.book-detail-layout {
		grid-template-columns: minmax(420px, 1.05fr) .95fr;
	}

	.cart-layout {
		grid-template-columns: 1fr 340px;
	}

	.admin-stat-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.admin-panels {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1120px) {
	.hero-content h1 {
		font-size: 74px;
	}

	.book-detail-info h1 {
		font-size: 54px;
	}
}

@media (max-width: 859px) {
	.main-nav.is-open {
		position: fixed;
		top: 96px;
		left: 16px;
		right: 16px;
		display: grid;
		gap: 0;
		padding: 14px;
		border-radius: var(--radius);
		background: var(--green-dark);
		box-shadow: var(--shadow-card);
	}

	.main-nav.is-open a {
		padding: 13px 10px;
		border-bottom: 1px solid rgba(255, 253, 248, .1);
	}

	.main-nav.is-open a:last-child {
		border-bottom: 0;
	}

	.header-actions {
		position: fixed;
		right: 24px;
		bottom: 24px;
		display: flex;
		padding: 8px;
		border-radius: 99px;
		background: var(--green-dark);
		box-shadow: var(--shadow-card);
		color: var(--white-warm);
	}

	.chatbot-widget {
		right: 16px;
		bottom: 92px;
	}

	.section-heading,
	.admin-title-row,
	.catalog-toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.add-cart-form {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.container {
		width: min(100% - 24px, 1240px);
	}

	.header-inner {
		min-height: 66px;
		padding: 0 12px;
	}

	.brand-mark {
		width: 36px;
		height: 36px;
	}

	.brand svg {
		width: 30px;
		height: 30px;
	}

	.hero-section {
		min-height: 600px;
		padding-top: 128px;
	}

	.hero-content h1 {
		font-size: 44px;
	}

	.page-hero h1,
	.book-detail-info h1,
	.admin-title-row h1 {
		font-size: 34px;
	}

	.section-heading h2,
	.promo-inner h2 {
		font-size: 28px;
	}

	.book-grid,
	.catalog-grid,
	.related-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.book-card-body {
		padding: 12px;
	}

	.btn {
		width: 100%;
	}

	.book-actions .btn {
		width: auto;
	}

	.spec-grid {
		grid-template-columns: 1fr;
	}

	.book-gallery {
		grid-template-columns: 1fr;
	}

	.thumb-rail {
		display: none;
	}

	.admin-nav {
		gap: 8px;
		font-size: 12px;
	}
}

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

	.reveal {
		opacity: 1;
		transform: none;
	}
}
