/* Kalpataru storefront: header, footer, home and shop.
   Loaded after css/style.css (Bookland theme). Brand colours come from the
   theme variables: --primary #EAA451 (orange), --secondary #1a1668 (navy). */

/* ------------------------------------------------------------ page width */
/* Safety net against stray horizontal scroll. "clip" does not create a
   scroll container, so sticky/fixed elements keep working. */
.page-wrapper,
.page-wraper {
	overflow-x: clip;
}

/* ------------------------------------------------------------ header */
.site-header .logo-header img {
	height: auto;
}

/* The theme positions .extra-nav relatively; make the search panel align to
   the header container instead so it never runs off a narrow screen. */
.site-header .extra-nav {
	position: static;
}

.site-header .extra-nav .extra-cell {
	gap: 10px;
}

.site-header .extra-nav .extra-cell > * {
	margin-left: 0;
}

.kp-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	background: var(--rgba-primary-1, rgba(234, 164, 81, .1));
	color: var(--secondary, #1a1668);
	font-size: 17px;
	border: 0;
	cursor: pointer;
	list-style: none;
	transition: background .2s, color .2s;
}

.kp-icon-btn:hover,
.kp-icon-btn:focus-visible,
.kp-search[open] > .kp-icon-btn {
	background: var(--primary, #EAA451);
	color: #fff;
}

.kp-icon-btn::-webkit-details-marker {
	display: none;
}

.kp-cart-count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: #e91e63;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
}

.kp-search-panel {
	position: absolute;
	top: 100%;
	right: 15px;
	width: 360px;
	max-width: calc(100% - 30px);
	padding: 12px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(26, 22, 104, .15);
	z-index: 1000;
}

.kp-search-form {
	display: flex;
	gap: 8px;
	margin: 0;
}

.kp-search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
	color: #222;
	background: #fff;
}

.kp-search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--primary, #EAA451);
	box-shadow: 0 0 0 3px var(--rgba-primary-2, rgba(234, 164, 81, .2));
}

.kp-search-form button {
	flex: 0 0 auto;
	height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--secondary, #1a1668);
	color: #fff;
	font-weight: 600;
}

