/*
 * Bookle — WordPress integration layer.
 *
 * Purely ADDITIVE styles that map WordPress core output (widgets, blocks,
 * comments, pagination, WooCommerce elements) onto the original design.
 * The original main.css is never modified, so the design stays pixel-perfect.
 */

/* ---------------------------------------------------------------------
 * 1. Accessibility helpers.
 * ------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--white);
	clip-path: none;
	color: var(--theme);
	display: block;
	font-size: 14px;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	left: -9999rem;
	position: absolute;
	top: 2.5rem;
	z-index: 999999999;
}

.skip-link:focus {
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	display: block;
	font-size: 14px;
	font-weight: 600;
	height: auto;
	left: 6px;
	line-height: normal;
	padding: 15px 23px 14px;
	top: 7px;
	width: auto;
	background: var(--white);
	color: var(--theme);
}

/* Keyboard focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--theme2);
	outline-offset: 2px;
}

/* Honeypot field — visually removed, still in the DOM for bots. */
.bookle-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * 2. WordPress core classes (required).
 * ------------------------------------------------------------------- */
.alignleft {
	float: left;
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

.alignwide {
	margin-left: -100px;
	margin-right: -100px;
	max-width: none;
}

.alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

@media (max-width: 1399px) {
	.alignwide {
		margin-left: 0;
		margin-right: 0;
	}
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8em 0;
	font-size: 14px;
	color: var(--text);
	text-align: center;
}

.gallery {
	display: grid;
	grid-gap: 1.5em;
	margin-bottom: 1.5em;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }

.gallery-caption {
	display: block;
	font-size: 13px;
}

.sticky .news-content h3 a::after {
	content: "\f08d";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 14px;
	margin-left: 8px;
	color: var(--theme2);
}

.bypostauthor {
	display: block;
}

.entry-content img {
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------
 * 3. Block editor (Gutenberg) front-end harmonization.
 * ------------------------------------------------------------------- */
.entry-content > * + * {
	margin-top: 1.25em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin-top: 1.4em;
	margin-bottom: 0.6em;
}

.entry-content ul:not([class]),
.entry-content ol:not([class]) {
	padding-left: 1.4em;
	color: var(--text);
}

.entry-content ul:not([class]) li {
	list-style: disc;
	margin-bottom: 0.4em;
}

.entry-content ol:not([class]) li {
	list-style: decimal;
	margin-bottom: 0.4em;
}

.entry-content blockquote,
.wp-block-quote {
	background-color: var(--bg2);
	border-left: 4px solid var(--theme);
	border-radius: 10px;
	padding: 30px 40px;
	font-weight: 500;
	color: var(--header);
}

.wp-block-quote cite {
	display: block;
	margin-top: 12px;
	font-size: 14px;
	font-style: normal;
	color: var(--theme);
}

.wp-block-button__link,
.entry-content .wp-block-button__link {
	background-color: var(--theme);
	color: var(--white);
	border-radius: 100px;
	padding: 16px 34px;
	font-weight: 700;
	transition: all 0.4s ease-in-out;
}

.wp-block-button__link:hover {
	background-color: var(--theme2);
	color: var(--white);
}

.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--theme);
	color: var(--theme);
}

.wp-block-table table,
.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-table td,
.wp-block-table th,
.entry-content table td,
.entry-content table th {
	border: 1px solid var(--border-2);
	padding: 10px 14px;
}

.wp-block-separator {
	border-color: var(--border-2);
}

.wp-block-cover,
.wp-block-embed {
	margin-bottom: 1.5em;
}

.page-links {
	clear: both;
	margin: 24px 0;
	font-weight: 600;
}

.page-links a,
.page-links > span:not(.screen-reader-text) {
	display: inline-block;
	min-width: 36px;
	height: 36px;
	line-height: 36px;
	text-align: center;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--bg2);
	color: var(--header);
}

.page-links > span:not(.screen-reader-text) {
	background: var(--theme);
	color: var(--white);
}

