/*
Theme Name: SYG Metals
Theme URI: https://sygmetals.com/
Author: SYG Metals
Author URI: https://sygmetals.com/
Description: Custom theme for SYG Metals — silver jewelry. Child theme of Twenty Twenty-Five. All SYG Metals design overrides live here, so the parent theme can update safely.
Template: twentytwentyfive
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.14.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: syg-metals
Tags: full-site-editing, block-patterns, custom-colors, custom-logo
*/

/*
 * SYG Metals front-end styles.
 * Loaded after the parent stylesheet (see functions.php). Section styles live in /blocks/<section>/style.css.
 */

/* ---------- Tokens (Amara look) ---------- */
:root {
	--syg-color-text: #2b2f2e;
	--syg-color-text-hover: #5c5c5c;
	--syg-color-muted: #8a8d8c;
	--syg-color-bg: #ffffff;
	--syg-color-line: #e5e5e5;
	--syg-color-placeholder: #f2f0ed;
	--syg-color-bar-bg: #2b2f2e;
	--syg-color-bar-text: #ffffff;
	--syg-font-nav: var(--wp--preset--font-family--montserrat, Montserrat, sans-serif);
	--syg-font-heading: var(--wp--preset--font-family--tenor-sans, "Tenor Sans", sans-serif);
	--syg-gutter: 60px;
	--syg-announcement-h: 36px;
	--syg-header-h: 64px;
	--syg-mega-width: 1260px;
	--syg-color-text-soft: #5f6362;
	--syg-color-dark: #151616;
	--syg-color-footer-bg: #000000;
	--syg-color-footer-text: #ffffff;
	--syg-color-footer-soft: rgb(255 255 255 / 68%);
	--syg-color-footer-line: rgb(255 255 255 / 16%);
	--syg-content-width: 1260px;
	--syg-section-space: 88px;
	--syg-color-panel: #f5f4f1;
	--syg-color-rule: #d6d6d6;
}

@media (max-width: 1023px) {
	:root {
		--syg-gutter: 20px;
		--syg-announcement-h: 34px;
		--syg-header-h: 56px;
		--syg-section-space: 56px;
	}
}

/* ---------- Sticky header ----------
 * The header template part sticks. Its negative top lets the announcement bar scroll away
 * while the main header bar stays pinned (offset for the admin bar when logged in).
 */
.wp-site-blocks > .wp-block-template-part:has(.syg-site-header) {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--syg-announcement-h));
	z-index: 100;
}

.wp-site-blocks > .wp-block-template-part:has(.syg-site-header):not(:has(.syg-announcement)) {
	top: var(--wp-admin--admin-bar--height, 0px);
}

/* ---------- Helpers ---------- */
html.syg-lock {
	overflow: hidden;
}

.syg-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Page frame ---------- */
/* No sideways scrolling, ever. clip (not hidden) keeps the sticky header working. */
.wp-site-blocks {
	overflow-x: clip;
}

/* Space above the footer on every page, except the home page whose last section brings its own. */
.wp-site-blocks > .wp-block-template-part:has(.syg-footer) {
	margin-block-start: var(--syg-section-space);
}

body.home .wp-site-blocks > .wp-block-template-part:has(.syg-footer) {
	margin-block-start: 0;
}

/* ---------- Section building blocks (shared by blocks/<section>) ---------- */
.syg-section {
	padding-block: var(--syg-section-space);
}

.syg-section--flush-top {
	padding-top: 0;
}

.syg-container {
	box-sizing: content-box;
	max-width: var(--syg-content-width);
	margin-inline: auto;
	padding-inline: var(--syg-gutter);
}

.syg-eyebrow {
	margin: 0;
	font-family: var(--syg-font-nav);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.syg-heading {
	margin: 0;
	font-family: var(--syg-font-heading);
	font-size: clamp(22px, 2vw, 28px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-align: center;
	text-transform: uppercase;
}

.syg-btn {
	display: inline-block;
	padding: 15px 28px;
	border: 1px solid transparent;
	border-radius: 0;
	font-family: var(--syg-font-nav);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.12em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.syg-btn--light {
	background: #fff;
	color: var(--syg-color-text);
}

.syg-btn--light:hover,
.syg-btn--light:focus-visible {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.syg-btn--dark {
	background: var(--syg-color-text);
	color: #fff;
}

.syg-btn--dark:hover,
.syg-btn--dark:focus-visible {
	background: transparent;
	border-color: var(--syg-color-text);
	color: var(--syg-color-text);
}

.syg-link {
	color: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-decoration: underline;
	text-underline-offset: 5px;
	text-transform: uppercase;
}

.syg-link:hover,
.syg-link:focus-visible {
	color: var(--syg-color-text-hover);
}

/* Lancer-style boxed arrow buttons. */
.syg-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--syg-color-text);
	border-radius: 0;
	background: transparent;
	color: var(--syg-color-text);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.syg-arrow:hover:not(:disabled),
.syg-arrow:focus-visible {
	background: var(--syg-color-text);
	color: #fff;
}

.syg-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.is-static .syg-arrow {
	display: none;
}

/* ---------- Newsletter form ---------- */
.syg-newsletter__input {
	box-sizing: border-box;
	width: 100%;
	padding: 13px 16px;
	border: 1px solid #cacbcb;
	border-radius: 0;
	background: #fff;
	color: var(--syg-color-text);
	font: 400 14px/1.4 var(--syg-font-nav);
}

.syg-newsletter__input:focus {
	outline: 1px solid var(--syg-color-text);
	outline-offset: 0;
}

.syg-newsletter__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.syg-newsletter__status {
	margin: 0;
	font-size: 13px;
}

/* ---------- Store notices (Lancer: solid bar + outlined button) — product, cart, checkout, account ---------- */
:is(.syg-pdp__notices, .syg-store) :is(.woocommerce-message, .woocommerce-error, .wc-block-components-notice-banner) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 0;
	border-radius: 0;
	background: var(--syg-color-text);
	color: #fff;
	font-size: 14px;
	list-style: none;
}

:is(.syg-pdp__notices, .syg-store) :is(.woocommerce-error, .wc-block-components-notice-banner.is-error) {
	background: #8a1c1c;
}

:is(.syg-pdp__notices, .syg-store) .wc-block-components-notice-banner.is-info {
	background: var(--syg-color-panel);
	color: var(--syg-color-text);
}

:is(.syg-pdp__notices, .syg-store) .wc-block-components-notice-banner > svg {
	display: none;
}

:is(.syg-pdp__notices, .syg-store) .wc-block-components-notice-banner__content {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}

:is(.syg-pdp__notices, .syg-store) :is(.woocommerce-message, .woocommerce-error, .wc-block-components-notice-banner:not(.is-info)) a {
	color: #fff;
}

:is(.syg-pdp__notices, .syg-store) :is(.woocommerce-message, .wc-block-components-notice-banner) .button {
	order: 2;
	padding: 10px 18px;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-decoration: none;
	text-transform: uppercase;
}

:is(.syg-pdp__notices, .syg-store) :is(.woocommerce-message, .woocommerce-error, .wc-block-components-notice-banner):focus {
	outline: 1px solid var(--syg-color-text);
	outline-offset: 3px;
}

.syg-pdp__notices:empty,
.syg-store .woocommerce-notices-wrapper:empty {
	display: none;
}

