/* ==========================================================================
   Vértice Commerce 2 — core/product.css
   Mecánica de la FICHA de producto (sin estética de marca, SOLO tokens):
   layout 2 columnas, galería (principal + miniaturas con estados
   aria-current), LIGHTBOX (contrato JS), sumario, formulario de compra
   (simple y variable), meta, acordeones <details>, reseñas, sticky ATC
   (#vc-sticky-atc) y relacionados/upsells.

   Se encola SOLO con is_product() y SIEMPRE junto a core/shop.css
   (is_woocommerce() es true en la ficha): .vc-btn sobre WC core,
   ul.products/.vc-card (relacionados/upsells), breadcrumbs, notices y el
   quick view viven en shop.css; el stepper .vc-qty, en core/components.css
   (única fuente) — acá NO se repiten.

   Convenciones del motor:
   - Mobile-first; breakpoints 640 / 880 / 1100 (min-width).
   - Foco: :focus-visible + var(--focus-ring) (el anillo global vive en
     core/reset.css; acá solo se re-declara donde hace falta offset propio).
     Nunca outline:none sin reemplazo.
   - Motion SOLO dentro de @media (prefers-reduced-motion: no-preference)
     (sección final).
   - z-index SOLO vía var(--z-*). Sin !important: el CSS del core de Woo
     (woocommerce-general, que el tema conserva) se vence por especificidad
     acotada (fix woo-overrides.css:8).

   CONTRATO JS (Task 11) — LIGHTBOX (el shell lo monta el JS en <body>):
     .vc-lightbox[data-vc-lightbox][hidden]
       ├─ .vc-lightbox__counter > b (actual) — "Imagen %1$s de %2$s"
       ├─ button.vc-lightbox__close[data-vc-lightbox-close]
       ├─ button.vc-lightbox__nav.vc-lightbox__nav--prev
       ├─ figure.vc-lightbox__stage > img.vc-lightbox__img
       └─ button.vc-lightbox__nav.vc-lightbox__nav--next
     Estados: [hidden] (display:none, reset.css) + body.vc-lightbox-open
     (scroll lock). Foco atrapado con vcFocusTrap; Esc cierra. Se abre desde
     a.vc-gallery__main — el JS DEBE tolerar el placeholder <div> sin href
     (ver single-product/product-image.php: lightbox deshabilitado ahí).

   CONTRATO JS — STICKY ATC (inc/product-extras.php imprime el markup):
     #vc-sticky-atc nace con hidden + aria-hidden="true". El JS los quita y
     alterna .is-visible con IntersectionObserver sobre el CTA principal.
     Sin .is-visible la barra queda fuera de pantalla por transform
     (abajo en mobile, arriba en ≥880px). Sin JS: hidden ⇒ no existe.
   ========================================================================== */

/* ============================ 1. WRAPPER / LAYOUT ======================= */
/* content-single-product.php: div.vc-single (wc_product_class) >
   .vc-container.vc-single__inner > .vc-single__layout (galería + sumario),
   y después .vc-container.vc-single__extras. OJO: la ficha ya vive dentro
   del wrapper del shop (#primary.vc-shop > .vc-container.vc-shop__inner),
   así que estos .vc-container internos se APLANAN para no duplicar gutter
   ni re-encajonar el ancho. */
.vc-single > .vc-container {
	max-width: none;
	padding-inline: 0;
}

.vc-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-5);
	align-items: start;
}
@media (min-width: 880px) {
	.vc-single__layout {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		gap: clamp(var(--sp-6), 4vw, var(--sp-8));
	}
}

/* ============================ 2. GALERÍA ================================ */
/* single-product/product-image.php:
   .vc-single__gallery (columna, hook) > .vc-gallery.woocommerce-product-gallery
     > figure.woocommerce-product-gallery__wrapper.vc-gallery__stage
         > a.vc-gallery__main.woocommerce-product-gallery__image (o <div>
           placeholder SIN href) > img.vc-gallery__img
     > .vc-gallery__thumbs > a.vc-gallery__thumb[href][data-full][data-alt]
       (.is-active + aria-current="true" en la activa). */
