/*
 * Página de producto nueva de Almendra.
 * Todo va dentro de .alm-producto. Los controles llevan ".alm-producto" delante y estados :hover/:focus explícitos
 * porque el tema (Hello Elementor) les pone a button/[type=button] borde y fondo #c36 y a input[type=number] borde gris.
 */

body.almendra-producto-nuevo {
	background-color: #efe7e1;
}

.alm-producto {
	--alm-texto: #272727;
	--alm-suave: #6b6b6b;
	--alm-marron: #3d1d17;
	--alm-marron-2: #5a2d22;
	--alm-precio: #855a3b;
	--alm-caramelo: #b3784f;
	--alm-crema: #efe7e1;
	--alm-crema-2: #f7f2ef;
	--alm-borde: #e4d9d2;
	--alm-ok: #2e6b35;
	--alm-error: #b21e1e;
	--alm-radio: 12px;
	--alm-titulos: "Century Schoolbook std", Georgia, "Times New Roman", serif;
	--alm-letra: "Gotham Light", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--alm-ui: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 16px 48px;
	color: var(--alm-texto);
	font-family: var(--alm-letra);
	font-size: 16px;
	line-height: 1.5;
}

.alm-producto *,
.alm-producto *::before,
.alm-producto *::after {
	box-sizing: inherit;
}

.alm-producto svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

/* Base para todos los botones propios: anula el estilo del tema. */
.alm-producto button {
	white-space: normal;
	text-transform: none;
	font-family: var(--alm-ui);
	line-height: 1.2;
}

.alm-producto button:focus {
	outline: none;
}

.alm-producto button:focus-visible {
	outline: 3px solid rgba(179, 120, 79, 0.6);
	outline-offset: 2px;
}

/* ---------- Migas ---------- */

.alm-producto .alm-migas {
	margin: 0 0 16px;
	font-family: var(--alm-ui);
	font-size: 13px;
	color: var(--alm-suave);
}

.alm-producto .alm-migas a {
	color: var(--alm-suave);
	text-decoration: none;
}

.alm-producto .alm-migas a:hover {
	color: var(--alm-precio);
	text-decoration: underline;
}

.alm-producto .alm-migas__sep {
	margin: 0 6px;
	opacity: 0.6;
}

/* ---------- Grilla ---------- */

.alm-producto__grilla {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

.alm-producto__grilla > * {
	min-width: 0;
}

@media (min-width: 900px) {
	.alm-producto {
		padding-top: 24px;
	}

	.alm-producto__grilla {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		gap: 48px;
		align-items: start;
	}

	.alm-producto__fotos {
		position: sticky;
		top: 96px;
	}
}

/* ---------- Galería ---------- */

.alm-producto .alm-galeria__marco {
	position: relative;
}

.alm-producto .alm-galeria__escenario {
	position: relative;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	border-radius: var(--alm-radio);
	background: #fff;
	aspect-ratio: 1 / 1;
	outline-offset: 3px;
}

.alm-producto .alm-galeria__escenario::-webkit-scrollbar {
	display: none;
}

.alm-producto .alm-galeria__foto {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
}

.alm-producto .alm-galeria__foto--vacia {
	cursor: default;
}

.alm-producto .alm-galeria__foto img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	border-radius: var(--alm-radio);
}

.alm-producto .alm-galeria__flecha,
.alm-producto .alm-galeria__ampliar,
.alm-producto .alm-zoom__cerrar {
	position: absolute;
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--alm-borde);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: var(--alm-marron);
	cursor: pointer;
}

.alm-producto .alm-galeria__flecha:hover,
.alm-producto .alm-galeria__flecha:focus,
.alm-producto .alm-galeria__ampliar:hover,
.alm-producto .alm-galeria__ampliar:focus,
.alm-producto .alm-zoom__cerrar:hover,
.alm-producto .alm-zoom__cerrar:focus {
	border-color: var(--alm-caramelo);
	background: #fff;
	color: var(--alm-marron);
}

