/* ==========================================================================
   TechLight Studio — design system (Woodmart-aligned)
   ========================================================================== */

/* Hide legacy SPS plugin UI on studio routes */
body.tl-studio-page #sps-project-sidebar,
body.tl-studio-page #sps-add-to-project-modal,
body.tl-studio-page #sps-project-modal,
body.tl-wishlist-page #sps-project-sidebar,
body.tl-wishlist-page #sps-add-to-project-modal,
body.tl-wishlist-page #sps-project-modal {
	display: none !important;
}

/* ---- Tokens (global so footer modals on product pages inherit them) ---- */
:root {
	--tl-color-text: var(--wd-text-color, #333);
	--tl-color-title: var(--wd-title-color, #222);
	--tl-color-muted: var(--color-gray-500, #767676);
	--tl-color-muted-light: var(--color-gray-600, #666);
	--tl-color-border: var(--brdcolor-gray-300, #e9e9e9);
	--tl-color-surface: var(--wd-main-bgcolor, #fff);
	--tl-color-sidebar: var(--bgcolor-gray-100, #f7f7f7);
	--tl-color-accent: #F7D218;
	--tl-color-accent-text: #000;
	--tl-radius: var(--wd-brd-radius, 0);
	--tl-font-text: var(--wd-text-font, inherit);
	--tl-font-title: var(--wd-title-font, var(--wd-text-font, inherit));
	--tl-font-size: var(--wd-text-font-size, 14px);
	--tl-btn-height: var(--btn-height, 42px);
	--tl-btn-padding: var(--btn-padding, 5px 20px);
	--tl-btn-radius: var(--btn-accented-brd-radius, var(--wd-brd-radius, 0));
	--tl-form-height: var(--wd-form-height, 42px);
	--tl-form-border: var(--wd-form-brd-color, #e9e9e9);
}

.tl-wishlist-studio {
	/* Studio shell inherits :root tokens */
}

/* ---- Page shell ---- */
body.tl-studio-page .tl-wishlist-studio,
body.tl-wishlist-page .tl-wishlist-studio {
	width: 100%;
	max-width: 100%;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	font-family: var(--tl-font-text);
	font-size: var(--tl-font-size);
	color: var(--tl-color-text);
}

body.tl-studio-page .tl-wishlist-layout,
body.tl-wishlist-page .tl-wishlist-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

body.tl-studio-page .wishlist-main,
body.tl-wishlist-page .wishlist-main {
	background: var(--tl-color-surface);
	min-width: 0;
	flex: 1 1 0;
}

.tl-studio-main {
	flex: 1 1 auto;
}

.tl-studio-container {
	padding: 1.5rem 1.25rem 2.5rem;
	max-width: 100%;
}

@media (min-width: 768px) {
	.tl-studio-container {
		padding: 2rem 2.5rem 3rem;
	}
}

/* ---- Mobile nav ---- */
.tl-studio-mobile-nav {
	display: flex;
	flex: 0 0 100%;
	width: 100%;
	border-bottom: 1px solid var(--tl-color-border);
	background: var(--tl-color-surface);
}

@media (min-width: 1024px) {
	.tl-studio-mobile-nav {
		display: none;
	}
}

.tl-studio-mobile-nav__link {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1rem;
	font-size: 13px;
	font-weight: 600;
	color: var(--tl-color-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color 0.15s, border-color 0.15s;
}

.tl-studio-mobile-nav__link:hover {
	color: var(--tl-color-title);
}

.tl-studio-mobile-nav__link.is-active {
	color: var(--tl-color-title);
	border-bottom-color: var(--tl-color-accent);
}

/* ---- Sidebar ---- */
body.tl-studio-page .wishlist-sidebar,
body.tl-wishlist-page .wishlist-sidebar {
	background-color: var(--tl-color-sidebar) !important;
	border-right: 1px solid var(--tl-color-border);
	padding-top: 2rem;
	padding-bottom: 2rem;
	display: flex;
	flex-direction: column;
}

@media (min-width: 1024px) {
	body.tl-studio-page .wishlist-sidebar,
	body.tl-wishlist-page .wishlist-sidebar {
		position: sticky !important;
		top: var(--tl-header-height, 130px) !important;
		align-self: flex-start;
		width: 18rem !important;
		flex-shrink: 0;
		min-height: calc(100vh - var(--tl-header-height, 130px));
		max-height: calc(100vh - var(--tl-header-height, 130px));
		z-index: 10;
		overflow-y: auto;
	}

	body.tl-studio-page .wishlist-main,
	body.tl-wishlist-page .wishlist-main {
		margin-left: 0 !important;
		width: auto !important;
	}
}

@media (max-width: 1023px) {
	body.tl-studio-page .wishlist-sidebar,
	body.tl-wishlist-page .wishlist-sidebar {
		display: none !important;
	}

	body.tl-studio-page .wishlist-main,
	body.tl-wishlist-page .wishlist-main {
		margin-left: 0 !important;
		width: 100% !important;
	}
}

.tl-studio-sidebar__nav {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0 0.75rem;
}

.tl-studio-sidebar__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	font-size: 14px;
	font-weight: 500;
	color: var(--tl-color-text);
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: background 0.15s, border-color 0.15s;
}

.tl-studio-sidebar__link:hover {
	background: rgba(255, 255, 255, 0.6);
	color: var(--tl-color-title);
}

.tl-studio-sidebar__link.is-active {
	background: var(--tl-color-surface);
	border-left-color: var(--tl-color-accent);
	color: var(--tl-color-title);
	font-weight: 600;
}

.tl-studio-sidebar__link .tl-studio-icon-wrap {
	width: 24px;
	height: 24px;
}

/* Sidebar project stats (desktop) */
.tl-studio-sidebar-stats {
	display: none;
}

@media (min-width: 1024px) {
	.tl-studio-sidebar-stats {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
		margin-top: 2rem;
		padding: 0 0.75rem;
	}

	.tl-studio-sidebar-stats .tl-studio-stat-card {
		background: var(--tl-color-surface);
		padding: 1rem 1.125rem;
		border: 1px solid var(--tl-color-border);
	}

	.tl-studio-sidebar-stats .tl-studio-stat-card__value {
		font-size: 1.5rem;
	}

	.tl-studio-sidebar-stats .tl-studio-stat-card__label {
		font-size: 11px;
	}
}

.tl-studio-stats--mobile {
	display: grid;
}

@media (min-width: 1024px) {
	.tl-studio-stats--mobile {
		display: none;
	}
}

/* ---- Icons ---- */
.tl-studio-icon {
	display: block;
	flex-shrink: 0;
	color: currentColor;
}

.tl-studio-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	flex-shrink: 0;
	color: inherit;
}

.tl-studio-icon-wrap--lg {
	color: var(--tl-color-muted);
}

/* ---- Typography ---- */
.tl-studio-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	margin-bottom: 1.5rem;
}

.tl-studio-header__text {
	min-width: 0;
}

.tl-studio-title {
	font-family: var(--tl-font-title);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: var(--wd-title-font-weight, 600);
	color: var(--tl-color-title);
	margin: 0 0 0.25rem;
	line-height: 1.2;
	letter-spacing: normal;
}

.tl-studio-subtitle {
	font-size: 14px;
	color: var(--tl-color-muted);
	margin: 0;
}

.tl-studio-back-link {
	display: inline-block;
	font-size: 13px;
	color: var(--tl-color-muted);
	text-decoration: none;
	margin-bottom: 0.5rem;
}

.tl-studio-back-link:hover {
	color: var(--tl-color-title);
}

.tl-studio-section-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.tl-studio-section-title {
	font-family: var(--tl-font-title);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--tl-color-title);
	margin: 0;
}

/* ---- Buttons ---- */
.tl-studio-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.tl-studio-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--tl-btn-height);
	padding: var(--tl-btn-padding) !important;
	font-family: var(--tl-font-text) !important;
	font-size: var(--tl-font-size) !important;
	font-weight: var(--btn-font-weight, 600) !important;
	text-transform: var(--btn-transform, uppercase) !important;
	letter-spacing: normal !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	text-decoration: none !important;
	border-radius: var(--tl-btn-radius) !important;
	transition: opacity 0.2s, background 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.tl-studio-btn--primary {
	background: var(--tl-color-accent) !important;
	color: var(--tl-color-accent-text) !important;
	border: var(--btn-accented-brd-width, 0) solid var(--btn-accented-brd-color, transparent) !important;
}

.tl-studio-btn--primary:hover {
	opacity: 0.92;
}

.tl-studio-btn--secondary {
	background: var(--btn-bgcolor, transparent) !important;
	color: var(--btn-color, var(--tl-color-title)) !important;
	border: var(--btn-brd-width, 1px) solid var(--btn-brd-color, var(--tl-color-border)) !important;
}

.tl-studio-btn--secondary:hover {
	border-color: var(--tl-color-title);
}

.tl-studio-btn--danger {
	background: #ba1a1a !important;
	color: #fff !important;
	border: none !important;
}

.tl-studio-btn--danger:hover {
	opacity: 0.9;
}

.tl-studio-btn--success {
	background: #4caf50 !important;
	color: #fff !important;
	border: none !important;
}

.tl-studio-btn--success:hover {
	opacity: 0.92;
}

.tl-studio-btn--warning {
	background: #f5b800 !important;
	color: #1a1a1a !important;
	border: none !important;
}

.tl-studio-btn--warning:hover {
	opacity: 0.92;
}

.tl-studio-btn:disabled,
.tl-studio-btn[disabled] {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
}

/* ---- Toolbar & tabs ---- */
.tl-studio-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--tl-color-border);
}

.tl-studio-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
}

.tl-studio-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 0.5rem 0;
	font-family: var(--tl-font-text);
	font-size: 14px;
	font-weight: 500;
	color: var(--tl-color-muted);
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}

