/* KKTKY Pack Builder */
.kktky-pb {
	--kktky-pb-accent: var(--primary-color, #633cff);
	--kktky-pb-accent-soft: rgba(99, 60, 255, .08);
	--kktky-pb-border: #dcdce4;
	--kktky-pb-muted: #6b6b76;
	--kktky-pb-radius: 14px;
	margin: 0 0 1.5em;
	font-size: 15px;
}

.kktky-pb__step {
	margin-bottom: 18px;
}

.kktky-pb__label {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 8px;
	font-weight: 600;
}

.kktky-pb__chart {
	margin-left: auto;
	font-size: 13px;
	font-weight: 400;
	text-decoration: underline;
}

.kktky-pb__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kktky-pb .kktky-pb__option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 42px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--kktky-pb-border);
	border-radius: 999px;
	background: #fff;
	color: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}

.kktky-pb__options--mode .kktky-pb__option {
	flex: 1 1 0;
}

/* Strihov môže byť viac (PPČKY má 5) – text v jednom riadku, tlačidlá sa zalomia. */
.kktky-pb__options--fit .kktky-pb__option {
	flex: 1 1 auto;
	white-space: nowrap;
}

.kktky-pb .kktky-pb__option:hover {
	border-color: var(--kktky-pb-accent);
}

.kktky-pb .kktky-pb__option.is-active {
	border-color: var(--kktky-pb-accent);
	background: var(--kktky-pb-accent);
	color: #fff;
}

.kktky-pb .kktky-pb__option.is-soldout,
.kktky-pb .kktky-pb__option:disabled {
	border-style: dashed;
	color: #b4b4bc;
	text-decoration: line-through;
	cursor: not-allowed;
}

.kktky-pb__notice {
	margin: 0 0 8px;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fff4e0;
	font-size: 13px;
}

/* Packy */
.kktky-pb__packs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.kktky-pb .kktky-pb__pack {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 16px 6px 10px;
	border: 1.5px solid var(--kktky-pb-border);
	border-radius: var(--kktky-pb-radius);
	background: #fff;
	color: inherit;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.kktky-pb .kktky-pb__pack.is-active {
	border-color: var(--kktky-pb-accent);
	background: var(--kktky-pb-accent-soft);
	box-shadow: 0 0 0 1px var(--kktky-pb-accent);
}

.kktky-pb .kktky-pb__pack.is-target {
	border-style: dashed;
	border-color: var(--kktky-pb-accent);
}

.kktky-pb__pack-qty {
	font-size: 17px;
	font-weight: 700;
}

.kktky-pb__pack-unit {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.kktky-pb__pack-unit small {
	color: var(--kktky-pb-muted);
	font-weight: 400;
}

.kktky-pb__pack-save {
	color: var(--kktky-pb-accent);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.kktky-pb__pack-save s {
	color: var(--kktky-pb-muted);
	font-weight: 400;
}

.kktky-pb__badge {
	position: absolute;
	top: -9px;
	left: 50%;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--kktky-pb-accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
	transform: translateX(-50%);
}

/* Počet kusov + upozornenie na ďalší pack */
.kktky-pb__qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12px;
	padding: 8px 12px;
	border: 1.5px solid var(--kktky-pb-border);
	border-radius: 999px;
	font-weight: 600;
}

.kktky-pb__qty .kktky-pb__stepper {
	gap: 14px;
	margin: 0;
}

.kktky-pb__hint,
.kktky-pb__incart {
	margin: 10px 0 0;
	padding: 8px 12px;
	border-radius: 10px;
	background: var(--kktky-pb-accent-soft);
	color: var(--kktky-pb-accent);
	font-size: 13px;
	font-weight: 600;
}

.kktky-pb__incart {
	background: none;
	padding: 0;
	color: var(--kktky-pb-muted);
	font-weight: 400;
}

.kktky-pb__hint.is-done {
	background: #e8f6ee;
	color: #1e8a4c;
}

/* Farby pri jednej farbe – odkazy na ostatné dizajny v strihu */
.kktky-pb__label--sub {
	margin: 14px 0 8px;
	font-weight: 400;
}

.kktky-pb__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.kktky-pb__swatch {
	display: block;
	width: 52px;
	height: 52px;
	padding: 2px;
	border: 2px solid transparent;
	border-radius: 12px;
	transition: border-color .15s;
}

.kktky-pb__swatch img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	object-fit: cover;
}

a.kktky-pb__swatch:hover {
	border-color: var(--kktky-pb-border);
}

.kktky-pb__swatch.is-active {
	border-color: var(--kktky-pb-accent);
}

.kktky-pb__swatch.is-soldout img {
	opacity: .35;
}

/* Mix */
.kktky-pb__counter {
	margin: 12px 0 8px;
	color: var(--kktky-pb-muted);
	font-size: 13px;
	font-weight: 600;
}

.kktky-pb__counter.is-full {
	color: var(--kktky-pb-accent);
}

.kktky-pb__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 8px;
	max-height: 460px;
	overflow-y: auto;
	padding: 2px;
}

.kktky-pb__tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 6px;
	border: 1.5px solid var(--kktky-pb-border);
	border-radius: 12px;
	background: #fff;
	text-align: center;
}

