/*
 * AJB Nexus base styles: global typography, buttons, the navy header and footer,
 * and the shared components used across the pages.
 * Page-specific layout is built in Elementor; this file supplies the brand look.
 */

/* ---------- Global typography ---------- */

body,
button,
input,
select,
textarea {
	font-family: var(--ajb-font-body);
	color: var(--ajb-charcoal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
	font-family: var(--ajb-font-heading);
	color: var(--ajb-navy);
	letter-spacing: -0.01em;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

::selection {
	background: var(--ajb-gold-soft);
	color: var(--ajb-navy);
}

:focus-visible {
	outline: 2px solid var(--ajb-gold);
	outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.ajb-btn,
.wp-block-button__link,
.ast-button,
button.button,
a.button,
input[type="submit"] {
	font-family: var(--ajb-font-body);
	font-size: var(--ajb-button);
	font-weight: 600;
	border-radius: var(--ajb-radius-button);
	transition: background-color var(--ajb-duration) var(--ajb-ease),
		color var(--ajb-duration) var(--ajb-ease),
		border-color var(--ajb-duration) var(--ajb-ease),
		transform var(--ajb-duration) var(--ajb-ease);
}

.ajb-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1px solid transparent;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.ajb-btn:active {
	transform: scale(0.97);
}

/* Primary: gold with navy text */
.ajb-btn--primary {
	background: var(--ajb-gold);
	color: var(--ajb-navy);
}

.ajb-btn--primary:hover,
.ajb-btn--primary:focus-visible {
	background: var(--ajb-gold-soft);
	color: var(--ajb-navy);
}

/* Secondary: transparent with white border, for navy backgrounds */
.ajb-btn--outline {
	background: transparent;
	color: var(--ajb-white);
	border-color: var(--ajb-white);
}

.ajb-btn--outline:hover,
.ajb-btn--outline:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: var(--ajb-white);
	border-color: var(--ajb-gold-soft);
}

/* Secondary on light backgrounds */
.ajb-btn--navy-outline {
	background: transparent;
	color: var(--ajb-navy);
	border-color: var(--ajb-navy);
}

.ajb-btn--navy-outline:hover {
	background: var(--ajb-navy);
	color: var(--ajb-white);
}

/* Gold text link with arrow ("Explore →") */
.ajb-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--ajb-small);
	font-weight: 600;
	color: var(--ajb-gold-text);
	text-decoration: none;
}

.ajb-link:hover {
	color: var(--ajb-navy);
}

/* ---------- Header (Astra builder) ---------- */

.ast-primary-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar,
.main-header-bar {
	background-color: var(--ajb-navy);
	border-bottom: 0;
}

.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link {
	position: relative;
	font-family: var(--ajb-font-body);
	font-size: var(--ajb-nav);
	font-weight: 500;
	color: var(--ajb-white);
	transition: color var(--ajb-duration) var(--ajb-ease);
}

.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link:hover,
.ast-primary-header-bar .main-header-menu > .menu-item.current-menu-item > .menu-link,
.ast-primary-header-bar .main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
	color: var(--ajb-gold-soft);
}

/* Small gold indicator under the active item */
.ast-primary-header-bar .main-header-menu > .menu-item.current-menu-item > .menu-link::after,
.ast-primary-header-bar .main-header-menu > .menu-item.current-menu-ancestor > .menu-link::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 18px;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--ajb-gold);
	transform: translateX(-50%);
}

.ast-primary-header-bar .main-header-menu .sub-menu {
	background: var(--ajb-white);
	border-top: 2px solid var(--ajb-gold);
	border-radius: 0 0 var(--ajb-radius-card) var(--ajb-radius-card);
	box-shadow: var(--ajb-shadow-hover);
}

.ast-primary-header-bar .main-header-menu .sub-menu .menu-link {
	color: var(--ajb-navy);
	font-size: var(--ajb-nav);
}

.ast-primary-header-bar .main-header-menu .sub-menu .menu-link:hover {
	background: var(--ajb-ivory);
	color: var(--ajb-navy);
}

.ast-header-break-point .ast-mobile-menu-trigger-minimal,
.ast-primary-header-bar .ast-button-wrap .menu-toggle,
.ast-primary-header-bar .ast-header-search .astra-search-icon,
.ast-primary-header-bar .ast-header-account-wrap .ast-header-account-link,
.ast-primary-header-bar .ast-site-header-cart .ast-cart-menu-wrap,
.ast-primary-header-bar .ast-site-header-cart .ast-icon svg {
	color: var(--ajb-white);
	fill: var(--ajb-white);
}

.ast-site-header-cart .ast-cart-menu-wrap .count,
.ast-site-header-cart .ast-addon-cart-wrap .ast-icon-shopping-cart::after {
	background: var(--ajb-gold);
	color: var(--ajb-navy);
	border-color: var(--ajb-gold);
}

/* ---------- Footer (Astra builder) ---------- */

.site-footer,
.site-primary-footer-wrap,
.site-above-footer-wrap,
.site-below-footer-wrap {
	background-color: var(--ajb-navy);
	color: rgba(255, 255, 255, 0.78);
	border-top: 0;
}

.site-footer .widget-title,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
	color: var(--ajb-white);
	font-size: 0.875rem;
	font-weight: 700;
}

.site-footer a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--ajb-gold-soft);
}

.site-below-footer-wrap {
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	font-size: 0.75rem;
}

/* ---------- Shared components ---------- */

.ajb-container {
	width: 100%;
	max-width: var(--ajb-container);
	margin-inline: auto;
	padding-inline: 20px;
}

