/* ELEVANNIA · Tienda · Versión 2 (v1.1.0)
   Solo se carga con body.elv-v2. Portada compacta a todo el ancho, banda de kits, tarjeta única, filtros por línea y momento.
   Los !important solo pisan márgenes/anchos del diseño en bloques de WordPress y los botones que el tema pinta en línea. */

body.elv-v2 {
	--elv-pad: clamp(16px, 3vw, 40px);
	--elv-ancho: min(1360px, calc(100vw - 2 * var(--elv-pad)));
	overflow-x: clip;
}

/* ---------- Portada compacta a todo el ancho ---------- */
body.elv-v2 .elv-th {
	width: 100vw; max-width: none !important; margin: 0 0 clamp(28px, 4vw, 44px) !important; margin-inline: calc(50% - 50vw) !important;
	padding: clamp(26px, 3.4vw, 46px) 0; border-radius: 0 0 28px 96px;
}
body.elv-v2 .elv-th::before { right: -120px; top: -140px; width: 420px; height: 420px; }
body.elv-v2 .elv-th::after { right: -50px; top: -80px; width: 300px; height: 300px; }
body.elv-v2 .elv-th__in {
	width: var(--elv-ancho); margin-inline: auto; display: grid; align-items: center;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px clamp(32px, 5vw, 72px);
}
body.elv-v2 .elv-th__titulo { max-width: none; font-size: clamp(2rem, 1.1rem + 2.8vw, 3.2rem); }
body.elv-v2 .elv-th__texto { margin-top: 12px; font-size: 1.05rem; }
body.elv-v2 .elv-th__confianza {
	display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 20px 0 0; padding: 0; list-style: none;
	font: 700 .86rem/1.3 'Karla', system-ui, sans-serif; color: var(--th-bruma);
}
body.elv-v2 .elv-th__confianza li { display: inline-flex; align-items: center; gap: 8px; }
body.elv-v2 .elv-th__confianza li::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--th-oroh); flex: none;
}
body.elv-v2 .elv-th__filtros { display: grid; gap: 18px; }
body.elv-v2 .elv-th__etiqueta {
	margin: 0 0 8px; font: 700 .78rem/1.2 'Karla', system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--th-oroh);
}
body.elv-v2 .elv-th__lineas { margin-top: 0; }
body.elv-v2.elv-tienda .elv-th__linea { min-height: 44px; padding: 0 18px; font-size: .95rem; }
body.elv-v2.elv-tienda .elv-th__momento { border-color: rgba(224, 188, 76, .45); }
@media (max-width: 899px) {
	body.elv-v2 .elv-th { border-radius: 0 0 24px 56px; padding: 26px 0 30px; }
	body.elv-v2 .elv-th__in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	body.elv-v2 .elv-th__confianza { gap: 6px 16px; margin-top: 14px; font-size: .8rem; }
	/* En celular los filtros se envuelven en varias líneas (nunca una fila recortada: todos quedan visibles) */
	body.elv-v2.elv-tienda .elv-th__linea { min-height: 44px; padding: 0 14px; font-size: .9rem; }
	body.elv-v2 .elv-th__filtros { gap: 14px; }
}

/* Anchos: la rejilla, la banda de kits y la barra de resultados usan el mismo ancho de la portada */
body.elv-v2 main > .alignwide,
body.elv-v2 main > .elv-kits,
body.elv-v2 main > .elv-v2-titulo-rejilla,
body.elv-v2 ul.wc-block-product-template {
	width: var(--elv-ancho); max-width: none !important; margin-inline: calc(50% - var(--elv-ancho) / 2) !important; box-sizing: border-box;
}

