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

/**
 * ------------------------------------------------------------------------------------------------
 * Основное
 * ------------------------------------------------------------------------------------------------
 */
/* base */

label,
.label {
	display: block;
	font-size: 14px;
	color: var(--wd-text-color);
	margin-bottom: 5px;
}

/* заголовок страницы */
.wd-page-content .wd-page-title .container {
	flex-direction: column-reverse;
	gap: 16px;
}

.wd-page-content .wd-page-title.title-size-small {
	padding-top: 26px;
}

@media (min-width: 1025px) {
    .wd-page-content .wd-page-title.title-size-small {
		padding-top: 26px;
	}
}

/* окно об успешной отправке */
@media (max-width: 550px) {
	.pum-container {
		max-width: 550px !important;
		width: 100% !important;
	}
}

.pum-container .pum-title {
	margin-bottom: 1em;
}

.wpcf7 form.sent .wpcf7-response-output {
	display: none;
}

/**
 * ------------------------------------------------------------------------------------------------
 * Хелперы
 * ------------------------------------------------------------------------------------------------
 */
/* утилиты */
.height-full {
	height: 100%;
}

.text-white {
	color: #fff;
}

/**
 * ------------------------------------------------------------------------------------------------
 * Каталог
 * ------------------------------------------------------------------------------------------------
 */
/* селектор для правок стилей категорий */
.categories-decoration .products.elements-grid .wd-cat-wrap {
	height: 100%;
}

