/* Alsina Commerce — componente de precio.
 * Jerarquía: 1) precio más conveniente (transferencia), 2) cuota, 3) beneficios, 4) precio de lista.
 * Los colores e imagen de fondo se ajustan con las variables de :root.
 */
:root {
	--ac-primary: #663399;
	--ac-dark: #32055F;
	--ac-accent: #DDFF00;
	--ac-text: #232323;
	--ac-muted: #6b6b6b;
	--ac-border: #E8E2ED;
	--ac-radius: 14px;
	--ac-font: Montserrat, Arial, sans-serif;
	--ac-hero-img: url("/wp-content/uploads/2026/08/fondo-promo.jpg");
}

.ac-price { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; clear: both; font-family: var(--ac-font); color: var(--ac-text); }
.ac-price > * { margin: 0; box-sizing: border-box; }
.ac-card { border-radius: var(--ac-radius); overflow: hidden; }

/* Estado: pastilla arriba de todo */
.ac-state { align-self: center; padding: 8px 22px; border-radius: 999px; background: var(--ac-dark); color: var(--ac-accent); font-size: .85em; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; text-align: center; }
.ac-state--onbackorder { background: var(--ac-primary); color: #fff; }
.ac-state--outofstock { background: #e9e6ec; color: #555; }
.ac-state.ac-state--styled { background: var(--ac-badge-bg); color: var(--ac-badge-color); }


/* Precio principal cuando no hay precio por transferencia */
.ac-price__main { font-size: 2em; font-weight: 800; line-height: 1.1; color: var(--ac-dark); text-align: center; }
.ac-price__main .woocommerce-Price-amount { font-weight: inherit; color: inherit; }

/* Protagonista: precio por transferencia */
.ac-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 18px; text-align: center; border: 2px solid var(--ac-primary); background: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .5)), var(--ac-hero-img) center top / cover no-repeat, var(--ac-accent); }
.ac-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; background: var(--ac-dark); color: var(--ac-accent); font-size: .8em; font-weight: 700; }
.ac-pill b { font-size: 1.5em; font-weight: 800; }
.ac-hero__amount { font-size: 2.7em; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--ac-dark); }
.ac-hero__amount .woocommerce-Price-amount { font-weight: inherit; color: inherit; }
.ac-hero__from { font-size: .4em; font-weight: 600; }
.ac-hero__label { font-size: .9em; font-weight: 600; color: var(--ac-text); }

.ac-price__store { font-size: .85em; text-align: center; }

/* Badge */
.ac-badge--raw { display: flex; flex-direction: column; align-items: center; }
.ac-badge--styled { display: inline-flex; align-self: center; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; font-size: .88em; font-weight: 600; line-height: 1.25; background: var(--ac-badge-bg, #fff); color: var(--ac-badge-color, var(--ac-dark)); }
.ac-badge__img { height: 36px; width: auto; object-fit: contain; }

/* Panel único: cuotas y envío, siempre en una columna. */
.ac-panel { display: grid; grid-template-columns: 1fr; border: 1px solid var(--ac-border); background: #fff; }
.ac-panel__sec + .ac-panel__sec { border-top: 1px solid var(--ac-border); }

/* Cuotas */
.ac-inst { display: flex; flex-direction: column; }
.ac-inst__head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 12px; background: var(--ac-accent); text-align: center; }
.ac-inst__title { font-size: 1.1em; font-weight: 800; line-height: 1.15; text-transform: uppercase; letter-spacing: -.01em; color: var(--ac-dark); }
.ac-inst__logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ac-inst__logos img { display: block; height: 20px; width: 28px; padding: 0 4px; border-radius: 4px; background: #FAFAFA; box-sizing: border-box; object-fit: contain; }
.ac-inst__body { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; padding: 14px 16px 10px; }
.ac-inst__of { font-size: .85em; font-weight: 600; color: var(--ac-primary); }
.ac-inst__amount { font-size: 2.3em; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--ac-dark); }
.ac-inst__amount .woocommerce-Price-amount { font-weight: inherit; color: inherit; }
.ac-inst__more { margin: 0 16px; padding: 8px 0 10px; border-top: 1px solid var(--ac-border); text-align: center; }
.ac-inst__more summary { cursor: pointer; list-style: none; color: var(--ac-primary); font-size: .8em; font-weight: 700; }
.ac-inst__more summary::-webkit-details-marker { display: none; }
.ac-inst__more summary::after { content: " +"; }
.ac-inst__more[open] summary::after { content: " −"; }
.ac-inst__more ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: .82em; }
.ac-inst__more li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--ac-border); text-align: left; }
.ac-inst__total { color: var(--ac-muted); white-space: nowrap; }
.ac-inst__note { margin: 0; padding: 0 16px 12px; font-size: .72em; color: var(--ac-muted); text-align: center; }
.ac-inst__note a { color: var(--ac-primary); text-decoration: underline; }
.ac-inst--hero .ac-inst__amount { font-size: 2.7em; }
.ac-panel:has(.ac-inst--hero) { border: 2px solid var(--ac-primary); }

