/*
Theme Name: Malvinox
Theme URI: https://malvinox.pl/
Author: Piotr Gałęziok
Description: Lekki motyw blokowy WooCommerce dla Malvinox.
Requires at least: 6.6
Requires PHP: 8.0
Version: 1.0.24
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: malvinox
Tags: e-commerce, block-patterns, full-site-editing, wide-blocks
*/

:root {
	--malvinox-border: #d8dee2;
	--malvinox-muted: #49555c;
	--malvinox-accent: #a8d400;
	--malvinox-accent-dark: #627d00;
	--malvinox-accent-bright: #bde62a;
	--malvinox-accent-hover: #b5df1a;
	--malvinox-success: #2f6b4f;
	--malvinox-radius: 10px;
	--malvinox-shadow: 0 14px 36px rgba(24, 33, 39, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: 0.18em; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 3px solid rgba(168, 212, 0, 0.5);
	outline-offset: 3px;
}

.malvinox-topbar {
	font-size: 0.82rem;
	letter-spacing: 0.02em;
}
.malvinox-topbar a { color: inherit; }
.malvinox-brand__logo { margin: 0; }
.malvinox-brand__logo a {
	display: block;
	line-height: 0;
}
.malvinox-brand__logo img {
	display: block;
	height: auto;
	max-height: 55px;
	object-fit: contain;
	object-position: left center;
	width: clamp(220px, 25vw, 320px);
}
.malvinox-header-main { border-bottom: 1px solid var(--malvinox-border); }
.malvinox-header-search { flex: 1 1 420px; max-width: 610px; }
.malvinox-header-search .wp-block-search__inside-wrapper {
	border: 1px solid var(--malvinox-border);
	border-radius: 8px;
	min-height: 48px;
	padding: 3px;
}
.malvinox-header-search .wp-block-search__button {
	border-radius: 6px;
	margin-left: 4px;
}
.malvinox-header-main .wp-block-woocommerce-customer-account {
	flex: 0 0 auto;
}
.malvinox-header-main .wc-block-customer-account__link {
	align-items: center;
	background: #fff;
	border: 1px solid var(--malvinox-accent);
	border-radius: 8px;
	color: var(--malvinox-accent-dark);
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 750;
	gap: 0.45rem;
	justify-content: center;
	min-height: 44px;
	padding: 0.65rem 0.9rem;
	text-decoration: none;
}
.malvinox-header-main .wc-block-customer-account__link:hover {
	background: #f6fbe3;
	color: var(--malvinox-accent-dark);
}
.malvinox-header-main .wc-block-customer-account__account-icon {
	height: 1.15rem;
	width: 1.15rem;
}
.malvinox-navigation { border-bottom: 1px solid var(--malvinox-border); }
.malvinox-navigation .wp-block-navigation-item__content {
	font-size: 0.9rem;
	font-weight: 650;
	text-decoration: none;
}
.malvinox-navigation .wp-block-navigation-item__content:hover { color: var(--malvinox-accent); }

.malvinox-legal-table {
	margin: 1.25rem 0 1.75rem;
	overflow-x: auto;
}
.malvinox-legal-table table {
	border-collapse: collapse;
	font-size: 0.92rem;
	line-height: 1.5;
	width: 100%;
}
.malvinox-legal-table th,
.malvinox-legal-table td {
	border: 1px solid var(--malvinox-border);
	padding: 0.75rem;
	text-align: left;
	vertical-align: top;
}
.malvinox-legal-table th {
	background: #eef1f2;
	color: #182127;
	font-weight: 750;
}

.malvinox-hero {
	background-color: #eef1f2;
	border-bottom: 1px solid var(--malvinox-border);
	position: relative;
}
.malvinox-hero::after {
	background: repeating-linear-gradient(90deg, transparent 0, transparent 47px, rgba(24,33,39,.035) 48px);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}
.malvinox-hero > * { position: relative; z-index: 1; }
.malvinox-eyebrow {
	color: var(--malvinox-accent-dark);
	font-size: 0.78rem;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.malvinox-hero-panel .malvinox-eyebrow,
.malvinox-info-card.has-contrast-background-color .malvinox-eyebrow {
	color: var(--malvinox-accent-bright);
}
.malvinox-hero h1 { max-width: 820px; }
.malvinox-hero-panel {
	background: #182127;
	border-radius: var(--malvinox-radius);
	box-shadow: var(--malvinox-shadow);
	color: #fff;
	overflow: hidden;
	padding: clamp(1.5rem, 4vw, 3rem);
	position: relative;
}
.malvinox-hero-panel::before {
	background: linear-gradient(135deg, transparent 45%, rgba(255,255,255,.08) 46%, transparent 47%);
	content: "";
	inset: 0;
	position: absolute;
}
.malvinox-hero-panel > * { position: relative; }
.malvinox-spec-row {
	border-top: 1px solid rgba(255,255,255,.18);
	display: flex;
	justify-content: space-between;
	padding: 0.9rem 0;
}
.malvinox-spec-row strong { color: #fff; }
.malvinox-spec-row span { color: #b9c2c7; }

.malvinox-trust-bar { margin-top: -1px; }
.malvinox-trust-item {
	border-left: 3px solid var(--malvinox-accent);
	padding-left: 1rem;
}
.malvinox-trust-item p { margin: 0.15rem 0 0; }

.malvinox-section-heading { max-width: 760px; }
.malvinox-category-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.malvinox-category-card {
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: var(--malvinox-radius);
	color: inherit;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	overflow: hidden;
	text-decoration: none;
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.malvinox-category-card a { color: inherit; text-decoration: none; }
.malvinox-category-card:hover {
	border-color: #aeb8be;
	box-shadow: var(--malvinox-shadow);
	transform: translateY(-3px);
}
.malvinox-category-card__image {
	align-items: center;
	background: #f2f4f5;
	display: flex;
	height: 190px;
	justify-content: center;
	padding: 1rem;
}
.malvinox-category-card__image img {
	height: 100%;
	object-fit: contain;
	width: 100%;
}
.malvinox-category-card__body { padding: 1.1rem 1.2rem 1.25rem; }
.malvinox-category-card__body h3 { font-size: 1.08rem; margin: 0; }
.malvinox-category-card__body p { color: var(--malvinox-muted); font-size: .88rem; margin: .35rem 0 0; }

.malvinox-service-card,
.malvinox-info-card {
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: var(--malvinox-radius);
	height: 100%;
	padding: clamp(1.25rem, 3vw, 2rem);
}
.malvinox-service-card h3,
.malvinox-info-card h3 { margin-top: 0; }
.malvinox-info-card.has-contrast-background-color a:not(.wp-block-button__link) {
	color: var(--malvinox-accent-bright);
}
.malvinox-number {
	color: var(--malvinox-accent-dark);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .1em;
}
.malvinox-grade-list {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.malvinox-grade-list li {
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: 999px;
	font-size: .88rem;
	font-weight: 650;
	padding: .45rem .75rem;
}

.malvinox-archive-hero { border-bottom: 1px solid var(--malvinox-border); }
.malvinox-catalog-layout { align-items: flex-start !important; }
.malvinox-catalog-layout > .wp-block-column { min-width: 0; }
.malvinox-filters {
	align-self: start;
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: var(--malvinox-radius);
	max-height: calc(100vh - 2rem);
	max-width: 100%;
	min-width: 0;
	overflow-y: auto;
	padding: 1.25rem;
	position: sticky;
	top: 1rem;
	width: 100%;
}
.malvinox-filters .wp-block-search__inside-wrapper { border-radius: 7px; }
.malvinox-filters .wc-block-product-filters__overlay,
.malvinox-filters .wc-block-product-filters__overlay-wrapper,
.malvinox-filters .wc-block-product-filters__overlay-dialog,
.malvinox-filters .wc-block-product-filters__overlay-content {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}
.malvinox-filters .wc-block-product-filter-price-slider__content {
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.malvinox-filters .wc-block-product-filter-price-slider__left,
.malvinox-filters .wc-block-product-filter-price-slider__right,
.malvinox-filters .wc-block-product-filter-price-slider__range {
	max-width: 100%;
	min-width: 0;
	width: auto;
}
.malvinox-filters .wc-block-product-filter-price-slider__left input[type="text"],
.malvinox-filters .wc-block-product-filter-price-slider__right input[type="text"] {
	min-width: 0;
	width: 100%;
}
.malvinox-catalog-layout .wp-block-woocommerce-product-template {
	display: grid !important;
	gap: 1.25rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
}
.malvinox-catalog-layout .wp-block-woocommerce-product-template > li {
	max-width: none !important;
	width: 100% !important;
}
.wp-block-woocommerce-product-template,
.products-block-post-template { align-items: stretch; }
.wp-block-woocommerce-product-template > li,
.products-block-post-template > li {
	align-self: stretch;
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: var(--malvinox-radius);
	display: flex;
	flex-direction: column;
	height: auto;
	overflow: hidden;
	padding: 0 0 1rem;
}
.wp-block-woocommerce-product-template .wc-block-components-product-image,
.products-block-post-template .wc-block-components-product-image {
	aspect-ratio: 4 / 3;
	background: #f4f5f5;
	display: flex;
	margin-bottom: 1rem;
	overflow: hidden;
	width: 100%;
}
.wp-block-woocommerce-product-template .wc-block-components-product-image img,
.products-block-post-template .wc-block-components-product-image img {
	aspect-ratio: 4 / 3;
	height: 100%;
	object-fit: contain;
	padding: .75rem;
	width: 100%;
}
.wp-block-woocommerce-product-template .wp-block-post-title,
.wp-block-woocommerce-product-template .wp-block-woocommerce-product-price,
.wp-block-woocommerce-product-template .wp-block-woocommerce-product-button,
.wp-block-woocommerce-product-template .wp-block-shortcode,
.wp-block-woocommerce-product-template .malvinox-card-meta,
.products-block-post-template .wp-block-post-title,
.products-block-post-template .wp-block-woocommerce-product-price,
.products-block-post-template .wp-block-woocommerce-product-button,
.products-block-post-template .wp-block-shortcode,
.products-block-post-template .malvinox-card-meta {
	margin-left: 1rem;
	margin-right: 1rem;
}
.wp-block-woocommerce-product-template .wp-block-post-title,
.products-block-post-template .wp-block-post-title {
	line-height: 1.35;
}
.wp-block-woocommerce-product-template .wp-block-post-title a,
.products-block-post-template .wp-block-post-title a,
.wc-block-grid__product-title,
.wc-block-components-product-name {
	color: #182127;
}
.wp-block-woocommerce-product-template .wp-block-post-title { min-height: 5.4em; }
.products-block-post-template .wp-block-post-title { min-height: 4.05em; }
.wp-block-woocommerce-product-template .wp-block-woocommerce-product-price,
.products-block-post-template .wp-block-woocommerce-product-price {
	line-height: 1.35;
	min-height: 2.7em;
}
.wp-block-woocommerce-product-template .wp-block-woocommerce-product-button,
.products-block-post-template .wp-block-woocommerce-product-button {
	margin-top: auto;
	min-height: 46px;
}
.malvinox-card-meta {
	color: var(--malvinox-muted);
	font-size: .78rem;
	margin-bottom: .85rem;
	min-height: 2.6em;
}
.malvinox-card-meta__stock { color: var(--malvinox-success); font-weight: 700; }
.malvinox-card-meta__stock.is-out { color: #8a3b31; }
.malvinox-no-products {
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: var(--malvinox-radius);
	margin: 0;
	padding: 1.25rem;
}

.malvinox-product-shell { padding-bottom: clamp(3rem, 7vw, 6rem); padding-top: 1.25rem; }
.malvinox-product-main { align-items: flex-start !important; gap: clamp(2rem, 5vw, 5rem) !important; }
.malvinox-product-main > .wp-block-column { min-width: 0; }
.single-product .woocommerce-product-gallery {
	max-width: 100%;
	opacity: 1 !important;
}
.single-product .woocommerce-product-gallery .flex-viewport,
.single-product .woocommerce-product-gallery img {
	max-width: 100%;
}
.single-product .woocommerce-product-gallery img {
	height: auto;
}
.malvinox-product-summary {
	background: #fff;
	border: 1px solid var(--malvinox-border);
	border-radius: var(--malvinox-radius);
	padding: clamp(1.25rem, 3vw, 2rem);
}
.malvinox-product-summary .wp-block-post-title { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.malvinox-product-summary .wp-block-woocommerce-product-price { color: #11181c; }
.malvinox-product-summary .single_add_to_cart_button { min-height: 48px; }
.malvinox-product-meta {
	border-top: 1px solid var(--malvinox-border);
	color: var(--malvinox-muted);
	font-size: .86rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
}
.malvinox-assurance {
	background: #eef4f1;
	border-left: 4px solid var(--malvinox-success);
	border-radius: 7px;
	margin-top: 1.25rem;
	padding: 1rem 1.1rem;
}
.malvinox-assurance strong { display: block; margin-bottom: .2rem; }

.malvinox-page-hero { border-bottom: 1px solid var(--malvinox-border); }
.malvinox-prose { max-width: 840px; }
.malvinox-prose h2 { margin-top: 2.25rem; }
.malvinox-checkout-title {
	font-size: clamp(1.9rem, 4vw, 2.7rem);
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
	margin-top: 0;
}
.malvinox-contact-list { list-style: none; margin: 0; padding: 0; }
.malvinox-contact-list li { border-bottom: 1px solid var(--malvinox-border); padding: .75rem 0; }

.malvinox-footer { border-top: 1px solid #303b42; }
.malvinox-footer__logo {
	background: #fff;
	border-radius: 8px;
	display: inline-block;
	margin: 0 0 1.25rem;
	max-width: 100%;
	padding: .65rem .8rem;
	width: 320px;
}
.malvinox-footer__logo a {
	display: block;
	line-height: 0;
}
.malvinox-footer__logo img {
	display: block;
	height: auto;
	width: 100%;
}
.malvinox-footer a { color: #dce2e5; text-decoration-color: rgba(220,226,229,.4); }
.malvinox-footer a:hover { color: #fff; }
.malvinox-footer h3 { color: #fff; font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; }
.malvinox-footer p,
.malvinox-footer li { color: #b9c2c7; font-size: .88rem; }
.malvinox-footer ul { list-style: none; margin: 0; padding: 0; }
.malvinox-footer li + li { margin-top: .45rem; }
.malvinox-footer-bottom { border-top: 1px solid #303b42; }

.wp-element-button,
.wp-block-button__link {
	font-weight: 700;
	transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover {
	background: var(--malvinox-accent-hover);
	color: #182127;
	transform: translateY(-1px);
}
.is-style-outline .wp-block-button__link:hover { color: #182127; }
.wp-block-query-pagination { margin-top: 2.5rem; }
.wp-block-query-pagination a,
.wp-block-query-pagination .current { border-radius: 6px; padding: .5rem .7rem; }
.wp-block-query-pagination .current { background: #182127; color: #fff; }

@media (min-width: 783px) {
	.malvinox-catalog-layout {
		display: grid !important;
		grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
	}
	.malvinox-catalog-layout > .wp-block-column {
		flex-basis: auto !important;
		width: auto;
	}
}

@media (max-width: 1024px) {
	.malvinox-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.malvinox-header-search { order: 3; max-width: none; width: 100%; }
	.wp-block-woocommerce-product-template .wp-block-post-title { min-height: 6.75em; }
}

@media (max-width: 782px) {
	.malvinox-topbar .is-layout-flex { justify-content: center; }
	.malvinox-topbar__secondary { display: none; }
	.malvinox-header-main .is-layout-flex { flex-wrap: wrap; }
	.malvinox-header-search { flex-basis: 100%; }
	.malvinox-navigation .wp-block-navigation { justify-content: space-between; width: 100%; }
	.malvinox-hero { padding-bottom: 3rem !important; padding-top: 3rem !important; }
	.malvinox-filters { max-height: none; overflow-y: visible; position: static; }
	.malvinox-product-main { gap: 1.5rem !important; }
	.malvinox-product-summary { padding: 1.15rem; }
	.malvinox-footer .wp-block-columns { gap: 2rem; }
	.malvinox-legal-table { overflow: visible; }
	.malvinox-legal-table table,
	.malvinox-legal-table tbody,
	.malvinox-legal-table tr,
	.malvinox-legal-table td { display: block; width: 100%; }
	.malvinox-legal-table thead {
		height: 1px;
		overflow: hidden;
		position: absolute;
		width: 1px;
		clip: rect(1px, 1px, 1px, 1px);
		clip-path: inset(50%);
	}
	.malvinox-legal-table tr {
		border: 1px solid var(--malvinox-border);
		border-radius: 8px;
		margin-bottom: 1rem;
		overflow: hidden;
	}
	.malvinox-legal-table td { border: 0; border-bottom: 1px solid var(--malvinox-border); }
	.malvinox-legal-table td:last-child { border-bottom: 0; }
	.malvinox-legal-table td::before {
		color: #182127;
		content: attr(data-label);
		display: block;
		font-weight: 750;
		margin-bottom: 0.25rem;
	}
}

@media (max-width: 540px) {
	.malvinox-category-grid { grid-template-columns: 1fr; }
	.malvinox-category-card__image { height: 210px; }
	.wp-block-woocommerce-product-template,
	.products-block-post-template { grid-template-columns: 1fr !important; }
	.wp-block-woocommerce-product-template .wp-block-post-title,
	.wp-block-woocommerce-product-template .wp-block-woocommerce-product-price,
	.products-block-post-template .wp-block-post-title,
	.products-block-post-template .wp-block-woocommerce-product-price { min-height: 0; }
	.malvinox-hero .wp-block-buttons { align-items: stretch; flex-direction: column; }
	.malvinox-hero .wp-block-button { width: 100%; }
	.malvinox-hero .wp-block-button__link { width: 100%; }
}
