/* =========================================================================
   Tony Perfumes — main stylesheet
   Design tokens come from theme.json as --wp--preset--* variables.
   We alias them to shorter --tony-* names so markup stays readable.
   ========================================================================= */

:root {
	--tony-ink: var(--wp--preset--color--ink, #5d162e);
	--tony-charcoal: var(--wp--preset--color--charcoal, #7a2e43);
	--tony-muted: var(--wp--preset--color--muted, #6b5d4b);
	--tony-line: var(--wp--preset--color--line, #ded2b6);
	--tony-sand: var(--wp--preset--color--sand, #f0e6cd);
	--tony-white: var(--wp--preset--color--white, #fff);
	--tony-gold: var(--wp--preset--color--gold, #c9a227);
	--tony-gold-dark: var(--wp--preset--color--gold-dark, #a5841c);

	/* Brand accents — city/product colours (packaging-led, available for theming) */
	--tony-crimson: var(--wp--preset--color--crimson, #b32e33);
	--tony-powder: var(--wp--preset--color--powder, #b7d1ea);
	--tony-raspberry: var(--wp--preset--color--raspberry, #ba396a);

	--tony-font-body: var(--wp--preset--font-family--body, sans-serif);
	--tony-font-heading: var(--wp--preset--font-family--heading, serif);

	--tony-container: 1200px;
	--tony-gutter: clamp(1rem, 4vw, 2.5rem);
	--tony-radius: 2px;
	--tony-transition: 200ms ease;
}

/* --- Base ---------------------------------------------------------------- */

body {
	font-family: var(--tony-font-body);
	color: var(--tony-ink);
	background: var(--tony-white);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--tony-font-heading);
	font-weight: 500;
	line-height: 1.25;
}

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

.tony-container {
	width: 100%;
	max-width: var(--tony-container);
	margin-inline: auto;
	padding-inline: var(--tony-gutter);
}

/* Full-width pages (homepage, legal): the `full-width-content` body class added
   in PHP releases GeneratePress' 1200px max-width via the parent theme's own
   rule; this drops the container's side padding so section backgrounds reach the
   screen edges. Each section then holds its own centred .tony-container. */
.full-width-content #page {
	padding-inline: 0;
}

/* GeneratePress' #content is a flex row (for sidebars). On our full-width pages
   the single child would otherwise shrink to its content width and align left,
   leaving white space on the right. Make it block so the child fills the width. */
.full-width-content .site-content {
	display: block;
}

/* Screen-reader-only utility, used by the switchers below. */
.tony-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Announcement top bar ------------------------------------------------ */

.tony-topbar {
	background: var(--tony-ink);
	color: var(--tony-sand);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
}

.tony-topbar__inner {
	display: flex;
	justify-content: center;
	padding-block: 0.5rem;
	min-height: 38px;
}

.tony-topbar__tag {
	margin: 0;
	text-align: center;
}

/* --- Language switcher --------------------------------------------------- */

.tony-lang-switch {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--tony-line);
	border-radius: var(--tony-radius);
	overflow: hidden;
}

.tony-lang-switch__item {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	line-height: 1.4;
	transition: background var(--tony-transition), color var(--tony-transition);
}

.tony-lang-switch__item[aria-current="true"] {
	background: var(--tony-gold);
	color: var(--tony-ink);
	font-weight: 600;
}

/* --- Currency switcher --------------------------------------------------- */

.tony-currency {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.tony-currency__select {
	appearance: none;
	background: transparent;
	color: inherit;
	border: 1px solid var(--tony-line);
	border-radius: var(--tony-radius);
	font: inherit;
	padding: 0.25rem 1.6rem 0.25rem 0.6rem;
	cursor: pointer;
	line-height: 1.4;
}

.tony-currency__select:focus-visible {
	outline: 2px solid var(--tony-gold);
	outline-offset: 1px;
}

.tony-currency option {
	color: var(--tony-ink);
	background: var(--tony-white);
}

/* Caret, drawn with CSS so there is no image request. */
.tony-currency::after {
	content: "";
	position: absolute;
	inset-inline-end: 0.55rem;
	top: 50%;
	width: 0.4rem;
	height: 0.4rem;
	margin-top: -0.28rem;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
	pointer-events: none;
}

/* Approximate-price disclaimer shown when a non-base currency is active. */
.tony-currency-note {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.75rem;
	color: var(--tony-muted);
	font-family: var(--tony-font-body);
}

.tony-currency-notice {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	background: var(--tony-sand);
	border-inline-start: 3px solid var(--tony-gold);
	font-size: 0.875rem;
	color: var(--tony-charcoal);
}

/* --- Footer -------------------------------------------------------------- */

.tony-copyright {
	font-size: 0.875rem;
	color: var(--tony-muted);
}

/* --- WooCommerce trims --------------------------------------------------- */

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--tony-font-heading);
	font-size: 1.0625rem;
}

.woocommerce ul.products li.product .price {
	color: var(--tony-ink);
	font-weight: 600;
}

.woocommerce ul.products li.product .price del {
	color: var(--tony-muted);
	font-weight: 400;
}

/* --- Site header: ivory bar, centred logo -------------------------------- */

.site-header {
	background: var(--tony-sand);
}

/* Three-column header row: switchers | logo | icons. On desktop GP's empty
   text-title container and the mobile toggle are display:none, so the grid sees
   exactly three items. */
.inside-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
	padding-block: 0.85rem;
}

.site-header .site-branding {
	display: none;
}

.site-logo {
	grid-column: 2;
	justify-self: center;
	margin: 0;
}

.site-logo .header-image,
.site-logo img {
	width: auto;
	height: 40px;
	max-height: 40px;
}

.tony-header__switchers {
	grid-column: 1;
	justify-self: start;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--tony-ink);
	font-size: 0.8125rem;
}

.tony-header__actions {
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.tony-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--tony-ink);
	text-decoration: none;
	cursor: pointer;
	transition: color var(--tony-transition);
}

.tony-icon-btn:hover,
.tony-icon-btn:focus-visible {
	color: var(--tony-gold-dark);
}

.tony-icon {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tony-cart-count {
	position: absolute;
	top: 3px;
	inset-inline-end: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--tony-gold);
	color: var(--tony-ink);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.tony-cart-count.is-empty {
	display: none;
}

/* --- Primary navigation bar (ivory, centred) ----------------------------- */

.main-navigation {
	background: var(--tony-sand);
	border-top: 1px solid var(--tony-line);
}

.main-navigation .inside-navigation,
.main-navigation .main-nav > ul {
	justify-content: center;
}

.main-navigation .main-nav ul li a {
	font-family: var(--tony-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	color: var(--tony-ink);
	transition: color var(--tony-transition), box-shadow var(--tony-transition);
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li a:focus,
.main-navigation .main-nav ul li[class*="current-menu"] > a {
	color: var(--tony-gold-dark);
}

/* Active item: gold underline, like the reference. */
.main-navigation .main-nav > ul > li[class*="current-menu"] > a {
	box-shadow: inset 0 -2px 0 var(--tony-gold);
}

/* Sub-menus */
.main-navigation .main-nav ul ul {
	background: var(--tony-sand);
	border: 1px solid var(--tony-line);
}

/* Mobile toggle colour */
.main-navigation .menu-toggle {
	color: var(--tony-ink);
}

/* --- Collapsible product-search bar -------------------------------------- */

.tony-search-bar {
	background: var(--tony-sand);
	border-top: 1px solid var(--tony-line);
	padding-block: 0.85rem;
}

.tony-search-bar[hidden] {
	display: none;
}

.tony-search-bar form {
	display: flex;
	gap: 0.5rem;
	max-width: 40rem;
	margin-inline: auto;
}

.tony-search-bar input[type="search"] {
	flex: 1;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--tony-line);
	background: var(--tony-white);
}

/* --- Mobile header ------------------------------------------------------- */

@media (max-width: 768px) {
	.inside-header {
		display: flex;
		align-items: center;
		gap: 0.4rem;
	}
	.site-logo {
		margin-inline-end: auto;
	}
	.tony-header__switchers {
		display: none;
	}
}

/* --- Brand footer -------------------------------------------------------- */

.tony-footer {
	background: var(--tony-ink);
	color: rgba(255, 255, 255, 0.82);
	padding-block: clamp(2.5rem, 6vw, 4rem);
}

.tony-footer__grid {
	display: grid;
	gap: clamp(1.75rem, 4vw, 3rem);
	grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
}

.tony-footer__wordmark {
	display: block;
	font-family: var(--tony-font-heading);
	font-size: 1.75rem;
	letter-spacing: 0.12em;
	color: var(--tony-white);
}

.tony-footer__wordmark em {
	font-style: normal;
	font-size: 0.7em;
	letter-spacing: 0.35em;
	color: var(--tony-gold);
}

.tony-footer__tagline {
	margin: 0.75rem 0 0.5rem;
	font-family: var(--tony-font-heading);
	font-size: 1.0625rem;
	color: rgba(255, 255, 255, 0.9);
}

.tony-footer__about {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.7;
	max-width: 22rem;
}

.tony-footer__social {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin: 1.25rem 0 0;
	padding: 0;
}

.tony-footer__heading {
	margin: 0 0 1rem;
	font-family: var(--tony-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tony-gold);
}

.tony-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.tony-footer a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
	transition: color var(--tony-transition);
}

.tony-footer a:hover,
.tony-footer a:focus-visible {
	color: var(--tony-gold);
}

.tony-footer__address {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.875rem;
	line-height: 1.6;
}

/* Copyright bar sits below, styled dark to match. */
.site-info {
	background: var(--tony-ink);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-info .tony-copyright {
	color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 860px) {
	.tony-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.tony-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {
	.tony-footer__grid {
		grid-template-columns: 1fr;
	}
}