/* ---------------------------------------------------------------------
 * 4. Widgets: default core widgets inside the design's sidebar shells.
 * ------------------------------------------------------------------- */
.single-sidebar-widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-sidebar-widget ul li {
	margin-bottom: 12px;
	color: var(--text);
}

.single-sidebar-widget ul li:last-child {
	margin-bottom: 0;
}

.single-sidebar-widget ul li a {
	color: inherit;
	transition: all 0.3s ease-in-out;
}

.single-sidebar-widget ul li a:hover {
	color: var(--theme);
}

.news-widget-categories ul li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: var(--bg2);
	padding: 13px 20px;
	border-radius: 8px;
	font-weight: 600;
}

.news-widget-categories ul li:hover,
.news-widget-categories ul li.active {
	background-color: var(--theme);
}

.news-widget-categories ul li:hover a,
.news-widget-categories ul li:hover span,
.news-widget-categories ul li.active a,
.news-widget-categories ul li.active span {
	color: var(--white);
}

/* Tag cloud (core + widget block) in the design pill style */
.news-widget-categories a.tag-cloud-link,
.single-sidebar-widget .wp-block-tag-cloud a,
.single-footer-widget .tagcloud a {
	display: inline-block;
	background-color: var(--bg2);
	color: var(--text);
	padding: 8px 16px;
	border-radius: 6px;
	margin: 0 6px 10px 0;
	font-size: 14px !important;
	font-weight: 600;
	transition: all 0.3s ease-in-out;
}

.news-widget-categories a.tag-cloud-link:hover,
.single-sidebar-widget .wp-block-tag-cloud a:hover {
	background-color: var(--theme);
	color: var(--white);
}

/* Built-in search form inside the sidebar shell */
.search-widget form.bookle-searchform,
.single-sidebar-widget form.bookle-searchform {
	position: relative;
}

.search-widget form.bookle-searchform input,
.single-sidebar-widget form.bookle-searchform input {
	width: 100%;
	border: none;
	background-color: var(--bg2);
	padding: 18px 20px;
	border-radius: 8px;
}

.search-widget form.bookle-searchform button,
.single-sidebar-widget form.bookle-searchform button {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: var(--header);
}

/* Footer widget area: core widgets adopt the design's typography */
.single-footer-widget .wp-block-group__inner-container > h2,
.single-footer-widget .widget-title {
	color: var(--white);
	font-size: 20px;
	margin-bottom: 20px;
}

.single-footer-widget ul li a {
	color: inherit;
}

.single-footer-widget select {
	width: 100%;
	padding: 10px;
	border-radius: 6px;
}

/* Calendar widget readability on dark footer */
.single-footer-widget .wp-calendar-table caption,
.single-footer-widget .wp-calendar-table td,
.single-footer-widget .wp-calendar-table th,
.single-footer-widget .wp-calendar-nav {
	color: #cfd8e3;
}

/* ---------------------------------------------------------------------
 * 5. Pagination (paginate_links → .page-nav-wrap design).
 * ------------------------------------------------------------------- */
.page-nav-wrap ul li {
	display: inline-block;
}

.page-nav-wrap ul li span.page-numbers.current {
	display: inline-block;
	background-color: var(--theme);
	color: var(--white);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	line-height: 50px;
	text-align: center;
	font-weight: 600;
}

.page-nav-wrap ul li span.page-numbers.dots {
	display: inline-block;
	width: 50px;
	text-align: center;
}

/* ---------------------------------------------------------------------
 * 6. Comments.
 * ------------------------------------------------------------------- */
.comment-list .children {
	margin-left: 60px;
}

@media (max-width: 767px) {
	.comment-list .children {
		margin-left: 20px;
	}
}

.blog-single-comment .image img {
	border-radius: 50%;
	max-width: 80px;
	height: auto;
}

.blog-single-comment .content {
	flex: 1;
}