.tl-studio-tab:hover {
	color: var(--tl-color-title);
}

.tl-studio-tab.is-active {
	color: var(--tl-color-title);
	border-bottom-color: var(--tl-color-accent);
	font-weight: 600;
}

.tl-studio-sort {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	white-space: nowrap;
	font-size: 13px;
	color: var(--tl-color-muted);
}

.tl-studio-sort__label {
	white-space: nowrap;
	margin: 0;
	flex-shrink: 0;
}

.tl-studio-sort select,
.tl-studio-sort__select {
	height: var(--tl-form-height);
	padding: 0 0.75rem;
	border: 1px solid var(--tl-form-border);
	background: var(--tl-color-surface);
	font-family: var(--tl-font-text);
	font-size: 13px;
	color: var(--tl-color-text);
	min-width: 9.5rem;
}

/* ---- Tables ---- */
.tl-studio-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tl-studio-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--tl-color-surface);
}

.tl-studio-table__head {
	text-align: left;
	padding: 0.75rem 1rem;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--tl-color-muted-light);
	border-bottom: 1px solid var(--tl-color-border);
	white-space: nowrap;
}

.tl-studio-table__head--actions,
.tl-studio-table__cell--actions {
	text-align: right;
}

.tl-studio-table__head--product {
	min-width: 280px;
}

