/**
 * WPGPL.store — global foundation.
 *
 * Overrides the parts of WoodMart / Elementor / WooCommerce that otherwise keep
 * the demo "electronics" look, then applies the marketplace typography rhythm.
 */

/* --------------------------------------------------------------------------
 * Typography rhythm
 * ----------------------------------------------------------------------- */

body {
	font-family: var(--wpgpl-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--wpgpl-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
.elementor-heading-title,
.woocommerce-products-header__title,
.page-title,
.wd-page-title {
	font-family: var(--wpgpl-font-heading);
	font-weight: 600;
	letter-spacing: -0.016em;
	color: var(--wpgpl-text);
}

p {
	margin: 0 0 1.15em;
}

a {
	color: var(--wpgpl-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--wpgpl-dur) var(--wpgpl-ease);
}

a:hover {
	color: var(--wpgpl-primary-dark);
}

:focus-visible {
	outline: 3px solid rgba(49, 85, 231, 0.35);
	outline-offset: 2px;
}

::selection {
	background: rgba(49, 85, 231, 0.18);
}

/* WoodMart ships a heavy default body weight for some blocks — normalise it. */
.wd-nav-main .wd-nav > li > a,
.woodmart-nav-main .wd-nav > li > a {
	font-weight: 600;
}

/* --------------------------------------------------------------------------
 * Container
 * ----------------------------------------------------------------------- */

.woocommerce .container,
.elementor-section .container,
.container {
	max-width: var(--wpgpl-container);
}

.elementor-widget-container > .wpgpl-section,
.wpgpl-section {
	padding-left: var(--wpgpl-gutter);
	padding-right: var(--wpgpl-gutter);
}

/* --------------------------------------------------------------------------
 * WoodMart section spacing rhythm
 * ----------------------------------------------------------------------- */

.wd-section-1,
.vc_row,
.elementor-section {
	--wd-section-gap: 0;
}

/* --------------------------------------------------------------------------
 * Page title / breadcrumbs
 * ----------------------------------------------------------------------- */

.woodmart-page-title {
	font-family: var(--wpgpl-font-heading);
	font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.5rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.16;
	color: var(--wpgpl-text);
}

.woodmart-breadcrumbs {
	font-size: 0.83rem;
	color: var(--wpgpl-text-muted);
}

.woodmart-breadcrumbs a {
	color: var(--wpgpl-text-muted);
	text-decoration: none;
}

.woodmart-breadcrumbs a:hover {
	color: var(--wpgpl-primary);
}

.woodmart-breadcrumbs .separator {
	color: var(--wpgpl-text-soft);
	padding: 0 6px;
}

/* --------------------------------------------------------------------------
 * Buttons — bring WoodMart primary buttons in line with the design tokens
 * ----------------------------------------------------------------------- */

.wd-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	font-family: var(--wpgpl-font-heading);
	font-weight: 600;
	letter-spacing: 0.01em;
	border-radius: var(--wpgpl-radius-sm);
	transition: background-color var(--wpgpl-dur) var(--wpgpl-ease), border-color var(--wpgpl-dur) var(--wpgpl-ease),
		color var(--wpgpl-dur) var(--wpgpl-ease), box-shadow var(--wpgpl-dur) var(--wpgpl-ease),
		transform var(--wpgpl-dur) var(--wpgpl-ease);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
 * Forms
 * ----------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select,
.wd-form-control {
	border-radius: var(--wpgpl-radius-sm);
	border-color: var(--wpgpl-border-strong);
	font-family: var(--wpgpl-font-body);
	color: var(--wpgpl-text);
	transition: border-color var(--wpgpl-dur) var(--wpgpl-ease), box-shadow var(--wpgpl-dur) var(--wpgpl-ease);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--wpgpl-primary);
	box-shadow: 0 0 0 3px rgba(49, 85, 231, 0.14);
}

label {
	font-family: var(--wpgpl-font-body);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--wpgpl-text);
}

/* --------------------------------------------------------------------------
 * Notices / alerts
 * ----------------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
	border-radius: var(--wpgpl-radius-sm);
	border-top-width: 3px;
	font-size: 0.9rem;
	box-shadow: var(--wpgpl-shadow-xs);
}

.woocommerce-message {
	border-top-color: var(--wpgpl-success);
}

.woocommerce-info {
	border-top-color: var(--wpgpl-primary);
}

.woocommerce-error {
	border-top-color: var(--wpgpl-accent);
}

/* --------------------------------------------------------------------------
 * Sticky header look (subtle, performance friendly)
 * ----------------------------------------------------------------------- */

.whb-header-container.is-sticky .whb-main-header {
	box-shadow: 0 6px 22px rgba(17, 24, 39, 0.07);
}

/* --------------------------------------------------------------------------
 * Elementor containers used by the homepage sections
 * ----------------------------------------------------------------------- */

.elementor-section.wpgpl-sec,
.e-con.wpgpl-sec {
	overflow: visible;
}

/* Elementor's default gap makes the sections too airy for a dense catalogue. */
.elementor-section.wpgpl-sec > .elementor-container,
.e-con.wpgpl-sec > .e-con-inner {
	max-width: var(--wpgpl-container);
}

/* --------------------------------------------------------------------------
 * Accessibility / focus polish
 * ----------------------------------------------------------------------- */

.screen-reader-text:focus,
.wd-skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	padding: 12px 18px;
	background: var(--wpgpl-primary);
	color: #fff;
	border-radius: 0 0 var(--wpgpl-radius-sm) 0;
	z-index: 9999;
}

/* --------------------------------------------------------------------------
 * Skip link
 * ----------------------------------------------------------------------- */

.wpgpl-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
}

.wpgpl-skip-link:focus {
	left: 0;
}

/* --------------------------------------------------------------------------
 * Prevent horizontal overflow at every breakpoint
 * ----------------------------------------------------------------------- */

html,
body {
	overflow-x: hidden;
	max-width: 100%;
}

.wpgpl-section img,
.wpgpl-card img {
	max-width: 100%;
	height: auto;
}

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

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

/* --------------------------------------------------------------------------
 * Print
 * ----------------------------------------------------------------------- */

@media print {
	.whb-main-header,
	.site-footer,
	.wd-sticky-toolbar,
	.sticky-navigation {
		display: none !important;
	}
}