/* Feramo V2 – main stylesheet */

/* 1. Tokens */
:root {
	--feramo-ivory: #faf8f4;
	--feramo-line: #e7e7e7;
	--feramo-line-warm: #e6e1d8;
	--feramo-line-strong: #c9c2ba;
	--feramo-ink: #1d1d1d;
	--feramo-anthracite: #232324;
	--feramo-copper: #cf987e;
	--feramo-copper-dark: #8a5238;
	--feramo-muted: #6e6a64;
	--feramo-body: #4a4741;
	--feramo-text-soft: #5a5a5a;
	--feramo-footer-text: #d4d4d4;
	--feramo-footer-line: #343538;
	--feramo-footer-small: #a3a3a3;
	--feramo-font-serif: 'Playfair Display', Georgia, serif;
	--feramo-font-sans: 'Montserrat', Arial, sans-serif;
	--feramo-radius-pill: 999px;
	--feramo-container: 1280px;
	--feramo-gutter: 24px;
}

/* 2. Base */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--feramo-font-sans);
	color: var(--feramo-ink);
	background: #fff;
}

a {
	color: var(--feramo-ink);
}

a:hover {
	color: var(--feramo-copper-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--feramo-font-serif);
	font-weight: 400;
}

img {
	max-width: 100%;
	height: auto;
}

/* 3. Accessibility */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 20px;
	clip: auto;
	background: #fff;
	color: var(--feramo-ink);
}

:focus-visible {
	outline: 2px solid var(--feramo-copper-dark);
	outline-offset: 2px;
}

.feramo-footer :focus-visible {
	outline-color: var(--feramo-copper);
}

.feramo-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--feramo-ink);
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* 4. Container */
.feramo-container {
	max-width: var(--feramo-container);
	margin-inline: auto;
	padding-inline: var(--feramo-gutter);
}

/* 5. Header */
.feramo-header {
	background: #fff;
	border-bottom: 1px solid var(--feramo-line);
}

.feramo-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
	padding: 20px 24px;
}

.feramo-logo {
	display: block;
	color: var(--feramo-ink);
	text-decoration: none;
}

.feramo-logo__svg {
	display: block;
	width: 128px;
	height: 56px;
}

.feramo-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.feramo-nav__list a {
	display: block;
	padding: 14px 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.feramo-nav__list .current-menu-item > a,
.feramo-nav__list .current-menu-ancestor > a,
.feramo-nav__list a[aria-current="page"] {
	color: var(--feramo-copper-dark);
	border-bottom-color: var(--feramo-copper-dark);
}

.feramo-header__actions {
	display: flex;
	gap: 4px;
}

.feramo-account-link[aria-current="page"],
.feramo-header__panel-account[aria-current="page"] {
	color: var(--feramo-copper-dark);
}

.feramo-cart-link {
	position: relative;
}

.feramo-cart-link__count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	padding: 0 5px;
	border-radius: var(--feramo-radius-pill);
	background: var(--feramo-ink);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
}

.feramo-cart-link__count[hidden] {
	display: none;
}

.feramo-search {
	border-top: 1px solid var(--feramo-line);
	padding: 16px 0;
}

.feramo-search form {
	display: flex;
	gap: 8px;
}

.feramo-search input[type="search"] {
	flex: 1;
	height: 48px;
	padding: 0 24px;
	border: 1px solid var(--feramo-line-strong);
	border-radius: var(--feramo-radius-pill);
	font: inherit;
}

.feramo-search button,
.feramo-search input[type="submit"] {
	height: 48px;
	padding: 0 28px;
	border: 0;
	border-radius: var(--feramo-radius-pill);
	background: var(--feramo-ink);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

/* Header search panel: hidden until toggled (JS only; no-js keeps it visible). */
.js .feramo-search:not(.is-open) {
	display: none;
}

/* Burger icon swap: menu icon by default, close icon when expanded. */
.feramo-header__burger svg:last-child,
.feramo-header__burger[aria-expanded="true"] svg:first-child {
	display: none;
}

.feramo-header__burger[aria-expanded="true"] svg:last-child {
	display: block;
}

/* 6. Footer */
.feramo-footer {
	background: var(--feramo-ink);
	color: var(--feramo-footer-text);
}

.feramo-footer__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	padding: 80px 24px 40px;
}

.feramo-footer__col {
	flex: 1 1 180px;
}

.feramo-footer__col--brand {
	display: flex;
	flex: 2 1 320px;
	flex-direction: column;
	gap: 20px;
}

.feramo-footer__col--brand .textwidget,
.feramo-footer__col--brand .widget p:last-child {
	margin-bottom: 0;
}

.feramo-footer .feramo-logo {
	color: #fff;
}

.feramo-footer .feramo-logo__svg {
	width: 128px;
	height: 56px;
}

.feramo-footer__title {
	margin: 0 0 16px;
	font-family: var(--feramo-font-sans);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
}