.tl-studio-table__select-all {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--tl-color-muted-light);
}

.tl-studio-table__row {
	border-bottom: 1px solid var(--tl-color-border);
}

.tl-studio-table__row:last-child {
	border-bottom: none;
}

.tl-studio-table__cell {
	padding: 1rem;
	vertical-align: middle;
	font-size: 14px;
}

@media (max-width: 767px) {
	.tl-studio-table__head,
	.tl-studio-table__cell {
		padding: 0.75rem 0.5rem;
	}
}

.tl-studio-product-cell {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.tl-studio-product-cell__info {
	min-width: 0;
	flex: 1;
}

.tl-studio-product-cell__name {
	font-weight: 600;
	font-size: 14px;
	color: var(--tl-color-title);
}

.tl-studio-product-cell__specs {
	font-size: 12px;
	color: var(--tl-color-muted);
	margin-top: 0.25rem;
}

.tl-wishlist-code__sku {
	font-size: 14px;
	line-height: 1.4;
	color: var(--tl-color-text);
}

.tl-wishlist-code__pac {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	line-height: 1.4;
	color: var(--tl-color-muted, #767676);
	margin-top: 0.2rem;
	letter-spacing: 0.02em;
}

.tl-wishlist-project-badge {
	display: inline-block;
	margin-top: 0.35rem;
	padding: 0.15rem 0.45rem;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tl-color-muted, #767676);
	background: var(--tl-color-sidebar, #f7f7f7);
	border: 1px solid var(--tl-color-border, #e9e9e9);
	border-radius: 2px;
}

.wishlist-row--project-ineligible .tl-studio-product-cell__name {
	color: var(--tl-color-muted-light, #666);
}

.sps-single-product-project-wrap .tl-variation-add-project {
	min-height: 36px;
}

.tl-studio-product-thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--tl-color-border);
	background: var(--tl-color-sidebar);
}

.tl-studio-product-thumb--sm {
	width: 56px;
	height: 56px;
}

.tl-studio-product-thumb--placeholder {
	display: block;
}

/* ---- Checkbox (wishlist table inputs only) ---- */
input.sps-studio-checkbox {
	width: 1rem;
	height: 1rem;
	accent-color: var(--tl-color-accent);
	flex-shrink: 0;
}

/* ---- Table actions ---- */
.sps-studio-table-action {
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--tl-font-text);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--tl-color-muted);
	padding: 0.25rem 0.5rem;
	text-decoration: none;
	display: inline;
}

.sps-studio-table-action:hover {
	color: var(--tl-color-title);
}

.sps-studio-table-action--danger {
	color: #ba1a1a;
}

.sps-studio-table-action--danger:hover {
	color: #8b0000;
}

.sps-studio-table-action.sps-request-offer-btn--update {
	background: #4caf50;
	color: #fff;
	border-radius: 4px;
	padding: 0.35rem 0.65rem;
}

.sps-studio-table-action.sps-request-offer-btn--update:hover {
	color: #fff;
	opacity: 0.92;
}

/* ---- Empty state ---- */
.tl-studio-empty {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 3rem 1.5rem;
	border: 1px dashed var(--tl-color-border);
	background: var(--tl-color-sidebar);
	margin-top: 1rem;
}

.tl-studio-empty.is-visible {
	display: flex;
}

.tl-studio-empty--compact {
	padding: 2rem 1rem;
}

.tl-studio-empty__title {
	font-family: var(--tl-font-title);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--tl-color-title);
	margin: 1rem 0 0.5rem;
}

