/* ===========================================================================
 * CSS LOCKDOWN
 * ---------------------------------------------------------------------------
 * Every descendant of .wpw-widget is force-reset to the browser's own
 * default styling first ("all: revert" undoes any rule a theme, WordPress
 * core, WooCommerce, Elementor, or another plugin applied via inheritance
 * or a matching selector), then every declaration below this point in the
 * file is !important, so this widget's own look always wins the cascade
 * regardless of what other stylesheets load, and in what order.
 * "all: revert" only strips other authors' CSS — the widget's own rules
 * (all placed after this block, all carrying !important) still apply on
 * top of the clean baseline.
 * ========================================================================= */
.wpw-widget,
.wpw-widget *,
.wpw-widget *::before,
.wpw-widget *::after {
	box-sizing: border-box !important;
}

.wpw-widget {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: #1d1d1f !important;
	text-align: left !important;
	direction: ltr !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	background: none !important;
	isolation: isolate;
}

.wpw-widget * {
	font-family: inherit !important;
	box-sizing: border-box !important;
}

.wpw-widget img {
	max-width: 100% !important;
	height: auto !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	vertical-align: top !important;
}

.wpw-widget button,
.wpw-widget input,
.wpw-widget select,
.wpw-widget textarea {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: normal !important;
	outline: none !important;
}

/* Neutralize native OS/browser chrome (rounded corners, inset shadows —
   most noticeable on Safari, especially input[type=search]) at the
   appearance level instead of hardcoding border-radius/box-shadow here:
   those two, combined with !important and this selector's extra element
   type, were more specific than the widget's OWN per-component rules
   below (e.g. .wpw-add-to-cart, .wpw-variation-option, .wpw-search-input),
   silently defeating their intended radius/shadow. <select> keeps its
   native appearance so its dropdown arrow (and the padding reserved for
   it) still shows. */
.wpw-widget button,
.wpw-widget input {
	appearance: none !important;
	-webkit-appearance: none !important;
}

.wpw-widget a {
	text-decoration: none !important;
}

/* SVG icons (Elementor's icon picker can render Font Awesome as inline SVG,
   and the plugin's own inline SVGs below both rely on fill/stroke
   "currentColor" presentation attributes to pick up the surrounding color)
   lose that coloring under the "all: revert" reset above, because any CSS
   declaration — even one that reverts — outranks a presentation attribute.
   Restore normal currentColor-based fill so icon color controls actually
   work; the handful of outline-style icons that need fill:none/stroke
   instead override this with a more specific selector (filter-widget.css). */
.wpw-widget svg {
	fill: currentColor !important;
}

/* ===== Base widget layout ===== */
.wpw-widget {
	width: 100% !important;
}

.wpw-grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	row-gap: 24px !important;
	column-gap: 24px !important;
	width: 100% !important;
	align-items: stretch !important;
}

