/*
Theme Name: Лепнофф
Theme URI: https://lepnoff.ru
Author: Batra
Author URI: https://batra.by
Description: Тема сайта ЛЕПНОФФ без Elementor. Каталог с фильтрами цены, типа продукта и категории.
Version: 1.4.7
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: lepnoff
*/

:root {
	--font: Helvetica, Arial, sans-serif;
	--black: #111;
	--red: #b90000;
	--red-dark: #960000;
	--text: #202020;
	--muted: #666;
	--border: #e6e6e6;
	--page: 1200px;
}

* { box-sizing: border-box; }
html {
	scroll-behavior: smooth;
	margin: 0 !important;
	width: 100%;
	overflow-x: hidden;
	background-color: #fff;
}
html:not(.wp-toolbar) {
	padding-top: 0 !important;
}

body {
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
	font-family: Helvetica, Arial, sans-serif;
	font: 15px/1.5 Helvetica, Arial, sans-serif;
	color: var(--text);
	background-color: #fff;
	background-image: none;
	position: relative;
	isolation: isolate;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: url("assets/lepnoff-content-bg.jpg");
	background-repeat: repeat;
	background-position: top left;
	background-size: 720px auto;
	opacity: 0.2;
}

button, input { font: inherit; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; }

.container,
.lep-wrap {
	width: min(var(--page), calc(100% - 40px));
	margin-inline: auto;
}

/* Header: full viewport width, no top gap */
.top,
.lep-header,
header.top,
header.lep-header {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: #111;
	color: #fff;
	box-sizing: border-box;
	position: relative;
}

