/**
 * EMWB Frontend Styles
 *
 * Global frontend utility styles shared by EMWB widgets/templates.
 *
 * @package EMWB
 */

/* -------------------------------------------------------------------------- */
/* Base Helpers */
/* -------------------------------------------------------------------------- */

.emwb-hidden,
.emwb-is-hidden {
	display: none !important;
}

.emwb-screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.emwb-clearfix::after {
	display: table;
	clear: both;
	content: "";
}

/* -------------------------------------------------------------------------- */
/* Empty / Placeholder Notices */
/* -------------------------------------------------------------------------- */

.emwb-empty-notice {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	border: 1px dashed #b8b8b8;
	border-radius: 8px;
	background: #fafafa;
	color: #555555;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	box-sizing: border-box;
}

.emwb-empty-notice strong {
	color: #222222;
	font-weight: 700;
}

.emwb-empty-notice a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.emwb-empty-notice a:hover,
.emwb-empty-notice a:focus {
	color: #111111;
}

.elementor-editor-active .emwb-empty-notice,
.elementor-editor-preview .emwb-empty-notice {
	min-height: 44px;
}

/* -------------------------------------------------------------------------- */
/* Product Title */
/* -------------------------------------------------------------------------- */

.emwb-product-title {
	display: block;
	margin: 0 0 16px;
	padding: 0;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1.2;
	word-break: normal;
	overflow-wrap: anywhere;
}

.emwb-product-title a {
	color: inherit;
	text-decoration: none;
}