.tl-studio-empty__text {
	font-size: 14px;
	color: var(--tl-color-muted);
	max-width: 28rem;
	margin: 0 0 1.5rem;
}

.tl-studio-modal-text {
	font-size: 14px;
	color: var(--tl-color-text);
	margin: 0 0 1rem;
}

.tl-studio-modal-empty {
	padding: 1rem;
	font-size: 14px;
	color: var(--tl-color-muted);
}

/* ---- Stats cards ---- */
.tl-studio-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin-bottom: 2rem;
}

@media (max-width: 900px) {
	.tl-studio-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.tl-studio-stats {
		grid-template-columns: 1fr;
	}
}

.tl-studio-stat-card {
	background: var(--tl-color-surface);
	padding: 1.25rem;
	border: 1px solid var(--tl-color-border);
}

.tl-studio-stat-card__value {
	font-family: var(--tl-font-title);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--tl-color-title);
	line-height: 1.1;
}

.tl-studio-stat-card__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tl-color-muted);
	margin-top: 0.35rem;
}

/* Legacy stat class aliases */
.sps-studio-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.sps-studio-stat-card { background: var(--tl-color-surface); padding: 1.25rem; border: 1px solid var(--tl-color-border); }

/* ---- Modals ---- */
.sps-studio-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 999990;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.sps-studio-modal-overlay.is-open {
	display: flex;
}

