/**
 * Smartio Wishlist — minimal, extends theme tokens.
 * All accent colors flow through CSS variables so the theme can override.
 */

:root {
	/* Chain to smartio-child-theme tokens, fall back to brand defaults. */
	--smartio-wl-accent:           var(--primary, var(--smartio-accent, #0d4877));
	--smartio-wl-accent-contrast:  var(--smartio-accent-contrast, #ffffff);
	--smartio-wl-surface:          var(--bg-surface, var(--smartio-surface, #ffffff));
	--smartio-wl-surface-elevated: var(--bg-surface, var(--smartio-surface-elevated, #ffffff));
	--smartio-wl-border:           var(--border, var(--smartio-border, rgba(13, 72, 119, 0.12)));
	--smartio-wl-text:             var(--text, var(--smartio-text, #0d1220));
	--smartio-wl-text-muted:       var(--text-soft, var(--text-mid, var(--smartio-text-muted, #5a6a88)));
	--smartio-wl-radius:           var(--radius-lg, 12px);
	--smartio-wl-shadow:           var(--shadow-md, 0 8px 24px rgba(13, 72, 119, 0.12));
	--smartio-wl-font-brand:       var(--font-brand, 'D-DIN Exp', system-ui, sans-serif);
	--smartio-wl-font-body:        var(--font-body, system-ui, sans-serif);
}

/* Ensure the heart can position absolutely against the theme's custom card. */
.product-card,
.smartio-product-card,
.smartio-wishlist-card,
.woocommerce ul.products li.product,
.products .product {
	position: relative;
}

/* Bumped z-index so it sits above .card-img anchor + badges. */
.smartio-wishlist-btn--card {
	z-index: 12;
}

/* Headings inside the wishlist page get the theme's display font. */
.smartio-wishlist-page-header h1,
.smartio-wishlist-empty-title {
	font-family: var(--smartio-wl-font-brand);
	letter-spacing: -0.01em;
}

/* -------------------------------------------------------------- *
 * Toggle button
 * -------------------------------------------------------------- */

.smartio-wishlist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--smartio-wl-surface);
	color: var(--smartio-wl-text);
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.smartio-wishlist-btn:hover {
	color: var(--smartio-wl-accent);
}

.smartio-wishlist-btn:focus-visible {
	outline: 2px solid var(--smartio-wl-accent);
	outline-offset: 2px;
}

.smartio-wishlist-btn-icon {
	width: 24px;
	height: 24px;
	pointer-events: none;
}

.smartio-wishlist-btn-icon--filled {
	display: none;
	color: var(--smartio-wl-accent);
}

.smartio-wishlist-btn[aria-pressed="true"] .smartio-wishlist-btn-icon--outline {
	display: none;
}

.smartio-wishlist-btn[aria-pressed="true"] .smartio-wishlist-btn-icon--filled {
	display: block;
}

.smartio-wishlist-btn.is-animating {
	animation: smartio-wishlist-pop 200ms ease-out;
}

@keyframes smartio-wishlist-pop {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.2); }
	100% { transform: scale(1); }
}

/* Card placement — overlay top-right of the product image. */
.smartio-wishlist-btn--card {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	backdrop-filter: blur(4px);
}

/* Make the WC card a positioned ancestor without breaking theme layout. */
.woocommerce ul.products li.product,
.products .product,
.smartio-product-card {
	position: relative;
}

/* Single page placement. */
.smartio-wishlist-single {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0;
}

.smartio-wishlist-single-label {
	font-size: 0.875rem;
	color: var(--smartio-wl-text-muted);
}

.smartio-wishlist-btn--single {
	background: transparent;
	box-shadow: none;
}

.smartio-wishlist-btn--wishlist {
	background: rgba(255, 255, 255, 0.9);
}

/* -------------------------------------------------------------- *
 * Header icon + counter badge
 * -------------------------------------------------------------- */

/* The link itself inherits .nav-icon-btn from the theme — we only need
   position:relative for the badge to anchor against. Don't fight the
   theme's 40/44/40 responsive sizing. */
.smartio-wishlist-header-link {
	position: relative;
	flex-shrink: 0;
}

.smartio-wishlist-header-icon {
	width: 20px;
	height: 20px;
}

/* Match the theme's cart badge exactly so the wishlist + cart counters
   read as a single design system: 16×16 navy circle popping the icon's
   top-right corner, 9px bold white. */
.smartio-wishlist-header-count {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 16px;
	height: 16px;
	background: var(--primary, #0d4877);
	color: #ffffff;
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	pointer-events: none;
	padding: 0;
}

/* Counts of 10+ widen into a pill rather than getting clipped. */
.smartio-wishlist-header-count.is-wide {
	width: auto;
	min-width: 16px;
	padding: 0 4px;
	border-radius: 999px;
}

.smartio-wishlist-header-count[hidden] {
	display: none;
}

/* Dark mode: cart badge stays navy in dark, so we match that too. */

/* -------------------------------------------------------------- *
 * Toast
 * -------------------------------------------------------------- */

.smartio-wishlist-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	max-width: 320px;
	padding: 12px 16px;
	/* Fixed deep-navy pill — do NOT chain to --smartio-wl-text: that token
	   flips to a near-white color in dark mode, which turned the toast into a
	   white pill with white text (invisible "Saved" on the PDP). The toast is
	   always a dark surface with white text in both light and dark mode. */
	background: #11243a;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: var(--smartio-wl-radius);
	box-shadow: var(--smartio-wl-shadow);
	font-size: 0.9rem;
	line-height: 1.4;
	z-index: 9999;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.smartio-wishlist-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Dark mode: lift the pill to an elevated surface so it reads against the
   dark page background; text stays white. */
html.theme-dark .smartio-wishlist-toast {
	background: #243245;
	border-color: rgba(255, 255, 255, 0.14);
	color: #ffffff;
}

@media (max-width: 640px) {
	.smartio-wishlist-toast {
		left: 50%;
		right: auto;
		bottom: 24px;
		transform: translate(-50%, 8px);
		width: calc(100% - 32px);
		max-width: 360px;
		text-align: center;
	}
	.smartio-wishlist-toast.is-visible {
		transform: translate(-50%, 0);
	}
}

/* -------------------------------------------------------------- *
 * Phone modal
 * -------------------------------------------------------------- */

.smartio-wishlist-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 9998;
	opacity: 0;
	/* When the modal isn't open we MUST NOT intercept clicks. The overlay
	   stays in the DOM at z-index 9998 covering the whole viewport, so
	   without pointer-events:none + visibility:hidden it swallows every
	   click on the page after dismiss — that's the "save across devices →
	   close → page hangs" bug. */
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.smartio-wishlist-modal-overlay.is-visible {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
	transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.smartio-wishlist-modal {
	width: 100%;
	max-width: 420px;
	background: var(--smartio-wl-surface-elevated);
	color: var(--smartio-wl-text);
	border-radius: var(--smartio-wl-radius);
	padding: 24px;
	box-shadow: var(--smartio-wl-shadow);
	transform: translateY(8px);
	transition: transform 0.2s ease;
}

.smartio-wishlist-modal-overlay.is-visible .smartio-wishlist-modal {
	transform: translateY(0);
}

.smartio-wishlist-modal-headline {
	margin: 0 0 16px;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.4;
}

.smartio-wishlist-modal-field {
	margin-bottom: 12px;
}

.smartio-wishlist-modal-field label {
	display: block;
	font-size: 0.85rem;
	color: var(--smartio-wl-text-muted);
	margin-bottom: 4px;
}

.smartio-wishlist-modal-field input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--smartio-wl-border);
	border-radius: 8px;
	font-size: 1rem;
	background: var(--smartio-wl-surface);
	color: var(--smartio-wl-text);
	box-sizing: border-box;
}

.smartio-wishlist-modal-field input:focus {
	outline: 2px solid var(--smartio-wl-accent);
	outline-offset: 1px;
	border-color: var(--smartio-wl-accent);
}

.smartio-wishlist-modal-error {
	display: none;
	margin-top: 4px;
	font-size: 0.8rem;
	color: #c62828;
}

.smartio-wishlist-modal-error.is-visible {
	display: block;
}

.smartio-wishlist-modal-footnote {
	margin: 4px 0 18px;
	font-size: 0.78rem;
	color: var(--smartio-wl-text-muted);
}

/* OTP recovery step */
.smartio-wishlist-modal-otp-hint {
	margin: 0 0 14px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--smartio-wl-text-muted);
}

.smartio-wishlist-modal-otp-links {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 10px 0 16px;
	font-size: 0.82rem;
	color: var(--smartio-wl-text-muted);
}

.smartio-wishlist-linkbtn {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.82rem;
	color: var(--smartio-wl-accent);
	text-decoration: underline;
	cursor: pointer;
}

.smartio-wishlist-linkbtn:hover {
	opacity: 0.8;
}

.smartio-wishlist-modal-otp [data-smartio-wishlist-otp],
input[data-smartio-wishlist-otp] {
	letter-spacing: 0.35em;
	font-size: 1.1rem;
	text-align: center;
}

.smartio-wishlist-modal-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.smartio-wishlist-modal-submit {
	flex: 1;
	height: 44px;
	padding: 0 16px;
	background: var(--smartio-wl-accent);
	color: var(--smartio-wl-accent-contrast);
	border: 0;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
}

.smartio-wishlist-modal-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.smartio-wishlist-modal-dismiss {
	background: transparent;
	border: 0;
	color: var(--smartio-wl-text-muted);
	font-size: 0.9rem;
	padding: 8px 12px;
	cursor: pointer;
}

/* -------------------------------------------------------------- *
 * Wishlist page
 * -------------------------------------------------------------- */

.smartio-wishlist-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px;
}

.smartio-wishlist-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
}

/* When the outer page template renders the title, the inner header only
   holds the count + bulk-cart button. Right-align it so it sits cleanly. */
.smartio-wishlist-page-header--meta-only {
	justify-content: flex-end;
	margin-bottom: 18px;
}

.smartio-wishlist-page-header h1 {
	margin: 0;
}

.smartio-wishlist-page-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--smartio-wl-text-muted);
}

.smartio-wishlist-bulk-cart {
	height: 44px;
	padding: 0 18px;
	background: var(--smartio-wl-accent);
	color: var(--smartio-wl-accent-contrast);
	border: 0;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
}

.smartio-wishlist-bulk-cart:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.smartio-wishlist-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 600px)  { .smartio-wishlist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .smartio-wishlist-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .smartio-wishlist-grid { grid-template-columns: repeat(4, 1fr); } }

.smartio-wishlist-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--smartio-wl-surface);
	border: 1px solid var(--smartio-wl-border);
	border-radius: var(--smartio-wl-radius);
	overflow: hidden;
}

.smartio-wishlist-card-image {
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
}

.smartio-wishlist-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.smartio-wishlist-card-title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--smartio-wl-text);
	line-height: 1.3;
}

