:root {
	--wcsomm-bg: #050505;
	--wcsomm-header: linear-gradient(180deg, #0a0a0a, #050505);
	--wcsomm-ink: #ffffff;
	--wcsomm-muted: #d0d0d0;
	--wcsomm-card-bg: #050505;
	--wcsomm-border: #333;
	--wcsomm-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	--wcsomm-cta-bg: #ffffff;
	--wcsomm-cta-text: #000000;
	--wcsomm-pill-text: #f0f0f0;
	--wcsomm-skeleton-1: #1c1c1c;
	--wcsomm-skeleton-2: #2a2a2a;
	--wcsomm-card-border-color: rgba(255, 255, 255, 0.18);
	--wcsomm-card-media-bg: #050505;
}

#wcsomm-ai-launcher {
	position: fixed;
	bottom: 18px;
	right: 18px;
	z-index: 9999;
	background: #000;
	color: #fff;
	padding: 14px 20px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 800;
	letter-spacing: 0.2px;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
	font-family: "Manrope", "Inter", -apple-system, system-ui, sans-serif;
	border: 1px solid #333;
}

#wcsomm-ai-chat,
.wcsomm-shell {
	position: fixed;
	bottom: 90px;
	right: 18px;
	width: 440px;
	max-width: calc(100% - 24px);
	height: clamp(420px, 82vh, 460px);
	background: var(--wcsomm-bg);
	border-radius: 24px;
	border: 1px solid var(--wcsomm-border);
	box-shadow: var(--wcsomm-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: "Manrope", "Inter", -apple-system, system-ui, sans-serif;
}

#wcsomm-ai-chat,
.wcsomm-shell,
.wcsomm-wrapper {
	background: #020202;
	z-index: 999999;
}

.wcsomm-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
}

#wcsomm-ai-chat,
.wcsomm-shell,
.wcsomm-wrapper {
	background: #020202;
	z-index: 999999;
}

.wcsomm-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--wcsomm-header);
	border-bottom: 1px solid var(--wcsomm-border);
	position: sticky;
	top: 0;
	z-index: 2;
	min-height: 52px;
}

.wcsomm-head-title {
	color: #fff;
	font-size: 16px;
	font-weight: 800;
}

.wcsomm-close {
	background: #111;
	border: 1px solid #444;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: #fff;
	cursor: pointer;
	font-size: 18px;
}

.wcsomm-close-icon {
	width: 18px;
	height: 18px;
	display: block;
}

.wcsomm-body {
	padding: 12px;
	background: #0b0b0b;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	overflow: hidden;
}

.wcsomm-messages {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	scroll-behavior: smooth;
}

.wcsomm-bubble {
	background: #0f0f0f;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	padding: 14px 16px;
	font-size: 15px;
	color: #f0f0f0;
	line-height: 1.5;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
	max-width: 92%;
}

.wcsomm-bubble.user {
	background: #151515;
	align-self: flex-end;
}
.wcsomm-bubble.bot {
	max-height: none;
	overflow: visible;
	white-space: normal;
	color: #f7f7f7;
}
.wcsomm-bubble.bot p + p {
	margin-top: 0.75rem;
}

.wcsomm-typing {
	padding: 10px 14px;
}

.wcsomm-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wcsomm-typing-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: currentColor;
	opacity: 0.35;
	animation: wcsomm-dot 1s infinite;
}

.wcsomm-typing-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.wcsomm-typing-dot:nth-child(3) {
	animation-delay: 0.4s;
}

.wcsomm-products-skeleton {
	display: grid;
	gap: 12px;
}

.wcsomm-card-skeleton {
	border: 1px solid var(--wcsomm-card-border-color);
	background: var(--wcsomm-card-bg);
	padding: 12px;
	display: grid;
	gap: 10px;
}

.wcsomm-skeleton-block {
	background: linear-gradient(90deg, var(--wcsomm-skeleton-1), var(--wcsomm-skeleton-2), var(--wcsomm-skeleton-1));
	background-size: 200% 100%;
	animation: wcsomm-shimmer 1.2s ease-in-out infinite;
	border-radius: 8px;
}

.wcsomm-skeleton-media {
	height: 140px;
	border-radius: 14px;
}

.wcsomm-skeleton-lines {
	display: grid;
	gap: 8px;
}

.wcsomm-skeleton-line {
	height: 12px;
}

.wcsomm-skeleton-line:nth-child(2) {
	width: 80%;
}

.wcsomm-skeleton-line:nth-child(3) {
	width: 60%;
}