body.sps-studio-modal-open {
	overflow: hidden;
}

.sps-studio-modal {
	background: var(--tl-color-surface, #fff);
	max-width: 520px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	border-radius: var(--tl-radius, 0);
	border: 1px solid var(--tl-color-border, #e9e9e9);
	position: relative;
	z-index: 1;
}

.sps-studio-modal--wide {
	max-width: 640px;
}

.sps-studio-modal--notice {
	max-width: 440px;
}

.sps-studio-notice--success .sps-studio-modal__title {
	color: #027a48;
}

.sps-studio-notice--error .sps-studio-modal__title {
	color: #b42318;
}

.sps-studio-notice--info .sps-studio-modal__title {
	color: var(--tl-color-title);
}

.tl-studio-main.is-readonly .sps-studio-drag-handle,
.tl-studio-main.is-readonly .sps-studio-room-empty {
	display: none;
}

.sps-studio-qty-readonly {
	font-size: 13px;
	font-weight: 600;
	color: var(--tl-color-muted);
	min-width: 2.5rem;
	text-align: center;
}

.sps-project-locked-note {
	margin-top: 0.35rem;
	color: var(--tl-color-muted);
}

#spsModalNotice .sps-studio-modal__footer {
	justify-content: center;
}

.sps-studio-modal__header {
	padding: 1.5rem 1.5rem 0.75rem;
	border-bottom: 1px solid var(--tl-color-border);
}

.sps-studio-modal__title {
	font-family: var(--tl-font-title);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--tl-color-title);
	margin: 0;
}

.sps-studio-modal__body {
	padding: 1rem 1.5rem;
}

.sps-studio-modal__footer {
	padding: 1rem 1.5rem 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-end;
}

.sps-studio-field {
	margin-bottom: 1rem;
}

.sps-studio-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: var(--tl-color-text);
}

.sps-studio-field input:not([type="checkbox"]) {
	width: 100%;
	height: var(--tl-form-height);
	border: 1px solid var(--tl-form-border);
	padding: 0 0.75rem;
	font-family: var(--tl-font-text);
	font-size: 14px;
	color: var(--tl-color-text);
	background: var(--tl-color-surface);
	box-sizing: border-box;
}

.sps-studio-field--checkbox {
	margin-top: 0.5rem;
}

label.sps-studio-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	width: 100%;
	margin-bottom: 0;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
}

label.sps-studio-checkbox span {
	flex: 1;
	min-width: 0;
}

label.sps-studio-checkbox input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	min-width: 1rem;
	margin-top: 0.15rem;
	flex-shrink: 0;
	accent-color: var(--tl-color-accent);
}

.sps-studio-offer-error,
.sps-studio-login-error {
	margin: 0 0 0.5rem;
	padding: 0.65rem 0.75rem;
	font-size: 13px;
	line-height: 1.4;
	color: #b42318;
	background: #fef3f2;
	border: 1px solid #fecdca;
}

.sps-studio-login-register {
	margin: 1rem 0 0;
	font-size: 13px;
	color: var(--tl-color-muted);
	text-align: center;
}