.smartio-wishlist-card-title a {
	color: inherit;
	text-decoration: none;
}

.smartio-wishlist-card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	color: var(--smartio-wl-text-muted);
}

.smartio-wishlist-stock {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 500;
	background: rgba(13, 72, 119, 0.08);
	color: var(--smartio-wl-accent);
}

.smartio-wishlist-stock--oos {
	background: rgba(120, 120, 120, 0.12);
	color: #555;
}

.smartio-wishlist-card-actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
	padding-top: 8px;
}

.smartio-wishlist-cta,
a.smartio-wishlist-cta,
button.smartio-wishlist-cta {
	flex: 1;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 8px;
	border: 0;
	background: var(--smartio-wl-accent) !important;
	color: #ffffff !important;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.2;
	letter-spacing: 0.01em;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	box-shadow: 0 1px 0 rgba(13, 72, 119, 0.08);
	transition: background-color 0.18s ease, transform 0.08s ease, box-shadow 0.18s ease;
}

.smartio-wishlist-cta:hover,
a.smartio-wishlist-cta:hover,
button.smartio-wishlist-cta:hover {
	background: #0a3a60 !important;
	color: #ffffff !important;
	box-shadow: 0 4px 10px rgba(13, 72, 119, 0.18);
	text-decoration: none !important;
}

