/*
Theme Name: BRF Apparel
Theme URI: https://brfapparel.com/
Description: Custom design for BRF Apparel. Child theme of Twenty Twenty-Five: local fonts (Archivo, IBM Plex Mono), dynamic sticky header, spec-sheet styling.
Author: BRF Moda
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brf-apparel
*/

/* ---------------------------------------------------------------
   Base
---------------------------------------------------------------- */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1, h2,
.has-5-xl-font-size,
.has-4-xl-font-size,
.has-3-xl-font-size,
.has-2-xl-font-size {
	font-stretch: 112%;
}

h3, h4,
.has-xl-font-size {
	font-stretch: 108%;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

figure.wp-block-image {
	margin-bottom: 0;
}

.wp-block-image img {
	display: block;
}

/* Template parts sit flush against each other. */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part + * {
	margin-block-start: 0;
}

/* Page sections stack without gaps; spacing lives inside each section. */
.wp-block-post-content.brf-sections > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* TranslatePress floating switcher: replaced by the header/footer switcher. */
#trp-floater-ls,
.trp-floating-switcher {
	display: none !important;
}

/* ---------------------------------------------------------------
   Text styles
---------------------------------------------------------------- */

.is-style-label {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	font-weight: 400;
	font-stretch: 100%;
	letter-spacing: 0.1em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

h2.is-style-label,
h3.is-style-label {
	font-weight: 500;
}

.has-ink-background-color .is-style-label,
.has-ink-deep-background-color .is-style-label {
	color: #B9B2A6;
}

.is-style-statement {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 500;
	font-stretch: 104%;
	letter-spacing: -0.01em;
	line-height: 1.35;
}

.is-style-placeholder,
.wp-block-table code,
p code {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--subtle);
	background: #EFEBE4;
	padding: 4px 8px;
}

.is-style-placeholder {
	width: fit-content;
}

.has-linen-background-color .is-style-placeholder,
.has-linen-background-color code {
	background: #F1EDE6;
}

.brf-crumbs {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--subtle);
}

.brf-crumbs a {
	color: var(--wp--preset--color--subtle);
	text-decoration: none;
}

.brf-crumbs a:hover {
	color: var(--wp--preset--color--ink);
}

.brf-crumbs strong {
	font-weight: 400;
	color: var(--wp--preset--color--accent);
}

.brf-num {
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--accent);
}

/* Inline emphasis kept from the original copy (TranslatePress matches on it). */
h1 strong,
h2 strong,
h3 strong,
h4 strong,
.wp-block-button__link strong,
.wp-block-group.brf-tile-caption strong {
	font-weight: inherit;
}

.is-style-rule h2 br,
.is-style-rule h3 br {
	display: none;
}

/* ---------------------------------------------------------------
   Rules (hairlines)
---------------------------------------------------------------- */

.is-style-rule {
	border-top: 1px solid var(--wp--preset--color--ink);
	padding-top: 22px;
}

.has-ink-background-color .is-style-rule,
.has-ink-deep-background-color .is-style-rule {
	border-top-color: #3A3732;
}

.brf-divider {
	border-top: 1px solid var(--wp--preset--color--line);
}

/* ---------------------------------------------------------------
   Buttons
---------------------------------------------------------------- */

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wp-block-button.brf-arrow .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.2s ease;
}

.wp-block-button.brf-arrow .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	min-height: 48px;
	font-size: 15px;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.wp-block-button.is-style-light .wp-block-button__link {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-light .wp-block-button__link:hover {
	background-color: #FFFFFF;
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-text-link .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	padding: 0;
	min-height: 44px;
	gap: 10px;
	border-radius: 0;
	border-bottom: 1px solid var(--wp--preset--color--ink);
}

.wp-block-button.is-style-text-link .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--accent);
	border-bottom-color: var(--wp--preset--color--accent);
}

.wp-block-button.is-style-text-link.brf-arrow .wp-block-button__link::after {
	width: 16px;
	height: 16px;
}

/* Category chips (Products page). */
.wp-block-buttons.brf-chips {
	gap: 10px;
}

.brf-chips .wp-block-button__link {
	min-height: 44px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 400;
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid #C9C2B6;
}

.brf-chips .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
}

/* ---------------------------------------------------------------
   Tiles (product image slots)
---------------------------------------------------------------- */

