/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

@media (min-width: 1025px) {
	.whb-top-bar .whb-top-bar-inner {
		justify-content: center;
	}

	.whb-top-bar .whb-col-left {
		flex: 1 1 100%;
		max-width: 100%;
		justify-content: center;
		text-align: center;
	}

	.whb-top-bar .wd-header-text {
		text-align: center;
	}

	.whb-top-bar .semelika-viber-top-button {
		display: inline-flex;
		margin-left: 10px;
		padding: 3px 10px;
		border: 1px solid rgba(255, 255, 255, 0.62);
		border-radius: 999px;
		color: #fff;
		font-size: 11px;
		line-height: 1.2;
		text-decoration: none;
	}

	.whb-top-bar .semelika-viber-top-button:hover {
		background: rgba(255, 255, 255, 0.12);
		color: #fff;
		text-decoration: none;
	}

	.whb-top-bar .whb-col-center,
	.whb-top-bar .whb-col-right {
		display: none;
	}
}

.semelika-mobile-viber-bar {
	display: none;
}

/* Home page title banner like inner pages. */
.page-id-4179 .semelika-home-title-banner {
	--wd-title-sp: 15px;
	--wd-title-font-s: 36px;
	position: relative;
	margin-block: -40px 40px;
	padding-block: var(--wd-title-sp);
	background-size: cover;
	background-position: center center;
	overflow: hidden;
}

.page-id-4179 .semelika-home-title-banner .container {
	position: relative;
	z-index: 1;
	margin-bottom: -10px;
	text-align: center;
}

.page-id-4179 .semelika-home-title-banner .container > * {
	margin-bottom: 10px;
}

.page-id-4179 .semelika-home-title-banner .entry-title {
	max-width: 780px;
	margin-inline: auto;
	color: #111;
	font-size: clamp(30px, 5.4vw, var(--wd-title-font-s));
	line-height: 1.2;
	text-shadow: none;
}

.page-id-4179 .semelika-home-title-banner__slogan {
	display: inline-block;
	max-width: 520px;
	margin-inline: auto;
	padding: 7px 18px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.78);
	color: #111;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
	box-shadow: 0 5px 18px rgba(45, 36, 24, 0.08);
}

.page-id-4179 .semelika-home-title-banner .breadcrumbs,
.page-id-4179 .semelika-home-title-banner .breadcrumbs a,
.page-id-4179 .semelika-home-title-banner .breadcrumbs span,
.page-id-4179 .semelika-home-title-banner .breadcrumbs .current {
	color: #111;
	text-shadow: none;
}

@media (min-width: 1025px) {
	.page-id-4179 .semelika-home-title-banner.title-size-small {
		--wd-title-sp: 20px;
		--wd-title-font-s: 44px;
	}

	.page-id-4179 .semelika-home-title-banner.title-size-default {
		--wd-title-sp: 60px;
		--wd-title-font-s: 68px;
	}

	.page-id-4179 .semelika-home-title-banner.title-size-large {
		--wd-title-sp: 100px;
		--wd-title-font-s: 78px;
	}
}

@media (max-width: 768px) {
	.page-id-4179 .semelika-home-title-banner {
		background-position: center center;
		background-size: auto 100%;
	}

	.page-id-4179 .semelika-home-title-banner .entry-title {
		max-width: 330px;
		font-size: 28px;
		line-height: 1.15;
	}

	.page-id-4179 .semelika-home-title-banner__slogan {
		max-width: 300px;
		padding: 6px 14px;
		font-size: 14px;
		line-height: 1.3;
	}

	.page-id-4179 .elementor-element-3a0e619 {
		display: grid !important;
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 14px 10px;
		justify-items: stretch;
	}

	.page-id-4179 .elementor-element-3a0e619 > .elementor-widget-image-box {
		width: 100% !important;
		grid-column: span 2;
	}

	.page-id-4179 .elementor-element-3a0e619 > .elementor-widget-image-box:nth-child(4) {
		grid-column: 2 / span 2;
	}

	.page-id-4179 .elementor-element-3a0e619 > .elementor-widget-image-box:nth-child(5) {
		grid-column: 4 / span 2;
	}

	.page-id-4179 .elementor-element-3a0e619 .elementor-widget-container {
		min-height: 158px;
		padding: 14px 8px 12px;
	}

	.page-id-4179 .elementor-element-3a0e619 .elementor-image-box-img {
		margin-bottom: 8px;
	}

	.page-id-4179 .elementor-element-3a0e619 .elementor-image-box-img img {
		width: 58px;
		height: 58px;
		object-fit: contain;
	}

	.page-id-4179 .elementor-element-3a0e619 .elementor-image-box-title {
		margin: 0;
		font-size: 10px;
		line-height: 1.2;
		overflow-wrap: anywhere;
	}
}

