/*
 Theme Name:   LuzJardin
 Description:  LuzJardin customizations for Woodmart
 Author:       LuzJardin
 Template:     woodmart
 Version:      1.0.20
 Text Domain:  luzjardin
*/

.custom-registration .form-box {
	display: flex;
	align-items: center;
	justify-content: center;
}

.custom-registration .form-box button {
	border: 2px solid #f4a51c;
	border-radius: 10px;
	background: #f4a51c;
	color: #fff;
}

/* Woodmart can refresh cart totals automatically after a quantity change.
 * Keep the normal update control visible as a keyboard-friendly fallback. */
.woocommerce-cart-form .cart-actions button[name="update_cart"].wd-hide {
	display: inline-flex !important;
}

/* Keep the unavailable cart fallback readable on the dark storefront. */
.woocommerce-cart-form .cart-actions button[name="update_cart"]:disabled,
.woocommerce-cart-form .cart-actions button[name="update_cart"]:disabled:hover {
	color: #c8c8c8 !important;
	background-color: #303030 !important;
	opacity: 1 !important;
	box-shadow: inset 0 0 0 1px #555;
}

/* Woodmart 8 renamed the logo and navigation classes. Give the new wide
 * LuzJardin mark enough room while preserving the two-row desktop menu. */
.whb-visible-lg .wd-logo img {
	max-width: 220px !important;
}

@media (min-width: 1100px) {
	.whb-visible-lg .wd-logo img {
		max-width: 260px !important;
	}
}

.wd-header-nav .item-level-0 > a {
	text-transform: unset;
}

/* Woodmart 8 changed the copyright grid and no longer loads the legacy
 * Font Awesome copyright glyph. Preserve the reviewed footer layout. */
.wd-copyrights {
	font-size: 15px;
	line-height: 18px;
}

.wd-copyrights .container {
	column-gap: 0 !important;
	row-gap: 15px !important;
	padding-inline: 0 !important;
}

.wd-copyrights .fa-copyright:before {
	content: "\00a9";
	font-family: inherit;
}

/* Preserve the breathing room between archive SEO copy and the footer. */
.woodmart-archive-shop .term-description {
	margin-bottom: 25px;
}

/* Woodmart 8 kept the legacy footer HTML blocks but dropped a few class
 * aliases used by their WPBakery content. Restore the original horizontal
 * legal-links row and social icons without editing the translated blocks. */
.wd-footer {
	background-color: #030303;
}

.wd-footer .inline-list {
	margin-right: -15px;
	margin-left: -15px;
}

.wd-footer .inline-list li {
	display: inline-block;
	padding: 5px 15px;
}

.wd-footer .woodmart-social-icons {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
}

.wd-footer .woodmart-social-icons .woodmart-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 6px;
	color: #fff !important;
	font-size: 0;
}

.wd-footer .woodmart-social-icons .woodmart-social-icon:before {
	content: var(--wd-social-icon);
	font-family: "woodmart-font";
	font-size: 14px;
}

.wd-footer .woodmart-social-icons .woodmart-social-icon i,
.wd-footer .woodmart-social-icons .woodmart-social-icon-name {
	display: none;
}

/* The Wayback reference predates the later oversized LightPro logo inserted
 * above the app badges. Keep the app links but match the accepted old footer. */
.wd-footer .vc_custom_1560084782354 {
	display: none;
}

/* The YouTube performance facade already has its aspect ratio supplied by
 * WPBakery's responsive wrapper. Keep it inside that reserved space instead
 * of letting the facade add a second 16:9 block below the neighbouring copy. */
