/*
Theme Name: Marina's Art
Theme URI: https://marinasart.gr/
Author: Marina's Art
Description: A block theme for Marina's Art — handmade liquid-glass (epoxy resin) and pressed-flower pieces made in Athens. Built for the Site Editor with native WooCommerce support: every template (shop, product, cart, checkout, account) is made of blocks and fully editable. Lavender design system, self-hosted Greek + Latin fonts, fluid typography and ready-made store patterns.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 11.1
WC tested up to: 11.1
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marinas-art
Tags: e-commerce, block-patterns, block-styles, full-site-editing, style-variations, template-editing, wide-blocks, translation-ready, one-column, two-columns, four-columns, custom-colors, editor-style, featured-images
*/

/* ==========================================================================
   Global styles that theme.json cannot express.
   Colours, fonts, sizes and spacing come from theme.json presets
   (var(--wp--preset--…)); keep values here token-based so a style
   variation or a Site Editor change flows through automatically.
   ========================================================================== */

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

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

::selection {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent);
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-strong);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
.wp-block-post-title {
	text-wrap: balance;
}

p,
li,
blockquote {
	text-wrap: pretty;
}

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

/* Comfortable 44px+ touch targets for every button-like control (WCAG 2.5.8). */
.wp-element-button,
.wp-block-button__link {
	align-items: center;
	display: inline-flex;
	gap: 0.4em;
	justify-content: center;
	min-height: 44px;
	text-decoration: none;
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition), border-color var(--wp--custom--transition);
}

/* Text fields: consistent height, calm focus ring. Radii/colours come from theme.json elements. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
	min-height: 48px;
	padding-inline: 1rem;
}

textarea {
	border-radius: var(--wp--preset--border-radius--medium);
	min-height: 96px;
	padding: 0.75rem 1rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	border-color: var(--wp--preset--color--accent);
	outline: 2px solid color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	outline-offset: 0;
}

::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

/* Visually hidden but available to screen readers (used for the hero H1). */
.screen-reader-text,
.ma-visually-hidden {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	white-space: nowrap;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--white);
	clip-path: none;
	color: var(--wp--preset--color--contrast);
	display: block;
	height: auto;
	left: 8px;
	padding: 12px 20px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* Horizontal scroller helper (category chips, carousels) without visible scrollbars. */
.ma-scroll-x {
	overflow-x: auto;
	scrollbar-width: none;
}

.ma-scroll-x::-webkit-scrollbar {
	display: none;
}

/* ==========================================================================
   Header
   ========================================================================== */

/* Sticky header: sticky must live on the template-part wrapper, whose parent scrolls. */
.wp-site-blocks > .wp-block-template-part:has(> .ma-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .ma-header) {
		top: 0;
	}
}

/* While the menu drawer is open, lift the header (and its drawer) above the admin bar. */
.wp-site-blocks > .wp-block-template-part:has(.wp-block-navigation__responsive-container.is-menu-open) {
	z-index: 100000;
}

/*
 * Frosted glass: the blur sits on a pseudo-element on purpose. A
 * backdrop-filter on .ma-header itself would become the containing block
 * for the navigation overlay and the mini-cart drawer (both position:
 * fixed) and trap them inside the header.
 */
.ma-header {
	isolation: isolate;
	position: relative;
}

.ma-header::before {
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

/* Hamburger · centred brand · account + bag. Equal side columns keep the brand centred. */
.ma-header__bar.ma-header__bar {
	align-items: center;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.ma-header__start {
	justify-self: start;
}

.ma-header__brand {
	justify-self: center;
	min-height: 44px;
}

.ma-header__end {
	justify-self: end;
}

.ma-header .wp-block-site-title {
	white-space: nowrap;
}

.ma-brand-mark {
	line-height: 1;
	margin: 0;
	white-space: nowrap;
}

/* Icon buttons in the header: 48px circular hit areas, as in the design. */
.ma-header .wp-block-navigation__responsive-container-open,
.ma-header .wc-block-mini-cart__button,
.ma-header .wc-block-customer-account a {
	align-items: center;
	border-radius: var(--wp--preset--border-radius--pill);
	color: var(--wp--preset--color--contrast);
	display: inline-flex;
	height: 48px;
	justify-content: center;
	padding: 0;
	transition: background-color var(--wp--custom--transition);
	width: 48px;
}

.ma-header .wp-block-navigation__responsive-container-open:hover,
.ma-header .wc-block-mini-cart__button:hover,
.ma-header .wc-block-customer-account a:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent);
}

.ma-header .wp-block-navigation__responsive-container-open svg {
	height: 26px;
	width: 26px;
}

.ma-header .wc-block-customer-account__account-icon,
.ma-header .wc-block-customer-account svg {
	height: 24px;
	width: 24px;
}

.ma-header .wc-block-mini-cart__icon {
	height: 30px;
	width: 30px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.ma-footer a:where(:not(.wp-element-button)) {
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.ma-footer a:where(:not(.wp-element-button)):hover {
	text-decoration-color: currentColor;
}

.ma-footer .wp-block-navigation .wp-block-navigation-item__content {
	align-items: center;
	display: inline-flex;
	min-height: 36px;
	opacity: 0.85;
}

.ma-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	opacity: 1;
}

.ma-footer__policies .wp-block-navigation__container {
	row-gap: 4px;
}

.ma-footer p {
	margin: 0;
}

.ma-footer .ma-dm-link a,
.ma-footer p > a {
	min-height: 32px;
}

.ma-footer__muted {
	color: color-mix(in srgb, var(--wp--preset--color--base) 80%, transparent);
}

.ma-footer__social .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: color-mix(in srgb, var(--wp--preset--color--base) 30%, transparent);
	color: var(--wp--preset--color--base);
	min-height: 44px;
	padding: 0 18px;
}