.sps-studio-login-register__link {
	color: var(--tl-color-title);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sps-studio-login-register__link:hover {
	color: var(--tl-color-text);
}

.sps-studio-project-list {
	max-height: 280px;
	overflow-y: auto;
	border: 1px solid var(--tl-color-border, #e9e9e9);
	background: var(--tl-color-surface, #fff);
}

.sps-studio-project-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--tl-color-border);
	cursor: pointer;
}

.sps-studio-project-row:last-child {
	border-bottom: none;
}

.sps-studio-project-row:hover {
	background: var(--tl-color-sidebar);
}

.sps-studio-project-row.is-selected {
	background: rgba(247, 210, 24, 0.15);
}

.sps-studio-project-row__info {
	flex: 1;
	min-width: 0;
}

.sps-studio-project-row__name {
	font-weight: 600;
	font-size: 14px;
	color: var(--tl-color-title);
}

.sps-studio-project-row__date {
	font-size: 12px;
	color: var(--tl-color-muted);
	margin-top: 0.15rem;
}

/* ---- Status badges ---- */
.sps-studio-status-badge {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: var(--bgcolor-gray-200, #ebebeb);
	color: var(--tl-color-text);
}

.sps-studio-status-badge--saved {
	background: #e8f5e9;
	color: #2e7d32;
}

.sps-studio-status-badge--requested-offer {
	background: #fff3e0;
	color: #e65100;
}

/* ---- Project edit rooms ---- */
.sps-studio-room {
	border: 1px solid var(--tl-color-border);
	margin-bottom: 1.5rem;
	background: var(--tl-color-surface);
}

.sps-studio-room__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	background: var(--tl-color-sidebar);
	border-bottom: 1px solid var(--tl-color-border);
}

.sps-studio-room__name {
	font-weight: 600;
	font-size: 14px;
	flex: 1;
	color: var(--tl-color-title);
}

.sps-studio-room-body {
	position: relative;
}

.sps-studio-room-products {
	min-height: 3.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sps-studio-room-empty {
	padding: 1rem;
	text-align: center;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tl-color-muted);
	border: 1px dashed var(--tl-color-border);
	margin: 0.75rem;
	background: var(--tl-color-sidebar);
	pointer-events: none;
}

.sps-studio-room-body.is-empty .sps-studio-room-products {
	min-height: 3.5rem;
	border: 1px dashed var(--tl-color-border);
	margin: 0.75rem;
	background: var(--tl-color-sidebar);
}

.sps-studio-product-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--tl-color-border);
	background: var(--tl-color-surface);
	touch-action: none;
	user-select: none;
}

.sps-studio-product-row:last-child {
	border-bottom: none;
}

.sps-studio-product-row__info {
	flex: 1;
	min-width: 160px;
}

.sps-studio-product-row__name {
	font-weight: 600;
	font-size: 14px;
	color: var(--tl-color-title);
}

.sps-studio-drag-handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: var(--tl-color-muted);
	cursor: grab;
	padding: 0;
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1;
	letter-spacing: -0.15em;
	touch-action: none;
	user-select: none;
}

.sps-studio-drag-handle:active {
	cursor: grabbing;
}

.sps-studio-sortable-placeholder {
	border: 2px dashed var(--tl-color-border) !important;
	background: var(--tl-color-sidebar) !important;
	min-height: 72px;
	margin: 0;
	visibility: visible !important;
	box-sizing: border-box;
}

.sps-studio-room-products .ui-sortable-helper {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	z-index: 1000 !important;
	opacity: 0.95;
}

.sps-studio-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--tl-color-border);
}

.sps-studio-qty-stepper button {
	background: none;
	border: none;
	width: 28px;
	height: 28px;
	cursor: pointer;
	font-size: 16px;
	color: var(--tl-color-text);
}

.sps-studio-qty-stepper span {
	min-width: 28px;
	text-align: center;
	font-size: 13px;
}

/* ---- Catalog wishlist button ---- */
.sps-add-to-wishlist {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.35rem;
	color: var(--tl-color-muted);
	line-height: 1;
}

.sps-wishlist-heart {
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0;
	pointer-events: none;
}

.sps-wishlist-heart path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: fill 0.15s ease, stroke 0.15s ease;
}