@media (max-width: 1024px) {
	.semelika-mobile-viber-bar {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 7px 12px;
		background: #1f1f1f;
		color: #fff;
		text-align: center;
	}

	.semelika-mobile-viber-bar__text {
		max-width: 235px;
		font-size: 11px;
		font-weight: 600;
		line-height: 1.25;
	}

	.semelika-mobile-viber-bar__button {
		flex: 0 0 auto;
		padding: 5px 10px;
		border: 1px solid rgba(255, 255, 255, 0.7);
		border-radius: 999px;
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		line-height: 1;
		text-decoration: none;
	}

	.semelika-mobile-viber-bar__button:hover {
		color: #fff;
		text-decoration: none;
	}
}

@media (max-width: 380px) {
	.semelika-mobile-viber-bar {
		gap: 6px;
		padding-inline: 8px;
	}

	.semelika-mobile-viber-bar__text {
		max-width: 200px;
		font-size: 10px;
	}

	.semelika-mobile-viber-bar__button {
		padding-inline: 8px;
		font-size: 10px;
	}
}

/* Hide old large Elementor image card on home. */
.page-id-4179 .elementor-element-4e19811 {
	display: none !important;
}

/* Auto catalog cards: inserted in the same Elementor slot as the old static grid. */
.page-id-4179 .semelika-category-cards-wrap {
	margin: 0;
	padding: 0;
}

.page-id-4179 .semelika-category-cards {
	display: grid;
	grid-template-columns: repeat(var(--semelika-category-columns, 4), minmax(0, 1fr));
	gap: 34px 20px;
}

.page-id-4179 .semelika-category-card {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.page-id-4179 .semelika-category-card:hover {
	color: inherit;
	text-decoration: none;
}

.page-id-4179 .semelika-category-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f5f5f1;
}

.page-id-4179 .semelika-category-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.semelika-missing-image-placeholder {
	background: #f5f5f1;
	object-fit: contain;
}

.page-id-4179 .semelika-category-card__title {
	margin: 12px 0 0;
	padding: 0 6px;
	color: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: uppercase;
}

.page-id-4179 .semelika-category-card__count {
	margin-top: 4px;
	color: #777;
	font-size: 14px;
	line-height: 1.2;
}

/* The generated grid replaces this old static Elementor category block. */
.page-id-4179 .elementor-element-b2ea47a {
	display: none !important;
}

/* Remove map widgets globally when Elementor content cannot be edited. */
.elementor-widget-google_maps,
.elementor-widget-wd_google_map,
.wd-google-map,
.wd-map,
iframe[src*="api-maps.yandex.ru"],
iframe[src*="yandex"][src*="map"],
iframe[src*="maps.google"],
iframe[src*="google.com/maps"] {
	display: none !important;
}

@supports selector(:has(*)) {
	.elementor-widget-html:has(> .elementor-widget-container:empty),
	.elementor-widget-html:has(> .elementor-widget-container script[src*="api-maps.yandex.ru"]),
	.elementor-widget-html:has(> .elementor-widget-container script[src*="yandex"][src*="map"]) {
		display: none !important;
	}
}

/* Remove the header "Browse categories" opener and the category selector from search. */
.whb-header .wd-header-cats,
.whb-header .wd-search-cat,
.whb-header .wd-dropdown-search-cat {
	display: none !important;
}

.whb-header .searchform {
	--wd-search-cat-w: 0px;
}

.whb-header .whb-general-header .whb-col-right {
	flex: 0 0 auto;
	margin-left: clamp(28px, 5vw, 70px);
}

.whb-header .wd-header-secondary-nav {
	text-align: left;
}

.semelika-table-image-layout {
	display: grid;
	width: min(100%, 1220px);
	margin: 0 auto 50px;
	padding: 0 clamp(15px, 3vw, 30px);
	box-sizing: border-box;
	align-items: stretch;
	grid-template-columns: minmax(420px, 560px) minmax(420px, 620px);
	gap: clamp(24px, 3vw, 46px);
}

.entry-content .e-con-inner > .semelika-table-image-layout {
	flex: 1 1 100%;
}

.semelika-table-image-layout__table {
	width: 100%;
	max-width: 560px;
	overflow: visible;
}

