/*
Theme Name: Oakwright
Theme URI: https://felsflow.dev/downloads/themes/oakwright/
Author: Felsflow
Author URI: https://felsflow.dev
Description: Oakwright is a light, modern block theme for shops that sell solid wood furniture and other handmade goods. Warm white and sand backgrounds, a charcoal primary colour with an oak accent, Space Grotesk headings, Inter body text and pill buttons, on a 1200px layout. It ships with ready-made Home, Shop, About and Contact page designs that are offered when you create a new page, matching furniture illustrations, a full-width landing page template and a "Walnut" style variation for a classic dark-wood look. Built on the Felsflow block theme.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oakwright
Tags: one-column, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, full-width-template, block-patterns, style-variations, translation-ready

Oakwright WordPress Theme, (C) 2026 Felsflow
Oakwright is distributed under the terms of the GNU GPL. Based on Felsflow.
*/

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

/* Header: show the site title only when no logo is set. */
.oakwright-brand .wp-block-site-logo + .wp-block-site-title {
	display: none;
}

.oakwright-brand .wp-block-site-title a {
	color: var(--wp--preset--color--body-text);
	text-decoration: none;
}

/* Menus: plain text links, underline on hover and for the current page. */
.wp-block-navigation .wp-block-navigation-item__content {
	text-decoration: none;
}

.wp-block-navigation a.wp-block-navigation-item__content:hover,
.wp-block-navigation .current-menu-item > a.wp-block-navigation-item__content {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}

/*
 * Page template: space above the title and below the content. Set here rather
 * than on the block, so landing pages (below) can remove it; padding set on
 * the block in the Site Editor still takes precedence.
 */
.oakwright-main {
	padding-block: var(--wp--preset--spacing--12);
}

/*
 * Landing pages: the "Landing page" template, or any page whose content
 * contains a block with the class "oakwright-landing", gets full-width sections
 * and no visible page title.
 */
main:has(.oakwright-landing) {
	margin-block-start: 0;
}

.oakwright-main:has(.oakwright-landing) {
	padding-block: 0;
}

main:has(.oakwright-landing) > .wp-block-post-title {
	display: none;
}

main:has(.oakwright-landing) > .wp-block-post-content {
	margin-block-start: 0;
}

main:has(.oakwright-landing) > .wp-block-post-content > *,
.oakwright-landing-main > .wp-block-post-content > * {
	margin-block: 0;
}

/* Links inside cards and lists: no underline until hover. */
.oakwright-card a:where(:not(.wp-element-button)),
.oakwright-more a {
	text-decoration: none;
	font-weight: 600;
}

.oakwright-card a:where(:not(.wp-element-button)):hover,
.oakwright-more a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Card images: keep the rounded corners on the linked image too. */
.oakwright-card .wp-block-image,
.oakwright-card .wp-block-image img {
	border-radius: var(--wp--custom--radius--md);
	overflow: hidden;
}

/* Anchored sections (e.g. #stools) stop below the top edge when jumped to. */
[id] {
	scroll-margin-top: 24px;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
