/* BluSky Samples — matches the BluSky Colour Wheel card style. Flatsome-safe. */

.bss,
.bss-modal-wrap,
.bss-toast {
	--bss-accent: #2f2e78;
	--bss-accent-hover: #232260;
	--bss-text: #1a1a2e;
	--bss-muted: #6b7280;
	--bss-border: #e8e8ec;
	--bss-surface: #f7f7f8;
	--bss-radius: 12px;
	--bss-shadow: 0 4px 24px rgba(0, 0, 0, .06);
	--bss-shadow-hover: 0 8px 32px rgba(0, 0, 0, .12);
	--bss-gap: 22px;
	--bss-font: inherit;
	font-family: var(--bss-font);
	color: var(--bss-text);
}

.bss *,
.bss-modal-wrap * { box-sizing: border-box; }

.bss-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Flatsome resets for our controls */
.bss button,
.bss-modal-wrap button {
	margin: 0;
	min-height: 0;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	font-family: inherit;
	box-shadow: none;
	text-shadow: none;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.bss-header { margin: 0 0 24px; }
.bss-header__title { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.bss-header__intro { color: var(--bss-muted); max-width: 72ch; }
.bss-header__intro p:last-child { margin-bottom: 0; }

/* ── Toolbar ────────────────────────────────────────────────────────── */
.bss-toolbar {
	background: #fff;
	border: 1px solid var(--bss-border);
	border-radius: var(--bss-radius);
	padding: 16px;
	margin: 0 0 24px;
	display: grid;
	gap: 14px;
}
.bss-toolbar > * { min-width: 0; }
.bss-toolbar__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; }
.bss-toolbar__row--chips { justify-content: space-between; align-items: flex-start; }

.bss-field { position: relative; margin: 0; display: block; flex: 0 1 220px; }
.bss-field--search { flex: 1 1 260px; }
.bss-field--search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--bss-muted); pointer-events: none; }
.bss .bss-field input,
.bss .bss-field select {
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--bss-border);
	border-radius: 8px;
	background-color: var(--bss-surface);
	box-shadow: none;
	font-size: 14px;
	color: var(--bss-text);
}
.bss .bss-field--search input { padding-left: 36px; }
.bss .bss-field input:focus,
.bss .bss-field select:focus { outline: 2px solid rgba(47, 46, 120, .25); border-color: var(--bss-accent); background-color: #fff; }

.bss-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 520px; }
.bss .bss-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px;
	border: 1px solid var(--bss-border);
	border-radius: 100px;
	background: #fff;
	color: var(--bss-text);
	font-size: 12.5px; font-weight: 600;
	cursor: pointer;
	transition: border-color .15s, background .15s, color .15s;
}
.bss .bss-chip:hover { border-color: var(--bss-accent); }
.bss .bss-chip.is-active { background: var(--bss-accent); border-color: var(--bss-accent); color: #fff; }
.bss-chip__dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); flex: none; }