/* Break out if a plugin wraps body content in a narrow parent */
body .top.lep-header {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.topline {
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	font-size: 13px;
	gap: 14px;
}

.topline a { font-weight: 700; color: #fff; }

.lep-social {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.lep-soc-link,
.lep-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: transparent;
	flex: none;
}

.lep-soc-link img,
.lep-social img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lep-footer-soc .lep-soc-link {
	width: 36px;
	height: 36px;
}

.navrow,
.lep-header-inner {
	min-height: 113px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 34px;
}

.logo,
.lep-logo-img {
	width: 86px;
	height: 86px;
	object-fit: contain;
	flex: none;
	display: block;
	border-radius: 0;
	background: transparent;
}

.lep-logo { display: inline-flex; }

.nav,
.lep-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	font: 700 14px Helvetica, Arial, sans-serif;
	flex-wrap: wrap;
	justify-content: center;
}

.nav a,
.lep-nav a {
	white-space: nowrap;
	color: #fff;
}

.nav .active,
.nav a:hover,
.lep-nav a.is-current,
.lep-nav a:hover { color: #f44; }

/* Only header cart button - never table.cart / form.cart */
a.lep-cart,
.lep-header a.cart {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--red);
	border: 0;
	border-radius: 12px;
	color: #fff !important;
	font-weight: 700;
	padding: 12px 22px;
	white-space: nowrap;
	text-decoration: none;
}

.lep-cart-icon {
	display: block;
	flex: none;
}

a.lep-cart:hover,
.lep-header a.cart:hover,
.buy:hover,
.apply:hover,
.wc-catalog-filter button:hover { background: var(--red-dark); }

.lep-account {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: #fff;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.35);
}

.hamburger {
	display: none;
	background: none;
	border: 0;
	color: #fff;
	font-size: 27px;
}

.lep-header-tools {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Catalog page */
.main,
.catalog-page { padding-top: 25px; padding-bottom: 28px; }

.crumb,
.breadcrumbs {
	color: #923d48;
	font-size: 13px;
	margin-bottom: 27px;
}

.crumb a,
.breadcrumbs a { color: #923d48; }
.crumb b,
.breadcrumbs span { color: #555; font-weight: 400; }

.title,
.catalog-title {
	font: 700 clamp(28px, 3.2vw, 44px)/1.2 Helvetica, Arial, sans-serif;
	color: #111;
	letter-spacing: -.8px;
	margin: 0 0 12px;
	border: 0;
	padding: 0;
	text-align: left;
	width: auto;
}

.lead,
.catalog-lead {
	font: 14px/1.5 Helvetica, Arial, sans-serif;
	color: #4d4d4d;
	max-width: 1170px;
	margin: 0 0 48px;
	text-align: left;
}

.layout,
.wc-catalog-wrap {
	display: grid;
	grid-template-columns: 265px minmax(0, 1fr);
	gap: 47px;
	align-items: start;
}

.filters,
.wc-catalog-filter { padding-top: 2px; }

.filter-section { margin-bottom: 25px; }

.filter-heading,
.wc-catalog-filter h4 {
	background: none !important;
	border: 0 !important;
	color: #111 !important;
	font: 700 17px/1.35 Helvetica, Arial, sans-serif !important;
	margin: 0 0 10px !important;
	padding: 0 !important;
}

.wc-catalog-filter label,
.filter-section label {
	display: flex;
	align-items: center;
	gap: 7px;
	font: 14px/1.35 Helvetica, Arial, sans-serif;
	color: #333;
	margin: 3px 0;
}

.wc-catalog-filter label input,
.filter-section label input {
	accent-color: var(--red);
	margin: 0;
}

.price-text,
.wc-filter-price-values {
	font: 12px Helvetica, Arial, sans-serif;
	margin: 5px 0 0;
}

.wc-filter-range {
	position: relative;
	height: 8px;
	margin: 12px 0 8px;
	background: #d5d5d5;
	border-radius: 99px;
}

.wc-filter-range .ui-slider-range {
	position: absolute;
	height: 100%;
	background: #c5c5c5;
	border-radius: 99px;
}

.wc-filter-range .ui-slider-handle {
	position: absolute;
	top: -6px;
	width: 18px;
	height: 18px;
	margin-left: -9px;
	border: 2px solid #bbb;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.actions,
.wc-catalog-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 9px;
	margin-top: 8px;
}

.apply,
.wc-catalog-filter button {
	color: #fff;
	background: var(--red);
	font-weight: 700;
	border: 0;
	border-radius: 7px;
	padding: 10px 22px;
	min-width: auto;
}

.reset,
.wc-catalog-reset {
	color: var(--red);
	background: #fff;
	border: 1px solid #cd8f8f;
	border-radius: 7px;
	padding: 8px 19px;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
}

.reset:hover,
.wc-catalog-reset:hover { background: #fff3f3; color: var(--red); }

/* Products */
/* Catalog product grid only - never cart form.products */
.wc-simple-products ul.products,
ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	align-content: start;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wc-simple-products ul.products::before,
.wc-simple-products ul.products::after { content: none !important; display: none !important; }

.product,
.wc-simple-products li.product {
	position: relative;
	float: none !important;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	background: #fff;
	border-radius: 5px;
	box-shadow: 0 3px 16px #00000012;
	overflow: hidden;
	padding: 0 0 11px !important;
	border: 0;
	text-align: left;
}

.photo,
.wc-simple-products li.product a.woocommerce-LoopProduct-link,
.wc-simple-products .woocommerce-loop-product__link {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	position: relative;
	background: #f3f3f3;
}

.photo img,
.wc-simple-products li.product img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .2s;
	border-radius: 0;
}

.product:hover .photo img,
.wc-simple-products li.product:hover img { transform: scale(1.05); }

.tag,
.te-new-badge,
.te-red-label-badge {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	background: var(--red);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 0;
}

.product-info { padding: 5px 7px 0; }

/* Catalog cards only - not cart td.product-name */
.wc-simple-products .product-name,
.wc-simple-products .woocommerce-loop-product__title,
.wc-simple-products h3.woocommerce-loop-product__title,
.wc-simple-products .woocommerce-loop-product__title a {
	display: block !important;
	font: 700 14px/1.22 Helvetica, Arial, sans-serif !important;
	min-height: 52px;
	margin: 8px 7px 0 !important;
	padding: 0 !important;
	color: #111 !important;
	background: none !important;
	text-decoration: none !important;
}

.wc-simple-products .product-name:hover,
.wc-simple-products .woocommerce-loop-product__title a:hover { color: var(--red) !important; }

.cost,
.wc-simple-products .price {
	display: block;
	font-size: 15px !important;
	font-weight: 800 !important;
	margin: 5px 7px 10px !important;
	color: #111 !important;
	background: none !important;
}

.buy,
.wc-simple-products .button,
.wc-simple-products a.button,
.wc-simple-products a.add_to_cart_button {
	display: block !important;
	background: var(--red) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 8px !important;
	text-align: center;
	padding: 9px 7px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	width: calc(100% - 14px) !important;
	margin: 0 7px !important;
	min-width: 0 !important;
}

.wc-simple-products a.added_to_cart { display: none !important; }

.wc-simple-products a.add_to_cart_button.loading {
	opacity: 0.85;
	pointer-events: none;
}

.wc-simple-products a.add_to_cart_button.added,
.wc-simple-products a.add_to_cart_button.lep-added {
	background: #1b1b1b !important;
}

.wc-catalog-empty,
.empty {
	grid-column: 1 / -1;
	padding: 40px;
	border: 1px solid #ddd;
	text-align: center;
	list-style: none;
	color: var(--muted);
}

.pagination,
.wc-catalog-pagination {
	grid-column: 1 / -1;
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 10px;
}

.page,
.wc-catalog-page {
	border: none;
	padding: 8px 13px;
	background: #f2f2f2;
	border-radius: 5px;
	color: #111;
	text-decoration: none;
	min-width: 0;
	height: auto;
}

.page.active,
.wc-catalog-page.is-active {
	background: var(--red) !important;
	color: #fff !important;
}

.page:hover:not(.active),
.wc-catalog-page:hover:not(.is-active) { background: #e5e5e5; }

/* FAQ */
.faq,
.catalog-faq { margin: 68px 0 28px; }

.faq h2,
.catalog-faq h2 {
	font: 700 30px/1.3 Helvetica, Arial, sans-serif;
	color: #111;
	margin: 0 0 26px;
	background: none;
	border: 0;
	padding: 0;
	text-align: left;
	width: auto;
}

.faqgrid,
.faq-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.faq details,
.faq-grid details {
	border: 1px solid #ddd;
	font: 14px Helvetica, Arial, sans-serif;
	background: #fff;
	padding: 0;
	border-radius: 0;
}

.faq summary,
.faq-grid summary {
	cursor: pointer;
	padding: 11px 13px;
	list-style: none;
	font-weight: 400;
}

.faq summary::-webkit-details-marker,
.faq-grid summary::-webkit-details-marker { display: none; }

.faq summary:before,
.faq-grid summary::before {
	content: "+";
	font: 700 20px Helvetica, Arial, sans-serif;
	vertical-align: middle;
	margin-right: 9px;
	color: #111;
	width: auto;
	display: inline;
}

.faq details[open] summary:before,
.faq-grid details[open] summary::before { content: "-"; }

.faq details p,
.faq-grid p {
	padding: 0 14px 12px;
	margin: 0;
	color: #555;
}

/* Footer */
.footer,
.lep-footer {
	display: block;
	width: 100%;
	max-width: none;
	background: #111;
	color: #eee;
	margin-top: 36px;
	margin-left: 0;
	margin-right: 0;
	padding: 45px 0 34px;
	font: 13px/1.6 Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}

body .lep-footer {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.lep-footer a { color: #eee; }

.footgrid,
.lep-footer-grid {
	display: grid;
	grid-template-columns: 1.25fr .65fr 1.3fr;
	gap: 75px;
	padding-bottom: 0;
}

.footbrand img,
.lep-footer .lep-logo-img {
	width: 30px;
	height: 30px;
	object-fit: contain;
	display: block;
	border-radius: 0;
	background: transparent;
}

.footbrand p,
.lep-quote {
	font-weight: bold;
	max-width: 225px;
	margin: 0 0 15px;
	color: #eee;
}

.lep-footer-soc {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}

.footlinks,
.lep-footer-nav {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.footlinks a:hover,
.lep-footer-nav a:hover { color: #ff6262; }

.contact,
.lep-footer-legal p { margin: 0 0 15px; font-size: 12px; }

.legal,
.lep-footer-bottom {
	margin-top: 45px;
	font: 11px Helvetica, Arial, sans-serif;
	border: 0;
	padding: 0;
	color: #aaa;
}

.lep-footer-bottom .lep-wrap,
.legal { display: flex; gap: 18px; flex-wrap: wrap; }
.lep-footer-bottom a { color: #aaa; }

.te-filter-toggle { display: none; }

@media (max-width: 1120px) {
	.nav, .lep-nav { gap: 13px; font-size: 12px; }
	.layout, .wc-catalog-wrap { grid-template-columns: 230px minmax(0, 1fr); gap: 25px; }
	ul.products, .wc-simple-products ul.products { gap: 18px; }
	.wc-simple-products .product-name, .wc-simple-products .woocommerce-loop-product__title { font-size: 12px !important; }
	.buy, .wc-simple-products .button { font-size: 12px !important; }
	.footgrid, .lep-footer-grid { gap: 35px; }
}

@media (max-width: 850px) {
	.navrow, .lep-header-inner { min-height: 85px; gap: 12px; }
	.logo, .lep-logo-img { height: 64px; width: 64px; }
	.lep-header-tools { margin-left: auto; }
	.hamburger {
		display: block;
		flex: none;
		order: 3;
		width: 42px;
		height: 42px;
		padding: 0;
		border: 0;
		line-height: 1;
	}
	.nav, .lep-nav {
		display: flex;
		position: absolute;
		z-index: 30;
		top: 100%;
		left: 0;
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		box-sizing: border-box;
		background: #191919;
		padding: 0 20px;
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		font: 700 16px Helvetica, Arial, sans-serif;
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(-12px);
		transition:
			max-height .32s ease,
			opacity .24s ease,
			transform .32s ease,
			padding .32s ease,
			visibility 0s linear .32s;
	}
	.nav.open, .lep-nav.open {
		max-height: 420px;
		opacity: 1;
		padding: 18px 20px;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
		transition:
			max-height .32s ease,
			opacity .24s ease,
			transform .32s ease,
			padding .32s ease,
			visibility 0s linear 0s;
	}
	.layout, .wc-catalog-wrap { grid-template-columns: 1fr; }
	ul.products, .wc-simple-products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.faqgrid, .faq-grid, .footgrid, .lep-footer-grid { grid-template-columns: 1fr 1fr; }
	.te-filter-toggle {
		display: flex;
		justify-content: space-between;
		width: 100%;
		margin-bottom: 10px;
		padding: 10px 14px;
		border: 0;
		border-radius: 10px;
		background: var(--red);
		color: #fff;
		font-weight: 700;
	}
	.wc-catalog-wrap:not(.is-filter-open) .wc-catalog-filter { display: none; }
}

@media (max-width: 570px) {
	.container, .lep-wrap { width: min(100% - 28px, var(--page)); }
	.topline { height: 35px; }
	ul.products, .wc-simple-products ul.products { gap: 14px; }
	.faq, .catalog-faq { margin-top: 45px; }
	.faq h2, .catalog-faq h2 { font-size: 24px; }
	.faqgrid, .faq-grid { grid-template-columns: 1fr; }
	.footgrid, .lep-footer-grid { grid-template-columns: 1fr; gap: 24px; }
	.footer, .lep-footer { padding-top: 28px; }
}
