/**
 * Smart Variation Swatches Frontend Styles
 */

:root {
	--smart-swatch-width: 38px;
	--smart-swatch-height: 38px;
	--smart-swatch-font-size: 13px;
	--smart-swatch-border-color: #d1d5db;
	--smart-swatch-border-hover: #6366f1;
	--smart-swatch-border-selected: #4f46e5;
	--smart-swatch-border-width: 2px;
	--smart-swatch-tick-color: #ffffff;
	--smart-tooltip-bg: #1f2937;
	--smart-tooltip-text: #ffffff;
	--smart-tooltip-radius: 6px;
	--smart-tooltip-img-size: 100px;
	--smart-shop-swatch-size: 26px;
}

/* Suppress redundant WooCommerce default loop elements inside custom product cards */
.ds-product-card .ds-product-body > .woocommerce-LoopProduct-link,
.ds-product-card .ds-product-body > .woocommerce-loop-product__link,
.ds-product-card .ds-product-body > a > img,
.ds-product-card .ds-product-body > a > .attachment-woocommerce_thumbnail,
.ds-product-card .ds-product-body > .onsale,
.ds-product-card .ds-product-body .woocommerce-loop-product__title {
	display: none !important;
}

/* Compact Product Cards: Hide excerpt & archive swatches to keep grid height minimal & clean */
.ds-product-card .ds-product-excerpt,
.ds-product-card .smart-shop-swatches-wrap {
	display: none !important;
}

/* ==========================================================================
   Fix Theme & WooCommerce Variation Form Layout Alignment & Gallery Grid
   ========================================================================== */
.ds-single-product-top {
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) !important;
}

.ds-product-gallery-wrap {
	min-width: 0 !important;
	width: 100% !important;
}

.ds-gallery-shell {
	grid-template-columns: 76px minmax(280px, 1fr) !important;
	width: 100% !important;
}

.ds-gallery-stage {
	min-width: 280px !important;
	width: 100% !important;
	position: relative !important;
}

.ds-gallery-viewport {
	width: 100% !important;
	min-width: 0 !important;
	min-height: 280px !important;
}

.ds-gallery-main-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}

.ds-single-summary {
	min-width: 0 !important;
	max-width: 100% !important;
}

@media (max-width: 960px) {
	.ds-single-product-top {
		grid-template-columns: 1fr !important;
	}
	.ds-gallery-shell {
		grid-template-columns: 1fr !important;
	}
	.ds-gallery-stage {
		min-width: 0 !important;
	}
	.ds-gallery-viewport {
		min-height: 220px !important;
	}
}

.ds-single-summary form.variations_form.cart,
form.variations_form.cart {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 18px 0 !important;
}

.ds-single-summary form.variations_form table.variations,
form.variations_form table.variations {
	display: table !important;
	width: 100% !important;
	margin: 0 0 14px 0 !important;
	border: none !important;
	border-collapse: collapse !important;
	background: transparent !important;
}

.ds-single-summary form.variations_form table.variations tr,
form.variations_form table.variations tr {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	margin-bottom: 12px !important;
	border: none !important;
	background: transparent !important;
	width: 100% !important;
}

.ds-single-summary form.variations_form table.variations th.label,
.ds-single-summary form.variations_form table.variations td.label,
form.variations_form table.variations th.label,
form.variations_form table.variations td.label {
	display: inline-block !important;
	min-width: 95px !important;
	width: 95px !important;
	text-align: left !important;
	padding: 0 10px 0 0 !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	color: #1e293b !important;
	vertical-align: middle !important;
	border: none !important;
	box-sizing: border-box !important;
}

.ds-single-summary form.variations_form table.variations td.value,
form.variations_form table.variations td.value {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	flex: 1 1 auto !important;
	gap: 10px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	box-sizing: border-box !important;
	width: 100% !important;
}

/* Styled Native Select Fallback (When Swatches is unconfigured or loading) */
.ds-single-summary form.variations_form select:not(.smart-swatches-hidden-select),
form.variations_form select:not(.smart-swatches-hidden-select) {
	flex: 1 1 auto !important;
	max-width: 320px !important;
	min-width: 180px !important;
	height: 46px !important;
	line-height: 46px !important;
	padding: 0 36px 0 14px !important;
	border-radius: 12px !important;
	border: 1.5px solid #cbd5e1 !important;
	background-color: #ffffff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 14px 14px !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	color: #1e293b !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
	cursor: pointer !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
}

