/*
Theme Name: LAOM Products
Theme URI: https://www.laom.com.co
Author: LAOM Products
Description: Tema de bloques para la tienda de suplementos naturales LAOM Products (Medellín, Colombia). Todo el contenido se edita con bloques de WordPress y WooCommerce.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: laom
Tags: block-patterns, full-site-editing, e-commerce, wide-blocks
*/

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
:root {
	--laom-ease: cubic-bezier(0.23, 1, 0.32, 1);
	--laom-line: rgba(14, 107, 98, 0.14);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--lime); color: var(--wp--preset--color--primary); }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 3px;
	border-radius: 6px;
}

.wp-element-button,
.wp-block-button__link,
.wc-block-components-button {
	cursor: pointer;
	transition: background-color 180ms var(--laom-ease), color 180ms var(--laom-ease), transform 140ms var(--laom-ease), box-shadow 180ms var(--laom-ease);
}
.wp-element-button:active,
.wp-block-button__link:active,
.wc-block-components-button:active { transform: scale(0.97); }

/* Estilos de botón (Bloque → Estilos) */
.wp-block-button.is-style-laom-gold .wp-block-button__link {
	background: var(--wp--preset--color--green);
	color: #0B2E2A;
}
.wp-block-button.is-style-laom-ghost .wp-block-button__link {
	background: transparent;
	color: currentColor;
	box-shadow: inset 0 0 0 1.5px currentColor;
}
.wp-block-button.is-style-laom-light .wp-block-button__link {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
}
@media (hover: hover) and (pointer: fine) {
	.wp-block-button.is-style-laom-ghost .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.08); }
	.wp-block-button.is-style-laom-light .wp-block-button__link:hover { background: var(--wp--preset--color--lime); }
	.wp-block-button.is-style-laom-gold .wp-block-button__link:hover { box-shadow: 0 8px 22px rgba(125, 197, 35, 0.4); background: #8DD434; }
}

/* Antetítulo y etiquetas */
.is-style-laom-eyebrow {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
p.is-style-laom-tag {
	display: inline-block;
	width: fit-content;
	padding: 0.3rem 0.8rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.3;
}

/* Tarjetas */
.is-style-laom-card {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: var(--wp--preset--shadow--soft);
}
.is-style-laom-card-dark {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--wp--custom--radius--md);
}
.is-style-laom-pill {
	border-radius: 999px;
}

/* Listas con check */
ul.is-style-laom-checks { list-style: none; padding-left: 0; }
ul.is-style-laom-checks li {
	position: relative;
	padding-left: 2.25rem;
	margin-bottom: 0.9rem;
}
ul.is-style-laom-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.1rem;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}
.has-primary-background-color ul.is-style-laom-checks li::before,
.has-bosque-gradient-background ul.is-style-laom-checks li::before { background-color: var(--wp--preset--color--gold); }

/* Imagen flotante (productos sin fondo) */
.wp-block-image.is-style-laom-float img { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.28)); }

/* ------------------------------------------------------------------
   Encabezado
------------------------------------------------------------------ */
.laom-announcement a { text-decoration: none; }
.laom-announcement a:hover { text-decoration: underline; }

header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 0; } }

.laom-header { pointer-events: none; }
.laom-header > * { pointer-events: auto; }
.laom-header .laom-pill-bar {
	background: rgba(255, 255, 255, 0.86);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	backdrop-filter: blur(14px) saturate(1.4);
	border-radius: 999px;
	box-shadow: var(--wp--preset--shadow--soft);
}
.laom-header .wp-block-site-logo img { border-radius: 6px; }
.laom-header .wp-block-navigation a { text-decoration: none; }
.laom-header .wp-block-navigation-item__content { padding: 0.35rem 0.2rem; }
.laom-header .wp-block-navigation__submenu-container {
	border-radius: 16px;
	border: 0 !important;
	box-shadow: var(--wp--preset--shadow--lift);
	padding: 0.5rem !important;
	min-width: 240px !important;
}
.laom-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.55rem 0.8rem; border-radius: 10px; }
.laom-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--base); }
.laom-header .wc-block-mini-cart__button {
	background: var(--wp--preset--color--lime);
	border-radius: 999px;
	padding: 0.55rem 0.9rem;
}
.laom-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--primary); color: #fff; }
.laom-header .wp-block-search__button { border-radius: 999px; background: transparent; color: var(--wp--preset--color--primary); }