.wpw-card {
	position: relative !important;
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	background: #fff !important;
	transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.wpw-card__image-wrap {
	position: relative !important;
	width: 100% !important;
	height: 320px !important;
	overflow: hidden !important;
	background: #f4f4f4 !important;
	flex: 0 0 auto !important;
}

.wpw-card__image-link {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
}

.wpw-card__image {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	transition: opacity 0.2s ease, transform 0.4s ease !important;
}

.wpw-card--zoom .wpw-card__image-wrap:hover .wpw-card__image {
	transform: scale(1.05) !important;
}

.wpw-card__image.is-swapping {
	opacity: 0.4 !important;
}

.wpw-card__body {
	display: flex !important;
	flex-direction: column !important;
	padding: 16px !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
}

/* Everything above the Add to Cart button grows to fill the card, so the
   button naturally lands on the same baseline across a whole row —
   regardless of how long the title/description on each card is. */
.wpw-card__content {
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
	flex: 1 1 auto !important;
}

.wpw-card__category {
	font-size: 12px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	color: #888 !important;
}

.wpw-card__title {
	font-size: 16px !important;
	font-weight: 600 !important;
	margin: 0 !important;
	line-height: 1.3 !important;
}

.wpw-card__title-link {
	color: inherit !important;
	text-decoration: none !important;
	font: inherit !important;
}

.wpw-card__price {
	font-size: 15px !important;
	font-weight: 500 !important;
}

.wpw-card__price ins {
	text-decoration: none !important;
}

.wpw-card__price del {
	opacity: 0.5 !important;
	margin-right: 6px !important;
}

.wpw-card__description {
	font-size: 13px !important;
	color: #666 !important;
	line-height: 1.5 !important;
}

/* Variations */
.wpw-variation-options-wrap {
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;
	margin-top: 4px !important;
}

.wpw-variation-group {
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
}

.wpw-variation-label {
	font-size: 11px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.04em !important;
	color: #999 !important;
	display: inline-flex !important;
	align-items: baseline !important;
	gap: 2px !important;
}

.wpw-variation-selected-name {
	text-transform: none !important;
	font-weight: 600 !important;
	color: #333 !important;
	letter-spacing: normal !important;
}

.wpw-variation-options {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
}

.wpw-variation-option {
	appearance: none !important;
	cursor: pointer !important;
	color: #222 !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	padding: 4px 10px !important;
	font-size: 12px !important;
	line-height: 1 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.15s ease !important;
}

/* Text/size pills get a fixed gray background and a minimum tap-target size
   here. Color swatches (below) fully own their background — it's set as an
   inline style per term, to the actual color picked in WooCommerce — and
   their own size, so they must NOT pick these up: without :not(), every
   swatch rendered as a flat gray circle regardless of the color chosen for
   that term, no matter what was configured. */
.wpw-variation-option:not(.wpw-variation-swatch) {
	background: #f2f2f2 !important;
	min-width: 34px !important;
	min-height: 34px !important;
}

.wpw-variation-option:hover:not(.wpw-variation-swatch) {
	background: #e6e6e6 !important;
}

.wpw-variation-option.is-selected:not(.wpw-variation-swatch) {
	background: #1d1d1f !important;
	color: #fff !important;
	border-color: #1d1d1f !important;
}

.wpw-variation-option.is-disabled {
	opacity: 0.35 !important;
	cursor: not-allowed !important;
	text-decoration: line-through !important;
}

/* Color swatches — rendered as real color circles instead of text labels. */
.wpw-variation-swatch {
	width: 30px !important;
	height: 30px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	border: 2px solid #fff !important;
	box-shadow: 0 0 0 1px #ddd !important;
	background-size: cover !important;
	position: relative !important;
	overflow: hidden !important;
}

.wpw-variation-swatch:hover {
	box-shadow: 0 0 0 1px #aaa !important;
}

.wpw-variation-swatch.is-selected {
	box-shadow: 0 0 0 2px #1d1d1f !important;
}

.wpw-variation-swatch.is-disabled {
	opacity: 0.3 !important;
	text-decoration: none !important;
}

.wpw-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wpw-variation-message {
	font-size: 12px !important;
	color: #d63638 !important;
	min-height: 16px !important;
}

/* Add to cart button */
.wpw-add-to-cart {
	appearance: none !important;
	cursor: pointer !important;
	border: none !important;
	background: #1d1d1f !important;
	color: #fff !important;
	padding: 12px 20px !important;
	border-radius: 4px !important;
	width: 100% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	margin-top: 16px !important;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease !important;
}

.wpw-card--style-hover_icon .wpw-add-to-cart{
	padding:0px !important;
}
.wpw-add-to-cart:hover {
	background: #3d3d3f !important;
}

.wpw-add-to-cart:disabled {
	background: #cccccc !important;
	color: #888888 !important;
	cursor: not-allowed !important;
}

.wpw-add-to-cart.is-loading {
	opacity: 0.7 !important;
	pointer-events: none !important;
}

.wpw-add-to-cart i,
.wpw-add-to-cart svg {
	font-size: 16px !important;
	width: 16px !important;
	height: 16px !important;
}

/* Hover Cart Icon card style — icon overlays the image, hidden until hover */
.wpw-floating-cart {
	--wpw-fab-offset: 16px !important;
	position: absolute !important;
	width: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 50% !important;
	background: #ffffff !important;
	color: #1d1d1f !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	opacity: 0 !important;
	pointer-events: none !important;
	transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, color 0.2s ease !important;
	z-index: 2 !important;
}

.wpw-floating-cart i,
.wpw-floating-cart svg {
	font-size: 18px !important;
	width: 18px !important;
	height: 18px !important;
}

.wpw-floating-cart[data-position="bottom-right"] { bottom: var(--wpw-fab-offset) !important; right: var(--wpw-fab-offset) !important; }
.wpw-floating-cart[data-position="bottom-left"]  { bottom: var(--wpw-fab-offset) !important; left: var(--wpw-fab-offset) !important; }
.wpw-floating-cart[data-position="top-right"]    { top: var(--wpw-fab-offset) !important; right: var(--wpw-fab-offset) !important; }
.wpw-floating-cart[data-position="top-left"]     { top: var(--wpw-fab-offset) !important; left: var(--wpw-fab-offset) !important; }

.wpw-floating-cart[data-position="bottom-center"] {
	bottom: var(--wpw-fab-offset) !important;
	left: 50% !important;
	transform: translateX(-50%) scale(0.85) !important;
}
.wpw-card:hover .wpw-floating-cart[data-position="bottom-center"] {
	transform: translateX(-50%) scale(1) !important;
}

.wpw-floating-cart[data-position="center-right"] {
	top: 50% !important;
	right: var(--wpw-fab-offset) !important;
	transform: translateY(-50%) scale(0.85) !important;
}
.wpw-card:hover .wpw-floating-cart[data-position="center-right"] {
	transform: translateY(-50%) scale(1) !important;
}

/* Default (non-centered) resting transform per animation style */
.wpw-floating-cart[data-animation="fade"]:not([data-position="bottom-center"]):not([data-position="center-right"]) {
	transform: none !important;
}
.wpw-floating-cart[data-animation="fade-scale"]:not([data-position="bottom-center"]):not([data-position="center-right"]) {
	transform: scale(0.8) !important;
}
.wpw-floating-cart[data-animation="slide-up"]:not([data-position="bottom-center"]):not([data-position="center-right"]) {
	transform: translateY(10px) !important;
}

.wpw-card:hover .wpw-floating-cart {
	opacity: 1 !important;
	pointer-events: auto !important;
}
.wpw-card:hover .wpw-floating-cart[data-animation="fade-scale"]:not([data-position="bottom-center"]):not([data-position="center-right"]) {
	transform: scale(1) !important;
}
.wpw-card:hover .wpw-floating-cart[data-animation="slide-up"]:not([data-position="bottom-center"]):not([data-position="center-right"]) {
	transform: translateY(0) !important;
}

.wpw-add-to-cart.wpw-floating-cart:hover {
	background: #1d1d1f !important;
	color: #ffffff !important;
}

.wpw-add-to-cart.wpw-floating-cart.is-loading {
	opacity: 1 !important;
	pointer-events: none !important;
}

/* Touch devices can't hover — always show the floating icon so it stays usable. */
@media (hover: none) {
	.wpw-floating-cart {
		opacity: 1 !important;
		pointer-events: auto !important;
		transform: none !important;
	}
}

.wpw-empty {
	text-align: center !important;
	padding: 40px 0 !important;
	color: #888 !important;
}

@media (max-width: 1024px) {
	.wpw-grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media (max-width: 767px) {
	.wpw-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