.ds-single-summary form.variations_form select:not(.smart-swatches-hidden-select):focus,
form.variations_form select:not(.smart-swatches-hidden-select):focus {
	border-color: #2563eb !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
	outline: none !important;
}

/* Clean Reset / Clear Variations Button */
.ds-single-summary form.variations_form .reset_variations,
form.variations_form .reset_variations {
	font-size: 12px !important;
	color: #ef4444 !important;
	text-decoration: none !important;
	font-weight: 600 !important;
	padding: 5px 9px !important;
	border-radius: 6px !important;
	background: #fef2f2 !important;
	border: 1px solid #fee2e2 !important;
	display: inline-flex !important;
	align-items: center !important;
	line-height: 1 !important;
	white-space: nowrap !important;
	transition: all 0.15s ease !important;
}

.ds-single-summary form.variations_form .reset_variations:hover,
form.variations_form .reset_variations:hover {
	background: #fee2e2 !important;
	color: #b91c1c !important;
}

/* Single Variation Wrapper & Action Buttons Row */
.ds-single-summary form.variations_form .single_variation_wrap,
form.variations_form .single_variation_wrap {
	display: block !important;
	width: 100% !important;
	margin-top: 14px !important;
	clear: both !important;
}

.ds-single-summary form.variations_form .woocommerce-variation,
form.variations_form .woocommerce-variation {
	margin-bottom: 10px !important;
	width: 100% !important;
	clear: both !important;
}

/* Hide redundant lower variation price so price cleanly updates in top box */
.single_variation_wrap .woocommerce-variation-price,
.woocommerce-variation-price {
	display: none !important;
}

.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart,
form.variations_form .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 10px !important;
	width: 100% !important;
	margin: 0 !important;
}

.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .quantity,
.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button,
.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .ds-buy-now-btn,
.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .ds-wishlist-toggle {
	flex: 1 1 0 !important;
	min-width: 0 !important;
	height: 50px !important;
	box-sizing: border-box !important;
}

/* Hidden Native Select */
.smart-swatches-hidden-select {
	display: none !important;
}

/* Swatches Wrapper & Selected Label */
.smart-swatches-wrapper {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	width: 100%;
}

.smart-swatches-selected-label {
	display: inline-block;
	font-weight: 600;
	color: #4f46e5;
	font-size: 0.9em;
}

/* Never display duplicate selected label on button or radio swatches */
.smart-swatches-wrapper:has(.smart-type-button) .smart-swatches-selected-label,
.smart-swatches-wrapper:has(.smart-type-radio) .smart-swatches-selected-label,
.smart-swatches-wrapper[data-attribute*="plan"] .smart-swatches-selected-label,
.smart-swatches-wrapper[data-attribute*="day"] .smart-swatches-selected-label {
	display: none !important;
}

/* Swatches Container */
.smart-swatches-container {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0;
	position: relative;
}