.ma-footer__social .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 10%, transparent);
	color: var(--wp--preset--color--base);
}

p.is-style-ma-tag.ma-footer__tag {
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 12%, transparent);
	color: var(--wp--preset--color--base);
}

.ma-stat-value {
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Block styles registered in inc/block-styles.php
   ========================================================================== */

/* Paragraph → "Pill tag" (badges such as "Best seller", payment methods). */
.wp-block-paragraph.is-style-ma-tag,
p.is-style-ma-tag {
	align-items: center;
	align-self: flex-start;
	border-radius: var(--wp--preset--border-radius--pill);
	display: inline-flex;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.4;
	margin-block: 0;
	padding: 3px 10px;
	width: fit-content;
}

p.is-style-ma-tag:not(.has-background) {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

/* Paragraph → "Kicker" (small eyebrow text above headings). */
p.is-style-ma-kicker {
	color: var(--wp--preset--color--accent-strong);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* List → "Numbered steps" (pink numbered circles, e.g. "Make it yours"). */
ol.is-style-ma-steps,
ul.is-style-ma-steps {
	counter-reset: ma-step;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	list-style: none;
	margin-inline: 0;
	padding: 0;
}

.is-style-ma-steps > li {
	align-items: center;
	color: var(--wp--preset--color--contrast-soft);
	counter-increment: ma-step;
	display: flex;
	font-size: var(--wp--preset--font-size--small);
	gap: 8px;
	margin: 0;
}

.is-style-ma-steps > li::before {
	background-color: var(--wp--preset--color--pink);
	border-radius: 50%;
	color: var(--wp--preset--color--contrast);
	content: counter(ma-step);
	display: grid;
	flex: none;
	font-family: var(--wp--preset--font-family--literata);
	font-size: 0.8125rem;
	height: 26px;
	place-items: center;
	width: 26px;
}

/* List → "Check list" (check-mark bullets for trust points). */
ul.is-style-ma-checklist {
	display: flex;
	flex-direction: column;
	gap: 10px;
	list-style: none;
	padding-left: 0;
}

.is-style-ma-checklist > li {
	align-items: flex-start;
	display: flex;
	gap: 10px;
	margin: 0;
}

.is-style-ma-checklist > li::before {
	background-color: var(--wp--preset--color--pink-soft);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A2230' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 14px;
	border-radius: 50%;
	content: "";
	flex: none;
	height: 24px;
	margin-top: -1px;
	width: 24px;
}

/* Paragraph link with a chat bubble (the "Order via Instagram DM" link). */
.ma-dm-link a {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	min-height: 44px;
}

.ma-dm-link a::before {
	background-color: currentColor;
	content: "";
	flex: none;
	height: 16px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 16px;
}

/* Five-star rating row used in the reviews pattern. */
.ma-stars {
	color: var(--wp--preset--color--accent);
	letter-spacing: 2px;
	line-height: 1;
}

/* Icons on links and buttons (drawn with CSS masks, so they follow the text colour). */
.ma-icon-arrow-down .wp-block-button__link::after,
.ma-arrow-link a::after,
.ma-back-link a::before,
.ma-secure-note::before {
	background-color: currentColor;
	content: "";
	display: inline-block;
	flex: none;
	height: 1em;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	width: 1em;
}

.ma-icon-arrow-down .wp-block-button__link::after {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E");
}

.ma-arrow-link a {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	min-height: 32px;
	text-decoration: none;
}

.ma-arrow-link a::after {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: no-preference) {
	.ma-arrow-link a::after {
		transition: transform var(--wp--custom--transition);
	}

	.ma-arrow-link a:hover::after {
		transform: translateX(3px);
	}
}

.ma-back-link {
	margin: 0;
}

.ma-back-link a {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	min-height: 44px;
	text-decoration: none;
}

.ma-back-link a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m12 19-7-7 7-7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m12 19-7-7 7-7'/%3E%3C/svg%3E");
}

.ma-secure-note {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	margin: 0;
}

.ma-secure-note::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* Phones: keep only the lock icon (preset font-size classes use !important). */
@media (max-width: 480px) {
	.ma-header--checkout .ma-secure-note.ma-secure-note {
		font-size: 0 !important;
		gap: 0;
	}

	.ma-header--checkout .ma-secure-note::before {
		height: 18px;
		width: 18px;
	}
}

/* Hero cover: design height, and soften photos a touch ("washed" look). */
.wp-block-cover.ma-hero {
	min-height: clamp(460px, 64svh, 680px);
}

.ma-hero .wp-block-cover__image-background {
	filter: saturate(0.85) contrast(0.95) brightness(1.04);
}

.ma-hero .wp-block-button__link {
	box-shadow: var(--wp--preset--shadow--medium);
	min-height: 52px;
	padding-inline: 28px;
}

/* Promo grid: tile heights (large tile = two small tiles + gap on desktop). */
.wp-block-cover.ma-promo-tile {
	overflow: hidden;
}

.wp-block-cover.ma-promo-tile--large {
	min-height: clamp(360px, 48vw, 520px);
}

.wp-block-cover.ma-promo-tile--small {
	min-height: clamp(220px, 28vw, 253px);
}

@media (min-width: 782px) {
	.ma-promo-grid > .wp-block-column > .ma-promo-tile--large {
		height: 100%;
	}
}

.ma-promo-card {
	max-width: 380px;
}

.ma-promo-card p {
	margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.ma-promo-tile .wp-block-cover__image-background {
		transition: transform 0.6s ease;
	}

	.ma-promo-tile:hover .wp-block-cover__image-background {
		transform: scale(1.04);
	}
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

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