.emwb-product-title a:hover,
.emwb-product-title a:focus {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------- */
/* Product Price */
/* -------------------------------------------------------------------------- */

.emwb-product-price {
	display: block;
	margin: 0 0 16px;
	padding: 0;
	color: inherit;
	line-height: 1.25;
}

.emwb-product-price .price {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	color: inherit;
	line-height: inherit;
}

.emwb-product-price .amount {
	color: inherit;
	font-weight: inherit;
}

.emwb-product-price del {
	opacity: 0.65;
	text-decoration-thickness: 1px;
}

.emwb-product-price ins {
	background: transparent;
	text-decoration: none;
}

.emwb-product-price .woocommerce-Price-currencySymbol {
	margin-inline-end: 1px;
}

/* -------------------------------------------------------------------------- */
/* Product Add To Cart */
/* -------------------------------------------------------------------------- */

.emwb-product-add-to-cart {
	display: block;
	width: 100%;
	max-width: 100%;
}

.emwb-product-add-to-cart *,
.emwb-product-add-to-cart *::before,
.emwb-product-add-to-cart *::after {
	box-sizing: border-box;
}

.emwb-product-add-to-cart form.cart {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	width: 100%;
}

.emwb-product-add-to-cart form.cart::before,
.emwb-product-add-to-cart form.cart::after {
	display: none;
	content: none;
}

.emwb-product-add-to-cart .quantity {
	display: inline-flex;
	align-items: stretch;
	margin: 0;
	max-width: 100%;
}

.emwb-product-add-to-cart .quantity .qty {
	min-height: 46px;
	width: 80px;
	max-width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid #d8d8d8;
	border-radius: 8px;
	background: #ffffff;
	color: #111111;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	box-shadow: none;
	outline: none;
	-moz-appearance: textfield;
}

.emwb-product-add-to-cart .quantity .qty::-webkit-outer-spin-button,
.emwb-product-add-to-cart .quantity .qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.emwb-product-add-to-cart .quantity .qty:focus {
	border-color: #111111;
	box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.emwb-product-add-to-cart .single_add_to_cart_button,
.emwb-product-add-to-cart button.single_add_to_cart_button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 13px 24px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: #111111;
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease,
		opacity 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.emwb-product-add-to-cart .single_add_to_cart_button:hover,
.emwb-product-add-to-cart .single_add_to_cart_button:focus {
	background: #333333;
	color: #ffffff;
	border-color: transparent;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.emwb-product-add-to-cart .single_add_to_cart_button.disabled,
.emwb-product-add-to-cart .single_add_to_cart_button:disabled,
.emwb-product-add-to-cart .single_add_to_cart_button.loading {
	opacity: 0.82;
	cursor: wait;
	transform: none;
	box-shadow: none;
}

.emwb-product-add-to-cart .single_add_to_cart_button.loading::after {
	position: static;
	display: inline-block;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-left: 10px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 999px;
	content: "";
	vertical-align: middle;
	animation: emwb-spin 0.65s linear infinite;
}

.emwb-product-add-to-cart .single_add_to_cart_button.loading .emwb-product-add-to-cart__button-icon {
	width: 0;
	margin: 0 !important;
	opacity: 0;
	overflow: hidden;
}

.emwb-product-add-to-cart .single_add_to_cart_button.added {
	background: #168a3a;
	color: #ffffff;
}

.emwb-product-add-to-cart--full-width .single_add_to_cart_button {
	width: 100%;
}

.emwb-product-add-to-cart__button-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.emwb-product-add-to-cart__button-icon svg,
.emwb-product-add-to-cart__button-icon i {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	color: currentColor;
}

.emwb-product-add-to-cart__button-text {
	display: inline-block;
	line-height: inherit;
}

/* AJAX message */

.emwb-product-add-to-cart__ajax-message {
	display: none;
	align-items: center;
	width: 100%;
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.emwb-product-add-to-cart__ajax-message:not(:empty) {
	display: flex;
}

.emwb-product-add-to-cart__ajax-message--success {
	border-color: rgba(22, 138, 58, 0.22);
	background: #f0fbf4;
	color: #126b31;
}

.emwb-product-add-to-cart__ajax-message--error {
	border-color: rgba(179, 45, 46, 0.22);
	background: #fff4f4;
	color: #9d2526;
}

.emwb-product-add-to-cart__ajax-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-right: 9px;
	border-radius: 999px;
	background: currentColor;
	color: #ffffff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
}

.emwb-product-add-to-cart__ajax-message--success .emwb-product-add-to-cart__ajax-icon {
	background: #168a3a;
	color: #ffffff;
}

.emwb-product-add-to-cart__ajax-message--error .emwb-product-add-to-cart__ajax-icon {
	background: #b32d2e;
	color: #ffffff;
}

.emwb-product-add-to-cart__ajax-text {
	display: inline-block;
	min-width: 0;
}

/* Modern quantity stepper */

.emwb-product-add-to-cart--modern-quantity .quantity.emwb-quantity-enhanced {
	display: inline-flex;
	align-items: stretch;
}

.emwb-quantity-stepper {
	display: inline-flex;
	align-items: stretch;
	justify-content: center;
	width: 132px;
	max-width: 100%;
	min-height: 46px;
	overflow: hidden;
	border: 1px solid #d8d8d8;
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.emwb-quantity-stepper .qty,
.emwb-product-add-to-cart .emwb-quantity-stepper .qty {
	flex: 1 1 auto;
	width: 100%;
	min-width: 34px;
	min-height: 46px;
	padding: 0 4px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #111111;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	box-shadow: none;
	outline: none;
}

.emwb-quantity-stepper .qty:focus,
.emwb-product-add-to-cart .emwb-quantity-stepper .qty:focus {
	border: 0;
	box-shadow: none;
}

.emwb-quantity-stepper__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 42px;
	min-height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #f5f5f5;
	color: #111111;
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	box-shadow: none;
	transition:
		background-color 0.18s ease,
		color 0.18s ease,
		opacity 0.18s ease;
}

.emwb-quantity-stepper__button:hover,
.emwb-quantity-stepper__button:focus {
	background: #111111;
	color: #ffffff;
	outline: none;
}

.emwb-quantity-stepper__button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	background: #f5f5f5;
	color: #111111;
}

.emwb-quantity-stepper__button span {
	display: inline-block;
	transform: translateY(-1px);
}

/* Stock */

.emwb-product-add-to-cart .stock {
	display: block;
	width: 100%;
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.45;
}

.emwb-product-add-to-cart .stock.in-stock {
	color: #168a3a;
}

.emwb-product-add-to-cart .stock.out-of-stock {
	color: #b32d2e;
}

/* Variable products */

.emwb-product-add-to-cart .variations {
	width: 100%;
	margin: 0 0 12px;
	border-collapse: collapse;
}

.emwb-product-add-to-cart .variations tr,
.emwb-product-add-to-cart .variations th,
.emwb-product-add-to-cart .variations td {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	text-align: left;
}

.emwb-product-add-to-cart .variations tr {
	margin-bottom: 10px;
}

.emwb-product-add-to-cart .variations label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.emwb-product-add-to-cart .variations select {
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	border: 1px solid #d8d8d8;
	border-radius: 8px;
	background: #ffffff;
	color: #111111;
	font-size: 14px;
	line-height: 1.3;
}

.emwb-product-add-to-cart .reset_variations {
	display: inline-block;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.emwb-product-add-to-cart .single_variation_wrap {
	width: 100%;
}

.emwb-product-add-to-cart .woocommerce-variation {
	margin: 0 0 12px;
}

.emwb-product-add-to-cart .woocommerce-variation-price,
.emwb-product-add-to-cart .woocommerce-variation-availability,
.emwb-product-add-to-cart .woocommerce-variation-description {
	margin: 0 0 8px;
}

/* -------------------------------------------------------------------------- */
/* Product Specs */
/* -------------------------------------------------------------------------- */

.emwb-product-specs {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.emwb-product-specs *,
.emwb-product-specs *::before,
.emwb-product-specs *::after {
	box-sizing: border-box;
}

.emwb-product-specs__header {
	display: block;
	margin: 0 0 16px;
}

.emwb-product-specs__title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
}

.emwb-product-specs__description {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.8;
}

.emwb-product-specs__description p {
	margin: 0;
}

.emwb-product-specs__items {
	display: grid;
	width: 100%;
	gap: 10px;
}

.emwb-product-specs__item {
	display: flex;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
	padding: 10px 0;
	border: 0 solid transparent;
	line-height: 1.45;
}

.emwb-product-specs__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-right: 8px;
	color: inherit;
	font-size: 16px;
	line-height: 1;
}

.emwb-product-specs__icon svg,
.emwb-product-specs__icon i {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	color: currentColor;
}

.emwb-product-specs__text {
	display: flex;
	min-width: 0;
	width: 100%;
	gap: 8px;
}

.emwb-product-specs__label {
	flex: 0 0 auto;
	font-weight: 700;
	color: inherit;
}

.emwb-product-specs__separator {
	margin-left: 1px;
}

.emwb-product-specs__value {
	min-width: 0;
	color: inherit;
	opacity: 0.88;
	overflow-wrap: anywhere;
}

.emwb-product-specs__value a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.emwb-product-specs--table .emwb-product-specs__items {
	display: table;
	width: 100%;
	border-collapse: collapse;
}

.emwb-product-specs--table .emwb-product-specs__item {
	display: table-row;
	padding: 0;
}

.emwb-product-specs--table .emwb-product-specs__text {
	display: contents;
}

.emwb-product-specs--table .emwb-product-specs__label,
.emwb-product-specs--table .emwb-product-specs__value {
	display: table-cell;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	vertical-align: top;
}

.emwb-product-specs--table .emwb-product-specs__label {
	width: 34%;
}

.emwb-product-specs--list .emwb-product-specs__items {
	display: flex;
	flex-direction: column;
}

.emwb-product-specs--list .emwb-product-specs__item {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.emwb-product-specs--grid .emwb-product-specs__items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.emwb-product-specs--grid .emwb-product-specs__item {
	padding: 12px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
}

.emwb-product-specs--grid .emwb-product-specs__text,
.emwb-product-specs--inline .emwb-product-specs__text {
	flex-direction: column;
	gap: 3px;
}

.emwb-product-specs--inline .emwb-product-specs__items {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
}

.emwb-product-specs--inline .emwb-product-specs__item {
	width: auto;
	padding: 0;
}

/* -------------------------------------------------------------------------- */
/* Template Wrappers */
/* -------------------------------------------------------------------------- */

.emwb-single-product-template,
.emwb-template-wrapper {
	display: block;
	width: 100%;
	max-width: 100%;
}

.emwb-single-product-template *,
.emwb-template-wrapper * {
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------- */
/* WooCommerce Notice Compatibility */
/* -------------------------------------------------------------------------- */

.emwb-single-product-template .woocommerce-notices-wrapper {
	width: 100%;
	margin: 0 0 16px;
}

.emwb-single-product-template .woocommerce-message,
.emwb-single-product-template .woocommerce-error,
.emwb-single-product-template .woocommerce-info {
	margin-bottom: 16px;
}

/* -------------------------------------------------------------------------- */
/* Animations */
/* -------------------------------------------------------------------------- */

@keyframes emwb-spin {
	to {
		transform: rotate(360deg);
	}
}

/* -------------------------------------------------------------------------- */
/* Responsive */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.emwb-empty-notice {
		padding: 10px 12px;
		font-size: 13px;
	}

	.emwb-product-title {
		margin-bottom: 12px;
	}

	.emwb-product-price {
		margin-bottom: 12px;
	}

	.emwb-product-add-to-cart form.cart {
		gap: 8px;
	}

	.emwb-product-add-to-cart .quantity .qty {
		min-height: 42px;
		width: 72px;
	}

	.emwb-quantity-stepper {
		min-height: 42px;
	}

	.emwb-quantity-stepper .qty,
	.emwb-product-add-to-cart .emwb-quantity-stepper .qty,
	.emwb-quantity-stepper__button {
		min-height: 42px;
	}

	.emwb-product-add-to-cart .single_add_to_cart_button,
	.emwb-product-add-to-cart button.single_add_to_cart_button {
		min-height: 42px;
		padding: 11px 18px;
		font-size: 14px;
	}

	.emwb-product-specs__title {
		font-size: 18px;
	}

	.emwb-product-specs--table .emwb-product-specs__items,
	.emwb-product-specs--table .emwb-product-specs__item,
	.emwb-product-specs--table .emwb-product-specs__label,
	.emwb-product-specs--table .emwb-product-specs__value {
		display: block;
		width: 100%;
	}

	.emwb-product-specs--table .emwb-product-specs__item {
		padding: 10px 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.emwb-product-specs--table .emwb-product-specs__label,
	.emwb-product-specs--table .emwb-product-specs__value {
		padding: 0;
		border-bottom: 0;
	}

	.emwb-product-specs--table .emwb-product-specs__label {
		margin-bottom: 3px;
	}

	.emwb-product-specs--grid .emwb-product-specs__items {
		grid-template-columns: 1fr;
	}

	.emwb-product-specs__text {
		flex-direction: column;
		gap: 3px;
	}
}

@media (max-width: 480px) {
	.emwb-product-add-to-cart form.cart {
		flex-direction: column;
		align-items: stretch;
	}

	.emwb-product-add-to-cart .quantity,
	.emwb-product-add-to-cart .quantity .qty,
	.emwb-product-add-to-cart .single_add_to_cart_button,
	.emwb-quantity-stepper {
		width: 100%;
	}

	.emwb-product-specs__item {
		padding: 8px 0;
	}
}