.smartio-wishlist-cta:focus-visible {
	outline: 2px solid var(--smartio-wl-accent);
	outline-offset: 2px;
}

.smartio-wishlist-cta--secondary,
a.smartio-wishlist-cta--secondary {
	background: transparent !important;
	color: var(--smartio-wl-accent) !important;
	border: 1px solid var(--smartio-wl-accent);
	box-shadow: none;
}

.smartio-wishlist-cta--secondary:hover,
a.smartio-wishlist-cta--secondary:hover {
	background: rgba(13, 72, 119, 0.06) !important;
	color: var(--smartio-wl-accent) !important;
}

.smartio-wishlist-cta--whatsapp,
a.smartio-wishlist-cta--whatsapp {
	background: #25D366 !important;
	color: #ffffff !important;
}

.smartio-wishlist-cta--whatsapp:hover,
a.smartio-wishlist-cta--whatsapp:hover {
	background: #1ebe5a !important;
	color: #ffffff !important;
}

/* Bulk cart and modal buttons share the same defensive overrides. */
.smartio-wishlist-bulk-cart,
button.smartio-wishlist-bulk-cart,
.smartio-wishlist-modal-submit,
button.smartio-wishlist-modal-submit {
	color: #ffffff !important;
}

.smartio-wishlist-bulk-cart:hover,
.smartio-wishlist-modal-submit:hover {
	background: #0a3a60 !important;
	color: #ffffff !important;
}

/* -------------------------------------------------------------- *
 * Empty state
 * -------------------------------------------------------------- */

.smartio-wishlist-empty {
	text-align: center;
	padding: 72px 24px 80px;
	max-width: 520px;
	margin: 32px auto;
	background: var(--smartio-wl-surface);
	border: 1px solid var(--smartio-wl-border);
	border-radius: 16px;
}

.smartio-wishlist-empty-icon-wrap {
	width: 96px;
	height: 96px;
	margin: 0 auto 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(13, 72, 119, 0.06);
	border-radius: 50%;
	color: var(--smartio-wl-accent);
}

