/*
Theme Name: Fibra Modular
Theme URI: https://fibramuscular.com/
Author: FibraMuscular.com
Description: Tema de bloques modular, administrable y responsive para una tienda WooCommerce de suplementos deportivos.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fibra-modular
Tags: block-patterns, block-styles, e-commerce, full-site-editing, wide-blocks
*/

:root {
	--fm-border: rgba(255, 255, 255, 0.12);
	--fm-border-strong: rgba(31, 142, 255, 0.48);
	--fm-panel: #080d14;
	--fm-panel-alt: #0d1520;
	--fm-blue: #1688ff;
	--fm-blue-bright: #2aa8ff;
	--fm-muted: #9eaabc;
	--fm-radius: 0.55rem;
	--fm-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.34);
}

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
}

:root :where(.wp-site-blocks) {
	min-height: 100vh;
}

:root :where(a) {
	text-underline-offset: 0.2em;
}

:root :where(.wp-element-button, .wp-block-button__link) {
	box-shadow: 0 0.5rem 1.5rem rgba(22, 136, 255, 0.22);
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

:root :where(.wp-element-button:hover, .wp-block-button__link:hover) {
	transform: translateY(-1px);
}

:root :where(.fm-shell) {
	padding-inline: clamp(1rem, 3vw, 2.25rem);
}

:root :where(.fm-section) {
	border-top: 1px solid var(--fm-border);
	padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

:root :where(.fm-section-heading) {
	margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
	text-transform: uppercase;
}

:root :where(.fm-accent) {
	color: var(--fm-blue-bright);
}

/* Header */
:root :where(.fm-header) {
	position: relative;
	z-index: 30;
	border-bottom: 1px solid var(--fm-border);
	background: rgba(2, 5, 9, 0.98);
}

:root :where(.fm-topbar) {
	border-bottom: 1px solid var(--fm-border);
	color: var(--fm-muted);
	font-size: 0.78rem;
}

:root :where(.fm-topbar-inner) {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.4rem;
	padding-block: 0.65rem;
	text-align: center;
}

:root :where(.fm-topbar p) {
	margin: 0;
}

:root :where(.fm-header-main) {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1rem;
	align-items: center;
	padding-block: 1rem;
}

:root :where(.fm-header-search) {
	grid-column: 1 / -1;
	grid-row: 2;
}

:root :where(.fm-header-search .wp-block-search__inside-wrapper) {
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	background: #fff;
	overflow: hidden;
}

:root :where(.fm-header-search .wp-block-search__input) {
	border: 0;
	color: #111820;
}

:root :where(.fm-header-search .wp-block-search__button) {
	border: 0;
	border-radius: 0;
	margin: 0;
}

:root :where(.fm-header-actions) {
	justify-content: flex-end;
}

:root :where(.fm-main-nav) {
	border-top: 1px solid var(--fm-border);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 0.84rem;
	font-weight: 700;
	letter-spacing: 0.045em;
	text-transform: uppercase;
}

:root :where(.fm-main-nav .wp-block-navigation) {
	padding-block: 0.85rem;
}

/* Hero */
:root :where(.fm-hero) {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background:
		radial-gradient(circle at 78% 55%, rgba(22, 136, 255, 0.28), transparent 28rem),
		linear-gradient(115deg, #020509 0%, #060b12 48%, #04182b 100%);
}

:root :where(.fm-hero)::before {
	position: absolute;
	z-index: -1;
	inset: 0;
	background-image:
		linear-gradient(rgba(29, 151, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(29, 151, 255, 0.045) 1px, transparent 1px);
	background-size: 3.2rem 3.2rem;
	content: "";
	mask-image: linear-gradient(to right, transparent, #000 70%);
}

:root :where(.fm-hero-grid) {
	min-height: clamp(34rem, 68vw, 47rem);
	align-items: center !important;
	padding-block: clamp(3rem, 7vw, 6rem);
}

:root :where(.fm-hero-copy) {
	position: relative;
	z-index: 2;
}

:root :where(.fm-hero-title) {
	max-width: 12ch;
	font-size: clamp(2.7rem, 8vw, 5.8rem);
	line-height: 0.92;
	text-transform: uppercase;
}

:root :where(.fm-hero-text) {
	max-width: 34rem;
	color: #c1cad6;
	font-size: clamp(1rem, 2vw, 1.2rem);
}

:root :where(.fm-hero-media) {
	min-height: clamp(20rem, 56vw, 38rem);
	border: 1px dashed rgba(42, 168, 255, 0.32);
	border-radius: 50% 20% 45% 25%;
	background:
		radial-gradient(circle at 50% 45%, rgba(42, 168, 255, 0.24), transparent 45%),
		linear-gradient(145deg, rgba(255,255,255,0.03), rgba(22,136,255,0.08));
}

:root :where(.fm-hero-media img) {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Trust and service rows */
:root :where(.fm-trust-row, .fm-service-row) {
	border-block: 1px solid var(--fm-border);
	background: #050a10;
}

:root :where(.fm-trust-grid, .fm-service-grid) {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

:root :where(.fm-trust-item, .fm-service-item) {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.85rem;
	align-items: center;
	border-bottom: 1px solid var(--fm-border);
	padding: 1.15rem;
}

:root :where(.fm-trust-item:last-child, .fm-service-item:last-child) {
	border-bottom: 0;
}

:root :where(.fm-icon) {
	color: var(--fm-blue-bright);
	font-size: 1.5rem;
	font-weight: 800;
}

:root :where(.fm-trust-item p, .fm-service-item p) {
	margin: 0;
}

:root :where(.fm-trust-item strong, .fm-service-item strong) {
	display: block;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 0.92rem;
	letter-spacing: 0.025em;
	text-transform: uppercase;
}

:root :where(.fm-trust-item small, .fm-service-item small) {
	color: var(--fm-muted);
}

/* WooCommerce categories */
:root :where(.fm-categories .wc-block-product-categories-list) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	padding: 0;
	list-style: none;
}

:root :where(.fm-categories .wc-block-product-categories-list-item) {
	min-width: 0;
	margin: 0;
	text-align: center;
}

:root :where(.fm-categories .wc-block-product-categories-list-item > a) {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: center;
	color: #fff;
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 0.86rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-decoration: none;
	text-transform: uppercase;
}

:root :where(.fm-categories .wc-block-product-categories-list-item__image) {
	width: min(100%, 9rem);
	aspect-ratio: 1;
	border: 1px solid var(--fm-border-strong);
	border-radius: 50%;
	background: radial-gradient(circle, #142338 0%, #070b11 70%);
	overflow: hidden;
}

:root :where(.fm-categories .wc-block-product-categories-list-item__image img) {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Product cards */
:root :where(.fm-product-collection .wc-block-product-template) {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 0.85rem !important;
}

:root :where(.fm-product-collection .wc-block-product) {
	min-width: 0;
	border: 1px solid rgba(14, 30, 48, 0.2);
	border-radius: var(--fm-radius);
	background: #fff;
	box-shadow: var(--fm-shadow);
	color: #111820;
	overflow: hidden;
}

:root :where(.fm-product-collection .wc-block-product > .wp-block-group) {
	padding: 0.7rem;
}

:root :where(.fm-product-collection .wc-block-components-product-image) {
	border-radius: calc(var(--fm-radius) - 0.15rem);
	overflow: hidden;
}

:root :where(.fm-product-collection .wp-block-post-title a) {
	color: #111820;
	text-decoration: none;
}

:root :where(.fm-product-collection .wc-block-components-product-price) {
	color: #111820;
	font-weight: 800;
}

:root :where(.fm-product-collection .wp-block-button__link) {
	width: 100%;
}

/* Why us and editable media */
:root :where(.fm-why) {
	background:
		linear-gradient(90deg, rgba(3, 7, 12, 0.98), rgba(4, 23, 42, 0.88)),
		radial-gradient(circle at 80% 50%, rgba(22, 136, 255, 0.3), transparent 25rem);
}

:root :where(.fm-why-grid) {
	align-items: center !important;
}

:root :where(.fm-feature-list) {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.8rem;
}

:root :where(.fm-feature-card) {
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	background: rgba(9, 17, 27, 0.72);
	padding: 1rem;
}

:root :where(.fm-media-placeholder) {
	min-height: 18rem;
	border: 1px dashed var(--fm-border-strong);
	border-radius: var(--fm-radius);
	background:
		linear-gradient(135deg, rgba(22, 136, 255, 0.15), transparent 55%),
		var(--fm-panel);
}

:root :where(.fm-media-placeholder img) {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Testimonials */
:root :where(.fm-testimonial-card) {
	height: 100%;
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	background: linear-gradient(145deg, #0b121c, #070c12);
	box-shadow: var(--fm-shadow);
	padding: clamp(1.25rem, 3vw, 1.8rem);
}

:root :where(.fm-stars) {
	color: #ffd52d;
	letter-spacing: 0.15em;
}

:root :where(.fm-testimonial-meta) {
	color: var(--fm-muted);
	font-size: 0.84rem;
}

/* Footer */
:root :where(.fm-footer) {
	border-top: 1px solid var(--fm-border);
	background: #03070b;
}

:root :where(.fm-footer-main) {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

:root :where(.fm-footer a) {
	color: #b7c2cf;
	text-decoration: none;
}

:root :where(.fm-footer a:hover) {
	color: #fff;
}

:root :where(.fm-footer-bottom) {
	border-top: 1px solid var(--fm-border);
	color: var(--fm-muted);
	font-size: 0.8rem;
	padding-block: 1rem;
}

/* Generic templates */
:root :where(.fm-content-area) {
	padding-block: clamp(3rem, 8vw, 6rem);
}

:root :where(.fm-loop-card) {
	height: 100%;
	border: 1px solid var(--fm-border);
	border-radius: var(--fm-radius);
	background: var(--fm-panel);
	padding: 1.25rem;
}

@media (min-width: 481px) {
	:root :where(.fm-topbar-inner) {
		grid-template-columns: repeat(3, 1fr);
		text-align: left;
	}

	:root :where(.fm-topbar-inner > :last-child) {
		text-align: right;
	}

	:root :where(.fm-trust-grid, .fm-service-grid) {
		grid-template-columns: repeat(2, 1fr);
	}

	:root :where(.fm-trust-item, .fm-service-item) {
		border-right: 1px solid var(--fm-border);
	}

	:root :where(.fm-trust-item:nth-child(2n), .fm-service-item:nth-child(2n)) {
		border-right: 0;
	}

	:root :where(.fm-categories .wc-block-product-categories-list) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 783px) {
	:root :where(.fm-header-main) {
		grid-template-columns: minmax(12rem, 0.75fr) minmax(20rem, 2fr) auto;
	}

	:root :where(.fm-header-search) {
		grid-column: auto;
		grid-row: auto;
	}

	:root :where(.fm-trust-grid, .fm-service-grid) {
		grid-template-columns: repeat(4, 1fr);
	}

	:root :where(.fm-trust-item, .fm-service-item) {
		border-bottom: 0;
	}

	:root :where(.fm-trust-item:nth-child(2n), .fm-service-item:nth-child(2n)) {
		border-right: 1px solid var(--fm-border);
	}

	:root :where(.fm-trust-item:last-child, .fm-service-item:last-child) {
		border-right: 0;
	}

	:root :where(.fm-categories .wc-block-product-categories-list) {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	:root :where(.fm-product-collection .wc-block-product-template) {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 1.25rem !important;
	}

	:root :where(.fm-feature-list) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