.vc-single__gallery {
	position: relative;
	min-width: 0;
}

.vc-gallery { position: relative; }
.vc-gallery__stage { margin: 0; }

/* Imagen principal. La piel puede cambiar la proporción con
   --vc-gallery-aspect (default 4/5, herencia de la referencia v1). */
.vc-gallery__main {
	display: block;
	width: 100%;
	aspect-ratio: var(--vc-gallery-aspect, 4 / 5);
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--surface-2);
	border: var(--border-w) solid var(--line);
}
.vc-gallery__main img,
.vc-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* Solo el <a> real (con lightbox) invita al zoom; el placeholder <div> no. */
a.vc-gallery__main { cursor: zoom-in; }
a.vc-gallery__main:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

/* Miniaturas: <a> a la imagen completa — sin JS cada una abre la imagen
   (degradación real); con JS el motor intercepta el click y hace el swap. */
.vc-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--sp-2);
	margin-top: var(--sp-3);
}
.vc-gallery__thumb {
	display: block;
	padding: 0;
	border: var(--border-w) solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface-2);
	overflow: hidden;
	cursor: pointer;
}
.vc-gallery__thumb img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	opacity: 0.72;
}
.vc-gallery__thumb:hover img { opacity: 1; }
/* Estado activo: clase del render inicial + aria-current que mantiene el JS. */
.vc-gallery__thumb.is-active,
.vc-gallery__thumb[aria-current="true"] {
	border-color: var(--brand);
}
.vc-gallery__thumb.is-active img,
.vc-gallery__thumb[aria-current="true"] img { opacity: 1; }
.vc-gallery__thumb:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}
.vc-gallery__thumb:focus-visible img { opacity: 1; }

/* Sale flash sobre la galería (single-product/sale-flash.php imprime
   span.onsale.vc-badge--oferta.vc-single__sale vía el hook @10 antes de las
   imágenes). El core (woocommerce-general: .woocommerce span.onsale,
   0,1,2) lo posiciona con min-width/height propios; se vence con
   especificidad acotada (0,2,0+) sin !important. El look de píldora ya lo
   trae .vc-badge--oferta (core/components.css). */
.vc-single__gallery .onsale,
.vc-single__gallery .vc-single__sale {
	position: absolute;
	top: var(--sp-3);
	left: var(--sp-3);
	right: auto;
	z-index: 2;
	margin: 0;
	min-width: 0;
	min-height: 0;
	width: auto;
	height: auto;
	line-height: 1;
	border-radius: var(--radius-pill);
}

/* ============================ 3. LIGHTBOX (contrato JS) ================= */
/* Ver cabecera. Mobile-first: flechas superpuestas; en ≥640px pasa a grilla
   de 3 columnas (flecha | imagen | flecha). */
body.vc-lightbox-open { overflow: hidden; }

.vc-lightbox {
	position: fixed;
	inset: 0;
	z-index: var(--z-modal);
	display: grid;
	place-items: center;
	padding: clamp(var(--sp-5), 6vw, var(--sp-7)) var(--sp-3);
	background: color-mix(in srgb, var(--surface-inverse) 92%, transparent);
}
/* [hidden] ⇒ display:none lo garantiza core/reset.css. */

.vc-lightbox__stage {
	margin: 0;
	min-width: 0;
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
}
.vc-lightbox__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--radius-md);
	background: var(--surface);
	box-shadow: var(--shadow-3);
}