.smartio-wishlist-empty-icon {
	width: 48px;
	height: 48px;
	color: var(--smartio-wl-accent);
	opacity: 0.9;
}

.smartio-wishlist-empty-title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--smartio-wl-text);
	line-height: 1.3;
}

.smartio-wishlist-empty-text {
	color: var(--smartio-wl-text-muted);
	margin: 0 auto 28px;
	font-size: 0.98rem;
	line-height: 1.5;
	max-width: 360px;
}

.smartio-wishlist-empty .smartio-wishlist-cta {
	flex: 0 0 auto;
	padding: 12px 28px;
}

/* -------------------------------------------------------------- *
 * Hydration skeleton (anti-flash)
 * Anonymous visitors keep saved IDs in localStorage only, so the server
 * always renders the empty state and a footer script swaps in the real
 * cards after a REST round-trip — that caused a "Nothing saved yet" flash.
 * An early <head> script (see wishlist-hydration.php) detects saved IDs and
 * sets html.smartio-wl-hydrating BEFORE first paint, hiding the empty state
 * and showing this skeleton until the cards arrive.
 * -------------------------------------------------------------- */
.smartio-wishlist-page--empty-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0;
}
.smartio-wishlist-skeleton { display: none; }
html.smartio-wl-hydrating .smartio-wishlist-empty-real { display: none; }
html.smartio-wl-hydrating .smartio-wishlist-skeleton { display: block; }

.smartio-wl-skel-card {
	border: 1px solid var(--border, rgba(13, 72, 119, 0.12));
	border-radius: 14px;
	overflow: hidden;
	background: var(--bg-surface, #ffffff);
}
.smartio-wl-skel-img { width: 100%; aspect-ratio: 1 / 1; }
.smartio-wl-skel-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.smartio-wl-skel-line { height: 12px; border-radius: 6px; }
.smartio-wl-skel-line--title { width: 85%; height: 14px; }
.smartio-wl-skel-line--price { width: 40%; height: 18px; }
.smartio-wl-skel-line--btn { width: 100%; height: 32px; border-radius: 9px; margin-top: 6px; }

.smartio-wl-skel-img,
.smartio-wl-skel-line {
	background: linear-gradient(100deg, rgba(13, 72, 119, 0.06) 30%, rgba(13, 72, 119, 0.13) 50%, rgba(13, 72, 119, 0.06) 70%);
	background-size: 200% 100%;
	animation: smartio-wl-shimmer 1.3s ease-in-out infinite;
}
@keyframes smartio-wl-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
html.theme-dark .smartio-wl-skel-card {
	background: var(--bg-surface);
	border-color: var(--border);
}
html.theme-dark .smartio-wl-skel-img,
html.theme-dark .smartio-wl-skel-line {
	background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.10) 50%, rgba(255, 255, 255, 0.05) 70%);
	background-size: 200% 100%;
}
@media (prefers-reduced-motion: reduce) {
	.smartio-wl-skel-img,
	.smartio-wl-skel-line { animation: none; }
}

/* -------------------------------------------------------------- *
 * Share section
 * -------------------------------------------------------------- */

.smartio-wishlist-share {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--smartio-wl-border);
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.smartio-wishlist-share-link {
	flex: 1 1 240px;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--smartio-wl-border);
	border-radius: 8px;
	background: var(--smartio-wl-surface);
	color: var(--smartio-wl-text);
	font-size: 0.85rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	box-sizing: border-box;
}

.smartio-wishlist-share-btn {
	height: 40px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid var(--smartio-wl-border);
	background: var(--smartio-wl-surface);
	color: var(--smartio-wl-text);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
}

.smartio-wishlist-share-btn--whatsapp {
	background: #25D366;
	border-color: #25D366;
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.smartio-wishlist-btn.is-animating { animation: none; }
	.smartio-wishlist-toast,
	.smartio-wishlist-modal-overlay,
	.smartio-wishlist-modal { transition: none; }
}

/* -------------------------------------------------------------- *
 * Cart-page integration (#2 Save for later + #3 Wishlist nudge)
 * -------------------------------------------------------------- */

/* #2 — Save for later link in cart row */
.smartio-cart-save-for-later {
	color: var(--smartio-wl-accent) !important;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: opacity 0.15s ease;
}
.smartio-cart-save-for-later:hover {
	color: var(--smartio-wl-accent) !important;
	text-decoration: underline !important;
}
.smartio-cart-sep {
	color: var(--smartio-wl-text-muted);
	margin: 0 4px;
	font-size: 0.8rem;
}

/* #3 — Cart-page wishlist nudge banner */
.smartio-cart-nudge {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	margin: 0 0 24px;
	background: var(--smartio-wl-surface);
	border: 1px solid var(--smartio-wl-border);
	border-left: 4px solid var(--smartio-wl-accent);
	border-radius: var(--smartio-wl-radius);
	box-shadow: var(--smartio-wl-shadow);
	flex-wrap: wrap;
}

