/* Чорна п'ятниця (inc/black-friday.php): подключается только в дни анонса/акции и в предпросмотре ?ms_bf=. */
:root { --bf-night: #0f0e0c; --bf-gold: #f0cf7e; --bf-paper: #f4efe6; }

/* Строка над шапкой: глубокий чёрный + латунная нить снизу. Высота задана сервером, отсчёт меняет только текст. */
.ms-bf { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.25rem 0.75rem;
	padding: 0.55rem max(16px, env(safe-area-inset-right, 0px)) calc(0.55rem + 2px) max(16px, env(safe-area-inset-left, 0px));
	background: var(--bf-night); color: var(--bf-paper); font-size: 0.8125rem; line-height: 1.35; text-align: center; }
.ms-bf::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #b8862b 20%, var(--bf-gold) 50%, #b8862b 80%, transparent); }
.ms-bf b { font-family: var(--ms-display); font-weight: 700; letter-spacing: 0.01em; color: #fff; }
.ms-bf__left { display: inline-flex; align-items: center; padding: 0.1rem 0.55rem; border: 1px solid rgba(240, 207, 126, .45); border-radius: 999px;
	color: var(--bf-gold); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-bf a { display: inline-block; padding-block: 0.2rem; margin-block: -0.2rem; color: var(--bf-gold); font-weight: 700; text-decoration: none; white-space: nowrap; }   /* зона нажатия >= 24 px (WCAG 2.5.8) без роста строки */
.ms-bf a:hover { text-decoration: underline; }
.ms-bf a:focus-visible { outline: 2px solid var(--bf-gold); outline-offset: 2px; border-radius: 2px; }
.ms-bf__short, .ms-bf__sw { display: none; }
.ms-bf__t { display: inline-block; min-width: 7.2em; text-align: left; }   /* отсчёт меняет только цифры - ширина стабильна, строка не переносится заново */
.ms-bf__pv { padding: 0.05rem 0.45rem; border-radius: 4px; background: #fff; color: var(--bf-night); font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 599px) {
	.ms-bf { padding-block: 0.45rem calc(0.45rem + 2px); font-size: 0.78rem; gap: 0.2rem 0.5rem; }
	.ms-bf__long, .ms-bf__lw { display: none; }
	.ms-bf__short, .ms-bf__sw { display: inline; }
}

/* Бейдж скидки: чёрная плашка с латунной цифрой, как ценник. На фото карточки - левый верхний угол. */
.ms-bf-badge { display: inline-block; padding: 0.3rem 0.5rem 0.25rem; border-radius: 4px; background: var(--bf-night); color: var(--bf-gold);
	font: 700 0.8125rem/1 var(--ms-display); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-grid .wc-block-components-product-image .ms-bf-badge { position: absolute; top: 10px; left: 10px; z-index: 2; pointer-events: none; box-shadow: 0 2px 8px rgba(15, 14, 12, .18); }
.ms-bf-gal { position: relative; }
.ms-bf-badge--lg { position: absolute; top: 14px; left: 14px; z-index: 5; padding: 0.45rem 0.7rem 0.4rem; font-size: 1.0625rem; pointer-events: none; box-shadow: 0 2px 10px rgba(15, 14, 12, .2); }
.ms-bf-badge--inline { font-size: 0.75rem; padding: 0.25rem 0.4rem 0.2rem; }

/* Цены: старая - приглушённая и зачёркнутая, новая - латунью (контраст с белым 6,3:1). */
.ms-card__price del, .ms-product__price del { color: var(--ms-muted); font-weight: 500; font-size: 0.82em; margin-right: 0.4rem; text-decoration-thickness: 1px; opacity: 1; }
.ms-card__price ins, .ms-product__price ins { color: var(--ms-brass); text-decoration: none; font-weight: 800; }

/* Строка под ценой на странице товара. */
.ms-bf-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin: 0.5rem 0 0 !important; font-size: 0.9375rem; font-weight: 600; color: var(--ms-ink); }

/* Блок на главной перед каталогом. */
.ms-bf-sec { padding-block: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 1.5rem); scroll-margin-top: calc(var(--ms-hdr, 64px) + 12px); }
.ms-bf-sec__head { display: grid; gap: 0.35rem; margin-bottom: 1.25rem; padding-left: 0.9rem; border-left: 3px solid var(--bf-night); }
.ms-bf-sec__kicker { margin: 0 !important; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ms-brass); }
.ms-bf-sec .ms-section-title { margin: 0 !important; text-wrap: balance; }
.ms-bf-sec__sub { margin: 0 !important; max-width: 62ch; color: var(--ms-muted); font-size: 0.9375rem; }
/* Штатная круглая наклейка WooCommerce «Розпродаж!» на галерее - вместо неё наш бейдж. */
.ms-bf-gal .onsale, .ms-bf-gal .wc-block-components-product-sale-badge { display: none !important; }
/* Подпись «Знижка» для экранных читалок (на случай, если стили WP/Woo с этим классом не подключены). */
.ms-bf-badge .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