@keyframes wcsomm-dot {
	0%, 80%, 100% {
	transform: translateY(0);
	opacity: 0.35;
	}
	40% {
	transform: translateY(-3px);
	opacity: 0.9;
	}
}

@keyframes wcsomm-shimmer {
	0% {
	background-position: 200% 0;
	}
	100% {
	background-position: -200% 0;
	}
}

.wcsomm-divider {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 11px;
	color: #b8b8b8;
	font-weight: 800;
	padding: 2px 4px;
	margin: 6px 0 4px;
}

.wcsomm-products {
	display: flex !important;
	flex-direction: column !important;
	gap: 12px;
	width: 100%;
}

.wcsomm-card {
	perspective: 1200px;
	border-radius: 26px;
	background: var(--wcsomm-card-bg);
	border: 1px solid var(--wcsomm-card-border-color);
	box-shadow: 0 25px 55px rgba(0, 0, 0, 0.6), inset 0 -2px 30px rgba(255, 255, 255, 0.04),
	inset 0 15px 35px rgba(0, 0, 0, 0.25);
	overflow: visible;
	position: relative;
	width: 100% !important;
}

.wcsomm-card::before {
	content: '';
	position: absolute;
	inset: 4px;
	border-radius: 24px;
	pointer-events: none;
	background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 60%);
	opacity: 0.6;
}

.wcsomm-card-inner {
	position: relative;
	width: 100%;
	min-height: 260px;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	transform-style: preserve-3d;
}

.wcsomm-card-inner.flipped {
	transform: rotateY(180deg);
}

.wcsomm-card-side {
	grid-area: 1/1;
	backface-visibility: hidden;
	display: flex;
	flex-direction: column;
	border-radius: 24px;
	padding: 0;
	min-height: 260px;
	box-sizing: border-box;
}

.wcsomm-card-front {
	padding: 18px;
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 18px;
	align-items: stretch;
	position: relative;
}

.wcsomm-card-back {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 18px;
	transform: rotateY(180deg);
	background: rgba(0, 0, 0, 0.8);
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.45);
	display: flex;
	flex-direction: column;
	gap: 14px;
	justify-content: stretch;
}

.wcsomm-card-media {
	position: relative;
	width: 140px;
	min-width: 140px;
	height: 230px;
	border-radius: 18px;
	background: var(--wcsomm-card-media-bg);
	display: grid;
	place-items: center;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 35px 70px rgba(0, 0, 0, 0.65), inset 0 -12px 35px rgba(255, 255, 255, 0.07);
}

.wcsomm-card-media::after {
	content: '';
	position: absolute;
	bottom: -28px;
	left: 50%;
	transform: translateX(-50%);
	width: 115%;
	height: 60px;
	background: radial-gradient(circle, rgba(0, 0, 0, 0.72), transparent 70%);
	opacity: 0.85;
	pointer-events: none;
}

.wcsomm-card-media img {
	width: auto !important;
	height: 100% !important;
	max-height: 210px !important;
	object-fit: contain !important;
}

.wcsomm-card-flip {
	position: absolute;
	bottom: 14px;
	left: 14px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.9);
	background: transparent;
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	z-index: 3;
	transition: transform 0.25s ease, opacity 0.25s ease;
	opacity: 0.9;
}

.wcsomm-card-flip::after {
	content: '↺';
	font-size: 16px;
}

.wcsomm-card-flip:hover {
	opacity: 1;
	transform: translateY(-2px);
}

.wcsomm-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 40px 70px rgba(0, 0, 0, 0.65), inset 0 0 40px rgba(255, 255, 255, 0.04);
}

.wcsomm-card-body,
.wcsomm-card-back-content {
	padding-bottom: 18px;
}


.wcsomm-card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	justify-content: space-between;
	height: 100%;
}

.wcsomm-card-name {
	font-size: 18px;
	font-weight: 700;
	color: var(--wcsomm-ink);
	margin: 0;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wcsomm-card-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--wcsomm-ink);
	letter-spacing: 0.04em;
}

.wcsomm-card-stock {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wcsomm-ink);
}
.wcsomm-card-stock.level-low {
	color: #b35c00;
}
.wcsomm-card-stock.level-out {
	color: #c62828;
}