.vc-lightbox__nav,
.vc-lightbox__close {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--surface) 16%, transparent);
	color: var(--surface);
	cursor: pointer;
}
.vc-lightbox__nav svg,
.vc-lightbox__close svg { width: 22px; height: 22px; }
.vc-lightbox__nav:hover,
.vc-lightbox__close:hover {
	background: color-mix(in srgb, var(--surface) 30%, transparent);
}
.vc-lightbox__nav:focus-visible,
.vc-lightbox__close:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}
/* Excepción LOCAL al anillo global (reset.css): sobre el fondo oscuro del
   lightbox (color-mix 92% de --surface-inverse) el azul --focus-ring queda
   en ≈2–3:1, debajo del 3:1 de WCAG 1.4.11. Acá el anillo usa --surface
   (la superficie clara), que sí contrasta con la capa invertida. Va DESPUÉS
   de la regla de arriba (misma especificidad: gana por orden). */
.vc-lightbox :focus-visible {
	outline-color: var(--surface);
}
/* Mobile: flechas flotando sobre la imagen. */
.vc-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}
.vc-lightbox__nav--prev { left: var(--sp-2); }
.vc-lightbox__nav--next { right: var(--sp-2); }
.vc-lightbox__close {
	position: absolute;
	top: var(--sp-3);
	right: var(--sp-3);
}
.vc-lightbox__counter {
	position: absolute;
	top: var(--sp-4);
	left: var(--sp-4);
	font-size: var(--fs-sm);
	color: color-mix(in srgb, var(--surface) 80%, transparent);
	letter-spacing: 0.02em;
}
.vc-lightbox__counter b { color: var(--surface); font-weight: 700; }

@media (min-width: 640px) {
	.vc-lightbox {
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: clamp(var(--sp-2), 2vw, var(--sp-5));
		padding: clamp(var(--sp-5), 5vw, var(--sp-8));
	}
	.vc-lightbox__nav {
		position: static;
		transform: none;
		width: 48px;
		height: 48px;
	}
	.vc-lightbox__nav--prev { grid-column: 1; }
	.vc-lightbox__stage { grid-column: 2; }
	.vc-lightbox__nav--next { grid-column: 3; }
}

/* ============================ 4. SUMARIO ================================ */
/* content-single-product.php: .summary.entry-summary.vc-single__summary.
   El core (woocommerce-general) le pone float/width a div.product
   div.summary (0,1,3); acá se neutraliza con (0,2,1) y el grid manda. */
.vc-single .vc-single__summary {
	float: none;
	width: auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--sp-4);
}
@media (min-width: 880px) {
	.vc-single .vc-single__summary {
		position: sticky;
		top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px) + var(--sp-4));
	}
}

/* Título (single-product/title.php: h1.product_title.vc-single__title). */
.vc-single__title {
	margin: 0;
	font-size: var(--fs-h1);
	line-height: var(--lh-tight);
}

/* Rating (single-product/rating.php). Las estrellas .star-rating las pinta
   el CSS del core (fuente propia); acá solo color + alineación. */
.vc-single__rating {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	margin: 0;
}
.vc-single__rating .star-rating { color: var(--accent); font-size: 0.95rem; }
.vc-single__rating-link {
	font-size: var(--fs-sm);
	color: var(--ink-3);
	text-decoration: none;
}
.vc-single__rating-link:hover { color: var(--brand-strong); }

/* Precio (single-product/price.php: p.price.vc-single__price). El core pinta
   .woocommerce div.product p.price en su verde propio con (0,3,2): el scope
   .vc-single solo (0,2,0) PERDÍA. Se suma el selector con las clases del
   core + la del tema — (0,4,2) le gana siempre; el selector corto queda de
   respaldo para contextos sin body.woocommerce. */
.vc-single .vc-single__price,
.woocommerce div.product p.price.vc-single__price {
	margin: 0;
	font-size: var(--fs-h2);
	font-weight: 600;
	color: var(--ink);
	font-variant-numeric: lining-nums tabular-nums;
}
.vc-single .vc-single__price del,
.woocommerce div.product p.price.vc-single__price del {
	font-size: 0.6em;
	font-weight: 400;
	color: var(--ink-3);
}
.vc-single .vc-single__price ins,
.woocommerce div.product p.price.vc-single__price ins {
	text-decoration: none;
	color: var(--accent-strong);
	font-weight: inherit;
}