/* ------------------------------------------------------------------
   Secciones
------------------------------------------------------------------ */
.laom-hero { position: relative; overflow: hidden; }
.laom-hero::after {
	content: "";
	position: absolute;
	inset: auto -10% -35% auto;
	width: 60vw;
	height: 60vw;
	max-width: 820px;
	max-height: 820px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(125, 197, 35, 0.30), rgba(125, 197, 35, 0) 65%);
	pointer-events: none;
}
.laom-hero > * { position: relative; z-index: 1; }
.laom-hero .laom-hero-badge {
	display: inline-block;
	width: fit-content;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cinta en movimiento */
.laom-marquee { overflow: hidden; white-space: nowrap; }
.laom-marquee > .wp-block-group__inner-container,
.laom-marquee > .laom-marquee-track { display: inline-flex !important; flex-wrap: nowrap !important; gap: 3rem; animation: laom-marquee 38s linear infinite; }
.laom-marquee p { margin: 0 !important; white-space: nowrap; }
.laom-marquee:hover .laom-marquee-track { animation-play-state: paused; }
@keyframes laom-marquee { to { transform: translateX(-50%); } }

/* Tarjetas de categoría */
.laom-cat-card {
	position: relative;
	overflow: hidden;
	transition: transform 220ms var(--laom-ease), box-shadow 220ms var(--laom-ease);
}
.laom-cat-card .wp-block-image { margin: 0; }
.laom-cat-card .wp-block-image img { aspect-ratio: 1; object-fit: contain; transition: transform 380ms var(--laom-ease); }
.laom-cat-card h3 a { text-decoration: none; color: inherit; }
.laom-cat-card h3 a::after { content: ""; position: absolute; inset: 0; }
@media (hover: hover) and (pointer: fine) {
	.laom-cat-card:hover { transform: translateY(-4px); box-shadow: var(--wp--preset--shadow--lift); }
	.laom-cat-card:hover .wp-block-image img { transform: scale(1.05) rotate(-2deg); }
}

/* Números */
.laom-stat .laom-stat-number {
	display: grid;
	place-items: center;
	width: 8.5rem;
	height: 8.5rem;
	margin-inline: auto;
	border-radius: 50%;
	border: 3px solid var(--wp--preset--color--gold);
	box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.06);
}

/* Pasos */
.laom-step { border-top: 2px solid var(--wp--preset--color--primary); position: relative; padding-top: 1.75rem; }
.laom-step::before {
	content: "";
	position: absolute;
	top: -7px;
	left: 0;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
}

/* Preguntas frecuentes */
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--primary);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "";
	flex: none;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 0.95rem no-repeat;
	transition: transform 220ms var(--laom-ease);
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }

/* ------------------------------------------------------------------
   WooCommerce — tarjetas de producto
------------------------------------------------------------------ */
.wc-block-product-template .wc-block-product,
.wp-block-woocommerce-product-template .wc-block-product,
ul.wc-block-product-template > li {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--md);
	padding: 1rem 1rem 1.25rem;
	box-shadow: var(--wp--preset--shadow--soft);
	transition: transform 220ms var(--laom-ease), box-shadow 220ms var(--laom-ease);
	display: flex;
	flex-direction: column;
}
ul.wc-block-product-template > li .wp-block-button,
ul.wc-block-product-template > li .wc-block-components-product-button { margin-top: auto; }
ul.wc-block-product-template > li .wc-block-components-product-image img { transition: transform 380ms var(--laom-ease); }
@media (hover: hover) and (pointer: fine) {
	ul.wc-block-product-template > li:hover { transform: translateY(-4px); box-shadow: var(--wp--preset--shadow--lift); }
	ul.wc-block-product-template > li:hover .wc-block-components-product-image img { transform: scale(1.04); }
}
ul.wc-block-product-template .wp-block-post-title { font-size: 1.125rem; line-height: 1.25; letter-spacing: -0.01em; hyphens: auto; -webkit-hyphens: auto; }
ul.wc-block-product-template .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--primary); }
.wc-block-components-product-sale-badge,
.wc-block-components-product-sale-badge--align-right {
	background: var(--wp--preset--color--green) !important;
	color: #0B2E2A !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-weight: 700;
}
.wc-block-components-product-button .wp-block-button__link,
.wc-block-components-product-button__button { border-radius: 999px !important; }
.wc-block-components-product-price del { color: var(--wp--preset--color--muted); font-weight: 400; }