.smartio-cart-nudge-thumbs {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.smartio-cart-nudge-thumb {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 50%;
	border: 2px solid var(--smartio-wl-surface);
	margin-left: -10px;
	background: var(--smartio-wl-surface);
	box-shadow: 0 1px 4px rgba(13, 72, 119, 0.08);
}
.smartio-cart-nudge-thumb:first-child { margin-left: 0; }

.smartio-cart-nudge-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--smartio-wl-accent);
	background: rgba(13, 72, 119, 0.08);
}

.smartio-cart-nudge-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 220px;
	min-width: 0;
}

.smartio-cart-nudge-title {
	font-family: var(--smartio-wl-font-brand);
	font-size: 1rem;
	font-weight: 700;
	color: var(--smartio-wl-text);
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.smartio-cart-nudge-sub {
	font-size: 0.85rem;
	color: var(--smartio-wl-text-muted);
	margin-top: 2px;
}

.smartio-cart-nudge-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.smartio-cart-nudge-add {
	background: var(--smartio-wl-accent) !important;
	color: #ffffff !important;
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	transition: background 0.15s ease;
}
.smartio-cart-nudge-add:hover {
	background: #0a3a60 !important;
}
.smartio-cart-nudge-add:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.smartio-cart-nudge-view {
	color: var(--smartio-wl-accent) !important;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none !important;
}
.smartio-cart-nudge-view:hover {
	text-decoration: underline !important;
}

.smartio-cart-nudge-dismiss {
	background: transparent;
	border: 0;
	color: var(--smartio-wl-text-muted);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	margin-left: 4px;
}
.smartio-cart-nudge-dismiss:hover {
	color: var(--smartio-wl-text);
}

@media (max-width: 600px) {
	.smartio-cart-nudge {
		gap: 12px;
		padding: 12px 14px;
	}
	.smartio-cart-nudge-thumb {
		width: 36px;
		height: 36px;
	}
	.smartio-cart-nudge-actions {
		width: 100%;
		justify-content: space-between;
	}
	.smartio-cart-nudge-add {
		flex: 1;
	}
}
/* ================================================================ *
 * v2 layout — wishlist page redesign + Tier 2 features
 * Higher specificity overrides for the v1 styles above.
 * ================================================================ */

.smartio-wishlist-page[data-smartio-wishlist-page] {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px 48px;
}

/* ---- Free delivery progress meter (Tier 2 #6) ---- */
.smartio-wishlist-freeship {
	background: var(--bg-surface, #ffffff);
	border: 1px solid var(--border, rgba(13,72,119,.12));
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 16px;
}
.smartio-wishlist-freeship-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.smartio-wishlist-freeship-icon { font-size: 1.2rem; line-height: 1; }
.smartio-wishlist-freeship-text {
	flex: 1 1 200px;
	font-size: 0.92rem;
	color: var(--text, #111827);
	line-height: 1.45;
}
.smartio-wishlist-freeship-text strong {
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	font-weight: 700;
	color: var(--primary, #0d4877);
}
.smartio-wishlist-freeship-pct {
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	font-weight: 700;
	color: var(--primary, #0d4877);
	font-size: 0.95rem;
	margin-left: auto;
}
.smartio-wishlist-freeship-bar {
	height: 6px;
	background: rgba(13, 72, 119, 0.08);
	border-radius: 999px;
	overflow: hidden;
}
.smartio-wishlist-freeship-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--primary, #0d4877), var(--teal-1, #7bd0ca));
	border-radius: 999px;
	transition: width 0.3s ease;
}

/* ---- Meta toolbar ---- */
.smartio-wishlist-page-header--meta-only {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	background: var(--bg-surface, #ffffff);
	border: 1px solid var(--border, rgba(13,72,119,.12));
	border-radius: 12px;
	margin-bottom: 20px;
}
.smartio-wishlist-page-count {
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--text, #111827);
}
.smartio-wishlist-bulk-cart {
	background: var(--primary, #0d4877) !important;
	color: #fff !important;
	border: 0;
	border-radius: 10px;
	padding: 10px 18px;
	font-weight: 700;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.08s ease;
}
.smartio-wishlist-bulk-cart:hover { background: #0a3a60 !important; }
.smartio-wishlist-bulk-cart:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	background: var(--text-soft, #a8b8cc) !important;
}

/* ---- Grid ---- */
.smartio-wishlist-page .smartio-wishlist-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

/* ---- Card ---- */
.smartio-wishlist-page .smartio-wishlist-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--bg-surface, #ffffff);
	border: 1px solid var(--border, rgba(13,72,119,.12));
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(13, 72, 119, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.smartio-wishlist-page .smartio-wishlist-card:hover {
	box-shadow: 0 8px 24px rgba(13, 72, 119, 0.12);
	transform: translateY(-3px);
	border-color: rgba(13, 72, 119, 0.18);
}
.smartio-wishlist-card--oos { opacity: 0.92; }

.smartio-wishlist-card-image-link {
	display: block;
	aspect-ratio: 1 / 1;
	background: rgba(13, 72, 119, 0.03);
	overflow: hidden;
}
.smartio-wishlist-card-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.4s ease;
}
.smartio-wishlist-card:hover .smartio-wishlist-card-image { transform: scale(1.04); }

/* Heart in corner */
.smartio-wishlist-page .smartio-wishlist-btn--wishlist {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 6;
	width: 38px;
	height: 38px;
	background: var(--bg-surface, #ffffff);
	border: 1px solid var(--border, rgba(13,72,119,.14));
	box-shadow: 0 2px 6px rgba(13, 72, 119, 0.10);
	color: var(--primary, #0d4877);
}
.smartio-wishlist-page .smartio-wishlist-btn--wishlist .smartio-wishlist-btn-icon { width: 18px; height: 18px; }
.smartio-wishlist-page .smartio-wishlist-btn--wishlist:hover { color: #c0392b; }

/* Card badges (top-left) */
.smartio-wishlist-card-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 6;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.smartio-wishlist-card-badge--drop {
	background: linear-gradient(135deg, #d62828, #c0392b);
	color: #ffffff;
}
.smartio-wishlist-card-badge--oos {
	background: rgba(85, 107, 133, 0.95);
	color: #ffffff;
}

/* Card body */
.smartio-wishlist-page .smartio-wishlist-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.smartio-wishlist-page .smartio-wishlist-card-title {
	margin: 0;
	font-family: var(--font-body, 'D-DIN Exp', sans-serif);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--text, #111827);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.7em;
}
.smartio-wishlist-page .smartio-wishlist-card-title a {
	color: inherit !important;
	text-decoration: none !important;
}
.smartio-wishlist-page .smartio-wishlist-card-title a:hover {
	color: var(--primary, #0d4877) !important;
}

/* Price row */
.smartio-wishlist-page .smartio-wishlist-card-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.smartio-wishlist-price-current {
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--primary, #0d4877);
	letter-spacing: -0.01em;
	line-height: 1.1;
}
.smartio-wishlist-price-current .woocommerce-Price-amount { color: inherit; }
.smartio-wishlist-price-current ins {
	background: transparent !important;
	text-decoration: none;
	color: inherit;
	font-weight: 700;
}
.smartio-wishlist-price-current del { display: none; }
.smartio-wishlist-price-snapshot {
	font-size: 0.9rem;
	color: var(--text-soft, #a8b8cc);
	text-decoration: line-through;
}

/* Price drop line (Tier 2 #5) */
.smartio-wishlist-card-drop {
	font-size: 0.78rem;
	color: #16a34a;
	line-height: 1.4;
	padding: 6px 10px;
	background: rgba(22, 163, 74, 0.08);
	border-radius: 6px;
	margin-top: 4px;
}
.smartio-wishlist-card-drop strong { color: #16a34a; font-weight: 700; }

/* Meta row */
.smartio-wishlist-page .smartio-wishlist-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.78rem;
	color: var(--text-mid, #556b85);
	margin-top: 6px;
}
.smartio-wishlist-page .smartio-wishlist-stock {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	letter-spacing: 0.02em;
}
.smartio-wishlist-page .smartio-wishlist-stock--in {
	background: rgba(22, 163, 74, 0.10);
	color: #16a34a;
}
.smartio-wishlist-page .smartio-wishlist-stock--oos {
	background: rgba(214, 40, 40, 0.10);
	color: #d62828;
}
.smartio-wishlist-saved-ago { font-size: 0.78rem; color: var(--text-mid, #556b85); }

/* Card actions */
.smartio-wishlist-page .smartio-wishlist-card-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--border, rgba(13,72,119,.08));
}
.smartio-wishlist-page .smartio-wishlist-cta {
	width: 100%;
	min-height: 40px;
	padding: 9px 14px;
	border-radius: 9px;
	border: 0;
	background: var(--primary, #0d4877) !important;
	color: #ffffff !important;
	font-weight: 700;
	font-size: 0.88rem;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.08s ease;
	font-family: var(--font-body, sans-serif);
}
.smartio-wishlist-page .smartio-wishlist-cta:hover {
	background: #0a3a60 !important;
	color: #ffffff !important;
}
.smartio-wishlist-page .smartio-wishlist-cta--secondary {
	background: transparent !important;
	color: var(--primary, #0d4877) !important;
	border: 1px solid var(--primary, #0d4877);
	font-weight: 600;
	font-size: 0.82rem;
}
.smartio-wishlist-page .smartio-wishlist-cta--secondary:hover {
	background: rgba(13, 72, 119, 0.06) !important;
	color: var(--primary, #0d4877) !important;
}
.smartio-wishlist-page .smartio-wishlist-cta--whatsapp {
	background: #25D366 !important;
	color: #ffffff !important;
}
.smartio-wishlist-page .smartio-wishlist-cta--whatsapp:hover {
	background: #1ebe5a !important;
	color: #ffffff !important;
}

/* Share section */
.smartio-wishlist-page .smartio-wishlist-share {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 36px;
	padding: 18px 20px;
	background: var(--bg-surface, #ffffff);
	border: 1px solid var(--border, rgba(13,72,119,.12));
	border-radius: 12px;
}
.smartio-wishlist-share-head { display: flex; flex-direction: column; gap: 2px; }
.smartio-wishlist-share-head strong {
	font-family: var(--font-brand, 'D-DIN Exp', sans-serif);
	font-size: 1rem;
	color: var(--text, #111827);
}
.smartio-wishlist-share-head span {
	font-size: 0.85rem;
	color: var(--text-mid, #556b85);
}
.smartio-wishlist-share-body {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.smartio-wishlist-page .smartio-wishlist-share-link {
	flex: 1 1 280px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--border, rgba(13,72,119,.14));
	border-radius: 8px;
	background: var(--bg, #f4f6f9);
	color: var(--text, #111827);
	font-size: 0.85rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	min-width: 0;
}
.smartio-wishlist-page .smartio-wishlist-share-btn {
	height: 40px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid var(--border, rgba(13,72,119,.14));
	background: var(--bg-surface, #ffffff);
	color: var(--text, #111827);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}
.smartio-wishlist-page .smartio-wishlist-share-btn:hover {
	border-color: var(--primary, #0d4877);
	color: var(--primary, #0d4877);
}
.smartio-wishlist-page .smartio-wishlist-share-btn--whatsapp {
	background: #25D366;
	border-color: #25D366;
	color: #fff;
}
.smartio-wishlist-page .smartio-wishlist-share-btn--whatsapp:hover {
	background: #1ebe5a;
	border-color: #1ebe5a;
	color: #fff;
}

/* ================================================================ *
 * Dark mode (html.theme-dark)
 * ================================================================ */
html.theme-dark .smartio-wishlist-freeship,
html.theme-dark .smartio-wishlist-page-header--meta-only,
html.theme-dark .smartio-wishlist-page .smartio-wishlist-card,
html.theme-dark .smartio-wishlist-page .smartio-wishlist-share {
	background: var(--bg-surface);
	border-color: var(--border);
}
html.theme-dark .smartio-wishlist-freeship-bar { background: rgba(255, 255, 255, 0.06); }
html.theme-dark .smartio-wishlist-page .smartio-wishlist-card-image-link {
	background: rgba(255, 255, 255, 0.03);
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-card-actions {
	border-top-color: rgba(255, 255, 255, 0.06);
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-stock--in {
	background: rgba(34, 197, 94, 0.16);
	color: #4ade80;
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-stock--oos {
	background: rgba(248, 113, 113, 0.16);
	color: #fca5a5;
}
html.theme-dark .smartio-wishlist-card-drop {
	background: rgba(34, 197, 94, 0.12);
	color: #4ade80;
}
html.theme-dark .smartio-wishlist-card-drop strong { color: #4ade80; }
html.theme-dark .smartio-wishlist-freeship-text strong,
html.theme-dark .smartio-wishlist-freeship-pct,
html.theme-dark .smartio-wishlist-price-current {
	color: var(--teal-1, #7bd0ca);
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-cta {
	background: var(--teal-1, #7bd0ca) !important;
	color: #0a2540 !important;
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-cta:hover {
	background: #5fb8b2 !important;
	color: #0a2540 !important;
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-cta--secondary {
	background: transparent !important;
	color: var(--teal-1, #7bd0ca) !important;
	border-color: var(--teal-1, #7bd0ca);
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-cta--secondary:hover {
	background: rgba(123, 208, 202, 0.10) !important;
	color: var(--teal-1, #7bd0ca) !important;
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-btn--wishlist {
	background: var(--bg-surface);
	border-color: var(--border);
	color: var(--teal-1, #7bd0ca);
}
html.theme-dark .smartio-wishlist-bulk-cart {
	background: var(--teal-1, #7bd0ca) !important;
	color: #0a2540 !important;
}
html.theme-dark .smartio-wishlist-bulk-cart:hover {
	background: #5fb8b2 !important;
}

/* Header tightening in template-wishlist.php */
.wishlist-page-wrap .wishlist-page-header { margin-bottom: 20px; }
.wishlist-page-wrap .wishlist-page-title { font-size: 30px; }
.wishlist-page-wrap .wishlist-page-sub { max-width: 640px; margin-top: 2px; }
@media (max-width: 720px) {
	.wishlist-page-wrap .wishlist-page-title { font-size: 24px; }
}
/* ================================================================ *
 * v3 — Share button group refresh
 * Higher specificity than the earlier share rules.
 * ================================================================ */

.smartio-wishlist-page .smartio-wishlist-share-body {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: stretch;
}

.smartio-wishlist-page .smartio-wishlist-share-link {
	flex: 1 1 100%;
	height: 42px;
	padding: 0 14px;
	border: 1px solid var(--border, rgba(13, 72, 119, 0.18));
	border-radius: 10px;
	background: var(--bg, #f4f6f9);
	color: var(--text, #111827);
	font-size: 0.85rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	min-width: 0;
	box-sizing: border-box;
}

.smartio-wishlist-page .smartio-wishlist-share-link:focus {
	outline: 2px solid var(--primary, #0d4877);
	outline-offset: 1px;
	border-color: var(--primary, #0d4877);
}

.smartio-wishlist-page .smartio-wishlist-share-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	width: 100%;
}

/* Unified button: same height, same padding, same icon+text layout */
.smartio-wishlist-page .smartio-wishlist-share-btn,
.smartio-wishlist-page a.smartio-wishlist-share-btn,
.smartio-wishlist-page button.smartio-wishlist-share-btn {
	flex: 1 1 auto;
	min-height: 42px;
	padding: 0 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-radius: 10px;
	border: 1px solid var(--border, rgba(13, 72, 119, 0.18));
	background: var(--bg-surface, #ffffff) !important;
	color: var(--text, #111827) !important;
	font-size: 0.88rem;
	font-weight: 600;
	font-family: var(--font-body, system-ui, sans-serif);
	text-decoration: none !important;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.08s ease;
	white-space: nowrap;
	line-height: 1;
}

.smartio-wishlist-page .smartio-wishlist-share-btn:hover,
.smartio-wishlist-page a.smartio-wishlist-share-btn:hover,
.smartio-wishlist-page button.smartio-wishlist-share-btn:hover {
	border-color: var(--primary, #0d4877);
	color: var(--primary, #0d4877) !important;
	background: var(--bg, #f4f6f9) !important;
}

.smartio-wishlist-page .smartio-wishlist-share-btn:active { transform: scale(0.98); }

.smartio-wishlist-share-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* WhatsApp variant — solid green, white text + icon */
.smartio-wishlist-page .smartio-wishlist-share-btn--whatsapp,
.smartio-wishlist-page a.smartio-wishlist-share-btn--whatsapp {
	background: #25D366 !important;
	border-color: #25D366 !important;
	color: #ffffff !important;
}
.smartio-wishlist-page .smartio-wishlist-share-btn--whatsapp:hover,
.smartio-wishlist-page a.smartio-wishlist-share-btn--whatsapp:hover {
	background: #1ebe5a !important;
	border-color: #1ebe5a !important;
	color: #ffffff !important;
}

/* When the user has already copied — small visual ack handled by JS toggling
   class .is-copied. We expose a hook so the JS can flip color momentarily. */
.smartio-wishlist-page .smartio-wishlist-share-btn.is-copied {
	background: #16a34a !important;
	border-color: #16a34a !important;
	color: #ffffff !important;
}

/* ---- Dark mode ---- */
html.theme-dark .smartio-wishlist-page .smartio-wishlist-share-link {
	background: var(--bg);
	border-color: var(--border);
	color: var(--text);
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-share-btn,
html.theme-dark .smartio-wishlist-page a.smartio-wishlist-share-btn,
html.theme-dark .smartio-wishlist-page button.smartio-wishlist-share-btn {
	background: var(--bg-surface) !important;
	border-color: var(--border);
	color: var(--text) !important;
}
html.theme-dark .smartio-wishlist-page .smartio-wishlist-share-btn:hover,
html.theme-dark .smartio-wishlist-page a.smartio-wishlist-share-btn:hover,
html.theme-dark .smartio-wishlist-page button.smartio-wishlist-share-btn:hover {
	border-color: var(--teal-1, #7bd0ca);
	color: var(--teal-1, #7bd0ca) !important;
	background: var(--bg) !important;
}
/* WhatsApp stays green in dark mode (it's THE brand color, recognizable) */
html.theme-dark .smartio-wishlist-page .smartio-wishlist-share-btn--whatsapp,
html.theme-dark .smartio-wishlist-page a.smartio-wishlist-share-btn--whatsapp {
	background: #25D366 !important;
	border-color: #25D366 !important;
	color: #ffffff !important;
}

/* Mobile: stack buttons full-width */
@media (max-width: 540px) {
	.smartio-wishlist-page .smartio-wishlist-share-buttons {
		flex-direction: column;
	}
	.smartio-wishlist-page .smartio-wishlist-share-btn {
		width: 100%;
	}
}