/* Descripción corta. */
.vc-single__excerpt {
	color: var(--ink-2);
	line-height: var(--lh-body);
}
.vc-single__excerpt p { max-width: 60ch; margin: 0 0 var(--sp-3); }
.vc-single__excerpt p:last-child { margin-bottom: 0; }
.vc-single__excerpt ul { margin: 0; padding-left: 1.2rem; }
.vc-single__excerpt li + li { margin-top: var(--sp-1); }

/* Disponibilidad (wc_get_stock_html imprime p.stock). Estados con tokens de
   feedback; el core lo pinta con sus verdes/rojos propios vía
   .woocommerce div.product .stock(.in-stock) — hasta (0,4,1): el scope
   .vc-single solo (0,3,1) PERDÍA los colores. Se suman selectores con las
   clases del core ((0,3,2) base / (0,5,2) estados); el corto queda de
   respaldo para contextos sin body.woocommerce. */
.vc-single p.stock,
.woocommerce div.product.vc-single p.stock {
	margin: 0;
	font-size: var(--fs-sm);
	font-weight: 500;
}
.vc-single p.stock.in-stock,
.woocommerce div.product.vc-single p.stock.in-stock { color: var(--ok); }
.vc-single p.stock.out-of-stock,
.woocommerce div.product.vc-single p.stock.out-of-stock { color: var(--error); }
.vc-single p.stock.available-on-backorder,
.woocommerce div.product.vc-single p.stock.available-on-backorder { color: var(--warn); }

/* ============================ 5. FORM DE COMPRA ========================= */
/* add-to-cart/simple.php y variation-add-to-cart-button.php: fila
   .vc-single__cart-row = stepper .vc-qty + button.single_add_to_cart_button
   (ya con clases vc-btn vc-btn--primary vc-btn--lg → components.css). */
.vc-single__cart { margin: 0; }
.vc-single__cart-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--sp-3);
}
.vc-single__cart-row .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: min(100%, 12rem);
}
/* El stepper acompaña la altura del CTA --lg (52px). El float/margin que el
   core le pone a form.cart div.quantity (0,3,3) es inocuo dentro del flex
   (float no aplica a flex items); el margin sí se neutraliza (0,4,1). */
.vc-single .vc-single__cart .vc-single__cart-row .quantity {
	float: none;
	margin: 0;
}
.vc-single__cart-row .vc-qty__btn { min-height: 52px; }
.vc-single__cart-row .vc-qty .qty { min-height: 52px; }

/* ============================ 6. VARIACIONES ============================ */
/* add-to-cart/variable.php: table.variations.vc-variations con filas
   th.label.vc-variations__label / td.value.vc-variations__value (select
   nativo de wc_dropdown_variation_attribute_options + a.reset_variations). */
.vc-single__cart--variable { display: block; }

.vc-variations {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 var(--sp-3);
	border: 0;
}
/* La tabla se re-fluye como bloques apilados: etiqueta arriba del control. */
.vc-variations .vc-variations__row,
.vc-variations .vc-variations__label,
.vc-variations .vc-variations__value {
	display: block;
	padding: 0;
	border: 0;
	text-align: left;
}
.vc-variations .vc-variations__row { margin-bottom: var(--sp-3); }
.vc-variations .vc-variations__label {
	margin-bottom: var(--sp-1);
	font-size: var(--fs-sm);
	font-weight: 500;
	color: var(--ink-2);
}
.vc-variations .vc-variations__label label { margin: 0; }
.vc-variations .vc-variations__value {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sp-2) var(--sp-3);
}
/* Select nativo (sin clase vc-): receta de .vc-input con tokens. El core
   fija min-width:75% con .woocommerce div.product form.cart .variations
   select (0,4,3): la cadena del tema sin las clases del core quedaba en
   (0,4,1) y PERDÍA (el flex 1 1 12rem no gobernaba el ancho). Con form.cart
   en el selector queda (0,5,2) y gana sin !important. */