/* Base Swatch Item */
.smart-swatch-item {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	cursor: pointer;
	border: var(--smart-swatch-border-width, 2px) solid var(--smart-swatch-border-color, #d1d5db);
	background-color: #ffffff;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	user-select: none;
	outline: none;
}

.smart-swatch-item:hover {
	border-color: var(--smart-swatch-border-hover, #6366f1);
	transform: translateY(-2px);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.smart-swatch-item.smart-swatch-selected {
	border-color: var(--smart-swatch-border-selected, #4f46e5);
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35);
}

/* Color & Image Swatches Dimensions */
.smart-swatch-color,
.smart-swatch-image {
	width: var(--swatch-item-width, var(--smart-swatch-width, 38px));
	height: var(--swatch-item-height, var(--smart-swatch-height, 38px));
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	flex-shrink: 0;
}

/* Light / White Swatch Inner Border */
.smart-swatch-color.smart-swatch-is-white {
	box-shadow: inset 0 0 0 1px #cbd5e1;
}

.smart-swatch-color.smart-swatch-is-white .smart-swatch-tick {
	color: #111827;
}

/* Button / Label Swatches */
.smart-swatch-button {
	min-width: var(--swatch-item-width, var(--smart-swatch-width, 38px));
	height: var(--swatch-item-height, var(--smart-swatch-height, 38px));
	padding: 0 16px;
	font-size: var(--smart-swatch-font-size, 13px);
	font-weight: 600;
	color: #374151;
	background: #ffffff;
	border-radius: 20px;
}

.smart-swatch-button.smart-swatch-selected {
	background: #4f46e5;
	color: #ffffff;
	border-color: #4f46e5;
}

.smart-swatch-button:hover:not(.smart-swatch-selected) {
	background: #f8fafc;
	color: #111827;
	border-color: #6366f1;
}

/* Radio Swatches */
.smart-type-radio {
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.smart-swatch-radio {
	border: none !important;
	box-shadow: none !important;
	padding: 4px 0;
	background: transparent;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transform: none !important;
}

.smart-swatch-radio-input {
	margin: 0;
	cursor: pointer;
	accent-color: #4f46e5;
	width: 16px;
	height: 16px;
}

.smart-swatch-radio-label {
	cursor: pointer;
	font-size: 14px;
	color: #374151;
	margin: 0;
}

/* Tick / Checkmark inside Color & Image Swatches */
.smart-swatch-tick {
	display: none;
	width: 16px;
	height: 16px;
	color: var(--smart-swatch-tick-color, #ffffff);
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.smart-swatch-tick svg {
	width: 100%;
	height: 100%;
	display: block;
}

.smart-swatch-selected .smart-swatch-tick {
	display: block;
}

/* Shapes */
.smart-shape-circle .smart-swatch-color,
.smart-shape-circle .smart-swatch-image {
	border-radius: 50%;
}

.smart-shape-circle .smart-swatch-button {
	border-radius: 24px;
}

.smart-shape-rounded .smart-swatch-item {
	border-radius: 8px;
}

.smart-shape-square .smart-swatch-item {
	border-radius: 0;
}

/* Tooltip Popup */
.smart-swatch-tooltip {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-6px);
	background: var(--smart-tooltip-bg, #1f2937);
	color: var(--smart-tooltip-text, #ffffff);
	font-size: 12px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: var(--smart-tooltip-radius, 6px);
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
	z-index: 999;
}

/* Never show tooltip on button/label or radio swatches */
.smart-swatch-button .smart-swatch-tooltip,
.smart-swatch-radio .smart-swatch-tooltip {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Tooltip Arrow */
.smart-swatch-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: var(--smart-tooltip-bg, #1f2937) transparent transparent transparent;
}

/* Tooltip with Image Preview */
.smart-swatch-tooltip.smart-tooltip-with-image {
	padding: 6px;
	text-align: center;
	white-space: normal;
	width: auto;
}

.smart-tooltip-img {
	width: var(--smart-tooltip-img-size, 100px);
	height: var(--smart-tooltip-img-size, 100px);
	object-fit: cover;
	border-radius: 4px;
	display: block;
	margin: 0 auto 4px;
}

.smart-tooltip-caption {
	display: block;
	font-size: 11px;
}

.smart-swatch-item:hover .smart-swatch-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(-10px);
}

/* Out of Stock / Unavailable Handling */
.smart-swatch-item.smart-swatch-out-of-stock.style-slash,
.smart-swatch-item.smart-swatch-disabled.style-slash {
	position: relative;
	overflow: hidden;
	opacity: 0.6;
}

.smart-swatch-item.smart-swatch-out-of-stock.style-slash::after,
.smart-swatch-item.smart-swatch-disabled.style-slash::after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 140%;
	height: 2px;
	background: #ef4444;
	transform: translateY(-50%) rotate(-45deg);
	transform-origin: center;
	pointer-events: none;
	box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.smart-swatch-item.smart-swatch-out-of-stock.style-blur,
.smart-swatch-item.smart-swatch-disabled.style-blur {
	opacity: 0.35;
	filter: grayscale(80%);
	cursor: not-allowed;
	pointer-events: none;
}

.smart-swatch-item.smart-swatch-out-of-stock.style-hide,
.smart-swatch-item.smart-swatch-disabled.style-hide {
	display: none !important;
}

/* Shop & Archive Swatches */
.smart-shop-swatches-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 8px 0;
	vertical-align: middle;
}

.smart-shop-swatch-item {
	width: var(--smart-shop-swatch-size, 26px);
	height: var(--smart-shop-swatch-size, 26px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid #d1d5db;
	text-decoration: none;
	box-sizing: border-box;
	transition: all 0.2s ease;
	outline: none;
	color: #374151;
	font-size: 11px;
}

.smart-shop-swatch-item:hover {
	border-color: #4f46e5;
	transform: scale(1.15);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.smart-shop-shape-circle .smart-shop-swatch-item {
	border-radius: 50%;
}

.smart-shop-shape-rounded .smart-shop-swatch-item {
	border-radius: 4px;
}

.smart-shop-shape-square .smart-shop-swatch-item {
	border-radius: 0;
}

.smart-shop-swatch-more {
	font-size: 11px;
	font-weight: 600;
	color: #6b7280;
	text-decoration: none;
	padding: 2px 6px;
	background: #f3f4f6;
	border-radius: 10px;
	line-height: 1;
}

.smart-shop-swatch-more:hover {
	background: #e5e7eb;
	color: #111827;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.smart-swatch-tooltip {
		display: none !important;
	}
	
	.ds-single-summary form.variations_form table.variations tr,
	form.variations_form table.variations tr {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 6px !important;
	}

	.ds-single-summary form.variations_form table.variations th.label,
	form.variations_form table.variations th.label {
		width: 100% !important;
		min-width: 100% !important;
		padding: 0 !important;
	}

	.ds-single-summary form.variations_form select:not(.smart-swatches-hidden-select),
	form.variations_form select:not(.smart-swatches-hidden-select) {
		max-width: 100% !important;
		width: 100% !important;
	}

	.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart,
	form.variations_form .woocommerce-variation-add-to-cart {
		flex-wrap: wrap !important;
		gap: 8px !important;
	}

	.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .quantity,
	.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button,
	.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .ds-buy-now-btn,
	.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart .ds-wishlist-toggle {
		flex: 1 1 calc(50% - 4px) !important;
		width: calc(50% - 4px) !important;
	}
}

/* ==========================================================================
   Bulk Quantity Discounts / Tiered Pricing Table Card (Compact & Refined)
   ========================================================================== */

/* Layout & Line-Break Fix: Scoped strictly to product forms with bulk pricing to avoid theme/plugin conflicts */
.ds-single-summary form.cart.smart-bulk-active-form,
form.cart.smart-bulk-active-form,
form.cart:has(.smart-bulk-card),
.single-product .product:has(.smart-bulk-card) form.cart,
.single_variation_wrap:has(.smart-bulk-card),
.woocommerce-variation-add-to-cart:has(.smart-bulk-card) {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

.smart-bulk-card {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	flex: 0 0 100% !important;
	clear: both !important;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 14px;
	margin: 10px 0 14px 0 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
	box-sizing: border-box !important;
}

.smart-bulk-clearfix {
	display: block !important;
	clear: both !important;
	width: 100% !important;
	flex: 0 0 100% !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0 !important;
}

/* Ensure the quantity box and action buttons sit neatly on their own row below the table */
.ds-single-summary form.cart.smart-bulk-active-form .quantity,
form.cart.smart-bulk-active-form .quantity,
form.cart:has(.smart-bulk-card) .quantity,
.ds-single-summary form.cart.smart-bulk-active-form .single_add_to_cart_button,
form.cart.smart-bulk-active-form .single_add_to_cart_button,
form.cart:has(.smart-bulk-card) .single_add_to_cart_button,
.ds-single-summary form.cart.smart-bulk-active-form .ds-buy-now-btn,
form.cart.smart-bulk-active-form .ds-buy-now-btn,
form.cart:has(.smart-bulk-card) .ds-buy-now-btn,
.ds-single-summary form.cart.smart-bulk-active-form .ds-wishlist-btn-wrap,
form.cart.smart-bulk-active-form .ds-wishlist-btn-wrap {
	margin-top: 0 !important;
}

/* Card Header */
.smart-bulk-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 2px;
}

.smart-bulk-title-group {
	display: flex;
	align-items: center;
	gap: 6px;
}

.smart-bulk-icon {
	color: #dc2626;
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.smart-bulk-title {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	margin: 0 !important;
	line-height: 1.2 !important;
}

.smart-bulk-badge-top {
	display: inline-flex;
	align-items: center;
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
}

.smart-bulk-subtitle {
	font-size: 11px;
	color: #64748b;
	margin: 2px 0 8px 0;
	line-height: 1.3;
}

/* Table Wrapping */
.smart-bulk-table-wrap {
	overflow-x: auto !important;
	-webkit-overflow-scrolling: touch;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
}

.smart-bulk-table {
	width: 100% !important;
	border-collapse: collapse !important;
	text-align: center !important;
	margin: 0 !important;
	border: none !important;
}

.smart-bulk-table thead th {
	background: #f8fafc !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	color: #475569 !important;
	padding: 6px 4px !important;
	border-bottom: 1px solid #e2e8f0 !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	text-align: center !important;
	white-space: nowrap;
	letter-spacing: 0.2px;
}

.smart-bulk-table tbody tr {
	border-bottom: 1px solid #f1f5f9 !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	transition: background-color 0.15s ease;
	cursor: pointer;
	position: relative;
}

.smart-bulk-table tbody tr:last-child {
	border-bottom: none !important;
}

.smart-bulk-table tbody tr:hover {
	background-color: #f8fafc;
}

.smart-bulk-table tbody tr.active {
	background-color: #f1f5f9;
}

.smart-bulk-table tbody td {
	padding: 5px 4px !important;
	font-size: 11.5px !important;
	color: #1e293b !important;
	vertical-align: middle !important;
	border: none !important;
	text-align: center !important;
	line-height: 1.25 !important;
}

.smart-bulk-table tbody td.col-packets {
	position: relative;
	font-weight: 600;
	color: #0f172a;
}

.smart-bulk-active-indicator {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3.5px;
	background: #dc2626;
	border-top-left-radius: 2px;
	border-bottom-left-radius: 2px;
}

.smart-bulk-table tbody tr.active .smart-bulk-active-indicator {
	display: block;
}

/* Compact Pill Badges */
.smart-bulk-pill-pcs {
	background: #f8fafc;
	color: #334155;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 1px 7px;
	font-size: 10.5px;
	font-weight: 500;
	display: inline-block;
	white-space: nowrap;
}

.smart-bulk-price-val {
	font-weight: 700;
	font-size: 12px;
	color: #0f172a;
}

.smart-bulk-total-note {
	display: block;
	font-size: 10px;
	color: #64748b;
	font-weight: 400;
	margin-top: 1px;
}

.smart-bulk-pill-rate {
	background: #eff6ff;
	color: #2563eb;
	border: 1px solid #bfdbfe;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 10.5px;
	font-weight: 600;
	display: inline-block;
	white-space: nowrap;
}

.smart-bulk-pill-standard {
	background: #f1f5f9;
	color: #64748b;
	border-radius: 10px;
	padding: 2px 8px;
	font-size: 10.5px;
	font-weight: 500;
	display: inline-block;
	white-space: nowrap;
}

.smart-bulk-pill-save {
	background: #16a34a;
	color: #ffffff;
	border-radius: 10px;
	padding: 2px 8px;
	font-size: 10.5px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(22, 163, 74, 0.15);
}

/* Bottom Active Summary Banner (Compact) */
.smart-bulk-active-banner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px dashed #e2e8f0;
	font-size: 11.5px;
	font-weight: 700;
	color: #dc2626;
	line-height: 1.3;
}

.smart-bulk-check-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.smart-bulk-pill-rate-mini {
	background: #eff6ff;
	color: #2563eb;
	border: 1px solid #bfdbfe;
	border-radius: 3px;
	padding: 1px 5px;
	font-size: 10px;
	font-weight: 600;
	margin: 0 2px;
}

.smart-bulk-active-total {
	color: #dc2626;
	font-weight: 700;
}

/* ==========================================================================
   Software License Plan Comparison Table & Cards
   ========================================================================== */

.ds-single-summary form.cart:has(.smart-license-card),
.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart:has(.smart-license-card),
.ds-single-summary form.cart.smart-license-active-form,
form.cart.smart-license-active-form,
form.cart:has(.smart-license-card),
.single-product .product:has(.smart-license-card) form.cart,
.single_variation_wrap:has(.smart-license-card),
.woocommerce-variation-add-to-cart:has(.smart-license-card) {
	display: flex !important;
	flex-wrap: wrap !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

.smart-license-card {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	flex: 0 0 100% !important;
	clear: both !important;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 14px;
	margin: 10px 0 14px 0 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
	box-sizing: border-box !important;
}

/* Full-width placement below product summary */
.ds-single-product-top ~ .smart-license-card,
.woocommerce-after-single-product-summary > .smart-license-card {
	margin: 20px 0 28px 0 !important;
	border-radius: 10px;
}

.smart-license-clearfix {
	display: block !important;
	clear: both !important;
	width: 100% !important;
	flex: 0 0 100% !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0 !important;
}

/* Header */
.smart-license-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.smart-license-title-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.smart-license-icon {
	color: #2563eb;
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.smart-license-title-inner {
	display: flex;
	flex-direction: column;
}

.smart-license-title {
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	margin: 0 !important;
	line-height: 1.25 !important;
}

.smart-license-subtitle {
	font-size: 11px;
	color: #64748b;
	margin: 2px 0 0 0;
	line-height: 1.3;
}

.smart-license-badge-top {
	display: inline-flex;
	align-items: center;
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
}

/* Table Layout */
.smart-license-table-wrap {
	overflow-x: auto !important;
	-webkit-overflow-scrolling: touch;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
}

.smart-license-table {
	width: 100% !important;
	border-collapse: collapse !important;
	text-align: left !important;
	margin: 0 !important;
	border: none !important;
}

.smart-license-table thead th {
	background: #f8fafc !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	color: #475569 !important;
	padding: 7px 8px !important;
	border-bottom: 1px solid #e2e8f0 !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	white-space: nowrap;
	letter-spacing: 0.2px;
}

.smart-license-table tbody tr {
	border-bottom: 1px solid #f1f5f9 !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	transition: all 0.15s ease;
	cursor: pointer;
	position: relative;
}

.smart-license-table tbody tr:last-child {
	border-bottom: none !important;
}

.smart-license-table tbody tr:hover {
	background-color: #f8fafc;
}

.smart-license-table tbody tr.active {
	background-color: #f0fdf4 !important;
}

.smart-license-table tbody tr.featured {
	background-color: #fbfdff;
}

.smart-license-table tbody tr.featured.active {
	background-color: #f0fdf4 !important;
}

.smart-license-table tbody td {
	padding: 8px 8px !important;
	font-size: 12px !important;
	color: #1e293b !important;
	vertical-align: middle !important;
	border: none !important;
	line-height: 1.3 !important;
}

.smart-license-plan-name-cell {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
}

.smart-license-active-indicator {
	display: none;
	position: absolute;
	left: -8px;
	top: -8px;
	bottom: -8px;
	width: 3.5px;
	background: #16a34a;
	border-top-left-radius: 2px;
	border-bottom-left-radius: 2px;
}

.smart-license-table tbody tr.active .smart-license-active-indicator {
	display: block;
}

.smart-license-name-group {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
}

.smart-license-plan-name {
	font-weight: 700;
	color: #0f172a;
	font-size: 12.5px;
}

.smart-license-pill-duration {
	background: #eff6ff;
	color: #2563eb;
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	padding: 1px 7px;
	font-size: 10.5px;
	font-weight: 600;
	white-space: nowrap;
}

.smart-license-pill-badge {
	background: #f1f5f9;
	color: #475569;
	border-radius: 10px;
	padding: 1px 7px;
	font-size: 10px;
	font-weight: 600;
	white-space: nowrap;
}

.smart-license-pill-badge.featured {
	background: #fef3c7;
	color: #b45309;
	border: 1px solid #fde68a;
}

.smart-license-device-badge {
	display: inline-flex;
	align-items: center;
	background: #f8fafc;
	color: #334155;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 2px 7px;
	font-size: 11px;
	font-weight: 500;
	white-space: nowrap;
}

.smart-license-features-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.smart-license-feat-tag {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: #f8fafc;
	color: #334155;
	border-radius: 4px;
	padding: 1px 6px;
	font-size: 11px;
	line-height: 1.3;
}

.smart-license-price-box {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
}

.smart-license-del-price {
	font-size: 11px;
	color: #94a3b8;
}

.smart-license-current-price {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}

.smart-license-table tbody tr.active .smart-license-current-price {
	color: #16a34a;
}

.smart-license-pill-save {
	background: #16a34a;
	color: #ffffff;
	border-radius: 8px;
	padding: 1px 6px;
	font-size: 9.5px;
	font-weight: 600;
	white-space: nowrap;
}

.smart-license-row-select-btn {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 5px 12px;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: all 0.15s ease;
}

.smart-license-row-select-btn:hover {
	background: #e2e8f0;
	border-color: #94a3b8;
}

.smart-license-row-select-btn.active {
	background: #16a34a;
	color: #ffffff;
	border-color: #16a34a;
	box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
}

.smart-license-check-icon {
	display: none;
}

.smart-license-row-select-btn.active .smart-license-check-icon {
	display: inline-flex;
}

/* ==========================================================================
   Cards Grid Layout
   ========================================================================== */

.smart-license-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin-top: 6px;
}

.smart-license-plan-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 14px 12px;
	position: relative;
	display: flex;
	flex-direction: column;
	transition: all 0.2s ease;
	cursor: pointer;
}

.smart-license-plan-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.smart-license-plan-card.featured {
	border-color: #93c5fd;
	background: #fbfdff;
}

.smart-license-plan-card.active {
	border-color: #16a34a !important;
	box-shadow: 0 0 0 1px #16a34a, 0 4px 12px rgba(22, 163, 74, 0.1) !important;
	background: #ffffff !important;
}

.smart-license-card-badge {
	position: absolute;
	top: -9px;
	right: 10px;
	background: #2563eb;
	color: #ffffff;
	border-radius: 10px;
	padding: 1px 8px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.smart-license-plan-card.featured .smart-license-card-badge {
	background: #d97706;
}

.smart-license-plan-card.active .smart-license-card-badge {
	background: #16a34a;
}

.smart-license-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin-bottom: 8px;
}

.smart-license-card-title {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	margin: 0 !important;
}

.smart-license-card-price-wrap {
	margin-bottom: 10px;
}

.smart-license-card-regular-price {
	font-size: 11px;
	color: #94a3b8;
	display: block;
}

.smart-license-card-price {
	display: flex;
	align-items: baseline;
	gap: 4px;
}

.smart-license-card-amount {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
}

.smart-license-plan-card.active .smart-license-card-amount {
	color: #16a34a;
}

.smart-license-card-period {
	font-size: 11px;
	color: #64748b;
}

.smart-license-card-savings {
	display: inline-block;
	background: #dcfce7;
	color: #15803d;
	border-radius: 4px;
	padding: 1px 5px;
	font-size: 10px;
	font-weight: 600;
	margin-top: 3px;
}

.smart-license-card-devices {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	color: #475569;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f1f5f9;
}

.smart-license-card-features {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 14px 0 !important;
	flex: 1;
}

.smart-license-card-features li {
	display: flex;
	align-items: flex-start;
	gap: 5px;
	font-size: 11.5px;
	color: #334155;
	margin-bottom: 5px !important;
	line-height: 1.35;
}

.smart-license-card-features li svg {
	flex-shrink: 0;
	margin-top: 2px;
}

.smart-license-select-btn {
	width: 100%;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: all 0.15s ease;
	border: 1px solid #cbd5e1;
	background: #f8fafc;
	color: #1e293b;
}

.smart-license-select-btn:hover {
	background: #e2e8f0;
}

.smart-license-plan-card.active .smart-license-select-btn {
	background: #16a34a;
	color: #ffffff;
	border-color: #16a34a;
}

/* Bottom Active Summary Banner */
.smart-license-active-banner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed #e2e8f0;
	font-size: 12px;
	font-weight: 700;
	color: #2563eb;
	line-height: 1.3;
}

.smart-license-active-check {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.smart-license-active-instant-badge {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	background: #f0fdf4;
	color: #16a34a;
	border: 1px solid #bbf7d0;
	border-radius: 4px;
	padding: 1px 7px;
	font-size: 10.5px;
	font-weight: 600;
}

@media (max-width: 600px) {
	.smart-license-cards-grid {
		grid-template-columns: 1fr;
	}
	.smart-license-active-instant-badge {
		margin-left: 0;
		width: 100%;
		margin-top: 4px;
	}
}

/* ==========================================================================
   Smart Direct Download Mode (Hide Purchase Buttons & Show Download)
   ========================================================================== */
.single-product .single_add_to_cart_button:has(~ .smart-direct-download-wrapper),
.single-product .ds-buy-now-btn:has(~ .smart-direct-download-wrapper),
.single-product .quantity:has(~ .smart-direct-download-wrapper),
.single-product form.cart:has(.smart-direct-download-wrapper) .single_add_to_cart_button,
.single-product form.cart:has(.smart-direct-download-wrapper) .ds-buy-now-btn,
.single-product form.cart:has(.smart-direct-download-wrapper) .quantity:not(.smart-allow-qty),
.single-product form.cart:has(.smart-direct-download-wrapper) button[name="add-to-cart"],
.single-product form.cart:has(.smart-direct-download-wrapper) input[name="add-to-cart"],
.single-product .woocommerce-variation-add-to-cart:has(.smart-direct-download-wrapper) .single_add_to_cart_button,
.single-product .woocommerce-variation-add-to-cart:has(.smart-direct-download-wrapper) .ds-buy-now-btn,
.single-product .woocommerce-variation-add-to-cart:has(.smart-direct-download-wrapper) .quantity,
.single-product .ds-single-actions:has(.smart-direct-download-wrapper) .single_add_to_cart_button,
.single-product .ds-single-actions:has(.smart-direct-download-wrapper) .ds-buy-now-btn,
.single-product .ds-single-actions:has(.smart-direct-download-wrapper) .quantity {
	display: none !important;
	visibility: hidden !important;
	width: 0 !important;
	min-width: 0 !important;
	max-width: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	opacity: 0 !important;
	border: none !important;
	pointer-events: none !important;
	position: absolute !important;
	left: -9999px !important;
	overflow: hidden !important;
}

/* Ensure flex containers wrap cleanly so Direct Download takes full width */
.ds-single-summary form.cart:has(.smart-direct-download-wrapper),
.ds-single-summary form.variations_form .woocommerce-variation-add-to-cart:has(.smart-direct-download-wrapper) {
	flex-wrap: wrap !important;
}

/* License Plan Comparison Table must always be visible */
.smart-license-card,
.single-product .smart-license-card,
.single-product form.cart .smart-license-card,
.single-product form.variations_form .smart-license-card {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100% !important;
}

.smart-download-meta-info {
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
}

.smart-download-meta-info span {
	font-size: 15px !important;
	font-weight: 700 !important;
}

.smart-download-meta-info .dashicons {
	font-size: 19px !important;
	width: 19px !important;
	height: 19px !important;
}

.smart-download-action-btn,
.smart-download-action-btn--direct,
.smart-download-action-btn--login {
	background: var(--ds-primary, #1d4ed8) !important;
	background-image: linear-gradient(135deg, var(--ds-accent, #2563eb) 0%, var(--ds-primary, #1d4ed8) 100%) !important;
	color: #ffffff !important;
	border-radius: var(--ds-radius, 8px) !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}

.smart-download-action-btn:hover,
.smart-download-action-btn--direct:hover,
.smart-download-action-btn--login:hover {
	background: var(--ds-primary-hover, #1e40af) !important;
	background-image: linear-gradient(135deg, var(--ds-primary, #1d4ed8) 0%, var(--ds-primary-hover, #1e40af) 100%) !important;
	color: #ffffff !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22) !important;
}

.smart-download-status-login,
.smart-download-status-direct {
	color: var(--ds-primary, #1d4ed8) !important;
}

/* Loop / Product Card Direct Download Button */
.smart-loop-download-btn,
a.button.smart-loop-download-btn {
	background: var(--ds-primary, #1d4ed8) !important;
	color: #ffffff !important;
	border-radius: var(--ds-radius, 6px) !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	text-decoration: none !important;
	transition: all 0.2s ease !important;
}

.smart-loop-download-btn:hover,
a.button.smart-loop-download-btn:hover {
	background: var(--ds-primary-hover, #1e40af) !important;
	color: #ffffff !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25) !important;
}

/* ==========================================================================
   Single Product Specification Cards (2x2 Grid)
   ========================================================================== */
.smart-product-specs-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 12px !important;
	margin: 18px 0 20px !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.smart-spec-card {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 12px 16px !important;
	background: var(--ds-surface-alt, #f8fafc) !important;
	border: 1px solid var(--ds-border, #e2e8f0) !important;
	border-radius: var(--ds-radius, 10px) !important;
	box-sizing: border-box !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.smart-spec-card:hover {
	border-color: var(--ds-primary, #2563eb) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.smart-spec-card-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px !important;
	height: 22px !important;
	color: var(--ds-primary, #2563eb) !important;
	flex-shrink: 0 !important;
}

.smart-spec-card-icon svg {
	width: 20px !important;
	height: 20px !important;
	display: block !important;
	stroke: currentColor !important;
	color: inherit !important;
}

.smart-spec-card-content {
	display: flex !important;
	flex-direction: column !important;
	gap: 2px !important;
	min-width: 0 !important;
	flex: 1 !important;
}

.smart-spec-card-label {
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.6px !important;
	color: var(--ds-text-muted, #64748b) !important;
	line-height: 1.2 !important;
}

.smart-spec-card-value {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: var(--ds-text-heading, #0f172a) !important;
	line-height: 1.3 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

@media (max-width: 540px) {
	.smart-product-specs-grid {
		grid-template-columns: 1fr !important;
		gap: 10px !important;
	}
	.smart-spec-card {
		padding: 10px 14px !important;
	}
}