/* Producto individual */
.laom-product-gallery {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--lg);
	padding: clamp(1rem, 3vw, 2rem);
	box-shadow: var(--wp--preset--shadow--soft);
}
.laom-product-summary { border-radius: var(--wp--custom--radius--lg); }
.laom-product-summary .wp-block-woocommerce-product-price { font-family: var(--wp--preset--font-family--display); }
.laom-product-summary form.cart { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.laom-product-summary .quantity input.qty {
	height: 100%;
	min-height: 3.1rem;
	border-radius: 999px;
	border: 1px solid var(--laom-line);
	width: 5.5rem;
	text-align: center;
	font-size: 1rem;
}
.laom-product-summary .single_add_to_cart_button { flex: 1 1 auto; min-height: 3.1rem; border-radius: 999px !important; }
.laom-trust { border: 1px solid var(--laom-line); }
.laom-chips { gap: 0.5rem !important; }
.laom-chips p {
	margin: 0 !important;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	font-size: 0.8125rem;
	font-weight: 600;
}

/* Pestañas de producto */
.wp-block-woocommerce-product-details .wc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 0 1.5rem !important;
}
.wp-block-woocommerce-product-details .wc-tabs::before,
.wp-block-woocommerce-product-details .wc-tabs li::before,
.wp-block-woocommerce-product-details .wc-tabs li::after { display: none !important; }
.wp-block-woocommerce-product-details .wc-tabs li {
	border: 1px solid var(--laom-line) !important;
	border-radius: 999px !important;
	background: var(--wp--preset--color--surface) !important;
	margin: 0 !important;
	padding: 0 !important;
}
.wp-block-woocommerce-product-details .wc-tabs li a { display: block; padding: 0.6rem 1.2rem !important; text-decoration: none; font-weight: 600; }
.wp-block-woocommerce-product-details .wc-tabs li.active { background: var(--wp--preset--color--primary) !important; }
.wp-block-woocommerce-product-details .wc-tabs li.active a { color: #fff !important; }
.wp-block-woocommerce-product-details .woocommerce-Tabs-panel h2:first-child { display: none; }

/* Carrito y pago */
.wc-block-cart, .wc-block-checkout { --wc-block-radius: 16px; }
.wc-block-components-totals-wrapper, .wc-block-components-sidebar .wc-block-components-panel { border-color: var(--laom-line) !important; }
.wc-block-components-text-input input, .wc-block-components-combobox input, .wc-blocks-components-select__select {
	border-radius: 12px !important;
}

/* ------------------------------------------------------------------
   Pie de página
------------------------------------------------------------------ */
.laom-footer a { color: inherit; text-decoration: none; }
.laom-footer ul { list-style: none; padding-left: 0; }
.laom-footer li { margin-bottom: 0.5rem; }
.laom-footer a:hover { text-decoration: underline; }
.laom-footer .wp-block-navigation a { text-decoration: none; }

/* ------------------------------------------------------------------
   Movimiento al hacer scroll (estilo "Aparecer al hacer scroll")
------------------------------------------------------------------ */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.is-style-laom-reveal {
			animation: laom-reveal linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 40%;
		}
	}
}
@keyframes laom-reveal {
	from { opacity: 0; transform: translateY(28px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 1ms !important; scroll-behavior: auto !important; }
	.laom-marquee-track { animation: none !important; }
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 781px) {
	.laom-header .laom-pill-bar { border-radius: 24px; }
	.laom-announcement { font-size: 0.8125rem !important; }
	.laom-cat-card .wp-block-image img { max-height: 200px; width: auto; margin-inline: auto; }
	ul.wc-block-product-template > li { padding: 0.75rem 0.75rem 1rem; }
	ul.wc-block-product-template .wp-block-post-title { font-size: 1rem; }
	ul.wc-block-product-template .wp-block-post-terms { display: none; }
	.laom-hero .wp-block-buttons { width: 100%; }
	.laom-stat .laom-stat-number { width: 7rem; height: 7rem; }
}

/* Tablet: el menú pasa a hamburguesa antes de partirse en varias filas */
@media (max-width: 1023px) {
	.laom-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.laom-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* ------------------------------------------------------------------
   Botón flotante de WhatsApp (bloque Botones con clase laom-wa-float,
   está al final del Pie de página y se edita desde el editor)
------------------------------------------------------------------ */
.wp-block-buttons.laom-wa-float {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 90;
	margin: 0 !important;
	animation: laom-wa-in 520ms var(--laom-ease) 600ms both;
}
.laom-wa-float .wp-block-button__link {
	position: relative;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	padding: 0 !important;
	border-radius: 50% !important;
	background: #25D366 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%23fff'%3E%3Cpath d='M16.04 3C8.9 3 3.1 8.8 3.1 15.93c0 2.28.6 4.5 1.73 6.46L3 29l6.78-1.78a12.9 12.9 0 0 0 6.26 1.6h.01c7.13 0 12.93-5.8 12.94-12.93A12.93 12.93 0 0 0 16.04 3Zm0 23.65h-.01c-1.93 0-3.82-.52-5.47-1.5l-.39-.23-4.02 1.05 1.07-3.92-.25-.4a10.7 10.7 0 0 1-1.65-5.72c0-5.93 4.83-10.75 10.76-10.75a10.76 10.76 0 0 1 10.74 10.76c0 5.93-4.83 10.71-10.78 10.71Zm5.9-8.05c-.32-.16-1.91-.94-2.2-1.05-.3-.11-.51-.16-.73.16-.21.32-.83 1.05-1.02 1.27-.19.21-.38.24-.7.08-.32-.16-1.36-.5-2.59-1.6-.96-.85-1.6-1.9-1.79-2.22-.19-.32-.02-.5.14-.66.15-.14.32-.38.48-.56.16-.19.21-.32.32-.54.1-.21.05-.4-.03-.56-.08-.16-.72-1.74-.99-2.38-.26-.62-.53-.54-.73-.55h-.62c-.21 0-.56.08-.86.4-.29.32-1.12 1.1-1.12 2.68s1.15 3.11 1.31 3.32c.16.21 2.26 3.45 5.48 4.84.77.33 1.36.53 1.83.68.77.24 1.47.21 2.02.13.62-.09 1.91-.78 2.18-1.53.27-.75.27-1.4.19-1.53-.08-.13-.29-.21-.61-.37Z'/%3E%3C/svg%3E") center / 32px no-repeat !important;
	color: transparent !important;
	font-size: 0 !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	transition: transform 160ms var(--laom-ease), box-shadow 160ms var(--laom-ease);
}
.laom-wa-float .wp-block-button__link:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) {
	.laom-wa-float .wp-block-button__link:hover { transform: scale(1.06); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); }
}
@keyframes laom-wa-in {
	from { opacity: 0; transform: scale(0.9) translateY(12px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-buttons.laom-wa-float { animation: laom-wa-fade 300ms linear 300ms both; }
}
@keyframes laom-wa-fade { from { opacity: 0; } to { opacity: 1; } }
/* En el editor se ve como botón normal para poder editarlo */
.editor-styles-wrapper .wp-block-buttons.laom-wa-float { position: static; animation: none; }