.vc-single form.cart.vc-single__cart .vc-variations .vc-variations__value select {
	flex: 1 1 12rem;
	min-width: 0;
	width: auto;
	padding: var(--sp-2) var(--sp-3);
	font: inherit;
	font-size: var(--fs-sm);
	color: var(--ink);
	background: var(--surface);
	border: var(--border-w) solid var(--line);
	border-radius: var(--radius-md);
}
.vc-single form.cart.vc-single__cart .vc-variations .vc-variations__value select:focus-visible {
	border-color: var(--brand);
}
.vc-variations__reset {
	font-size: var(--fs-sm);
	color: var(--ink-3);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.vc-variations__reset:hover { color: var(--accent-strong); }

/* Datos de la variación elegida (los llena wc-add-to-cart-variation en
   div.woocommerce-variation.single_variation). */
.vc-single__variation-wrap { display: block; }
.vc-single .single_variation .woocommerce-variation-description p {
	margin: 0 0 var(--sp-2);
	font-size: var(--fs-sm);
	color: var(--ink-2);
}
.vc-single .single_variation .woocommerce-variation-price .price {
	font-size: var(--fs-h3);
	font-weight: 600;
	color: var(--ink);
	font-variant-numeric: lining-nums tabular-nums;
}
.vc-single .single_variation .woocommerce-variation-availability .stock {
	margin-top: var(--sp-1);
}
.vc-single__variation-cart { margin-top: var(--sp-3); }
.vc-single__variations-empty { color: var(--error); font-weight: 500; }

/* ============================ 7. META =================================== */
/* single-product/meta.php: .product_meta.vc-single__meta con spans
   .vc-single__meta-row (.sku_wrapper/.posted_in/.tagged_as del core). */
.vc-single__meta {
	margin: 0;
	padding-top: var(--sp-4);
	border-top: var(--border-w) solid var(--line);
	display: flex;
	flex-direction: column;
	gap: var(--sp-1);
	font-size: var(--fs-sm);
	color: var(--ink-2);
}
.vc-single__meta-label { font-weight: 500; color: var(--ink-3); }
.vc-single__meta-row a { color: var(--brand-strong); text-decoration: none; }
.vc-single__meta-row a:hover { color: var(--brand); text-decoration: underline; }

/* ============================ 8. EXTRAS / ACORDEONES ==================== */
/* content-single-product.php: .vc-single__extras (aplanado en §1) recibe
   los acordeones + upsells + relacionados. inc/product-extras.php:
   section.vc-accordions > details.vc-accordion#tab-{key} >
   summary.vc-accordion__summary (.vc-accordion__title + __marker) +
   .vc-accordion__panel. <details> nativo: accesible y operable sin JS. */
.vc-single__extras { margin-top: clamp(var(--sp-6), 6vw, var(--sp-8)); }

.vc-accordions {
	border-top: var(--border-w) solid var(--line);
}
.vc-accordion {
	border-bottom: var(--border-w) solid var(--line);
}
.vc-accordion__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	padding: var(--sp-4) var(--sp-1);
	cursor: pointer;
	list-style: none; /* saca el marker nativo (Firefox) */
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 600;
	color: var(--ink);
}
/* Marker nativo de WebKit. */
.vc-accordion__summary::-webkit-details-marker { display: none; }
.vc-accordion__summary:hover { color: var(--brand-strong); }
.vc-accordion__summary:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}
.vc-accordion__title { min-width: 0; }
.vc-accordion__marker {
	flex: none;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--radius-pill);
	background: var(--surface-2);
	color: var(--ink-2);
}
.vc-accordion__marker svg { width: 18px; height: 18px; }
.vc-accordion[open] > .vc-accordion__summary .vc-accordion__marker {
	transform: rotate(180deg);
	background: var(--brand-soft);
	color: var(--brand-strong);
}