.home .wpb_video_wrapper > .luzjardin-youtube-facade {
	position: absolute !important;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

/* The translated home pages retain different WPBakery custom class names,
 * but all three video columns should start level with their adjacent copy. */
.home .vc_custom_1697196468184,
.home .vc_custom_1700561655015,
.home .vc_custom_1700562063725 {
	margin-top: 0 !important;
}

@media (min-width: 1025px) {
	/* The legacy title showed the category toggle only on mobile. */
	.wd-page-title .lj-context-show-categories {
		display: none !important;
	}

	/* Keep the archive title and toolbar aligned with the previous theme. */
	.woodmart-archive-shop .wd-page-title {
		min-height: 244px;
	}

}

/* Woodmart 8 uses CSS Grid for product archives. Neutralize the legacy
 * Woodmart 7 mobile width rule retained in WordPress Additional CSS. */
@media (max-width: 875px) {
	.woocommerce .products.wd-products .wd-product {
		top: auto !important;
		left: auto !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
	}

	/* Home-page product tabs are outside .woocommerce. The legacy 49%
	 * width constraint otherwise halves each Woodmart 8 grid cell again. */
	.home .products.wd-products.wd-grid-g > .wd-product {
		top: auto !important;
		left: auto !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
	}

	/* Preserve the old single-row, horizontally scrollable category strip
	 * on the home page. Woodmart 8 inserted an extra grid wrapper. */
	.wd-cats-element.main_categories_section {
		display: block;
		overflow-x: auto;
		overflow-y: hidden;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.wd-cats-element.main_categories_section > .products {
		display: block !important;
		width: max-content;
		height: auto !important;
		white-space: nowrap;
	}

	.wd-cats-element.main_categories_section > .products > .product {
		display: inline-block !important;
		width: 220px !important;
		min-width: 220px !important;
		max-width: 220px !important;
		vertical-align: top;
		white-space: normal;
	}
}

@media (max-width: 767px) {
	/* Remove the legacy viewport-sized blog-row margin on phones. The carousel's
	 * adaptive height handles unequal article cards without empty space. */
	.home main .vc_row:has(.wd-blog-element) {
		margin-bottom: 0 !important;
	}

	.home main .wd-blog-element {
		margin-bottom: 0;
	}

	/* The legacy footer row used negative desktop gutters. Remove them on
	 * phones so the restored block never creates horizontal page scrolling. */
	.wd-footer .vc_custom_1560084918430 {
		margin-right: 0 !important;
		margin-left: 0 !important;
		padding-right: 15px !important;
		padding-left: 15px !important;
	}

	.wd-copyrights .wd-col-start,
	.wd-copyrights .wd-col-end {
		width: 330px !important;
		max-width: 330px !important;
		margin-inline: auto;
	}

	.woodmart-archive-shop .wd-page-title {
		min-height: 174px;
	}

	.wd-header-mobile-nav .wd-tools-text {
		display: none !important;
	}

	.wd-page-title .wd-back-btn {
		display: inline-flex !important;
		position: absolute;
		inset-inline-start: 15px;
		margin-inline-start: 0 !important;
	}

	.wd-page-title .lj-context-show-categories a {
		text-transform: uppercase;
	}

	.wd-page-title .lj-context-show-categories a:after {
		display: inline-block;
		margin-inline-start: 5px;
		content: "\2304";
		font-size: 12px;
	}

	.wd-page-title .lj-context-catalog-nav {
		min-height: 51px;
		margin-inline: 6px;
		padding-inline: 9px;
		background: rgba(0, 0, 0, .4);
	}

	/* Match the compact one-row archive toolbar from the previous theme. */
	.wd-sidebar-hidden-sm .shop-loop-head {
		align-items: center;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 10px;
		min-height: 30px;
	}

	.wd-sidebar-hidden-sm .wd-shop-tools {
		flex-wrap: nowrap;
	}

	.wd-sidebar-hidden-sm .wd-shop-tools:not(:last-child) {
		padding-bottom: 0;
		border-bottom: 0;
	}

	.wd-sidebar-hidden-sm.wd-builder-off .woocommerce-result-count,
	.wd-sidebar-hidden-sm .wd-show-sidebar-btn,
	.wd-sidebar-hidden-sm .wd-products-shop-view {
		display: none !important;
	}

	.single-product .single-breadcrumbs-wrapper > .wd-grid-f {
		display: flex;
		align-items: center;
		flex-wrap: nowrap;
		gap: 10px;
	}

	.single-product .single-breadcrumbs-wrapper .wd-breadcrumbs {
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
	}

	.single-product .single-breadcrumbs-wrapper .wd-products-nav {
		flex: 0 0 auto;
		margin-inline-start: auto;
	}

	.lj-single-product-context-nav .lj-context-catalog-nav {
		min-height: 51px;
		background: rgba(0, 0, 0, .4);
	}

	.single-product .summary-inner form.cart .single_add_to_cart_button {
		background-color: #f4a51c !important;
	}

	.single-product .summary-inner form.cart .single_add_to_cart_button:hover,
	.single-product .summary-inner form.cart .single_add_to_cart_button:focus {
		background-color: #de961a !important;
	}
}