.wcsomm-card-meta {
	font-size: 12px;
	color: var(--wcsomm-muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wcsomm-card-description {
	margin: 0;
	color: var(--wcsomm-ink);
	font-size: 13px;
	line-height: 1.5;
	min-height: 48px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	mask-image: linear-gradient(180deg, #000 65%, transparent 100%);
	letter-spacing: 0.02em;
}

.wcsomm-card-cta {
	width: 100%;
	height: 44px;
	background: var(--wcsomm-cta);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	font-weight: 800;
	letter-spacing: 0.2em;
	cursor: pointer;
	box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wcsomm-card-cta:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wcsomm-card-cta:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 20px 32px rgba(0, 0, 0, 0.35);
}

.wcsomm-card-back-content .wcsomm-card-cta {
	align-self: center;
	width: 100%;
	max-width: 240px;
	height: 44px !important;
	padding: 0 24px !important;
	margin: 1.2rem auto 0.8rem !important;
	letter-spacing: 0.2em !important;
	font-size: 14px !important;
}

.wcsomm-card-back .wcsomm-card-back-content > .wcsomm-card-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 240px;
	height: 44px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--wcsomm-cta);
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.2em;
	border: 1px solid rgba(255, 255, 255, 0.45);
	box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
	cursor: pointer;
}

.wcsomm-card-back-content > .wcsomm-card-cta {
	width: 100%;
	height: 44px;
	padding: 0 16px;
	border-radius: 9999px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.wcsomm-card-back-content {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	overflow-y: auto;
	padding-bottom: 60px;

	position: relative;
}

.wcsomm-card-back-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--wcsomm-muted);
}

.wcsomm-card-back-description {
	font-size: 14px;
	line-height: 1.6;
	color: #fff;
	margin: 0;
}

.wcsomm-card-back-description + .wcsomm-card-back-description {
	margin-top: 0.65rem;
}

.wcsomm-card-back-close {
	position: absolute;
	bottom: 12px;
	left: 12px;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: var(--wcsomm-ink);
	cursor: pointer;
	display: grid;
	place-items: center;
	box-shadow: 0 12px 16px rgba(0, 0, 0, 0.3);
}

.wcsomm-card-back-close::before {
	content: '↩';
	font-size: 20px;
}

.wcsomm-form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	padding: 6px 2px 6px;
}

.wcsomm-form input[type="text"] {
	padding: 13px 14px;
	border-radius: 12px;
	border: 1px solid var(--wcsomm-border);
	font-size: 14px;
	background: #0f0f0f;
	color: #fff;
}

.wcsomm-form button {
	background: #0f0f0f;
	color: #fff;
	border: 1px solid var(--wcsomm-border);
	padding: 0 18px;
	border-radius: 12px;
	font-weight: 800;
	cursor: pointer;
}

.wcsomm-form button:hover {
	background: #141414;
	border-color: #555;
}

.wcsomm-skeleton {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 6px 4px;
}

.wcsomm-skeleton-line {
	height: 12px;
	border-radius: 999px;
	background: linear-gradient(
	90deg,
	var(--wcsomm-skeleton-1) 25%,
	var(--wcsomm-skeleton-2) 50%,
	var(--wcsomm-skeleton-1) 75%
	);
	background-size: 200% 100%;
	animation: shimmer 1100ms ease-in-out infinite;
}

.wcsomm-skeleton-line.short {
	width: 60%;
}

.wcsomm-skeleton-card {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 14px;
	padding: 12px;
	border-radius: 16px;
	border: 1px solid var(--wcsomm-border);
	background: #0a0a0a;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.wcsomm-skeleton-media {
	height: 190px;
	border-radius: 12px;
	background: linear-gradient(
	90deg,
	var(--wcsomm-skeleton-1) 25%,
	var(--wcsomm-skeleton-2) 50%,
	var(--wcsomm-skeleton-1) 75%
	);
	background-size: 200% 100%;
	animation: shimmer 1100ms ease-in-out infinite;
}

@keyframes shimmer {
	0% {
	background-position: 200% 0;
	}
	100% {
	background-position: -200% 0;
	}
}

@media (max-width: 520px) {
	#wcsomm-ai-chat,
	.wcsomm-shell {
	right: 10px;
	left: 10px;
	bottom: 80px;
	width: auto;
	max-height: 82vh;
	}

	.wcsomm-card-front {
	grid-template-columns: 1fr;
	}

	.wcsomm-card-media,
	.wcsomm-skeleton-media {
	width: 100%;
	min-width: 100%;
	height: 210px;
	}

	.wcsomm-card-description {
	-webkit-line-clamp: 3;
	}
}

@media (min-width: 781px) {
	.wcsomm-card-description {
	-webkit-line-clamp: 4;
	}
}