.semelika-table-image-layout__table table {
	width: 100% !important;
	max-width: none !important;
	table-layout: fixed;
}

.semelika-table-image-layout__image {
	width: 100%;
	max-width: 620px;
	min-height: 100%;
}

.semelika-table-image-layout__image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 320px;
	max-width: 100%;
	object-fit: contain;
}

.semelika-table-image-layout__image figure,
.semelika-table-image-layout__image .elementor-widget-container,
.semelika-table-image-layout__image .elementor-widget-image {
	height: 100%;
}

.semelika-table-image-layout__image figcaption,
.semelika-table-image-layout__image .widget-image-caption {
	display: none !important;
}

.semelika-table-image-layout .site-table td,
.semelika-table-image-layout .site-table th {
	overflow-wrap: anywhere;
	word-break: normal;
}

.semelika-table-image-layout .site-table .label {
	width: 38%;
	white-space: normal;
}

.semelika-table-image-empty {
	display: none !important;
}

/* Compact product images on single product pages. */
.single-product .single-product-page .woocommerce-product-gallery {
	--wd-thumbs-width: 96px;
}

.single-product .single-product-page .wd-gallery-images .wd-carousel-item,
.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image,
.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image > a {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image img:not(.zoomImg),
.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image--placeholder img:not(.zoomImg) {
	width: auto !important;
	max-width: 100%;
	max-height: 520px;
	max-height: min(520px, 62vh);
	object-fit: contain;
}

.single-product .single-product-page .wd-gallery-thumb img {
	object-fit: contain;
	background: #fff;
}

@media (min-width: 1025px) {
	.single-product .single-product-page:not(.image-full-width) .product-image-summary-inner > .product-images {
		flex: 0 0 40%;
		max-width: 40%;
	}

	.single-product .single-product-page:not(.image-full-width) .product-image-summary-inner > .summary.entry-summary {
		flex: 0 0 60%;
		max-width: 60%;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image img:not(.zoomImg),
	.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image--placeholder img:not(.zoomImg) {
		max-height: 440px;
		max-height: min(440px, 58vh);
	}
}

@media (max-width: 768px) {
	.single-product .single-product-page .woocommerce-product-gallery {
		--wd-thumbs-width: 82px;
	}

	.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image img:not(.zoomImg),
	.single-product .single-product-page .wd-gallery-images .woocommerce-product-gallery__image--placeholder img:not(.zoomImg) {
		max-height: 360px;
		max-height: min(360px, 55vh);
	}
}

.semelika-reviews-page {
	width: min(100%, 1180px);
	margin: 0 auto 70px;
	padding: 0 clamp(15px, 3vw, 30px);
	box-sizing: border-box;
}

.semelika-reviews-hero {
	max-width: 760px;
	margin: 0 auto 38px;
	text-align: center;
}

.semelika-reviews-kicker {
	margin: 0 0 10px;
	color: #5f8f00;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.semelika-reviews-hero h2 {
	margin: 0 0 14px;
	color: #2d2418;
	font-size: clamp(28px, 4vw, 46px);
	line-height: 1.12;
}

.semelika-reviews-hero p {
	margin: 0;
	color: #68645f;
	font-size: 17px;
	line-height: 1.6;
}

.semelika-reviews-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.semelika-review-card {
	min-height: 250px;
	padding: 30px 28px;
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.11);
}

.semelika-review-card--empty {
	grid-column: 1 / -1;
	min-height: 0;
	text-align: center;
}

.semelika-review-card__stars {
	margin-bottom: 18px;
	color: #f4c900;
	font-size: 18px;
	letter-spacing: 0.1em;
}

.semelika-review-card__text {
	margin: 0 0 22px;
	color: #2d2a27;
	font-size: 17px;
	line-height: 1.55;
}

.semelika-review-card__author {
	margin: 0;
	color: #5f8f00;
	font-weight: 700;
}

.semelika-reviews-cta {
	margin-top: 32px;
	padding: 32px;
	border-radius: 15px;
	background: linear-gradient(135deg, #f7f5ed 0%, #ffffff 100%);
	text-align: center;
	box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.08);
}

.semelika-reviews-cta h3 {
	margin: 0 0 10px;
	color: #2d2418;
	font-size: 28px;
}

.semelika-reviews-cta p {
	margin: 0 0 20px;
	color: #68645f;
}

.semelika-reviews-button {
	background-color: #5f8f00 !important;
	color: #fff !important;
}

.semelika-review-notice {
	margin: 0 auto 28px;
	padding: 16px 20px;
	max-width: 760px;
	border-radius: 12px;
	text-align: center;
	font-weight: 600;
}

.semelika-review-notice--success {
	background: #edf7df;
	color: #426a00;
}

.semelika-review-notice--error {
	background: #fff1ec;
	color: #9b3218;
}

.semelika-review-form-wrap {
	text-align: left;
}

.semelika-review-form-wrap h3,
.semelika-review-form-wrap > p {
	text-align: center;
}

.semelika-review-form {
	display: grid;
	gap: 14px;
	max-width: 720px;
	margin: 24px auto 0;
}

.semelika-review-form__label {
	margin: 0;
	color: #2d2418;
	font-weight: 700;
}

.semelika-review-form select,
.semelika-review-form textarea {
	width: 100%;
	border: 1px solid #e5e0d6;
	border-radius: 10px;
	background: #fff;
	color: #2d2a27;
	font-size: 16px;
}

.semelika-review-form textarea {
	min-height: 160px;
	resize: vertical;
}

.semelika-review-form button {
	justify-self: center;
	margin-top: 8px;
}

@supports selector(:has(*)) {
	.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) {
		display: grid !important;
		width: min(100%, 1180px);
		margin: 0 auto 40px;
		align-items: start;
		grid-template-columns: minmax(0, 680px) minmax(260px, 520px);
		gap: clamp(20px, 4vw, 56px);
	}

	.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) > .e-con-full:has(table.site-table),
	.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) > .e-con-full:has(.elementor-widget-image) {
		width: auto;
		max-width: 100%;
	}

	.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) > .e-con-full:has(.elementor-widget-image) {
		display: flex;
		flex-direction: column;
	}

	.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) .elementor-widget-image {
		order: -1;
	}

	.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) .elementor-widget-image img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}
}