.kp-search-form button:hover {
	background: var(--primary, #EAA451);
}

/* Search inside the slide-in mobile menu */
.kp-menu-search {
	padding: 0 20px 15px;
}

@media only screen and (max-width: 991px) {
	.site-header .extra-nav .extra-cell > * {
		margin-left: 0;
	}
}

@media only screen and (max-width: 767px) {
	/* The theme hides .extra-nav on phones, which also hid the cart. */
	.site-header .extra-nav {
		display: flex;
		height: 80px;
		padding-left: 0;
	}

	.kp-search-panel {
		left: 15px;
		right: 15px;
		width: auto;
		max-width: none;
	}
}

@media only screen and (max-width: 400px) {
	.site-header .logo-header {
		width: 140px;
	}

	.site-header .extra-nav .extra-cell {
		gap: 6px;
	}

	.kp-icon-btn {
		width: 38px;
		height: 38px;
		font-size: 15px;
	}
}

/* ------------------------------------------------------------ footer */
.site-footer .widget_getintuch a {
	color: inherit;
}

.site-footer .widget_getintuch a:hover {
	color: var(--primary, #EAA451);
}

.kp-whatsapp {
	position: fixed;
	right: 15px;
	bottom: 78px; /* sits above the 50px scroll-to-top button */
	z-index: 998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #25d366;
	color: #fff !important;
	font-size: 26px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
	transition: transform .2s;
}

.kp-whatsapp:hover,
.kp-whatsapp:focus-visible {
	transform: scale(1.08);
	color: #fff;
}

@media only screen and (max-width: 575px) {
	.kp-whatsapp {
		width: 44px;
		height: 44px;
		bottom: 64px; /* scroll-to-top is 40px on phones */
		font-size: 23px;
	}
}

/* ------------------------------------------------------------ home: banner */
.kp-hero {
	width: 100%;
	overflow: hidden;
	background: #f4f4f4;
}

.kp-hero .swiper-slide {
	width: 100%;
}

.kp-hero-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 5;
	object-fit: cover;
}

.kp-hero .swiper-button-next,
.kp-hero .swiper-button-prev {
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.kp-hero .swiper-pagination-bullet-active {
	background: var(--primary, #EAA451);
}

@media only screen and (max-width: 575px) {
	.kp-hero .swiper-button-next,
	.kp-hero .swiper-button-prev {
		display: none;
	}
}

/* ------------------------------------------------------------ home: trust strip */
.kp-trust {
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
	gap: 10px;
	padding: 20px 15px;
	background: #fff;
}

.kp-trust-item {
	flex: 0 1 300px;
	text-align: center;
	margin: 0;
}

.kp-trust-item i {
	font-size: 40px;
	color: #2e9b3a;
	margin-bottom: 8px;
}

.kp-trust-item p {
	margin: 0;
	line-height: 1.5;
}

@media only screen and (max-width: 767px) {
	.kp-trust {
		flex-wrap: nowrap;
		gap: 6px;
		padding: 14px 8px;
		border-bottom: 1px solid #eee;
	}

	.kp-trust-item {
		flex: 1 1 0;
		min-width: 0;
	}

	.kp-trust-item i {
		font-size: 22px;
		margin-bottom: 4px;
	}

	.kp-trust-item p {
		font-size: 11.5px;
		line-height: 1.35;
	}

	.kp-trust-item .kp-trust-sub {
		display: none;
	}
}

/* ------------------------------------------------------------ home: sliders */
.kp-featured {
	overflow: hidden; /* featured slider shows neighbour slides off-screen */
}

.books-wrapper-2 .swiper-slide {
	display: flex;
	justify-content: center;
	align-items: center;
}

.books-card.style-2 .dz-media {
	height: 520px;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.books-card.style-2 .dz-media img {
	max-height: 100%;
	width: auto;
	object-fit: contain;
}

.books-card .dz-media img {
	height: auto;
}

@media only screen and (max-width: 767px) {
	.books-card.style-2 .dz-media {
		height: 360px;
	}
}

/* ------------------------------------------------------------ shop */
.kp-shop-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.kp-shop-head h1 {
	font-size: 28px;
	margin: 0;
}

.kp-shop-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 25px;
}

.kp-shop-tools .kp-search-form {
	flex: 1 1 320px;
}

.kp-shop-tools .kp-tag-form {
	flex: 0 1 220px;
	display: flex;
	gap: 8px;
	margin: 0;
}

.kp-shop-tools .form-select {
	height: 44px;
	border-radius: 8px;
}

.kp-filter-btn {
	display: none;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border: 1px solid var(--secondary, #1a1668);
	border-radius: 8px;
	background: #fff;
	color: var(--secondary, #1a1668);
	font-weight: 600;
}

.kp-filter-btn:hover {
	background: var(--secondary, #1a1668);
	color: #fff;
}

.kp-active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -12px 0 20px;
}

.kp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 20px;
	background: var(--rgba-primary-1, rgba(234, 164, 81, .1));
	color: var(--secondary, #1a1668);
	font-size: 13px;
}

.kp-chip:hover {
	background: var(--rgba-primary-2, rgba(234, 164, 81, .2));
	color: var(--secondary, #1a1668);
}

.kp-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kp-cat-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	color: #444;
}

.kp-cat-list a::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border: 1px solid #bbb;
	border-radius: 50%;
	background: #fff;
}

.kp-cat-list a.active {
	color: var(--secondary, #1a1668);
	font-weight: 600;
}

.kp-cat-list a.active::before {
	border: 5px solid var(--primary, #EAA451);
}

.kp-cat-list a:hover {
	color: var(--primary, #EAA451);
}

.kp-filter-backdrop {
	display: none;
}

.book-card {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 2px 14px rgba(60, 60, 100, .06);
	padding: 16px 16px 12px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: box-shadow .2s;
}

.book-card:hover {
	box-shadow: 0 6px 24px rgba(40, 60, 90, .12);
}

.book-card-img-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 110%;
	background: #f8f9fa;
	border-radius: 7px;
	margin-bottom: 10px;
	overflow: hidden;
}

.book-card-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 7px;
}

.book-card-body {
	margin-bottom: 10px;
}

.book-card-series {
	color: #888;
	margin-bottom: 2px;
}

.book-card-title {
	font-size: 1.08em;
	font-weight: 600;
	margin: 0;
	line-height: 1.35;
}

.book-card-title a {
	color: #222;
	text-decoration: none;
}

.book-card-title a:hover {
	color: var(--primary, #EAA451);
}

.book-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px;
	border-top: 1px solid #eee;
	padding-top: 8px;
	margin-top: 6px;
}

.book-card-price {
	color: #198754;
	font-weight: 700;
	font-size: 1.2em;
	line-height: 1.2;
}

.book-card-price del {
	display: block;
	color: #999;
	font-size: .7em;
	font-weight: 400;
}

.kp-empty {
	padding: 40px 20px;
	text-align: center;
	background: #fafafa;
	border-radius: 10px;
}

@media only screen and (max-width: 1191px) {
	.kp-filter-btn {
		display: inline-flex;
	}

	/* the theme turns .shop-filter into an off-canvas panel at this width */
	.shop-filter .panel-close-btn {
		display: block;
		font-size: 18px;
		color: var(--secondary, #1a1668);
	}

	.kp-filter-backdrop.show {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, .35);
		z-index: 99999999;
	}
}

@media only screen and (max-width: 575px) {
	.kp-shop-head h1 {
		font-size: 22px;
	}

	.kp-shop-tools .kp-search-form {
		flex-basis: 100%;
		order: -1;
	}

	.kp-shop-tools .kp-tag-form {
		flex: 1 1 0;
	}

	.book-grid-row {
		--bs-gutter-x: 12px;
	}

	.book-grid-row > [class*="col-"] {
		margin-bottom: 12px !important;
	}

	.book-card {
		padding: 8px 8px 10px;
	}

	.book-card-img-wrap {
		padding-bottom: 125%;
		margin-bottom: 6px;
	}

	.book-card-title {
		font-size: 13px;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.book-card-series {
		font-size: 11px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.book-card-footer {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.book-card-price {
		font-size: 15px;
	}

	.book-card-footer .btn {
		padding: 6px 4px;
		font-size: 12px;
	}

	.page .pagination {
		flex-wrap: wrap;
		justify-content: center;
	}
}