.brf-tile img {
	width: 100%;
	height: auto;
	background: var(--wp--preset--color--linen);
}

.brf-tile a {
	display: block;
}

.wp-block-group.brf-tile-caption {
	border-top: 1px solid var(--wp--preset--color--ink);
	padding-top: 12px;
	gap: 12px;
}

.brf-tile-caption p {
	margin: 0;
}

.brf-tile-caption a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.brf-tile-caption a:hover {
	text-decoration: underline;
}

/* ---------------------------------------------------------------
   Spec sheet table
---------------------------------------------------------------- */

.wp-block-table.is-style-spec {
	margin: 0;
	border-top: 1px solid var(--wp--preset--color--ink);
}

.wp-block-table.is-style-spec table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
}

.wp-block-table.is-style-spec td,
.wp-block-table.is-style-spec th {
	border: 0;
	border-bottom: 1px solid #C9C2B6;
	padding: 16px 24px 16px 0;
	vertical-align: top;
	text-align: left;
	font-size: 17px;
	line-height: 1.5;
}

.has-paper-background-color .wp-block-table.is-style-spec td,
.wp-block-table.is-style-spec.brf-spec-light td {
	border-bottom-color: var(--wp--preset--color--line);
}

.wp-block-table.is-style-spec td:first-child {
	width: 38%;
	padding-top: 19px;
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--subtle);
}

.wp-block-table.is-style-spec td:last-child {
	padding-right: 0;
}

.wp-block-table.is-style-spec a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding: 6px 0;
}

.wp-block-table.is-style-spec a:hover {
	color: var(--wp--preset--color--accent);
	border-bottom-color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------
   Numbered steps
---------------------------------------------------------------- */

ol.is-style-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 32px;
	counter-reset: brf-step;
}

ol.is-style-steps > li {
	counter-increment: brf-step;
	margin: 0;
	border-top: 1px solid var(--wp--preset--color--ink);
	padding: 20px 0 28px;
	font-size: 18px;
	line-height: 1.45;
	font-weight: 500;
}

ol.is-style-steps > li::before {
	content: counter(brf-step, decimal-leading-zero);
	display: block;
	margin-bottom: 14px;
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------
   Header (dynamic)
---------------------------------------------------------------- */

.wp-site-blocks > header.wp-block-template-part,
header.brf-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	transition: transform 0.3s ease;
}

@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part,
	.admin-bar header.brf-header {
		top: 0;
	}
}

header.brf-header.is-hidden {
	transform: translateY(-100%);
}

.brf-header__bar {
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid #E2DDD4;
	padding-top: 24px;
	padding-bottom: 24px;
	transition: padding 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.brf-header.is-scrolled .brf-header__bar,
body.brf-menu-open .brf-header__bar {
	padding-top: 8px;
	padding-bottom: 8px;
	border-bottom-color: var(--wp--preset--color--line);
	box-shadow: 0 10px 24px -18px rgba(31, 29, 26, 0.45);
}

.wp-block-group.brf-header__row {
	gap: 24px;
}

.brf-header__logo,
.brf-header__logo a {
	display: block;
	flex: none;
	line-height: 0;
}

.brf-header__logo img {
	height: 72px;
	width: auto;
	transition: height 0.3s ease;
}

.brf-header.is-scrolled .brf-header__logo img,
body.brf-menu-open .brf-header__logo img {
	height: 40px;
}

.wp-block-group.brf-header__actions {
	gap: 32px;
}

.brf-nav-desktop .wp-block-navigation__container,
.brf-nav-desktop.wp-block-navigation {
	gap: 28px;
}

.brf-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.brf-nav-desktop .wp-block-navigation-item__content {
	padding: 10px 0 9px;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.brf-nav-desktop .wp-block-navigation-item__content:hover,
.brf-nav-desktop .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--ink);
}

.brf-header__cta .wp-block-button__link {
	min-height: 46px;
	padding: 0 20px;
	font-size: 15px;
	white-space: nowrap;
	transition: min-height 0.3s ease, background-color 0.2s ease;
}

.brf-header.is-scrolled .brf-header__cta .wp-block-button__link {
	min-height: 40px;
}