/* ---------- Banda «Empieza por tu kit» ---------- */
body.elv-v2 .elv-kits { margin-top: 0; margin-bottom: clamp(36px, 5vw, 60px) !important; }
body.elv-v2 .elv-kits__cab { margin-bottom: 20px; }
body.elv-v2 .elv-kits__titulo,
body.elv-v2 .elv-v2-titulo-rejilla {
	margin: 0; color: var(--th-noche); font: 400 clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem)/1.1 'Fraunces', Georgia, serif; letter-spacing: -.01em; text-wrap: balance;
}
body.elv-v2 .elv-kits__titulo em,
body.elv-v2 .elv-v2-titulo-rejilla em { font-style: italic; color: #8F7012; }
body.elv-v2 .elv-kits__texto { margin: 8px 0 0; max-width: 60ch; color: #3A5248; font: 400 1.02rem/1.55 'Karla', system-ui, sans-serif; }
body.elv-v2 .elv-kits__rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
body.elv-v2 .elv-kit {
	position: relative; display: flex; flex-direction: column; overflow: hidden; color: var(--th-crema);
	background: linear-gradient(180deg, var(--th-panel), var(--th-noche)); border: 1px solid var(--th-linea); border-radius: 22px 22px 56px 22px;
	transition: transform 250ms var(--th-ease), box-shadow 250ms var(--th-ease);
}
body.elv-v2 .elv-kit:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(7, 20, 16, .28); }
body.elv-v2 .elv-kit--cenit { border: 1.5px solid var(--th-oro); box-shadow: 0 0 0 1px rgba(224, 188, 76, .3), 0 16px 38px rgba(7, 20, 16, .32); }
body.elv-v2 .elv-kit__etiqueta {
	position: absolute; top: 14px; right: 14px; z-index: 2; margin: 0; padding: 6px 14px; border-radius: 999px;
	background: linear-gradient(135deg, var(--th-oroh), var(--th-oro)); color: var(--th-noche);
	font: 700 .75rem/1.2 'Karla', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase;
}
body.elv-v2 .elv-kit__img {
	display: grid; place-items: center; height: clamp(112px, 10vw, 140px); margin-top: 8px; background: radial-gradient(70% 90% at 50% 40%, #14482F 0%, transparent 70%);
}
body.elv-v2 .elv-kit__img img { width: auto; height: 100%; max-width: 60%; object-fit: contain; mix-blend-mode: lighten; }
body.elv-v2 .elv-kit__cuerpo { display: flex; flex-direction: column; flex: 1; padding: 6px clamp(18px, 2vw, 26px) clamp(20px, 2vw, 26px); }
body.elv-v2 .elv-kit__nombre { margin: 0; color: var(--th-crema); font: 500 clamp(1.35rem, 1.1rem + .8vw, 1.7rem)/1.15 'Fraunces', Georgia, serif; }
body.elv-v2 .elv-kit__sub { margin: 4px 0 0; color: var(--th-oroh); font: italic 400 1rem/1.35 'Fraunces', Georgia, serif; }
body.elv-v2 .elv-kit__para { margin: 12px 0 18px; color: var(--th-bruma); font: 400 .98rem/1.5 'Karla', system-ui, sans-serif; }
body.elv-v2 .elv-kit__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: auto; }
body.elv-v2 .elv-kit__precio { color: var(--th-crema); font: 700 1.35rem/1 'Karla', system-ui, sans-serif; }
body.elv-v2 .elv-kit__precio * { color: inherit; text-decoration: none; }
body.elv-v2 a.elv-kit__boton {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 999px; text-decoration: none;
	background: linear-gradient(135deg, var(--th-oroh), var(--th-oro)); color: var(--th-noche); font: 700 .98rem/1 'Karla', system-ui, sans-serif;
	transition: transform 220ms var(--th-ease), box-shadow 220ms var(--th-ease);
}
body.elv-v2 a.elv-kit__boton:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(224, 188, 76, .45); }
body.elv-v2 a.elv-kit__boton:focus-visible { outline: 3px solid var(--th-oroh); outline-offset: 3px; }
@media (max-width: 899px) {
	body.elv-v2 .elv-kits__rejilla { grid-template-columns: minmax(0, 1fr); }
	body.elv-v2 .elv-kit { display: grid; grid-template-columns: 112px minmax(0, 1fr); border-radius: 22px 22px 40px 22px; }
	body.elv-v2 .elv-kit__img { height: auto; min-height: 112px; }
	body.elv-v2 .elv-kit__img img { height: 88px; max-width: 88%; }
	body.elv-v2 .elv-kit__cuerpo { padding: 16px 16px 18px 4px; }
	body.elv-v2 .elv-kit__etiqueta { top: 10px; right: 10px; font-size: .75rem; padding: 5px 10px; }
	body.elv-v2 .elv-kit--cenit .elv-kit__nombre { padding-right: 0; margin-top: 22px; }
}
body.elv-v2 .elv-v2-titulo-rejilla { margin-bottom: 14px !important; }

