/*
Theme Name: Dose
Theme URI: https://example.com/dose
Author: Your Studio
Author URI: https://example.com
Description: A minimal, high-contrast block theme for supplement and wellness shops. Built for WooCommerce and the WordPress Site Editor — every colour, font, spacing value and word is editable without touching code. Self-hosted fonts, no external requests.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dose
Tags: e-commerce, full-site-editing, block-patterns, block-styles, wide-blocks, custom-colors, custom-menu, editor-style, featured-images, template-editing, translation-ready
*/

/* -------------------------------------------------------------------------
   1. Base
   ---------------------------------------------------------------------- */

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

:where(a, button, input, select, textarea, summary, .wp-block-navigation-item__content):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------
   2. Signature: the spec line
   A mono, tracked, uppercase label used for dosage and format data.
   ---------------------------------------------------------------------- */

.dose-spec,
.dose-spec p {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0;
}

.dose-spec--accent,
.dose-spec--accent p {
	color: var(--wp--preset--color--accent);
}

/* Small lime index marker placed before an eyebrow */
.dose-index::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 0.7em;
	background: var(--wp--preset--color--accent);
	vertical-align: 0.15em;
}

/* -------------------------------------------------------------------------
   3. Signature: the protocol strip (AM → PM daily routine)
   ---------------------------------------------------------------------- */

.dose-protocol {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.dose-protocol .wp-block-column {
	position: relative;
	padding-block: 2rem;
}

.dose-protocol .wp-block-column + .wp-block-column::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: calc(var(--wp--style--block-gap, 1.5rem) / -2);
	width: 1px;
	background: var(--wp--preset--color--line);
}

@media (max-width: 781px) {
	.dose-protocol .wp-block-column + .wp-block-column::before {
		display: none;
	}
	.dose-protocol .wp-block-column + .wp-block-column {
		border-top: 1px solid var(--wp--preset--color--line);
	}
}

/* -------------------------------------------------------------------------
   4. Cards
   ---------------------------------------------------------------------- */

.dose-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	transition: border-color 0.3s var(--dose-ease, ease), transform 0.3s var(--dose-ease, ease);
}

.dose-card:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	transform: translateY(-2px);
}

/* -------------------------------------------------------------------------
   5. Product grid (Query Loop rendering products)
   ---------------------------------------------------------------------- */

.dose-products .wp-block-post {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	padding: 0.75rem 0.75rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	transition: border-color 0.3s var(--dose-ease, ease), transform 0.3s var(--dose-ease, ease);
}

.dose-products .wp-block-post:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	transform: translateY(-3px);
}

.dose-products .wp-block-post-featured-image {
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp--preset--color--surface-raised);
	margin-bottom: 0.4rem;
}

.dose-products .wp-block-post-featured-image img {
	transition: transform 0.5s var(--dose-ease, ease);
}

.dose-products .wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

.dose-products .wp-block-post-title {
	font-size: 1.0625rem;
	letter-spacing: -0.02em;
	margin: 0;
	padding-inline: 0.5rem;
}

.dose-products .wp-block-post-excerpt,
.dose-products .wc-block-components-product-price,
.dose-products .wp-block-woocommerce-product-price {
	padding-inline: 0.5rem;
}

.dose-products .wp-block-post-excerpt__excerpt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

.dose-products .wp-block-button,
.dose-products .wp-block-woocommerce-product-button {
	margin-top: auto;
	padding-inline: 0.5rem;
}

/* -------------------------------------------------------------------------
   6. Header
   ---------------------------------------------------------------------- */

.dose-header {
	position: sticky;
	top: 0;
	z-index: 90;
	background: color-mix(in srgb, var(--wp--preset--color--base) 82%, transparent);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.dose-announce {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

.dose-announce p {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin: 0;
	padding-block: 0.55rem;
	text-align: center;
}

/* Mini cart trigger */
.wp-block-woocommerce-mini-cart .wc-block-mini-cart__button {
	color: var(--wp--preset--color--contrast);
	padding: 0.4rem;
}

.wp-block-woocommerce-mini-cart .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--accent);
	font-weight: 600;
}

/* Mobile navigation overlay */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
	padding-top: 5rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2rem;
	letter-spacing: -0.03em;
}

/* -------------------------------------------------------------------------
   7. Footer
   ---------------------------------------------------------------------- */

.dose-footer {
	border-top: 1px solid var(--wp--preset--color--line);
}

.dose-footer-links li {
	list-style: none;
	margin-bottom: 0.6rem;
}

.dose-footer-links {
	padding: 0;
	margin: 0;
}

.dose-footer-links a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	transition: color 0.2s ease;
}

.dose-footer-links a:hover,
.dose-footer-links a:focus {
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
   8. Block style variations
   ---------------------------------------------------------------------- */

/* Button: outline */
.wp-block-button.is-style-dose-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--line);
}

.wp-block-button.is-style-dose-outline .wp-block-button__link:hover,
.wp-block-button.is-style-dose-outline .wp-block-button__link:focus {
	background: transparent;
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* Group: hairline framed panel */
.wp-block-group.is-style-dose-panel {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 20px;
}

/* Heading: mono spec label */
.is-style-dose-label {
	font-family: var(--wp--preset--font-family--mono) !important;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 500 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	color: var(--wp--preset--color--muted);
}

/* -------------------------------------------------------------------------
   9. Misc
   ---------------------------------------------------------------------- */

.dose-hero-glow {
	background-image: radial-gradient(70% 90% at 50% -10%, rgba(204, 255, 0, 0.14) 0%, rgba(11, 11, 13, 0) 65%);
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.125rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: -0.1em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1.25rem;
	color: var(--wp--preset--color--accent);
	transition: transform 0.25s ease;
}

.wp-block-details[open] summary::after {
	content: "–";
}

.wp-block-details > *:not(summary) {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	max-width: 60ch;
}

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