.vc-accordion__panel {
	padding: 0 var(--sp-1) var(--sp-5);
	color: var(--ink-2);
	line-height: var(--lh-body);
}
.vc-accordion__panel > :first-child { margin-top: 0; }
.vc-accordion__panel p { max-width: 70ch; margin: 0 0 var(--sp-3); }
.vc-accordion__panel p:last-child { margin-bottom: 0; }
.vc-accordion__panel h2,
.vc-accordion__panel h3 {
	font-size: var(--fs-h3);
	margin: var(--sp-4) 0 var(--sp-2);
}

/* Tabla de atributos (tab "Información adicional" del core). El core pinta
   bordes/fondos en table.shop_attributes (0,1,2): se vence con (0,2,1)+. */
.vc-accordion__panel .shop_attributes,
.vc-accordion__panel .woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
	border: 0;
	font-size: var(--fs-sm);
}
.vc-accordion__panel .shop_attributes th,
.vc-accordion__panel .shop_attributes td {
	padding: var(--sp-3) var(--sp-3);
	border: 0;
	border-bottom: var(--border-w) solid var(--line);
	text-align: left;
	vertical-align: top;
	background: transparent;
	font-style: normal;
}
.vc-accordion__panel .shop_attributes th {
	width: 32%;
	font-weight: 500;
	color: var(--ink);
	background: var(--surface-2);
}
.vc-accordion__panel .shop_attributes td p { margin: 0; max-width: none; }

/* ============================ 9. RESEÑAS ================================ */
/* El callback del core (comments_template) imprime #reviews.woocommerce-Reviews
   dentro del panel del acordeón (id tab-reviews conservado para el ancla del
   rating). El form usa .comment-respond, que ya estila core/layout.css. */
.vc-accordion__panel #reviews .woocommerce-Reviews-title {
	font-size: var(--fs-body);
	font-weight: 600;
	margin: 0 0 var(--sp-4);
}
.vc-accordion__panel #reviews .commentlist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--sp-4);
}
.vc-accordion__panel #reviews .comment_container {
	display: flex;
	gap: var(--sp-3);
	align-items: flex-start;
}
.vc-accordion__panel #reviews .comment_container .avatar {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-pill);
	/* Neutraliza el marco flotado que el core le pone al avatar (0,1,3). */
	float: none;
	position: static;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}
.vc-accordion__panel #reviews .comment-text {
	flex: 1;
	min-width: 0;
	margin: 0; /* el core le deja margin-left para el avatar flotado */
	padding: var(--sp-4);
	border: var(--border-w) solid var(--line);
	border-radius: var(--radius-lg);
	background: var(--surface-raised);
}
.vc-accordion__panel #reviews .comment-text .meta {
	margin: 0 0 var(--sp-1);
	font-size: var(--fs-xs);
	color: var(--ink-3);
}
.vc-accordion__panel #reviews .comment-text .description p {
	margin: 0 0 var(--sp-2);
	max-width: none;
}
.vc-accordion__panel #reviews .comment-text .description p:last-child { margin-bottom: 0; }
.vc-accordion__panel #reviews .star-rating {
	color: var(--accent);
	float: none;
	margin-bottom: var(--sp-1);
}
.vc-accordion__panel #review_form_wrapper { margin-top: var(--sp-5); }
/* Selector de estrellas del form (p.stars del core). */
.vc-accordion__panel #reviews p.stars a { color: var(--accent); }
.vc-accordion__panel #reviews .comment-form-rating > label {
	display: block;
	font-size: var(--fs-sm);
	font-weight: 500;
	color: var(--ink-2);
	margin-bottom: var(--sp-1);
}

/* ============================ 10. RELACIONADOS / UPSELLS ================ */
/* related.php / up-sells.php: section.vc-related|.vc-upsells (.vc-section da
   el respiro vertical; título .vc-section__title — ambos en core/layout.css).
   La grilla ul.products + .vc-card la resuelve core/shop.css (incluida la
   anulación del clearfix del core). Acá solo el encadenado de secciones. */
.vc-related,
.vc-upsells { padding-bottom: 0; }
.vc-upsells + .vc-related { padding-top: 0; }