.sps-add-to-wishlist.sps-wishlist-active {
	color: var(--tl-color-accent);
}

.sps-add-to-wishlist.sps-wishlist-active .sps-wishlist-heart path {
	fill: currentColor;
	stroke: currentColor;
}

.techlight-product-card {
	position: relative;
}

.techlight-product-card .sps-add-to-wishlist {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sps-wishlist-single-wrap .sps-add-to-wishlist {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--tl-color-border);
	background: var(--tl-color-surface);
}

.sps-wishlist-single-wrap {
	margin-top: 0.75rem;
}

/* ---- Inherit theme typography ---- */
body.tl-studio-page .tl-wishlist-studio :is(table, th, td, button, input, select, label, p, a, span, div),
body.tl-wishlist-page .tl-wishlist-studio :is(table, th, td, button, input, select, label, p, a, span, div) {
	font-family: inherit;
}

body.tl-studio-page .tl-wishlist-studio h1,
body.tl-wishlist-page .tl-wishlist-studio h1,
body.tl-studio-page .tl-wishlist-studio h2,
body.tl-wishlist-page .tl-wishlist-studio h2 {
	font-family: var(--tl-font-title) !important;
	font-weight: var(--wd-title-font-weight, 600) !important;
	letter-spacing: normal !important;
}

/* ---- Variations table (single product) ---- */
.tl-variations-table-section {
	width: 100%;
	clear: both;
	flex: 0 0 100%;
	max-width: 100%;
	margin: 0;
	padding: 2rem 0;
	border-top: 1px solid var(--brdcolor-gray-300, #e9e9e9);
	background: var(--wd-main-bgcolor, #fff);
	box-sizing: border-box;
}

.single-product .elementor-location-single > .tl-variations-table-section,
.single-product .elementor .tl-variations-table-section {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	padding-left: max(1.25rem, calc((100vw - min(1200px, 100vw - 2.5rem)) / 2));
	padding-right: max(1.25rem, calc((100vw - min(1200px, 100vw - 2.5rem)) / 2));
}

.tl-variations-table-section__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.tl-variations-table-wrap {
	margin: 0;
	width: 100%;
}

.tl-variations-table__title {
	font-family: var(--wd-title-font, inherit);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--wd-title-color, #222);
	margin: 0 0 1rem;
}

.tl-variations-table__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.65rem;
	margin: 0 0 1rem;
	max-width: 42rem;
}

.tl-variations-table__search {
	flex: 1 1 14rem;
	min-width: 0;
	width: auto;
	padding: 0.55rem 0.85rem;
	font-size: 14px;
	line-height: 1.4;
	border: 1px solid var(--brdcolor-gray-300, #e0e0e0);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tl-variations-table__search:focus {
	outline: none;
	border-color: #F7D218;
	box-shadow: 0 0 0 2px rgba(247, 210, 24, 0.25);
}

.tl-variations-table__filters-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

.tl-variations-table__filters-btn.is-active {
	border-color: #F7D218;
	box-shadow: 0 0 0 1px rgba(247, 210, 24, 0.35);
}

.tl-variations-table__filters-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	margin-left: 0.35rem;
	padding: 0 0.35rem;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	color: #000;
	background: #F7D218;
	border-radius: 999px;
}

.tl-variations-table__filters-count[hidden] {
	display: none !important;
}

.tl-variations-table__filters-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: 100dvh;
	z-index: 10050;
	pointer-events: none;
}

.tl-variations-table__filters-panel.is-open {
	pointer-events: auto;
}

.tl-variations-table__filters-panel[hidden] {
	display: none !important;
}

.tl-variations-table__filters-backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	padding: 0;
	margin: 0;
	background: rgba(0, 0, 0, 0.42);
	opacity: 0;
	transition: opacity 0.22s ease;
	cursor: pointer;
}

.tl-variations-table__filters-panel.is-open .tl-variations-table__filters-backdrop {
	opacity: 1;
}

