/*
Theme Name: Porto Child
Theme URI: https://www.portotheme.com/wordpress/porto
Author: P-THEMES
Author URI: https://www.portotheme.com/
Description: Porto Responsive WordPress + eCommerce Theme.
Version: 1.1
Template: porto
License: Commercial
License URI: http://themeforest.net/licenses/regular_extended
Tags: woocommerce, corporate, ecommerce, responsive, blue, black, green, white, light, dark, red, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
*/

/*************** ADD YOUR CUSTOM CSS HERE  ***************/

:root {
	--piglet-border: #cfcfcf;
	--piglet-border-active: #3a3a3a;
	--piglet-check: #2f9e44;
	--piglet-text: #1f1f1f;
	--piglet-radius: 8px;
}

/* -------------------------------------------------------------------------
   Shared WPC linked attrs (Fabric + Colour)
--------------------------------------------------------------------------- */
.wpclv-attributes {
	margin: 0;
	padding: 1.1rem 0;
	border: none;
	border-bottom: 1px solid #e6e6e6;
}

/* Avoid double rule: Colour border + .single_variation_wrap border-top */
.variations_form > .wpclv-attributes:last-of-type {
	border-bottom: none;
	padding-bottom: 0.35rem;
}

.variations_form .single_variation_wrap {
	border-top: 1px solid #e6e6e6 !important;
	border-bottom: none !important;
}

.wpclv-attributes .wpclv-attribute {
	margin-bottom: 0;
}

.wpclv-attributes .wpclv-attribute-label {
	font-size: 15px;
	font-weight: 700;
	color: var(--piglet-text);
	margin: 0 0 0.75rem;
	text-align: start;
}

.wpclv-attributes .wpclv-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	float: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpclv-attributes .wpclv-terms .wpclv-term {
	float: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	height: auto;
	min-width: 0;
	line-height: 1;
	border-radius: 0;
	position: relative;
}

.wpclv-attributes .wpclv-terms .wpclv-term span,
.wpclv-attributes .wpclv-terms .wpclv-term a {
	background: transparent;
	box-shadow: none;
	outline: none;
	text-decoration: none;
	color: inherit;
}

/* -------------------------------------------------------------------------
   Fabric — donor-like rounded rectangles + green check
--------------------------------------------------------------------------- */
.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button span,
.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--piglet-border);
	border-radius: var(--piglet-radius);
	background: #fff;
	color: var(--piglet-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button:hover span,
.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button:hover a {
	border-color: #a8a8a8;
}

.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button.active span,
.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button.active a {
	border-color: var(--piglet-border-active);
	box-shadow: inset 0 0 0 1px var(--piglet-border-active);
}

.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button.active span::before,
.wpclv-attribute-pa_fabric .wpclv-terms .wpclv-term-button.active a::before {
	content: "";
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232f9e44' d='M6.2 11.4 2.8 8l1.1-1.1 2.3 2.3 5-5L12.3 5z'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------------------
   Colour — circular image swatches + active ring/check
--------------------------------------------------------------------------- */
.wpclv-attribute-pa_color .wpclv-terms {
	gap: 12px;
	align-items: center;
}

.wpclv-attributes .wpclv-terms .wpclv-term.wpclv-term-image,
.wpclv-attribute-pa_color .wpclv-terms .wpclv-term.wpclv-term-image {
	width: 52px !important;
	height: 52px !important;
	flex: 0 0 52px;
	overflow: hidden !important;
	box-sizing: border-box;
	border-radius: 50% !important;
}

.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image a,
.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image span {
	display: block !important;
	width: 52px !important;
	height: 52px !important;
	max-width: 52px !important;
	max-height: 52px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	overflow: hidden !important;
	border: 2px solid transparent;
	box-sizing: border-box;
	position: relative;
	line-height: 0 !important;
}

.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image img {
	width: 52px !important;
	height: 52px !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
	border-radius: 50% !important;
	margin: 0 !important;
}

.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image:hover a,
.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image:hover span {
	border-color: #bdbdbd;
}

.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image.active a,
.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image.active span {
	border-color: var(--piglet-border-active);
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--piglet-border-active);
}

.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image.active a::after,
.wpclv-attribute-pa_color .wpclv-terms .wpclv-term-image.active span::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%233a3a3a' d='M6.2 11.4 2.8 8l1.1-1.1 2.3 2.3 5-5L12.3 5z'/%3E%3C/svg%3E")
		center / 14px 14px no-repeat;
	pointer-events: none;
	z-index: 1;
}

/* -------------------------------------------------------------------------
   Size — donor-like rounded rectangles (not tiny circles)
   PDP: .custom-cart / .product-summary-wrap
   Archive/category hover: .custom-variation / .porto-tb-swatch
--------------------------------------------------------------------------- */
.custom-cart .variations,
.product-summary-wrap .variations {
	border-top: none !important;
	border-bottom: 1px solid #e6e6e6 !important;
	padding: 1.1rem 0 !important;
	margin: 0 !important;
	width: 100%;
}