/* ============================ 11. STICKY ADD-TO-CART ==================== */
/* inc/product-extras.php: #vc-sticky-atc.vc-sticky-atc[hidden] >
   .vc-container.vc-sticky-atc__inner > __info (__name + __price) +
   __actions (input#vc-sticky-qty.vc-sticky-atc__qty? + button __btn).
   Estados: ver contrato en la cabecera. Mobile: barra inferior; ≥880px:
   barra superior. Mismo --z-nav que el header: al vivir al final del <body>
   pinta por encima sin inventar capas nuevas. */
.vc-sticky-atc {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: var(--z-nav);
	background: var(--surface-raised);
	border-top: var(--border-w) solid var(--line);
	box-shadow: var(--shadow-2);
	padding-block: var(--sp-2);
	transform: translateY(102%);
}
.vc-sticky-atc.is-visible { transform: none; }

.vc-sticky-atc__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-3);
}
.vc-sticky-atc__info {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}
.vc-sticky-atc__name {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: var(--fs-sm);
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.vc-sticky-atc__price {
	font-size: var(--fs-sm);
	color: var(--ink-2);
	font-variant-numeric: lining-nums tabular-nums;
}
.vc-sticky-atc__price del { color: var(--ink-3); }
.vc-sticky-atc__price ins { text-decoration: none; color: var(--accent-strong); }

.vc-sticky-atc__actions {
	display: flex;
	align-items: stretch;
	gap: var(--sp-2);
	flex: none;
}
.vc-sticky-atc__qty {
	width: 4.25rem;
	min-height: 44px;
	padding: 0 var(--sp-2);
	text-align: center;
	font: inherit;
	color: var(--ink);
	background: var(--surface);
	border: var(--border-w) solid var(--line);
	border-radius: var(--radius-md);
}
.vc-sticky-atc__qty:focus-visible { border-color: var(--brand); }
.vc-sticky-atc__btn { flex: none; }

@media (min-width: 880px) {
	.vc-sticky-atc {
		/* Offset de la admin bar (mismo patrón que el resto de los sticky
		   del motor): sin él, la barra quedaba tapada por los 32px de la
		   admin bar de un usuario logueado. El translateY resta también el
		   offset para que la barra oculta quede 100% fuera de pantalla. */
		top: var(--wp-admin--admin-bar--height, 0px);
		bottom: auto;
		border-top: 0;
		border-bottom: var(--border-w) solid var(--line);
		transform: translateY(calc(-102% - var(--wp-admin--admin-bar--height, 0px)));
	}
	.vc-sticky-atc.is-visible { transform: none; }
	.vc-sticky-atc__name { font-size: var(--fs-body); }
}

/* ============================ 12. MOTION ================================ */
/* Todas las transiciones/animaciones de esta hoja viven acá: con
   prefers-reduced-motion: reduce, nada se mueve (bloque global del motor). */
@media (prefers-reduced-motion: no-preference) {
	.vc-gallery__thumb { transition: border-color var(--tr) var(--ease-out); }
	.vc-gallery__thumb img { transition: opacity var(--tr) var(--ease-out); }
	.vc-gallery__main img { transition: opacity var(--tr) var(--ease-out); }
	.vc-lightbox { animation: vc-lb-in var(--tr) var(--ease-out) both; }
	.vc-lightbox__nav,
	.vc-lightbox__close { transition: background var(--tr) var(--ease-out); }
	.vc-accordion__summary { transition: color var(--tr) var(--ease-out); }
	.vc-accordion__marker {
		transition:
			transform var(--tr) var(--ease-out),
			background var(--tr) var(--ease-out),
			color var(--tr) var(--ease-out);
	}
	.vc-sticky-atc { transition: transform var(--tr-slow) var(--ease-out); }
	.vc-single__rating-link,
	.vc-variations__reset { transition: color var(--tr) var(--ease-out); }
}
@keyframes vc-lb-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