.comment-form .form-clt span {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	color: var(--header);
}

.comment-form .logged-in-as,
.comment-form .comment-notes {
	margin-bottom: 16px;
	color: var(--text);
	font-size: 14px;
}

.comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 4px 0 8px;
	color: var(--text);
	font-size: 14px;
}

.comment-form-cookies-consent input {
	width: auto;
}

.comments-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	margin: 20px 0;
}

/* Notices from the built-in contact/newsletter forms */
.bookle-form-notice {
	padding: 14px 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-weight: 600;
}

.bookle-form-notice.success {
	background: #e7f6ee;
	color: #17714b;
}

.bookle-form-notice.error {
	background: #fdecec;
	color: #b42323;
}

.bookle-section-note {
	padding: 20px;
	background: var(--bg2);
	border-radius: 8px;
	text-align: center;
	margin: 0 0 30px;
}

/* ---------------------------------------------------------------------
 * 7. Menus: fallback page list + footer menu.
 * ------------------------------------------------------------------- */
.main-menu nav > ul > li.page_item > a,
.main-menu nav > ul > li > a {
	text-transform: capitalize;
}

.footer-menu ul.footer-links {
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu ul.footer-links li a {
	color: #cfd8e3;
	transition: color 0.3s ease-in-out;
}

.footer-menu ul.footer-links li a:hover {
	color: var(--white);
}

/* Keyboard access: mirror the :hover submenu reveal for focus */
.header-main .main-menu ul li.focus-within > .submenu,
.header-main .main-menu ul li:focus-within > .submenu {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
}

.header-main .main-menu ul li .submenu li.focus-within > .submenu,
.header-main .main-menu ul li .submenu li:focus-within > .submenu {
	transform: translateY(1%);
	visibility: visible;
	opacity: 1;
}

/* Admin-bar offset for the fixed sticky header */
.admin-bar .sticky-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .sticky-header {
		top: 46px;
	}
}

/* ---------------------------------------------------------------------
 * 8. WooCommerce glue — shop toolbar, ratings, single product, cart,
 *    checkout, account — mapped onto the design tokens.
 * ------------------------------------------------------------------- */
.bookle-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 30px;
}

.bookle-shop-toolbar .woocommerce-result-count {
	margin: 0;
	color: var(--text);
}

.bookle-shop-toolbar .form-clt {
	display: flex;
	align-items: center;
	gap: 12px;
}

.bookle-products {
	margin-bottom: 20px;
}

.bookle-products .shop-box-items {
	height: 100%;
}

/* Woo pagination inherits the theme pagination look */
.woocommerce-pagination {
	text-align: center;
	margin-top: 30px;
}

.woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
	display: inline-block;
	min-width: 50px;
	height: 50px;
	line-height: 50px;
	text-align: center;
	border-radius: 50%;
	background: var(--bg2);
	color: var(--header);
	font-weight: 600;
	transition: all 0.3s ease-in-out;
	padding: 0 14px;
}

.woocommerce-pagination ul.page-numbers li a:hover,
.woocommerce-pagination ul.page-numbers li span.current {
	background: var(--theme);
	color: var(--white);
}

/* Star ratings */
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
	color: #f39f5f;
}

/* Buttons — every Woo button becomes a theme button */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order,
.wc-block-components-button {
	background-color: var(--theme);
	color: var(--white);
	border-radius: 100px;
	padding: 14px 30px;
	font-weight: 700;
	transition: all 0.4s ease-in-out;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #payment #place_order:hover {
	background-color: var(--theme2);
	color: var(--white);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background-color: var(--theme2);
	color: var(--white);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background-color: var(--header);
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--theme);
	background-color: var(--bg2);
	border-radius: 8px;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--theme);
}

/* Single product */
.shop-details-section div.product .product_title {
	color: var(--header);
	font-weight: 700;
	margin-bottom: 12px;
}