/* Envío gratis: dos bloques */
.ac-ship { display: flex; align-items: stretch; min-height: 64px; }
.ac-ship__tag { flex: 0 0 34%; display: flex; align-items: center; justify-content: center; padding: 12px 8px; background: var(--ac-accent); color: var(--ac-dark); font-size: .95em; font-weight: 800; line-height: 1.05; text-transform: uppercase; text-align: center; }
.ac-ship__text { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 14px; font-size: .82em; line-height: 1.4; color: #555; text-align: center; }

/* Pago dividido: línea informativa en la ficha */
.ac-split-line { font-size: .82em; line-height: 1.35; color: var(--ac-dark); text-align: center; }
.ac-split-line strong { font-weight: 800; }

/* Ahorro */
.ac-hero__save { font-size: .88em; color: var(--ac-dark); }
.ac-hero__save strong { font-weight: 800; }

/* Líneas finas: precio de lista y sin impuestos, una por renglón */
.ac-lines { display: flex; flex-direction: column; gap: 2px; font-size: .78em; color: #9c9c9c; text-align: center; }
.ac-line .woocommerce-Price-amount { color: #8a8a8a; font-weight: 500; }

/* Listado: compacto */
.ac-price--compact { gap: 8px; font-size: 13px; }
.ac-price--compact .ac-state { align-self: stretch; padding: 6px 10px; font-size: .78em; }
.ac-price--compact .ac-hero { padding: 12px 8px; gap: 6px; }
.ac-price--compact .ac-pill { font-size: .75em; padding: 5px 10px; }
.ac-price--compact .ac-hero__amount { font-size: 1.9em; }
.ac-price--compact .ac-hero__save { display: none; }
.ac-price--compact .ac-hero__label { font-size: .78em; }
.ac-price--compact .ac-price__main { font-size: 1.5em; }
.ac-inst-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: 5px; row-gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--ac-accent); color: var(--ac-dark); line-height: 1.2; text-align: center; }
.ac-inst-line__big { font-size: 1em; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.ac-inst-line__rest { font-size: .85em; font-weight: 500; white-space: nowrap; }
.ac-inst-line__rest .woocommerce-Price-amount { font-weight: 700; color: inherit; }
@media (max-width: 480px) {
	.ac-inst-line { font-size: .92em; padding: 7px 6px; }
	.ac-inst-line__big { white-space: normal; }
}
.ac-price--compact .ac-badge--raw img { max-height: 28px; }
.ac-price--compact .ac-lines { font-size: .82em; line-height: 1.35; }
.ac-price--compact .ac-hero__label { line-height: 1.3; }
.ac-price--compact > * { min-width: 0; }

/* Listado: el precio ocupa todo el ancho de la tarjeta (Elementor lo muestra como inline-block) */
.ac-storefront ul.products li.product .price:has(> .ac-price) { display: block; width: 100%; }

/* Listado: logo de marca arriba y todo en una columna (el #48 flota el logo a la izquierda) */
.ac-storefront ul.products li.product .product-brand-logo { float: none; display: block; width: 100%; margin: 0 0 8px; }
.ac-storefront ul.products li.product .product-brand-logo img { margin: 0 !important; max-height: 40px !important; }
.ac-storefront ul.products li.product .astra-shop-summary-wrap:has(> .product-brand-logo) > .product-brand-logo { order: -1; }

/* Listado: tarjetas de igual altura, botón al pie (solo con el módulo activo) */
.ac-storefront ul.products li.product { display: flex; flex-direction: column; }
.ac-storefront ul.products li.product .astra-shop-summary-wrap { display: flex; flex-direction: column; flex: 1; }
.ac-storefront ul.products li.product .button { margin-top: auto; align-self: flex-start; }

/* Barra fija en celular */
.ac-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--ac-border); box-shadow: 0 -6px 18px rgba(50, 5, 95, .08); font-family: var(--ac-font); }
.ac-sticky[hidden] { display: none; }
.ac-sticky__price { display: flex; flex-direction: column; line-height: 1.1; }
.ac-sticky__label { font-size: 11px; font-weight: 600; color: var(--ac-primary); }
.ac-sticky__amount { font-size: 20px; font-weight: 800; color: var(--ac-dark); }
.ac-sticky__btn { flex: 0 0 auto; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--ac-dark); color: var(--ac-accent); font-weight: 800; font-size: 14px; letter-spacing: .03em; cursor: pointer; }
@media (min-width: 768px) { .ac-sticky { display: none !important; } }

/* Avisame */
.ac-notify { margin: 12px 0; padding: 16px; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); background: #fff; font-family: var(--ac-font); }
.ac-notify__title { margin: 0 0 8px; font-weight: 800; color: var(--ac-dark); }
.ac-notify__channels { border: 0; margin: 0 0 8px; padding: 0; }
.ac-notify__channels legend { font-size: .9em; margin-bottom: 4px; }
.ac-notify__channels label { margin-right: 14px; }
.ac-notify__field input { width: 100%; margin-bottom: 8px; }
.ac-notify__hp { position: absolute !important; left: -9999px !important; }
.ac-notify__error { color: #b32d2e; font-size: .9em; }
.ac-notify--ok { background: #f3fbe0; }

@media (max-width: 767px) {
	.ac-hero__amount { font-size: 2.3em; }
	.ac-inst__amount { font-size: 2.1em; }
}
@media (prefers-reduced-motion: no-preference) {
	.single-product .ac-pill { animation: acPulse 2.4s infinite; }
	@keyframes acPulse { 0%, 82%, 100% { transform: scale(1); } 88% { transform: scale(1.07); } 94% { transform: scale(1.03); } }
}

/* Íconos de tarjetas del checkout de Mercado Pago (venía del snippet #99). */
.mp-checkout-pro-payment-method-icon { border-radius: 4px !important; background: #FAFAFA !important; height: 24px !important; padding: 0 4px !important; width: 24px !important; }