/* ---------- Barra de resultados y orden ---------- */
body.elv-v2 main > .alignwide { margin-bottom: 18px; font-size: .95rem; }

/* ---------- Rejilla: 5 columnas en escritorio ancho, 4, 3, 2 ---------- */
body.elv-v2.elv-tienda ul.wc-block-product-template {
	grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: clamp(14px, 1.6vw, 22px) !important; padding: 0; list-style: none;
}
@media (max-width: 1279px) { body.elv-v2.elv-tienda ul.wc-block-product-template { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 999px) { body.elv-v2.elv-tienda ul.wc-block-product-template { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 699px) { body.elv-v2.elv-tienda ul.wc-block-product-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; } }

/* ---------- Tarjeta única (Skin Care, Suplementos y Kits con el mismo diseño) ---------- */
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] {
	display: flex; flex-direction: column; padding: 0 0 16px; overflow: hidden; text-align: center;
	background: linear-gradient(180deg, var(--th-panel), var(--th-noche2)); border: 1px solid var(--th-linea); border-radius: 22px 22px 56px 22px; color: var(--th-crema);
}
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"]:hover { box-shadow: 0 18px 40px rgba(7, 20, 16, .3); }
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-image { margin: 0 0 14px; }
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-image img {
	aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%; border-radius: 22px 22px 0 0;
}
/* Etiqueta de línea: más grande y con color por línea */
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-post-title::before { font-size: .75rem; letter-spacing: .16em; }
body.elv-v2.elv-tienda .wc-block-product-template li.product_cat-skin-care.wc-block-product .wp-block-post-title::before { color: var(--th-esml); }
/* Título, descriptor y precio */
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-post-title { margin: 0 14px 4px; font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; line-height: 1.2; }
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-post-title a { color: var(--th-crema); letter-spacing: 0; text-decoration: none; }
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product .elv-desc {
	margin: 0 14px 12px; color: var(--th-bruma); font: 400 .9rem/1.4 'Karla', system-ui, sans-serif; text-wrap: balance;
}
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-woocommerce-product-price { margin: auto 14px 12px !important; }
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-price,
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-price * { color: var(--th-crema); font-size: 1.1rem; font-weight: 700; }
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-button { margin-top: 0 !important; }
/* Botón dorado en todas las tarjetas */
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-button .wp-block-button__link,
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-button .wp-block-button__link:is(:focus, :active, .added, .loading) {
	background: linear-gradient(135deg, var(--th-oroh), var(--th-oro)) !important; color: var(--th-noche) !important; -webkit-text-fill-color: var(--th-noche) !important;
	border: 0 !important; min-height: 44px; font-size: .92rem;
}
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-button .wp-block-button__link:hover {
	background: linear-gradient(135deg, #F7DD7C, #E5BF3F) !important; color: var(--th-noche) !important; -webkit-text-fill-color: var(--th-noche) !important;
	transform: translateY(-3px) scale(1.03); box-shadow: 0 0 0 3px rgba(224, 188, 76, .28), 0 10px 26px rgba(224, 188, 76, .5) !important;
}
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] a.added_to_cart { color: var(--th-oroh) !important; -webkit-text-fill-color: var(--th-oroh) !important; }

/* Kits dentro de la página «Kits»: la misma tarjeta, con borde dorado */
body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product.product_cat-kits { border: 1.5px solid var(--th-oro); }

@media (max-width: 699px) {
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] { border-radius: 18px 18px 40px 18px; }
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-post-title { font-size: 1rem; margin: 0 10px 4px; }
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product .elv-desc { font-size: .82rem; margin: 0 10px 10px; }
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-woocommerce-product-price { margin: auto 10px 10px !important; }
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-price,
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wc-block-components-product-price * { font-size: 1rem; }
	body.elv-v2.elv-tienda .wc-block-product-template li.wc-block-product[class*="product_cat-"] .wp-block-button .wp-block-button__link { padding: 0 12px; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
	body.elv-v2 .elv-kit, body.elv-v2 .elv-kit:hover, body.elv-v2 a.elv-kit__boton:hover { transition: none; transform: none; }
}