.bss-segment { display: inline-flex; border: 1px solid var(--bss-border); border-radius: 100px; padding: 3px; background: var(--bss-surface); flex: none; }
.bss .bss-segment button {
	border: 0; background: transparent; padding: 6px 12px; border-radius: 100px;
	font-size: 12.5px; font-weight: 600; color: var(--bss-muted); cursor: pointer;
}
.bss .bss-segment button.is-active { background: #fff; color: var(--bss-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.bss-status { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--bss-muted); }
.bss .bss-clear { background: none; border: 0; padding: 0; color: var(--bss-accent); font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ── Grid & cards ───────────────────────────────────────────────────── */
.bss-grid {
	display: grid;
	grid-template-columns: repeat(var(--bss-cols, 4), minmax(0, 1fr));
	gap: var(--bss-gap);
}
@media (max-width: 1024px) { .bss-grid { grid-template-columns: repeat(min(var(--bss-cols, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 720px)  { .bss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); --bss-gap: 12px; } }

.bss-card {
	display: flex; flex-direction: column;
	background: #fff;
	border: 1px solid var(--bss-border);
	border-radius: var(--bss-radius);
	overflow: hidden;
	box-shadow: var(--bss-shadow);
	transition: box-shadow .22s, transform .22s, border-color .22s;
}
.bss-card[hidden] { display: none; }
.bss-card:hover { box-shadow: var(--bss-shadow-hover); transform: translateY(-2px); }
.bss-card.is-highlight { border-color: var(--bss-accent); box-shadow: 0 0 0 3px rgba(47, 46, 120, .25), var(--bss-shadow-hover); }

.bss .bss-card__media {
	display: block; width: 100%; padding: 0; border: 0; border-radius: 0;
	aspect-ratio: 1 / 1; overflow: hidden; cursor: zoom-in;
	background: var(--bss-surface);
}
.bss-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.bss-card:hover .bss-card__media img { transform: scale(1.04); }
.bss .bss-card__media { position: relative; }

/* "Learn more" hover hint */
.bss-card__hint {
	position: absolute; left: 50%; bottom: 12px;
	transform: translate(-50%, 6px); opacity: 0;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 100px;
	background: rgba(26, 26, 46, .82); color: #fff;
	font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
	backdrop-filter: blur(4px);
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}
.bss-card__media:hover .bss-card__hint,
.bss-card__media:focus-visible .bss-card__hint { opacity: 1; transform: translate(-50%, 0); }
/* Touch screens: no hover, so show a small permanent info badge instead. */
@media (hover: none) {
	.bss-card__hint { opacity: 1; transform: none; left: auto; right: 8px; bottom: 8px; padding: 6px; }
	.bss-card__hint-text { display: none; }
}

.bss-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 16px 18px; gap: 6px; }
.bss-card__brand {
	display: block;
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--bss-muted);
}
.bss .bss-card__title,
.bss-modal .bss-card__title {
	margin: 0 0 6px;
	font-size: 15px; line-height: 1.35; font-weight: 600;
	color: var(--bss-text);
	text-transform: none; letter-spacing: normal;
}
.bss-card__actions { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

/* Order Sample button */
.bss .bss-btn,
.bss-modal .bss-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 9px 16px;
	border: 1.5px solid var(--bss-accent);
	border-radius: 100px;
	background: #fff;
	color: var(--bss-accent);
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s, opacity .15s;
}
.bss .bss-btn:hover,
.bss-modal .bss-btn:hover { background: var(--bss-accent); color: #fff; }
.bss-btn.is-busy { opacity: .55; cursor: progress; }
.bss-btn__added,
.bss-btn__remove { display: none; }
.bss .bss-btn.is-added,
.bss-modal .bss-btn.is-added { background: var(--bss-accent); color: #fff; }
.bss-btn.is-added .bss-btn__add { display: none; }
.bss-btn.is-added .bss-btn__added { display: inline; }
.bss-btn.is-added:hover .bss-btn__added { display: none; }
.bss-btn.is-added:hover .bss-btn__remove { display: inline; }
.bss .bss-btn.is-added:hover,
.bss-modal .bss-btn.is-added:hover { background: #fff; color: #b42318; border-color: #b42318; }
.bss .bss-btn--ghost { margin-top: 8px; }

.bss .bss-similar,
.bss-modal .bss-similar {
	display: inline-flex; align-items: center; gap: 6px;
	background: none; border: 0; padding: 0;
	font-size: 12.5px; font-weight: 600; color: var(--bss-muted);
	cursor: pointer;
}
.bss .bss-similar:hover,
.bss-modal .bss-similar:hover { color: var(--bss-accent); text-decoration: underline; }
.bss-similar__dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }

.bss-empty { text-align: center; padding: 40px 16px; color: var(--bss-muted); }
.bss-empty[hidden] { display: none; }

/* Selection bar */
.bss-bar {
	position: sticky; bottom: 16px; z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin: 24px auto 0; max-width: 560px;
	padding: 12px 14px 12px 20px;
	background: var(--bss-text); color: #fff;
	border-radius: 100px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	font-size: 14px; font-weight: 600;
}
.bss-bar[hidden] { display: none; }
.bss .bss-bar__link {
	background: #fff; color: var(--bss-text);
	padding: 8px 16px; border-radius: 100px;
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	text-decoration: none; white-space: nowrap;
}
.bss .bss-bar__link:hover { background: var(--bss-surface); color: var(--bss-text); }

.bss-qty-locked { display: inline-block; min-width: 2em; text-align: center; }

/* ── Modal ──────────────────────────────────────────────────────────── */
body.bss-modal-open { overflow: hidden; }
.bss-modal-wrap { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bss-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 35, .6); }
.bss-modal {
	position: relative;
	width: min(1040px, 100%); max-height: calc(100vh - 40px); overflow: auto;
	background: #fff; border-radius: 16px;
	padding: 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	outline: none;
}
.bss-modal-wrap .bss-modal__close {
	position: absolute; top: 10px; right: 12px;
	width: 38px; height: 38px; padding: 0;
	border: 0; border-radius: 50%;
	background: var(--bss-surface); color: var(--bss-text);
	font-size: 24px; line-height: 38px; cursor: pointer;
}
.bss-modal__title { margin: 4px 0 12px; font-size: 1.35rem; line-height: 1.25; color: var(--bss-text); }

.bss-zoom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.bss-zoom__media { position: sticky; top: 0; }

/* Product information in the modal */
.bss-info { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bss-border); display: grid; gap: 18px; font-size: 14px; line-height: 1.55; color: var(--bss-text); }
.bss-info.is-loading { min-height: 60px; }
.bss-info__loader { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bss-border); border-top-color: var(--bss-accent); animation: bss-spin .8s linear infinite; }
@keyframes bss-spin { to { transform: rotate(360deg); } }
.bss-info h1, .bss-info h2, .bss-info h3, .bss-info h4, .bss-info h5, .bss-info h6, .bss-info__title {
	margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bss-text);
}
.bss-info ul { margin: 0; padding: 0; list-style: none; }
.bss-info li { position: relative; margin: 0 0 6px; padding-left: 18px; }
.bss-info li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--bss-accent); }
.bss-info p { margin: 0 0 8px; }
.bss .bss-info__link { font-size: 13px; font-weight: 700; color: var(--bss-accent); text-decoration: none; }
.bss .bss-info__link:hover { text-decoration: underline; }
.bss-zoom__media img { width: 100%; border-radius: 12px; display: block; }
@media (max-width: 720px) { .bss-zoom { grid-template-columns: 1fr; gap: 18px; } .bss-zoom__media { position: static; } .bss-modal { padding: 20px; } }