.feramo-footer .widget ul {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.feramo-footer a {
	color: var(--feramo-footer-text);
	font-size: 14px;
	text-decoration: none;
}

.feramo-footer a:hover {
	color: #fff;
}

.feramo-footer .widget_text p,
.feramo-footer .widget_block p,
.feramo-footer .textwidget {
	max-width: 340px;
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.7;
}

.feramo-footer__bottom {
	border-top: 1px solid var(--feramo-footer-line);
	padding-block: 24px;
	font-size: 12px;
	color: var(--feramo-footer-small);
}

.feramo-footer__bottom p {
	margin: 0;
}

.feramo-footer__bottom a {
	color: var(--feramo-footer-small);
	font-size: inherit;
}

/* Mobile only (see the mobile media query). */
.feramo-footer__quick,
.feramo-footer__legal {
	display: none;
}

/* 7. No-JS */
.no-js .feramo-header__burger,
.no-js .feramo-search-toggle {
	display: none;
}

/* 8. Content basics */
.feramo-main {
	display: block;
}

.feramo-main:focus {
	outline: none;
}

.entry-header {
	padding-block: 48px 24px;
}

.single .entry-content,
.blog .entry-content,
.archive .entry-content,
.search .entry-content {
	max-width: 760px;
	margin-inline: auto;
	padding-inline: var(--feramo-gutter);
}

.page .entry-content {
	max-width: none;
}

/* 9. Components (used by upcoming templates) */
.feramo-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 16px 30px;
	border: 0;
	border-radius: var(--feramo-radius-pill);
	background: var(--feramo-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-decoration: none;
	cursor: pointer;
}

.feramo-btn:hover {
	color: #fff;
	background: var(--feramo-copper-dark);
}

.feramo-btn--outline {
	border: 1px solid var(--feramo-ink);
	background: transparent;
	color: var(--feramo-ink);
}

.feramo-btn--outline:hover {
	border-color: var(--feramo-ink);
	background: var(--feramo-ink);
	color: #fff;
}

.feramo-btn--outline-light {
	border: 1px solid #fff;
	background: transparent;
	color: #fff;
}

.feramo-eyebrow {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--feramo-copper-dark);
}

/* 10. Desktop / mobile split */
@media (min-width: 900px) {
	.feramo-header__burger,
	.feramo-header__panel-account {
		display: none;
	}

	.feramo-header__panel {
		display: block;
	}
}

@media (max-width: 899.98px) {
	.feramo-header__inner {
		display: grid;
		grid-template-columns: 44px 1fr auto;
		align-items: center;
		gap: 0 8px;
		padding: 6px 8px;
	}

	.feramo-header__burger {
		grid-column: 1;
	}

	.feramo-header__inner > .feramo-logo,
	.feramo-header__inner > .custom-logo-link {
		grid-column: 2;
		justify-self: center;
	}

	.feramo-header__actions {
		grid-column: 3;
	}

	.feramo-header .feramo-logo__svg {
		width: 100px;
		height: 44px;
	}

	.feramo-account-link {
		display: none;
	}

	.feramo-header--no-menu .feramo-account-link {
		display: inline-flex;
	}

	.feramo-header__panel {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.js .feramo-header__panel:not(.is-open) {
		display: none;
	}

	.feramo-nav__list {
		flex-direction: column;
		gap: 0;
	}

	.feramo-nav__list li {
		border-bottom: 1px solid var(--feramo-line);
	}

	.feramo-nav__list a,
	.feramo-header__panel-account {
		padding: 14px;
		border-bottom: 0;
	}

	.feramo-header__panel-account {
		display: block;
		font-size: 13px;
		font-weight: 500;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		text-decoration: none;
	}

	.feramo-footer__grid {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 28px;
		padding: 48px 20px 24px;
	}

	.feramo-footer__col,
	.feramo-footer__col--brand {
		flex: 0 0 auto;
	}

	.feramo-footer__col--brand {
		gap: 16px;
	}

	/* Stacked accordions, as one list (mockup). */
	.feramo-footer__col[data-feramo-accordion] + .feramo-footer__col[data-feramo-accordion] {
		margin-top: -28px;
	}

	.feramo-footer__col--brand + .feramo-footer__col[data-feramo-accordion] .feramo-footer__toggle {
		border-top: 1px solid var(--feramo-footer-line);
	}

	.feramo-footer__bottom {
		display: flex;
		flex-wrap: wrap;
		gap: 0 6px;
		padding-inline: 20px;
		line-height: 1.8;
	}

	.feramo-footer__quick {
		display: block;
		margin-top: -28px;
	}

	.feramo-footer__quick-list {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.feramo-footer__quick-list a {
		display: block;
		padding: 14px 0;
		border-bottom: 1px solid var(--feramo-footer-line);
	}

	.feramo-footer__col--social .feramo-footer__title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.feramo-footer__col--social .widget ul {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0 24px;
	}

	.feramo-footer__col--social a {
		display: inline-block;
		padding-block: 12px;
	}

	.feramo-footer__handle,
	.feramo-footer__rights {
		display: none;
	}

	.feramo-footer__bottom p:has(+ .feramo-footer__legal)::after,
	.feramo-footer__legal li + li::before {
		content: "·";
	}

	.feramo-footer__legal li + li::before {
		margin: 0 6px 0 0;
	}

	.feramo-footer__legal {
		display: flex;
		flex-wrap: wrap;
		gap: 0 6px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.feramo-footer .feramo-logo__svg {
		width: 110px;
		height: 48px;
	}

	[data-feramo-accordion] .feramo-footer__title {
		margin: 0;
	}

	.feramo-footer__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 14px 0;
		border: 0;
		border-bottom: 1px solid var(--feramo-footer-line);
		background: transparent;
		color: var(--feramo-footer-text);
		font: inherit;
		font-size: 14px;
		text-align: left;
		text-transform: none;
		letter-spacing: normal;
		cursor: pointer;
	}

	.feramo-footer__toggle::after {
		content: "+";
	}

	.feramo-footer__toggle[aria-expanded="true"]::after {
		content: "\2212";
	}

	.feramo-footer__col .widget.is-collapsed > :not(.feramo-footer__title) {
		display: none;
	}
}