/* Language switcher (header, mobile panel, footer). */
.brf-lang {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.brf-lang__link {
	color: #6B675F;
	text-decoration: none;
	padding: 12px 2px;
}

.brf-lang__link:hover,
.brf-lang__link.is-current {
	color: var(--wp--preset--color--ink);
}

.brf-lang__link.is-current {
	font-weight: 500;
}

.brf-lang__sep {
	color: #9C968B;
}

/* Burger button. */
.brf-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 -10px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}

.brf-burger__lines,
.brf-burger__lines::before,
.brf-burger__lines::after {
	display: block;
	width: 20px;
	height: 1.6px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.brf-burger__lines {
	position: relative;
}

.brf-burger__lines::before,
.brf-burger__lines::after {
	content: "";
	position: absolute;
	left: 0;
}

.brf-burger__lines::before {
	top: -6px;
}

.brf-burger__lines::after {
	top: 6px;
}

.brf-burger[aria-expanded="true"] .brf-burger__lines {
	background: transparent;
}

.brf-burger[aria-expanded="true"] .brf-burger__lines::before {
	transform: translateY(6px) rotate(45deg);
}

.brf-burger[aria-expanded="true"] .brf-burger__lines::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* Mobile panel. */
.brf-mobile-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	max-height: calc(100vh - 60px);
	overflow-y: auto;
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 24px 40px -28px rgba(31, 29, 26, 0.5);
	padding-top: 4px;
	padding-bottom: 28px;
}

body.brf-menu-open .brf-mobile-panel {
	display: block;
}

.brf-nav-mobile,
.brf-nav-mobile .wp-block-navigation__container {
	width: 100%;
	gap: 0;
}

.brf-nav-mobile .wp-block-navigation-item {
	width: 100%;
}

.brf-nav-mobile .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 0;
	border-bottom: 1px solid #E2DDD4;
	font-size: 26px;
	font-weight: 600;
	font-stretch: 110%;
	letter-spacing: -0.01em;
}

.brf-nav-mobile .wp-block-navigation-item__content::after {
	content: "";
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.brf-nav-mobile .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent);
}

.brf-mobile-panel .brf-lang {
	margin-top: 12px;
	font-size: 14px;
}

@media (max-width: 899px) {
	.brf-nav-desktop,
	.brf-header__actions > .brf-lang {
		display: none !important;
	}

	.brf-burger {
		display: inline-flex;
	}

	.wp-block-group.brf-header__actions {
		gap: 12px;
	}

	.brf-header__logo img {
		height: 40px;
	}

	.brf-header__bar {
		padding-top: 8px;
		padding-bottom: 8px;
	}
}

@media (min-width: 900px) {
	.brf-mobile-panel {
		display: none !important;
	}
}

@media (max-width: 380px) {
	.brf-header__cta .wp-block-button__link {
		padding: 0 14px;
		font-size: 14px;
	}
}

/* ---------------------------------------------------------------
   Footer
---------------------------------------------------------------- */

.brf-footer a {
	color: var(--wp--preset--color--paper);
	text-decoration: none;
}

.brf-footer a:hover {
	text-decoration: underline;
}

.brf-footer__logo img {
	height: 84px;
	width: auto;
}

.brf-footer .is-style-label {
	font-size: 12px;
	color: #9C968B;
	margin-bottom: 6px;
}

.brf-footer .wp-block-navigation__container {
	gap: 0;
}

.brf-footer .wp-block-navigation-item__content,
.brf-footer__contact p:not(.is-style-label) {
	font-size: 15px;
	padding: 8px 0;
	margin: 0;
}

.brf-footer__bottom {
	border-top: 1px solid #3A3732;
	padding-top: 20px;
	font-family: var(--wp--preset--font-family--plex-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: #9C968B;
}

.brf-footer__bottom p {
	margin: 0;
}

.brf-footer .brf-lang {
	font-size: 12px;
}

.brf-footer .brf-lang__link {
	color: #9C968B;
	padding: 10px 2px;
}

.brf-footer .brf-lang__link:hover,
.brf-footer .brf-lang__link.is-current {
	color: var(--wp--preset--color--paper);
	text-decoration: none;
}

/* ---------------------------------------------------------------
   Responsive details
---------------------------------------------------------------- */

@media (max-width: 781px) {
	.wp-block-columns.brf-split {
		gap: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}