.custom-cart .filter-item-list[data-name="attribute_pa_size"],
.custom-variation .filter-item-list[data-name="attribute_pa_size"],
.porto-tb-swatch .filter-item-list[data-name="attribute_pa_size"] {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
}

.custom-cart .filter-item-list[data-name="attribute_pa_size"] .filter-item,
.custom-variation .filter-item-list[data-name="attribute_pa_size"] .filter-item,
.porto-tb-swatch .filter-item-list[data-name="attribute_pa_size"] .filter-item {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	min-height: 44px !important;
	padding: 10px 18px !important;
	margin: 0 !important;
	line-height: 1.2 !important;
	border-radius: var(--piglet-radius) !important;
	border: 1px solid var(--piglet-border) !important;
	background-color: #fff !important;
	background-image: none !important;
	color: var(--piglet-text) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	white-space: nowrap;
	overflow: visible !important;
	text-indent: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-shadow: none !important;
}

/* Category / archive hover: fit Size pills inside the image card */
.porto-tb-featured-image .custom-variation {
	width: 100% !important;
	left: 0 !important;
	right: 0 !important;
	transform: none !important;
	padding: 0 8px;
	box-sizing: border-box;
}

.custom-variation .variations_form,
.custom-variation .variations,
.custom-variation .variations td.value {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
}

.custom-variation .variations {
	border: none !important;
	padding: 0.35rem 0 !important;
	margin: 0 !important;
}

.custom-variation .filter-item-list[data-name="attribute_pa_size"] {
	gap: 6px;
	width: 100%;
}

.custom-variation .filter-item-list[data-name="attribute_pa_size"] > li {
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	width: auto !important;
}

.custom-variation .filter-item-list[data-name="attribute_pa_size"] .filter-item,
.porto-tb-swatch .filter-item-list[data-name="attribute_pa_size"] .filter-item {
	min-height: 28px !important;
	padding: 5px 10px !important;
	font-size: 12px !important;
}

.custom-cart .filter-item-list[data-name="attribute_pa_size"] .filter-item:hover,
.custom-variation .filter-item-list[data-name="attribute_pa_size"] .filter-item:hover,
.porto-tb-swatch .filter-item-list[data-name="attribute_pa_size"] .filter-item:hover {
	border-color: #a8a8a8 !important;
	background-color: #fff !important;
	color: var(--piglet-text) !important;
}

.custom-cart .filter-item-list[data-name="attribute_pa_size"] .active .filter-item,
.custom-cart .filter-item-list[data-name="attribute_pa_size"] .filter-item.active,
.custom-variation .filter-item-list[data-name="attribute_pa_size"] .active .filter-item,
.custom-variation .filter-item-list[data-name="attribute_pa_size"] .filter-item.active,
.porto-tb-swatch .filter-item-list[data-name="attribute_pa_size"] .active .filter-item,
.porto-tb-swatch .filter-item-list[data-name="attribute_pa_size"] .filter-item.active {
	border-color: var(--piglet-border-active) !important;
	box-shadow: inset 0 0 0 1px var(--piglet-border-active) !important;
	background-color: #fff !important;
	color: var(--piglet-text) !important;
}

.custom-cart .variations label[for="pa_size"],
.custom-variation .variations label[for="pa_size"] {
	line-height: 1.2;
	font-size: 15px;
	font-weight: 700;
	color: var(--piglet-text);
	text-transform: none;
	letter-spacing: 0;
}

/* -------------------------------------------------------------------------
   Megamenu Elementor blocks: fill popup width (cols were % of shrink-wrapped
   content after banner columns were removed)
--------------------------------------------------------------------------- */
.mega-menu .popup .porto-wide-sub-menu {
	width: 100%;
}

.mega-menu .popup .menu-block-item,
.mega-menu .popup .menu-block,
.mega-menu .popup .porto-block,
.mega-menu .popup .elementor {
	width: 100% !important;
	max-width: 100%;
}

/* Shop All links in megamenu (last item in each list) */
.mega-menu .popup .elementor-icon-list-item:last-child .elementor-icon-list-text {
	font-weight: 700;
}

/* -------------------------------------------------------------------------
   Porto horizontal filters (style2): hide widget search until dropdown opens.
   Theme CSS hides ul/form, but not .widget-search-box added by wc-widget.js,
   so search fields show inside closed filter buttons until the first click.
--------------------------------------------------------------------------- */
@media (min-width: 992px) {
	.porto-product-filters.style2 .widget > .widget-search-box {
		display: none;
		position: absolute;
		left: 0;
		top: 100%;
		margin-top: 9px;
		margin-bottom: 0;
		z-index: 100;
		min-width: 220px;
		width: max(100%, 220px);
		padding: 10px 15px 0;
		background: #fff;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
		box-sizing: border-box;
	}

	/* Keep list panel under the search field when both are open */
	.porto-product-filters.style2 .widget:has(> .widget-search-box) > ul,
	.porto-product-filters.style2 .widget:has(> .widget-search-box) > div:not(.pwb-filter-products) > ul {
		padding-top: 50px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	}
}