.categories-decoration .products.elements-grid .wd-cat-inner {
	display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.categories-decoration .products.elements-grid .wd-cat-image img {
	aspect-ratio: 1;
	object-fit: contain;
}

.categories-decoration .products.elements-grid .wd-cat-content {
	padding-block: 18px 4px;
}

/* стили для плашки наличия */
body .wd-page-content p.wd-style-default.stock {
	--in-stock-color: #28a745;
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
	font-size: 13px;
}

body .wd-page-content p.stock.wd-style-default::before {
	content: '';
	display: block;
	width: 6px;
	min-width: 6px;
	height: 6px;
	border-radius: 6px;
	margin-bottom: 1px;
}

body .wd-page-content p.stock.wd-style-default.in-stock::before {
	background-color: var(--in-stock-color);
}

body .wd-page-content p.stock.wd-style-default.in-stock:not(.in-pickup) {
	color: var(--in-stock-color);
}

body .wd-page-content p.stock.wd-style-default.in-stock::before {
	color: var(--in-stock-color);
	margin-inline-end: 0;
}

body .wd-page-content p.stock.wd-style-default.available-on-backorder::before,
body .wd-page-content p.stock.wd-style-default.in-stock.in-pickup::before {
	background-color: #ffa319;
}

body .wd-page-content p.stock.wd-style-default.out-of-stock::before {
	background-color: #b50808;
}

/* пошире кнопки quantity */
body div.quantity input[type=button] {
	min-width: 32px;
}

/* скрывать сайдбар если в архиве товаров - нет товаров */
.product-archive-only-categories :is(.product-filter-wrapper, .product-filter-mobile-wrapper) {
	display: none;
}

.product-archive-only-categories .products-wrapper {
	--width: 100% !important;
}

/**
 * ------------------------------------------------------------------------------------------------
 * Корзина
 * ------------------------------------------------------------------------------------------------
 */
/* не переносить цену на новую строку */
.woocommerce-cart .woocommerce-cart-form .woocommerce-Price-amount {
	white-space: nowrap;
}

/* селектор для скрытия подытога */
.woocommerce-cart .cart-order-hide-subtotal :is(.cart-subtotal, .woocommerce-shipping-totals) {
	display: none;
}

/**
 * ------------------------------------------------------------------------------------------------
 * Оформление заказа
 * ------------------------------------------------------------------------------------------------
 */
.woocommerce-checkout .woocommerce-billing-fields > h3 {
	text-transform: none;
	font-size: 24px;
}

/* не переносить цену на новую строку */
.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-Price-amount {
	white-space: nowrap;
}

/* скрыть подытог */
.woocommerce-checkout .woocommerce-checkout-review-order-table .cart-subtotal {
	display: none;
}

/* правки стилей для формы логина */
.woocommerce-checkout .woocommerce-checkout-must-be-logged-in-message {
	margin-inline: auto;
    max-width: 1000px;
}

.woocommerce-checkout .woocommerce-checkout-must-be-logged-in-message::before {
	content: "\f124";
	font-family: "woodmart-font";
	font-weight: 400;
}

.woocommerce-checkout .woocommerce-form-login.hidden-form {
	border: 0;
	padding: 0;
	max-width: none;
}

.woocommerce-checkout .wd-registration-page {
	padding-top: 60px;
}

/**
 * ------------------------------------------------------------------------------------------------
 * Списочный вид товаров
 * ------------------------------------------------------------------------------------------------
 */
/* ширина миниатюры */
@media (min-width: 769px) {
    .wd-products .wd-product.product-list-item .wd-product-thumb {
        flex: 0 0 150px;
    }
}

.wd-products .wd-product.product-list-item .wd-product-thumb {
    flex: 0 0 150px;
}

.wd-products .wd-product.product-list-item .wd-product-thumb {
	aspect-ratio: 1;
	object-fit: cover;
	width: 150px;
	height: 150px;
}

@media (max-width: 1024px) {
	.wd-products .wd-product.product-list-item .wd-product-thumb {
		margin: auto;
	}
}

.wd-products .wd-product.product-list-item .wd-product-thumb img {
	transition: transform .5s cubic-bezier(0, 0, 0.44, 1.18);
}

.wd-products .wd-product.product-list-item .wd-product-thumb:hover img {
	transform: scale3d(1.1, 1.1, 1);
}

/* карточка товара */
@media (min-width: 769px) {
    .wd-products .wd-product.product-list-item .wd-product-wrapper {
		align-items: start;
        gap: 30px;
    }
}

/* убрать отрицательный margin */
body .wd-loop-builder-off .product-list-item :is(.wd-entities-title,.wd-product-cats,.wd-product-brands-links,.wd-product-sku,.wd-product-stock,.price),
body .wd-loop-builder-off :is(.wd-entities-title,.wd-product-cats,.wd-product-brands-links,.wd-product-sku,.wd-product-stock,.price) {
	margin-block: 0;
}

/* основной ряд с информацией о товаре */
.product-list-item .product-list-content-row {
	display: flex;
	justify-content: space-between;
	gap: 30px; 
}

/* левая часть строки: название и описание. */
.product-list-item .product-list-content-info {
	flex-basis: 0;
    flex-grow: 1;
    min-width: 0;
    max-width: 100%;
	display: flex;
    flex-direction: column;
	gap: 12px;
}

/* описание товара в две строки */
.product-list-item .product-list-content-description {
	display: -webkit-box;
	overflow: hidden;
	color: #717171;
	font-size: 14px;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* правая часть c ценой и кнопкой добавить в корзину */
.product-list-item .product-list-content-side {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px;
	min-width: 0;
}

@media (min-width: 1200px) {
	.product-list-item .product-list-content-side {
		gap: 12px;
	}
}

/* обертка цены и наличия */
.product-list-item .product-list-content-price-stock-wrapper {
	display: flex;
	flex-direction: column;
	gap: 4px;
} 

@media (max-width: 1200px) {
	.wd-products .wd-product.product-list-item {
		text-align: start;
	}
	
	.wd-products .wd-product.product-list-item .wd-product-wrapper {
		flex-direction: column;
		gap: 15px;
	}
	
	.product-list-item .product-list-content-row {
		flex-direction: column;
	}
	
	.product-list-item .product-list-content-side {
		flex-direction: row;
		align-items: end;
	}
}

/* кнопка добавить в корзину */
.wd-products .wd-product.product-list-item .wd-add-btn .add-to-cart-loop span {
	padding: 5px 20px;
    min-height: 40px;
    font-size: 13px;
}

.wd-products .wd-product.product-list-item .wd-add-btn {
	flex-wrap: nowrap;
}

:is(.add_to_cart_button, .single_add_to_cart_button) .wd-action-text::before {
	content: '';
	display: block;
	background-image: url('assets/images/icon-add-to-cart.png');
	background-size: 22px;
	width: 22px;
	height: 22px;
	background-repeat: no-repeat;
	margin-right: 8px;
}

.wd-products .wd-add-btn-replace > a:hover span {
	transform: none;
}

.wd-products .wd-add-btn-replace > a::before {
	transition: none;
}

.wd-products .wd-add-btn-replace > a:not(.loading):hover::before {
	transform: translateY(100%);
}

.wd-products .wd-product.outofstock .wd-add-btn .wd-action-text::before {
	content: none;
}

.single-product .single_add_to_cart_button .wd-action-text {
	display: flex;
    align-items: center;
    justify-content: center;
}

body .wd-product.wd-hover-buttons-on-hover .add-to-cart-loop .wd-action-text {
	display: flex;
}

/* вариации по центру кроме главной */
.catalog-variation-item .product-list-content-row {
	align-items: center;
	padding-top: 18px;
	margin-top: 18px;
	border-top: 1px dashed var(--brdcolor-gray-300);;
}

@media (min-width: 768px) {
	.catalog-variation-item .product-list-content-row {
		padding-top: 12px;
		margin-top: 12px;
	}
}

/* название вариации */
html .wd-product .catalog-variation-item .product-list-content-info .wd-entities-title {
	display: block;
	color: var(--wd-title-color);
	font-size: 16px;
}

@media (min-width: 768px) {
	html .wd-product .catalog-variation-item .product-list-content-info .wd-entities-title {
		font-size: 14px;
	}
}

html .wd-product .catalog-variation-item .product-list-content-info .wd-entities-title:hover {
	color: var(--wd-primary-color);
}

/* размер шрифта для цены вариации кроме главной */
.product-list-content .catalog-variation-item .product-list-content-row .product-list-content-side .price {
	font-size: 16px;
}

/* обертка для наличия и цены для вариаций кроме главной */
.product-list-item .catalog-variation-item .product-list-content-price-stock-wrapper {
	flex-direction: row;
	gap: 24px;
}

@media (min-width: 768px) {
	.product-list-item .catalog-variation-item .product-list-content-price-stock-wrapper {
		align-items: end;
	}
}

@media (min-width: 1200px) {
	.product-list-item .catalog-variation-item .product-list-content-price-stock-wrapper {
		align-items: center;
	}
}

/* правая часть вариации: наличие, цена, количество и кнопка. */
.product-list-item .catalog-variation-item .product-list-content-side {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: space-between;
	gap: 30px;
}

@media (min-width: 1200px) {
	.catalog-variation-item .product-list-content-price-stock-wrapper .wd-product-stock {
		order: 0;
	}

	.catalog-variation-item .product-list-content-price-stock-wrapper .price {
		order: 1;
	}
}

@media (min-width: 768px) {
	.product-list-item .catalog-variation-item .product-list-content-side {
		align-items: center;
	}
}

/* Кнопка покупки вариации. */
.catalog-variation-item .add_to_cart_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 18px;
	border-radius: 8px;
	line-height: 1;
	white-space: nowrap;
}

/* Кнопки остальных вариаций показываются как кнопки с иконкой. */
.catalog-variation-button-icon {
	width: 66px;
	min-width: 66px;
	padding-right: 0;
	padding-left: 0;
}

/* отступ вправо для кнопки добавить в корзину */
.wd-products .wd-product.product-list-item .catalog-variation-item .wd-add-btn .wd-action-text:before {
	margin-right: 4px;
}

/* адаптив для планшетов и телефонов */
@media (max-width: 1200px) {
	.product-list-item .catalog-variation-item .product-list-content-row {
		flex-direction: row;
	}
	
	.product-list-item .catalog-variation-item .product-list-content-price-stock-wrapper {
		flex-direction: column;
		gap: 4px;
	}
}

@media (max-width: 768px) {
	.product-list-item .catalog-variation-item .product-list-content-row {
		flex-direction: column;
		align-items: start;
	}
	
	.product-list-item .catalog-variation-item .product-list-content-side {
		width: 100%;
	}
}

/**
 * ------------------------------------------------------------------------------------------------
 * Страница товара
 * ------------------------------------------------------------------------------------------------
 */
/* селектор для атрибутов */
.swatches-additional .variations .reset_variations {
	margin-left: 0;
}

.swatches-additional .variations .wd-swatch-text {
	padding: 10px 16px !important;
}

/* метка атрибутов */
.single-product .wd-label-top-lg table.variations .cell {
	display: block;
}

/* кнопка очистить */
.single-product .variations_form.variation-swatch-selected {
	--wd-var-table-mb: 60px !important;
}

@media (max-width: 1025px) {
	.single-product .wd-reset-bottom-lg .wd-reset-var {
		--wd-reset-btn-space: 15px;
		position: absolute;
        inset-inline: 0;
        top: calc(100% + var(--wd-reset-btn-space));
	}
}

/* вкладка характеристики */
.single-product .wc-product-attributes {
	padding-left: 0;
}

.single-product .wc-product-attributes li {
	display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #d6d6d6;
    gap: 12px;
}

.single-product .wc-product-attributes li span {
	text-align: end;
}

/* вкладка документы */
.product-documents-list {
	list-style: none;
	padding-left: 0;
}

.product-documents-list .product-documents-list__link {
	color: var(--wd-text-color);
	font-size: 14px;
}

.product-documents-list .product-documents-list__link::before {
	content: "\f138";
	font-family: "woodmart-font";
	font-weight: 400;
	margin-right: 6px;
	font-size: 15px;
	color: var(--wd-primary-color);
}

.product-documents-list .product-documents-list__link:hover {
	color: var(--wd-primary-color);
}

.product-documents-list .product-documents-list__size {
	color: var(--color-gray-400);
	margin-left: 4px;
}

/**
 * ------------------------------------------------------------------------------------------------
 * Шапка
 * ------------------------------------------------------------------------------------------------
 */
/* поменять иконки */
:is(.whb-header, .wd-toolbar) .wd-tools-element > a {
	flex-direction: column;
}

.whb-header :is(.wd-header-search.wd-design-1, .wd-header-my-account.wd-design-1, .wd-header-cart.wd-design-2) .wd-tools-icon::before {
	content: '';
	background-size: 32px;
	width: 32px;
	height: 32px;
	background-repeat: no-repeat;
}

.wd-toolbar .wd-tools-icon::before {
	content: '';
	background-size: 25px;
	width: 25px;
	height: 25px;
	background-repeat: no-repeat;
}

.wd-toolbar .wd-toolbar-link .wd-custom-icon img {
	height: 25px;
}

.whb-header .wd-header-search.wd-design-1 .wd-tools-icon::before,
.wd-toolbar .wd-header-search .wd-tools-icon::before {
	background-image: url('assets/images/icon-search.png');
}

.whb-header .wd-header-my-account.wd-design-1 .wd-tools-icon::before,
.wd-toolbar .wd-header-my-account .wd-tools-icon::before {
	background-image: url('assets/images/icon-account.png');
}

.whb-header .wd-header-cart.wd-design-2 .wd-tools-icon::before,
.wd-toolbar .wd-header-cart .wd-tools-icon::before {
	background-image: url('assets/images/icon-cart.png');
}

.wd-tools-element:is(.wd-design-2,.wd-design-5) .wd-tools-count {
	background-color: var(--wd-title-color);
}

/**
 * ------------------------------------------------------------------------------------------------
 * Подвал
 * ------------------------------------------------------------------------------------------------
 */
/* категории в 3 колонки */
@media (min-width: 1024px) {
	.wd-footer .categories-columns .product-categories {
		column-count: 3;
	}
}

/**
 * ------------------------------------------------------------------------------------------------
 * Contact form 7
 * ------------------------------------------------------------------------------------------------
 */
.wpcf7 .wpcf7-heading {
	font-size: 22px;
	color: var(--wd-title-color);
}

@media screen and (min-width: 768px) {
	.wpcf7 .wpcf7-heading {
		font-size: 24px;
	}
}

@media screen and (min-width: 1024px) {
	.wpcf7 .wpcf7-heading {
		font-size: 27px;
	}
}

.wpcf7 .wpcf7-acceptance {
	display: block;
}

.wpcf7 .wpcf7-acceptance label {
	margin-bottom: 0;
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item {
	margin-inline-end: 0;
}

.wpcf7-acceptance .wpcf7-list-item input {
	margin-inline-end: 14px;
	margin-bottom: 2px;
	transform: scale(1.35);
}

.wpcf7-acceptance .wpcf7-list-item-label {
	line-height: 2;
	font-size: 14px;
}

.wpcf7-acceptance .wpcf7-list-item-label a {
	font-size: 14px;
	text-decoration: underline;
}

.wpcf7-acceptance .wpcf7-list-item-label a:hover {
	font-size: 14px;
	text-decoration: none;
}

.wpcf7 .wpcf7-form-control-wrap + label {
	margin-top: 3px;
}

.wpcf7 .wpcf7-not-valid-tip {
	font-size: 14px;
    margin-top: 4px;
}

.wpcf7 .wpcf7-important-mark {
	font-size: 14px; 
	margin-bottom: 12px;
}

.wpcf7 .wpcf7-response-output {
	display: none;
	font-size: 14px;
}

.wpcf7 .privacy-text {
	font-size: 13px;
    color: var(--color-gray-600);
}

.wpcf7 .wpcf7-submit.width-full {
	width: 100%;
}
    
.wpcf7 .wpcf7-file {
	font-size: 14px;
}

.wpcf7 .wpcf7-file::file-selector-button {
	background-color: transparent;
	border-radius: 5px;
	border: 2px solid var(--wd-alternative-color);
	padding: 5px 12px;
	cursor: pointer;
	transition: color 0.25s ease-in-out, background 0.25s ease-in-out;
	font-family: Onest, system-ui;
}

.wpcf7 .wpcf7-file::file-selector-button:hover {
	background-color: var(--wd-alternative-color);
	color: var(--wd-text-color);
}

.wpcf7 .file-title {
	font-size: 16px;
	cursor: pointer;
}

.wpcf7 .file-text {
	color: var(--color-gray-400);
	font-size: 14px;
}

.wpcf7 .wpcf7-form.submitting .wpcf7-submit,
.wpcf7 .wpcf7-form.submitting .wpcf7-submit:hover {
	color: transparent;
	pointer-events: none;
}

.wpcf7 p:has(.wpcf7-submit) {
	position: relative;
}

div.wpcf7 .wpcf7-spinner {
	position: absolute !important;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

div.wpcf7 .wpcf7-spinner::before {
	position: static !important;
	border-left-color: #ffffff !important;
}

div.wpcf7 p:has(input[type="hidden"]) {
	margin-bottom: 0;
}

div.wpcf7 p:has(input[type="file"]) {
	margin-bottom: 6px;
}