.alm-producto .alm-galeria__ampliar {
	display: flex;
	top: 12px;
	right: 12px;
}

.alm-producto .alm-galeria__flecha--ant {
	left: 12px;
}

.alm-producto .alm-galeria__flecha--sig {
	right: 12px;
}

@media (hover: hover) and (min-width: 700px) {
	.alm-producto .alm-galeria--varias .alm-galeria__flecha {
		display: flex;
		top: calc(50% - 20px);
	}
}

.alm-producto .alm-galeria__miniaturas {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	padding-bottom: 4px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.alm-producto .alm-galeria__mini,
.alm-producto .alm-galeria__mini:hover,
.alm-producto .alm-galeria__mini:focus {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
}

.alm-producto .alm-galeria__mini img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.alm-producto .alm-galeria__mini[aria-current="true"] {
	border-color: var(--alm-caramelo);
}

.alm-producto .alm-zoom {
	width: min(96vw, 1100px);
	max-width: none;
	max-height: 94vh;
	padding: 0;
	border: 0;
	border-radius: var(--alm-radio);
	background: #fff;
}

.alm-producto .alm-zoom::backdrop {
	background: rgba(20, 10, 8, 0.8);
}

.alm-producto .alm-zoom__img {
	display: block;
	width: 100%;
	max-height: 94vh;
	object-fit: contain;
}

.alm-producto .alm-zoom__cerrar {
	display: flex;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
}

/* ---------- Título y precio ---------- */

.alm-producto .alm-marca {
	display: inline-block;
	margin-bottom: 6px;
	font-family: var(--alm-ui);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--alm-caramelo);
	text-decoration: none;
}

.alm-producto .alm-titulo {
	margin: 0 0 12px;
	font-family: var(--alm-titulos);
	font-size: clamp(24px, 3.2vw, 34px);
	font-weight: 400;
	line-height: 1.2;
	color: var(--alm-marron);
	letter-spacing: 0.01em;
}

.alm-producto .alm-corta {
	margin-bottom: 12px;
	color: var(--alm-suave);
}

.alm-producto .alm-compra {
	margin: 8px 0 20px;
	padding: 20px;
	border: 1px solid var(--alm-borde);
	border-radius: var(--alm-radio);
	background: #fff;
}

.alm-producto .alm-precio {
	margin-bottom: 16px;
	font-family: var(--alm-ui);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--alm-precio);
}

.alm-producto .alm-precio del {
	margin-right: 8px;
	font-size: 18px;
	font-weight: 400;
	color: var(--alm-suave);
}

.alm-producto .alm-precio ins {
	text-decoration: none;
}

.alm-producto .alm-precio__unidad {
	font-size: 15px;
	font-weight: 400;
	color: var(--alm-suave);
}

/* ---------- Campos ---------- */

.alm-producto .alm-form {
	display: grid;
	gap: 16px;
	margin: 0;
}

.alm-producto .alm-campo__etiqueta {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--alm-ui);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--alm-texto);
}

.alm-producto .alm-presentaciones,
.alm-producto .alm-variedades {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.alm-producto .alm-stepper {
	display: inline-flex;
	align-items: stretch;
	height: 48px;
	border: 1px solid var(--alm-borde);
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}

.alm-producto .alm-stepper:focus-within {
	border-color: var(--alm-caramelo);
	box-shadow: 0 0 0 3px rgba(179, 120, 79, 0.2);
}

.alm-producto .alm-stepper__btn,
.alm-producto .alm-stepper__btn:focus {
	width: 48px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--alm-marron);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.alm-producto .alm-stepper__btn:hover {
	background: var(--alm-crema);
	color: var(--alm-marron);
}

.alm-producto input.alm-stepper__input,
.alm-producto input.alm-stepper__input:focus {
	width: 64px;
	height: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--alm-ui);
	font-size: 18px;
	text-align: center;
	color: var(--alm-texto);
	outline: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.alm-producto .alm-stepper--gramos input.alm-stepper__input {
	width: 84px;
	text-align: right;
}

.alm-producto .alm-stepper__input::-webkit-outer-spin-button,
.alm-producto .alm-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.alm-producto .alm-stepper__sufijo {
	display: flex;
	align-items: center;
	padding: 0 6px 0 4px;
	font-family: var(--alm-ui);
	color: var(--alm-suave);
}

.alm-producto .alm-stock {
	margin: 8px 0 0;
	font-family: var(--alm-ui);
	font-size: 14px;
}

.alm-producto .alm-stock--poco {
	color: var(--alm-precio);
	font-weight: 500;
}

.alm-producto .alm-ayuda {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--alm-suave);
}