.bss-similar-panel__head { display: flex; align-items: center; gap: 16px; margin: 0 40px 20px 0; }
.bss-similar-panel__head img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.bss-modal .bss-grid--similar { --bss-cols: 4; }
.bss-loading { color: var(--bss-muted); padding: 40px 0; text-align: center; }

/* ── Toast ──────────────────────────────────────────────────────────── */
.bss-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 100001;
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	background: var(--bss-text); color: #fff;
	padding: 12px 20px; border-radius: 10px; font-size: 14px;
	transition: opacity .2s, transform .2s;
	max-width: calc(100vw - 32px);
}
.bss-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bss-toast.is-error { background: #b42318; }

/* ── Index tiles ────────────────────────────────────────────────────── */
.bss-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.bss-tile {
	display: flex; flex-direction: column;
	border: 1px solid var(--bss-border); border-radius: var(--bss-radius);
	overflow: hidden; background: #fff; text-decoration: none;
	box-shadow: var(--bss-shadow); transition: box-shadow .22s, transform .22s;
}
.bss-tile:hover { box-shadow: var(--bss-shadow-hover); transform: translateY(-2px); }
.bss-tile__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bss-surface); }
.bss-tile__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bss-tile__strip { display: flex; height: 10px; }
.bss-tile__strip span { flex: 1; }
.bss-tile__body { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 18px; }
.bss-tile__title { font-weight: 700; font-size: 17px; color: var(--bss-text); }
.bss-tile__meta { font-size: 13px; color: var(--bss-muted); white-space: nowrap; }

/* ── Mobile: compact toolbar ───────────────────────────────────────── */
@media (max-width: 720px) {
	.bss-toolbar { padding: 12px; gap: 10px; }
	.bss-toolbar__row { gap: 8px; }
	.bss-field { flex: 1 1 calc(50% - 4px); }
	.bss-field--search { flex: 1 1 100%; }
	.bss .bss-field input, .bss .bss-field select { height: 40px; font-size: 16px; }
	.bss-chips { min-width: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; flex: 1 1 100%; }
	.bss-chips::-webkit-scrollbar { display: none; }
	.bss .bss-chip { flex: none; }
	.bss-segment { width: 100%; }
	.bss .bss-segment button { flex: 1; }
	.bss-card__body { padding: 12px 12px 14px; }
	.bss .bss-card__title { font-size: 14px; }
	.bss .bss-btn { padding: 8px 12px; font-size: 11px; }
	.bss-bar { bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
	.bss-card__hint, .bss-info__loader { transition: none; animation: none; }
	.bss-card, .bss-card__media img, .bss-tile, .bss-toast { transition: none; }
}