.tl-variations-table__filters-drawer {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(360px, 100vw);
	height: 100%;
	max-height: 100dvh;
	min-height: 0;
	background: #fff;
	border-left: 1px solid var(--brdcolor-gray-300, #e9e9e9);
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.24s ease;
}

.tl-variations-table__filters-panel.is-open .tl-variations-table__filters-drawer {
	transform: translateX(0);
}

.tl-variations-table__filters-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.1rem;
	border-bottom: 1px solid var(--brdcolor-gray-300, #e9e9e9);
}

.tl-variations-table__filters-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--wd-title-color, #222);
}

.tl-variations-table__filters-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--color-gray-600, #666);
	cursor: pointer;
}

.tl-variations-table__filters-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 0.85rem 1.1rem 1.25rem;
}

.tl-variations-table__filter-group {
	margin: 0 0 1.1rem;
	padding: 0;
	border: 0;
}

.tl-variations-table__filter-legend {
	display: block;
	margin: 0 0 0.55rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--color-gray-600, #666);
}

.tl-variations-table__filter-options {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.tl-variations-table__filter-option {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	font-size: 14px;
	line-height: 1.45;
	color: var(--wd-text-color, #333);
	cursor: pointer;
}

.tl-variations-table__filter-option input {
	margin-top: 0.2rem;
	accent-color: #F7D218;
	flex-shrink: 0;
}

.tl-variations-table__filters-footer {
	flex: 0 0 auto;
	padding: 0.85rem 1.1rem 1.1rem;
	border-top: 1px solid var(--brdcolor-gray-300, #e9e9e9);
	background: #fff;
}

body.tl-variations-filters-open {
	overflow: hidden;
}

.tl-variation-product__title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--color-gray-900, #222);
}

.tl-variation-product__sku,
.tl-variation-product__pac {
	font-size: 13px;
	line-height: 1.4;
	color: var(--color-gray-600, #666);
	margin-top: 0.2rem;
}

.tl-variation-product__pac {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	letter-spacing: 0.02em;
}

.tl-variations-table__empty td {
	padding: 1.5rem 1rem;
	text-align: center;
	color: var(--color-gray-600, #666);
	font-size: 14px;
}

.tl-variations-table__empty[hidden] {
	display: none;
}

.tl-variations-table__row {
	cursor: pointer;
	transition: background 0.15s ease;
}

.tl-variations-table__row:hover {
	background: var(--bgcolor-gray-100, #f7f7f7);
}

.tl-variations-table__row.is-current {
	background: rgba(247, 210, 24, 0.12);
}

.tl-variations-table__row:focus-visible {
	outline: 2px solid #F7D218;
	outline-offset: -2px;
}

.tl-variations-table__actions {
	white-space: nowrap;
}

.tl-variations-table__action-group {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
}

.tl-variations-table__action-group .tl-studio-btn {
	min-height: 36px;
	padding: 0.35rem 0.75rem !important;
	font-size: 12px !important;
}

.tl-variations-table__action-group .sps-add-to-wishlist {
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--brdcolor-gray-300, #e9e9e9);
	border-radius: 50%;
	width: 36px;
	height: 36px;
}

body.tl-variation-view .tl-variations-table-section,
body.tl-variation-view .tl-variations-table-wrap {
	display: none !important;
}

.single-product .tl-variations-table-wrap .tl-studio-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tl-variations-table__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--brdcolor-gray-300, #e9e9e9);
}

.tl-variations-table__pagination[hidden] {
	display: none !important;
}

.tl-variations-table__page-info {
	font-size: 14px;
	color: var(--color-gray-600, #666);
	min-width: 7rem;
	text-align: center;
}

.tl-variations-table__pagination .tl-studio-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.tl-variations-table__row[hidden] {
	display: none;
}

@media (max-width: 767px) {
	.tl-variations-table__action-group {
		flex-direction: column;
		align-items: flex-end;
	}
}