.kktky-pb__tile.is-picked {
	border-color: var(--kktky-pb-accent);
	background: var(--kktky-pb-accent-soft);
}

.kktky-pb__tile.is-soldout {
	opacity: .45;
}

.kktky-pb__tile img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 8px;
	object-fit: cover;
}

.kktky-pb__tile-name {
	font-size: 12px;
	line-height: 1.25;
}

.kktky-pb__tile-note {
	color: #c0392b;
	font-size: 11px;
	font-weight: 600;
}

.kktky-pb__stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.kktky-pb .kktky-pb__stepper button {
	width: 30px;
	height: 30px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--kktky-pb-border);
	border-radius: 50%;
	background: #fff;
	color: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.kktky-pb .kktky-pb__stepper button:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.kktky-pb .kktky-pb__stepper input {
	width: 42px;
	height: 30px;
	min-height: 0;
	margin: 0 4px;
	padding: 0;
	/* Flatsome (Customizer) nastavuje rámček inputov s !important */
	border: 1.5px solid transparent !important;
	border-radius: 8px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	cursor: text;
	-moz-appearance: textfield;
	appearance: textfield;
}

.kktky-pb .kktky-pb__stepper input:focus {
	border-color: var(--kktky-pb-accent) !important;
	background: #fff !important;
	outline: none;
}

.kktky-pb .kktky-pb__stepper input:disabled {
	background: transparent;
	opacity: .5;
}

.kktky-pb .kktky-pb__stepper input::-webkit-inner-spin-button,
.kktky-pb .kktky-pb__stepper input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

/* Súhrn */
.kktky-pb__summary {
	padding-top: 6px;
}

.kktky-pb__total {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 15px;
}

.kktky-pb__total strong {
	font-size: 20px;
}

.kktky-pb__total s {
	color: var(--kktky-pb-muted);
}

.kktky-pb .kktky-pb__submit {
	width: 100%;
	margin: 0;
}

.kktky-pb .kktky-pb__submit:disabled,
.kktky-pb .kktky-pb__submit.is-disabled {
	opacity: .55;
}

.kktky-pb .kktky-pb__submit:disabled {
	cursor: not-allowed;
}

/* Celý dizajn vypredaný */
.kktky-pb__soldout {
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid #f1c4bd;
	border-left: 4px solid #c0392b;
	border-radius: 10px;
	background: #fff5f3;
}

.kktky-pb__soldout-title {
	display: block;
	color: #a1281c;
	font-size: 16px;
}

.kktky-pb__soldout-text {
	display: block;
	margin: 6px 0 8px;
	font-size: 14px;
}

.kktky-pb__soldout-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* Hláška k vybranej veľkosti */
.kktky-pb__size-note {
	margin: 8px 0 0;
	color: var(--kktky-pb-muted);
	font-size: 13px;
	font-weight: 600;
}

.kktky-pb__size-note.is-warn {
	padding: 8px 12px;
	border-radius: 10px;
	background: #fff4e0;
	color: #8a4b00;
}

/* Zvýraznenie sekcie po kliknutí na neaktívne tlačidlo */
.kktky-pb [data-pb-step].is-attention {
	animation: kktky-pb-attention 1.5s ease;
	border-radius: 12px;
}

@keyframes kktky-pb-attention {
	0%, 100% { box-shadow: 0 0 0 0 rgba(99, 60, 255, 0); }
	20%, 60% { box-shadow: 0 0 0 6px rgba(99, 60, 255, .25); }
}

/* Plávajúca lišta „Pridať do košíka“ */
.kktky-pb-sticky {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 990;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid #e6e6ee;
	background: #fff;
	box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
	transform: translateY(110%);
	transition: transform .25s ease;
	pointer-events: none;
}

.kktky-pb-sticky.is-visible {
	transform: translateY(0);
	pointer-events: auto;
}

.kktky-pb-sticky__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 1080px;
	margin: 0 auto;
}

.kktky-pb-sticky__info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.kktky-pb-sticky__name {
	overflow: hidden;
	color: #6b6b76;
	font-size: 13px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.kktky-pb-sticky__total {
	font-size: 16px;
}

.kktky-pb-sticky .kktky-pb-sticky__button {
	flex: 0 0 auto;
	min-width: 220px;
	margin: 0;
}

.kktky-pb-sticky .kktky-pb-sticky__button.is-disabled {
	opacity: .55;
}

body.kktky-pb-sticky-on {
	padding-bottom: 76px;
}

@media (max-width: 549px) {
	.kktky-pb-sticky__inner {
		gap: 10px;
	}

	.kktky-pb-sticky .kktky-pb-sticky__button {
		min-width: 0;
		flex: 1 1 55%;
		padding-right: 10px;
		padding-left: 10px;
		font-size: 14px;
	}
}

.kktky-pb__message {
	margin: 10px 0 0;
	font-size: 14px;
	font-weight: 600;
}

.kktky-pb__message--success {
	color: #1e8a4c;
}

.kktky-pb__message--error {
	color: #c0392b;
}

.kktky-pb__note {
	margin: 8px 0 0;
	color: var(--kktky-pb-muted);
	font-size: 12px;
}

@media (max-width: 549px) {
	.kktky-pb__packs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 14px;
	}

	.kktky-pb__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		max-height: none;
	}
}
