/* Smart Bundles – „Купи заедно“ */
.sb-root[hidden] { display: none; }
.sb-root { --sb-accent: #1e6fd9; --sb-price: #d32f2f; clear: both; margin: 32px 0; }

.sb-root .sb-bundle {
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 12px;
	padding: 20px 22px;
	background: #fff;
	margin: 0 0 20px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.sb-root .sb-heading { margin: 0 0 18px; font-size: 1.3em; font-weight: 600; line-height: 1.3; }

.sb-root .sb-body { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

.sb-root .sb-items {
	list-style: none; margin: 0; padding: 0;
	display: flex; align-items: flex-start; gap: 10px;
	flex: 1 1 460px; flex-wrap: wrap;
}
.sb-root .sb-item {
	display: flex; flex-direction: column; align-items: center;
	text-align: center; width: 160px; margin: 0; padding: 0;
}
.sb-root .sb-item::before { content: none; }
.sb-root .sb-thumb { display: block; flex-shrink: 0; }
.sb-root .sb-thumb img {
	width: 120px; height: 120px; object-fit: contain;
	display: block; margin: 0 auto 8px; border-radius: 8px;
}
.sb-root .sb-info { display: flex; flex-direction: column; align-items: inherit; gap: 4px; min-width: 0; }
.sb-root .sb-name {
	font-size: .9em; line-height: 1.35; color: inherit; text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sb-root .sb-name:hover { text-decoration: underline; }
.sb-root .sb-price { display: block; font-weight: 600; font-size: .95em; }
.sb-root .sb-price del { opacity: .55; font-weight: 400; margin-right: 4px; }
.sb-root .sb-price ins { text-decoration: none; }

.sb-root .sb-tag {
	display: inline-block; align-self: center;
	font-size: .72em; line-height: 1.6; padding: 0 8px; border-radius: 999px;
	background: #f1f3f5; color: #555; text-transform: uppercase; letter-spacing: .03em;
}
.sb-root .sb-tag--viewed { background: #fff4e5; color: #8a5300; }

.sb-root .sb-plus,
.sb-root .sb-eq {
	width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 18px; line-height: 1;
	background: #e8f0fc;
	background: color-mix(in srgb, var(--sb-accent) 12%, #fff);
	color: var(--sb-accent);
	margin: 0; padding: 0;
}
.sb-root .sb-plus::before { content: none; }
.sb-root .sb-items .sb-plus { margin-top: 43px; }
.sb-root .sb-eq { align-self: center; margin-bottom: 4px; }

.sb-root .sb-summary {
	flex: 0 1 260px; margin: 0 auto; display: flex; flex-direction: column;
	gap: 6px; align-items: stretch; text-align: center;
}
.sb-root .sb-old { opacity: .6; font-size: .95em; }
.sb-root .sb-new { font-size: 1.7em; font-weight: 700; color: var(--sb-price); line-height: 1.2; }
.sb-root .sb-from { font-size: .55em; font-weight: 500; color: inherit; }
.sb-root .sb-save {
	align-self: center; background: #e8f5e9; color: #1b5e20;
	border-radius: 999px; padding: 2px 12px; font-size: .85em; font-weight: 600;
}

.sb-root .sb-add {
	background: var(--sb-accent); color: #fff; border: 0; border-radius: 999px;
	padding: 13px 20px; margin-top: 8px; font-size: 1em; font-weight: 600; line-height: 1.2;
	cursor: pointer; width: 100%; text-transform: none; letter-spacing: normal;
	transition: filter .15s ease, opacity .15s ease;
}
.sb-root .sb-add:hover { filter: brightness(1.08); }
.sb-root .sb-add:focus-visible { outline: 3px solid color-mix(in srgb, var(--sb-accent) 40%, transparent); outline-offset: 2px; }
.sb-root .sb-add[disabled] { opacity: .65; cursor: default; }
.sb-root .sb-add.is-loading { cursor: wait; }

.sb-root .sb-msg { font-size: .9em; min-height: 1.2em; }
.sb-root .sb-msg.is-error { color: #c62828; }
.sb-root .sb-msg a { color: var(--sb-accent); font-weight: 600; }

@media (max-width: 640px) {
	.sb-root .sb-bundle { padding: 16px; }
	.sb-root .sb-items { flex-direction: column; align-items: stretch; flex-basis: 100%; }
	.sb-root .sb-item { flex-direction: row; width: auto; text-align: left; gap: 12px; align-items: center; }
	.sb-root .sb-thumb img { width: 72px; height: 72px; margin: 0; }
	.sb-root .sb-info { align-items: flex-start; }
	.sb-root .sb-tag { align-self: flex-start; }
	.sb-root .sb-items .sb-plus { align-self: center; margin-top: 0; width: 30px; height: 30px; flex-basis: 30px; font-size: 16px; }
	.sb-root .sb-summary { flex: 1 1 100%; }
	.sb-root .sb-item .sb-thumb img { width: 72px; height: 72px; }
}

/* In case the theme does not hide WooCommerce's screen-reader price text. */
.sb-root .screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}

/* Theme overrides: keep our colors on WooCommerce price spans. */
.sb-root .sb-new .amount,
.sb-root .sb-new bdi { color: inherit; }
.sb-root .sb-save .amount,
.sb-root .sb-save bdi { color: inherit; }

/* ------------------------------------------------------------------ */
/* Tile calculator                                                    */
/* ------------------------------------------------------------------ */
.sb-calc-root { margin: 24px 0; }
.sb-calc-root .sb-calc {
	border: 1px solid rgba(0, 0, 0, .1); border-radius: 12px; padding: 20px 22px;
	background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.sb-calc .sb-heading { margin-bottom: 4px; }
.sb-calc .sb-c-sub { margin: 0 0 16px; font-size: .9em; opacity: .7; }

.sb-calc .sb-c-tabs { display: inline-flex; border: 1px solid rgba(0, 0, 0, .15); border-radius: 999px; padding: 3px; margin: 0 0 16px; gap: 2px; }
.sb-calc .sb-c-tabs label { margin: 0; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .9em; line-height: 1.3; }
.sb-calc .sb-c-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.sb-calc .sb-c-tabs label:has(input:checked) { background: var(--sb-accent); color: #fff; }
.sb-calc .sb-c-tabs label:has(input:focus-visible) { outline: 2px solid var(--sb-accent); outline-offset: 2px; }

.sb-calc .sb-c-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; font-size: .9em; }
.sb-calc .sb-c-field > span { font-weight: 600; opacity: .85; }
.sb-calc .sb-c-field input,
.sb-calc .sb-c-field select {
	width: 100%; height: 42px; padding: 0 12px; margin: 0; box-sizing: border-box;
	border: 1px solid rgba(0, 0, 0, .2); border-radius: 8px; background: #fff;
	font-size: 15px; line-height: 40px; color: inherit;
}
.sb-calc .sb-c-field input:focus,
.sb-calc .sb-c-field select:focus { border-color: var(--sb-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sb-accent) 18%, transparent); }

.sb-calc .sb-c-surfaces { display: flex; flex-direction: column; gap: 10px; }
.sb-calc .sb-c-surface { display: grid; grid-template-columns: 1fr auto 1fr 36px; gap: 10px; align-items: end; }
.sb-calc .sb-c-x { align-self: end; line-height: 42px; opacity: .5; }
.sb-calc .sb-c-del {
	width: 36px; height: 42px; padding: 0; margin: 0; border: 0; border-radius: 8px;
	background: #f1f3f5; color: #555; font-size: 20px; line-height: 1; cursor: pointer;
}
.sb-calc .sb-c-del[hidden] { display: block; visibility: hidden; }
.sb-calc .sb-c-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 0 0; }
.sb-calc .sb-c-addrow {
	background: none; border: 0; padding: 8px 0; margin: 0; color: var(--sb-accent);
	font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: normal; font-size: .95em;
}
.sb-calc .sb-c-field--minus { width: 100%; max-width: 260px; }
.sb-calc .sb-c-m2 .sb-c-field { max-width: 260px; }

.sb-calc .sb-c-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 0; }
.sb-calc .sb-c-check { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; font-size: .92em; cursor: pointer; }
.sb-calc .sb-c-check input { width: 18px; height: 18px; margin: 0; }

.sb-calc .sb-c-result { margin-top: 18px; transition: opacity .15s ease; }
.sb-calc .sb-c-result:empty { display: none; }
.sb-calc .sb-c-result.is-loading { opacity: .5; }
.sb-calc .sb-c-hint { margin: 0; padding: 12px 14px; background: #fff8e1; border-radius: 8px; font-size: .92em; }

.sb-calc .sb-c-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; border: 0; font-size: .95em; }
.sb-calc .sb-c-table td { padding: 12px 0; border: 0; border-top: 1px solid rgba(0, 0, 0, .08); vertical-align: top; background: none; text-align: left; }
.sb-calc .sb-c-table tr:first-child td { border-top: 0; }
.sb-calc .sb-c-table .sb-c-name { display: block; font-weight: 600; }
.sb-calc .sb-c-table .sb-c-qty { display: block; font-weight: 700; color: var(--sb-accent); margin-top: 2px; }
.sb-calc .sb-c-table .sb-c-note { display: block; opacity: .6; margin-top: 2px; font-size: .85em; }
.sb-calc .sb-c-table .sb-c-num { text-align: right; white-space: nowrap; padding-left: 16px; font-weight: 600; }
.sb-calc .sb-c-table .sb-c-num .amount,
.sb-calc .sb-c-table .sb-c-num bdi { display: inline; color: inherit; }
.sb-calc .sb-c-table .sb-c-num del { opacity: .5; font-weight: 400; display: block; }
.sb-calc .sb-c-table .sb-c-num ins { text-decoration: none; display: block; }

.sb-calc .sb-c-total { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; border-top: 1px solid rgba(0, 0, 0, .1); padding-top: 14px; }
.sb-calc .sb-c-total .sb-save { align-self: center; }

@media (max-width: 640px) {
	.sb-calc-root .sb-calc { padding: 16px; }
	.sb-calc .sb-c-surface { grid-template-columns: 1fr 1fr 36px; }
	.sb-calc .sb-c-x { display: none; }
	.sb-calc .sb-c-field--minus { width: 100%; }
	.sb-calc .sb-c-tabs { display: flex; }
	.sb-calc .sb-c-tabs label { flex: 1; text-align: center; padding: 8px 6px; }
}

/* Optional adhesive / grout */
.sb-calc .sb-c-extras { margin: 18px 0 0; padding: 14px 16px; border-radius: 10px; background: #f7f8fa; }
.sb-calc .sb-c-extras-title { margin: 0 0 10px; font-weight: 600; font-size: .95em; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-calc .sb-c-badge { font-style: normal; font-size: .8em; font-weight: 600; background: #e8f5e9; color: #1b5e20; border-radius: 999px; padding: 2px 10px; }
.sb-calc .sb-c-extra + .sb-c-extra { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .08); }
.sb-calc .sb-c-extra .sb-c-check { margin: 0; font-weight: 600; }
.sb-calc .sb-c-extra-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 12px; margin: 10px 0 0 26px; }
.sb-calc .sb-c-extra-body[hidden] { display: none; }
.sb-calc .sb-c-extras .sb-c-field input,
.sb-calc .sb-c-extras .sb-c-field select { background: #fff; }
.sb-calc .sb-c-offer { margin: 0 0 6px; padding: 10px 12px; border-radius: 8px; background: #fff8e1; font-size: .9em; }

@media (max-width: 640px) {
	.sb-calc .sb-c-extras { padding: 12px; }
	.sb-calc .sb-c-extra-body { grid-template-columns: 1fr; margin-left: 0; }
	.sb-calc .sb-c-field--short { max-width: 160px; }
	.sb-calc .sb-c-surface + .sb-c-surface .sb-c-field > span { display: none; }
}

/* ------------------------------------------------------------------ */
/* Desktop sizing (1.1.2): fixed pixel sizes so small theme fonts      */
/* do not shrink the block; larger photos on wide layouts.             */
/* ------------------------------------------------------------------ */
@media (min-width: 641px) {
	.sb-root .sb-bundle { padding: 26px 30px; font-size: 15px; line-height: 1.45; }
	.sb-root .sb-heading { font-size: 22px; margin-bottom: 22px; }
	.sb-root .sb-body { gap: 32px; }
	.sb-root .sb-items { gap: 14px; flex: 1 1 600px; }
	.sb-root .sb-item { width: 200px; }
	.sb-root .sb-thumb img { width: 170px; height: 170px; margin-bottom: 12px; }
	.sb-root .sb-name { font-size: 14px; }
	.sb-root .sb-price { font-size: 16px; }
	.sb-root .sb-tag { font-size: 11px; padding: 1px 10px; }
	.sb-root .sb-plus, .sb-root .sb-eq { width: 40px; height: 40px; flex-basis: 40px; font-size: 20px; }
	.sb-root .sb-items .sb-plus { margin-top: 65px; }
	.sb-root .sb-summary { flex: 0 1 300px; gap: 8px; }
	.sb-root .sb-old { font-size: 16px; }
	.sb-root .sb-new { font-size: 32px; }
	.sb-root .sb-save { font-size: 14px; padding: 4px 14px; }
	.sb-root .sb-add { font-size: 16px; padding: 16px 22px; }
	.sb-root .sb-msg { font-size: 14px; }
}
@media (min-width: 1400px) {
	.sb-root .sb-item { width: 230px; }
	.sb-root .sb-thumb img { width: 200px; height: 200px; }
	.sb-root .sb-items .sb-plus { margin-top: 80px; }
}

/* Calculator: same fixed sizes on desktop. */
@media (min-width: 641px) {
	.sb-calc-root .sb-calc { font-size: 15px; line-height: 1.45; padding: 24px 26px; }
	.sb-calc .sb-heading { font-size: 22px; }
	.sb-calc .sb-c-sub { font-size: 14px; }
	.sb-calc .sb-c-field { font-size: 14px; }
	.sb-calc .sb-c-table { font-size: 15px; }
	.sb-calc .sb-c-total .sb-new { font-size: 32px; }
}
.sb-bundle[hidden]{display:none!important}
.sb-bundle--none{display:none!important}
.sb-root .sb-price .sb-pct { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 10px; background: #e8f5e9; color: #1b5e20; font-size: .8em; font-weight: 700; }
.sb-root .sb-price ins { color: var(--sb-price); }
.sb-root .sb-price ins .amount, .sb-root .sb-price ins bdi { color: inherit; }
.sb-root .sb-bsave { margin-top: 4px; font-size: .85em; color: #1b5e20; }
.sb-root .sb-bsave .amount, .sb-root .sb-bsave bdi { color: inherit; }