@media (max-width: 900px) {
	.semelika-table-image-layout {
		grid-template-columns: 1fr;
	}

	.products.wd-cats,
	.products.wd-products {
		--wd-col: 3 !important;
		--wd-col-lg: 3 !important;
		--wd-col-md: 3 !important;
		--wd-col-sm: 3 !important;
		--wd-gap: 12px !important;
		--wd-gap-lg: 12px !important;
		--wd-gap-md: 12px !important;
		--wd-gap-sm: 12px !important;
	}

	.products.wd-cats .wd-cat .wd-entities-title,
	.products.wd-products .wd-entities-title {
		font-size: 12px;
		line-height: 1.25;
	}

	.products.wd-cats .wd-cat .more-products,
	.products.wd-products .price,
	.products.wd-products .wd-product-cats {
		font-size: 11px;
		line-height: 1.2;
	}

	.semelika-reviews-grid {
		grid-template-columns: 1fr;
	}

	.semelika-table-image-layout__table,
	.semelika-table-image-layout__image {
		width: 100%;
		max-width: 100%;
	}

	.semelika-table-image-layout__table {
		overflow-x: auto;
	}

	.semelika-table-image-layout__image {
		min-height: 0;
	}

	.semelika-table-image-layout__image img {
		height: auto;
		min-height: 0;
	}

	@supports selector(:has(*)) {
		.entry-content .e-con-inner:has(table.site-table):has(.elementor-widget-image):not(:has(.semelika-table-image-layout)) {
			grid-template-columns: 1fr;
		}
	}
}

@media (max-width: 768px) {
	.products.wd-cats,
	.products.wd-products {
		--wd-col: 3 !important;
		--wd-col-lg: 3 !important;
		--wd-col-md: 3 !important;
		--wd-col-sm: 3 !important;
		--wd-gap: 10px !important;
		--wd-gap-lg: 10px !important;
		--wd-gap-md: 10px !important;
		--wd-gap-sm: 10px !important;
	}

	.products.wd-cats .wd-cat .wd-entities-title,
	.products.wd-products .wd-entities-title {
		font-size: 11px;
	}

	.products.wd-cats .wd-cat .more-products,
	.products.wd-products .price,
	.products.wd-products .wd-product-cats {
		font-size: 10px;
	}

	.page-id-4179 .semelika-category-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 22px 10px;
	}

	.page-id-4179 .semelika-category-card__title {
		margin-top: 10px;
		padding: 0 3px;
		font-size: 11px;
		line-height: 1.2;
	}

	.page-id-4179 .semelika-category-card__count {
		margin-top: 3px;
		font-size: 10px;
	}
}