.ajb-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--ajb-font-body);
	font-size: var(--ajb-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ajb-gold);
}

.ajb-eyebrow::before {
	content: "";
	width: 32px;
	height: 2px;
	background: var(--ajb-gold);
}

.ajb-gold {
	color: var(--ajb-gold);
}

/* Breadcrumb bar */
.ajb-breadcrumb {
	padding: 10px 0;
	font-size: 0.75rem;
	color: var(--ajb-grey);
	background: var(--ajb-white);
	border-bottom: 1px solid var(--ajb-grey-light);
}

.ajb-breadcrumb a {
	color: var(--ajb-grey);
	text-decoration: none;
}

.ajb-breadcrumb a:hover {
	color: var(--ajb-navy);
}

/* Navy hero with photo on the right and a gold diagonal between them */
.ajb-hero {
	position: relative;
	overflow: hidden;
	background: var(--ajb-navy);
	color: var(--ajb-white);
}

.ajb-hero h1,
.ajb-hero h2 {
	color: var(--ajb-white);
}

.ajb-hero__media {
	position: absolute;
	inset: 0 0 0 auto;
	width: 52%;
	clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
	background-size: cover;
	background-position: center;
}

/* Gold diagonal stroke along the photo's slanted edge */
.ajb-hero__divider {
	position: absolute;
	inset: 0 0 0 auto;
	width: calc(52% + 6px);
	clip-path: polygon(calc(14% - 0px) 0, calc(14% + 6px) 0, 6px 100%, 0 100%);
	background: var(--ajb-gold);
	pointer-events: none;
}

@media (max-width: 767px) {
	.ajb-hero__media,
	.ajb-hero__divider {
		position: relative;
		width: 100%;
		height: 220px;
		clip-path: none;
	}

	.ajb-hero__divider {
		display: none;
	}
}

/* Cards */
.ajb-card {
	background: var(--ajb-white);
	border: 1px solid var(--ajb-grey-light);
	border-radius: var(--ajb-radius-card);
	box-shadow: var(--ajb-shadow-card);
	overflow: hidden;
	transition: box-shadow var(--ajb-duration) var(--ajb-ease),
		transform var(--ajb-duration) var(--ajb-ease);
}

.ajb-card:hover {
	box-shadow: var(--ajb-shadow-hover);
	transform: translateY(-2px);
}

.ajb-card--ivory {
	background: var(--ajb-ivory);
	border-color: transparent;
	box-shadow: none;
}

.ajb-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.ajb-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ajb-card__body {
	padding: 16px 18px 18px;
}

.ajb-card__title {
	margin: 0 0 6px;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--ajb-navy);
}

.ajb-card__text {
	margin: 0 0 14px;
	font-size: var(--ajb-small);
	line-height: 1.55;
	color: var(--ajb-grey);
}

/* "Coming Soon" badge, deliberately muted */
.ajb-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: var(--ajb-grey-light);
	color: var(--ajb-grey);
}

/* Ivory benefit strip */
.ajb-strip {
	background: var(--ajb-ivory);
	border-bottom: 1px solid var(--ajb-grey-light);
}

/* Notices */
.ajb-notice {
	padding: 12px 16px;
	border-radius: var(--ajb-radius-button);
	font-size: 0.875rem;
}

.ajb-notice--success {
	background: #e8f3ee;
	color: var(--ajb-success);
}

.ajb-notice--error {
	background: #f8e9e9;
	color: var(--ajb-error);
}

/* ---------- Elementor refinements ----------
 * Small additions to native Elementor widgets, for things the free
 * Elementor controls can't do on their own.
 */

/* Eyebrow heading: short gold rule before the text */
.ajb-eyebrow-el .elementor-heading-title {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.ajb-eyebrow-el .elementor-heading-title::before {
	content: "";
	width: 32px;
	height: 2px;
	background: currentColor;
}

/* Hero photo fills the full height of its column on tablet and desktop */
@media (min-width: 768px) {
	.ajb-hero-media .ajb-cover {
		flex: 1 1 auto;
		align-self: stretch;
	}

	.ajb-hero-media .ajb-cover > .elementor-widget-container,
	.ajb-hero-media .ajb-cover img {
		height: 100% !important;
	}
}

/* Linked images: let the link fill the column so "width 100%" means the card's width */
.e-con .elementor-widget-image a {
	display: block;
}

/* Cards lift slightly on hover (shadow change is set in Elementor) */
.ajb-lift {
	transition: transform var(--ajb-duration) var(--ajb-ease),
		box-shadow var(--ajb-duration) var(--ajb-ease);
}

.ajb-lift:hover {
	transform: translateY(-2px);
}

/* Collapsed (hamburger) menu: take the closed menu out of the layout so its
   items can't push the page sideways; it reappears when the toggle opens it. */
@media (max-width: 1024px) {
	.hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__toggle:not(.hfe-active-menu) + .hfe-nav-menu__layout-horizontal {
		display: none;
	}
}

/* Header icons: match the menu's white and soft-gold states */
.hfe-search-button-wrapper .hfe-search-icon-toggle i,
.hfe-search-button-wrapper .hfe-search-icon-toggle svg {
	color: var(--ajb-white);
	fill: var(--ajb-white);
}

/* ---------- WooCommerce touches ---------- */

.woocommerce span.onsale {
	background: var(--ajb-gold);
	color: var(--ajb-navy);
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
	color: var(--ajb-navy);
	font-weight: 700;
}

.woocommerce .stock.in-stock {
	color: var(--ajb-success);
}

.woocommerce .stock.out-of-stock {
	color: var(--ajb-error);
}

/* ---------- Reduced motion ---------- */

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