/* ---------- Granel: presentaciones ---------- */

.alm-producto .alm-chips {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 8px;
}

/* Celular: filas parejas (4 chips = 2 + 2, no 3 + 1 con uno huérfano). */
@media (max-width: 599px) {
	.alm-producto .alm-chips {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.alm-producto .alm-chips:has(> :nth-child(2):last-child),
	.alm-producto .alm-chips:has(> :nth-child(4):last-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.alm-producto .alm-chips:has(> :only-child) {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Llegó por un anuncio a algo que hoy no tiene stock. */
.alm-producto .alm-nota {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fff6e5;
	color: #7a4b00;
	font-family: var(--alm-ui);
	font-size: 14px;
	line-height: 1.4;
}

.alm-producto .alm-chip {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 10px 6px;
	border: 1px solid var(--alm-borde);
	border-radius: 10px;
	background: #fff;
	font-family: var(--alm-ui);
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.alm-producto .alm-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.alm-producto .alm-chip__peso {
	font-size: 16px;
	font-weight: 600;
	color: var(--alm-texto);
}

.alm-producto .alm-chip__precio {
	font-size: 13px;
	color: var(--alm-suave);
}

.alm-producto .alm-chip:hover {
	border-color: var(--alm-caramelo);
}

.alm-producto .alm-chip:has(input:checked) {
	padding: 9px 5px;
	border: 2px solid var(--alm-caramelo);
	background: var(--alm-crema-2);
}

.alm-producto .alm-chip:has(input:focus-visible) {
	box-shadow: 0 0 0 3px rgba(179, 120, 79, 0.35);
}

.alm-producto .alm-otra__abrir,
.alm-producto .alm-otra__abrir:hover,
.alm-producto .alm-otra__abrir:focus {
	justify-self: start;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: none;
	font-size: 14px;
	color: var(--alm-precio);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.alm-producto .alm-otra__abrir[aria-expanded="true"] {
	display: none;
}

.alm-producto .alm-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0;
	padding-top: 12px;
	border-top: 1px dashed var(--alm-borde);
	font-family: var(--alm-ui);
	color: var(--alm-suave);
}

.alm-producto .alm-total strong {
	font-size: 24px;
	font-weight: 600;
	color: var(--alm-precio);
}

/* ---------- Agrupados: variedades ---------- */

.alm-producto .alm-variedades {
	display: grid;
	gap: 8px;
}

.alm-producto .alm-variedad {
	position: relative;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 8px 12px 8px 8px;
	border: 1px solid var(--alm-borde);
	border-radius: 10px;
	background: #fff;
	font-family: var(--alm-ui);
	line-height: 1.3;
	cursor: pointer;
}

.alm-producto .alm-variedad input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.alm-producto .alm-variedad__foto img {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
}

.alm-producto .alm-variedad__nombre {
	font-size: 15px;
}

.alm-producto .alm-variedad__precio {
	font-size: 14px;
	font-weight: 600;
	color: var(--alm-precio);
	white-space: nowrap;
}

.alm-producto .alm-variedad:hover {
	border-color: var(--alm-caramelo);
}

.alm-producto .alm-variedad:has(input:checked) {
	padding: 7px 11px 7px 7px;
	border: 2px solid var(--alm-caramelo);
	background: var(--alm-crema-2);
}

.alm-producto .alm-variedad:has(input:focus-visible) {
	box-shadow: 0 0 0 3px rgba(179, 120, 79, 0.35);
}

.alm-producto .alm-variedad--agotada {
	cursor: not-allowed;
	opacity: 0.55;
}

.alm-producto .alm-variedad--agotada:hover {
	border-color: var(--alm-borde);
}

.alm-producto .alm-variedad--agotada .alm-variedad__precio {
	font-weight: 400;
	color: var(--alm-suave);
}

/* ---------- Botones de compra y mensajes ---------- */

.alm-producto .alm-botones {
	display: grid;
	gap: 10px;
}

.alm-producto .alm-boton,
.alm-producto .alm-boton:focus {
	font-family: var(--alm-ui); /* los <a> (WhatsApp) heredaban Gotham Light y los <button> Poppins */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 12px 20px;
	border: 2px solid var(--alm-marron);
	border-radius: 10px;
	background: var(--alm-marron);
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

.alm-producto .alm-boton:hover {
	border-color: var(--alm-marron-2);
	background: var(--alm-marron-2);
	color: #fff;
}

.alm-producto .alm-boton--secundario,
.alm-producto .alm-boton--secundario:focus {
	border-color: var(--alm-caramelo);
	background: #fff;
	color: var(--alm-marron);
}

.alm-producto .alm-boton--secundario:hover {
	border-color: var(--alm-caramelo);
	background: var(--alm-crema-2);
	color: var(--alm-marron);
}

.alm-producto .alm-boton:disabled {
	opacity: 0.6;
	cursor: wait;
}

.alm-producto .alm-mensaje {
	margin: 0;
	font-family: var(--alm-ui);
	font-size: 14px;
	line-height: 1.4;
}

.alm-producto .alm-mensaje:empty {
	display: none;
}

.alm-producto .alm-mensaje--ok {
	padding: 10px 12px;
	border-radius: 8px;
	background: #eef6ee;
	color: var(--alm-ok);
}

.alm-producto .alm-mensaje--error {
	padding: 10px 12px;
	border-radius: 8px;
	background: #fbeeee;
	color: var(--alm-error);
}

.alm-producto .alm-mensaje__enlace {
	color: inherit;
	font-weight: 600;
}

/* ---------- Sin stock ---------- */

.alm-producto .alm-sin-stock {
	padding: 16px;
	border-radius: 10px;
	background: var(--alm-crema-2);
}

.alm-producto .alm-sin-stock__titulo {
	margin: 0 0 6px;
	font-family: var(--alm-ui);
	font-size: 17px;
	font-weight: 600;
	color: var(--alm-marron);
}

.alm-producto .alm-sin-stock__texto {
	margin: 0;
	color: var(--alm-suave);
}

.alm-producto .alm-sin-stock .stock {
	display: none;
}

.alm-producto .alm-precio:empty {
	display: none;
}

.alm-producto a.alm-boton--whatsapp,
.alm-producto a.alm-boton--whatsapp:hover,
.alm-producto a.alm-boton--whatsapp:focus {
	margin-top: 12px;
	min-height: 48px;
	text-decoration: none;
}

.alm-producto ul.alm-variedades--agotadas {
	display: grid;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.alm-producto ul.alm-variedades--agotadas .alm-variedad {
	cursor: default;
}

.alm-producto .alm-sin-stock__aviso input[type="submit"],
.alm-producto .alm-sin-stock__aviso input[type="submit"]:hover,
.alm-producto .alm-sin-stock__aviso input[type="submit"]:focus {
	width: 100%;
	min-height: 48px;
	margin-top: 8px;
	border: 2px solid var(--alm-caramelo);
	border-radius: 10px;
	background: #fff;
	color: var(--alm-marron);
	font-family: var(--alm-ui) !important; /* otra hoja le pone Gotham Light con !important */
	font-size: 15px;
	white-space: normal;
	cursor: pointer;
}

.alm-producto .alm-sin-stock__aviso input[type="submit"]:hover {
	background: var(--alm-crema-2);
}

/* Popup "Avisarme cuando haya stock" (Back In Stock Notifier + SweetAlert2): con los colores y la letra de la tienda
   (venía azul, celeste y con la X fucsia del tema). Vive fuera de .alm-producto: los colores van escritos. */
body.almendra-producto-nuevo .swal2-popup {
	border-radius: 14px;
	font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.almendra-producto-nuevo .swal2-popup .cwginstock-panel-primary {
	border: 0;
	box-shadow: none;
}

body.almendra-producto-nuevo .swal2-popup .cwginstock-panel-heading {
	padding: 16px;
	border: 0;
	border-radius: 10px 10px 0 0;
	background: #3d1d17;
	color: #fff;
}

body.almendra-producto-nuevo .swal2-popup .cwginstock-panel-heading h4 {
	margin: 0;
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}

body.almendra-producto-nuevo .swal2-popup .cwginstock-panel-body {
	padding: 16px 4px 4px;
}

body.almendra-producto-nuevo .swal2-popup .cwgstock_name,
body.almendra-producto-nuevo .swal2-popup .cwgstock_email {
	min-height: 46px;
	margin-bottom: 10px;
	border: 1px solid #e4d9d2;
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
}

body.almendra-producto-nuevo .swal2-popup .cwgstock_button,
body.almendra-producto-nuevo .swal2-popup .cwgstock_button:hover,
body.almendra-producto-nuevo .swal2-popup .cwgstock_button:focus {
	width: 100%;
	min-height: 48px;
	border: 2px solid #3d1d17;
	border-radius: 10px;
	background: #3d1d17;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

body.almendra-producto-nuevo .swal2-popup .cwgstock_button:hover {
	border-color: #5a2d22;
	background: #5a2d22;
}

body.almendra-producto-nuevo .swal2-popup .swal2-close,
body.almendra-producto-nuevo .swal2-popup .swal2-close:hover,
body.almendra-producto-nuevo .swal2-popup .swal2-close:focus {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #3d1d17 !important;
}

/* ---------- Avisos y beneficios ---------- */

.alm-producto .alm-avisos {
	margin-bottom: 20px;
}

.alm-producto .alm-beneficios {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.alm-producto .alm-beneficios__item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 14px;
	color: var(--alm-suave);
}

.alm-producto .alm-beneficios__item svg {
	color: var(--alm-caramelo);
}

.alm-producto .alm-beneficios__item strong {
	display: block;
	font-family: var(--alm-ui);
	font-weight: 500;
	color: var(--alm-texto);
}

.alm-producto .alm-beneficios__texto {
	display: block;
}

/* ---------- Descripción ---------- */

.alm-producto .alm-descripcion {
	max-width: 780px;
	margin: 40px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--alm-borde);
}

.alm-producto .alm-descripcion__titulo {
	margin: 0 0 12px;
	font-family: var(--alm-titulos);
	font-size: 22px;
	font-weight: 400;
	color: var(--alm-marron);
}

.alm-producto .alm-descripcion__texto {
	color: #454545;
}

/* 321 descripciones traen su propio estilo en línea (letra, tamaño y color de otra herramienta): todas iguales. */
.alm-producto .alm-descripcion__texto [style] {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
}

/* Los títulos dentro de la descripción no pueden ser más grandes que "Sobre este producto". */
.alm-producto .alm-descripcion__texto h1,
.alm-producto .alm-descripcion__texto h2 {
	margin: 20px 0 8px;
	font-family: var(--alm-ui);
	font-size: 19px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--alm-marron);
}

.alm-producto .alm-descripcion__texto h3,
.alm-producto .alm-descripcion__texto h4,
.alm-producto .alm-descripcion__texto h5,
.alm-producto .alm-descripcion__texto h6 {
	margin: 16px 0 6px;
	font-family: var(--alm-ui);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--alm-marron);
}

.alm-producto .alm-descripcion__texto p:empty {
	display: none;
}

.alm-producto .alm-descripcion__texto img {
	max-width: 100%;
	height: auto;
}

/* ---------- Versión mínima (si algo falló) ---------- */

.alm-producto--minimo {
	padding: 32px 16px;
}