.shop-details-section div.product p.price,
.shop-details-section div.product span.price {
	color: var(--theme2);
	font-size: 24px;
	font-weight: 700; padding:20px 0;
}

.shop-details-section div.product p.price del,
.shop-details-section div.product span.price del {
	color: var(--text);
	font-size: 18px;
	opacity: 0.6;
}

.shop-details-section div.product form.cart div.quantity .qty {
	border: 1px solid var(--border-2);
	border-radius: 6px;
  height: 44px;
  width: 98px;
  color: #000;
  padding: 10px;
}

.shop-details-section div.product .woocommerce-tabs ul.tabs li {
	background: var(--bg2);
	border: none;
	border-radius: 8px 8px 0 0;
}

.shop-details-section div.product .woocommerce-tabs ul.tabs li.active {
	background: var(--white);
}

.shop-details-section div.product .woocommerce-tabs ul.tabs::before {
	border-color: var(--border-2);
}

.shop-details-section .related.products > h2,
.shop-details-section .upsells.products > h2 {
	font-size: 32px;
	color: var(--header);
	margin-bottom: 24px;
}

.shop-details-section .onsale {
	background-color: var(--theme2);
	border-radius: 100px;
	padding: 4px 14px;
	min-height: 0;
	line-height: 1.6;
}

/* Cart & checkout tables/forms */
.woocommerce table.shop_table {
	border: 1px solid var(--border-2);
	border-radius: 10px;
}

.woocommerce table.shop_table th {
	color: var(--header);
}

.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
	border-color: var(--border-2);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text {
	background-color: var(--bg2);
	border: none;
	border-radius: 8px;
	padding: 14px 18px;
}

.woocommerce form.checkout h3,
.woocommerce-account h2 {
	color: var(--header);
}

/* Account navigation */
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
	margin-bottom: 8px;
}

.woocommerce-MyAccount-navigation ul li a {
	display: block;
	background: var(--bg2);
	border-radius: 8px;
	padding: 12px 20px;
	font-weight: 600;
	color: var(--header);
	transition: all 0.3s ease-in-out;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
	background: var(--theme);
	color: var(--white);
}

/* Shop sidebar: core WC widgets adopt the design shell */
.main-sidebar .woocommerce.widget_product_search form,
.main-sidebar .wc-block-product-search__fields {
	position: relative;
}

.main-sidebar .woocommerce.widget_product_search input[type="search"] {
	width: 100%;
	border: none;
	background-color: var(--bg2);
	padding: 18px 20px;
	border-radius: 8px;
}

.main-sidebar .woocommerce.widget_product_search button {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: var(--theme);
	color: var(--white);
	border-radius: 6px;
	padding: 10px 14px;
}

.main-sidebar .widget_product_categories ul li {
	background-color: var(--bg2);
	padding: 12px 18px;
	border-radius: 8px;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
}

.main-sidebar .widget_price_filter .ui-slider .ui-slider-range,
.main-sidebar .widget_price_filter .ui-slider .ui-slider-handle {
	background-color: var(--theme);
}

.main-sidebar .widget_price_filter .price_slider_wrapper .ui-widget-content {
	background-color: var(--border-3);
}

/* ---------------------------------------------------------------------
 * 9. Misc parity details.
 * ------------------------------------------------------------------- */
/* wp_list_categories count wrapped by the theme filter */
.news-widget-categories ul li .cat-count {
	color: inherit;
}

/* Avatar in product card author row */
.author-post .authot-list .thumb img.avatar {
	border-radius: 50%;
	width: 30px;
	height: 30px;
}

/* Front page content section spacing */
.front-page-content .entry-content > *:first-child {
	margin-top: 0;
}

/* Full width template */
.full-width-content .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* RTL logical fixes */
[dir="rtl"] .alignleft {
	float: right;
	margin-left: 1.5em;
	margin-right: 0;
}

[dir="rtl"] .alignright {
	float: left;
	margin-right: 1.5em;
	margin-left: 0;
}
