/*
 * Distribuidora Tamajo — pantallas de la tienda:
 * archivo de producto, ficha, carrito y finalizar compra.
 */

/* ================================================================== */
/* ARCHIVO DE PRODUCTO (tienda y categorías)                          */
/* ================================================================== */

.woocommerce .woocommerce-products-header,
.tax-product_cat .ast-archive-description,
.tax-product_brand .ast-archive-description {
	background: var(--tmj-crema);
	border: 1px solid var(--tmj-linea);
	border-radius: var(--tmj-radio);
	padding: 26px 28px;
	margin-bottom: 24px;
	text-align: left;
}

.woocommerce .woocommerce-products-header__title,
.tax-product_cat .ast-archive-title,
.tax-product_brand .ast-archive-title {
	font-size: clamp(22px, 3vw, 30px) !important;
	font-weight: 800 !important;
	color: var(--tmj-verde) !important;
	margin: 0 !important;
	letter-spacing: -.01em;
}

.woocommerce .woocommerce-result-count {
	color: var(--tmj-gris);
	font-size: 13px;
	padding-top: 10px;
}

.woocommerce .woocommerce-ordering select {
	border: 1px solid var(--tmj-linea);
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 13px;
	background: #fff;
	color: var(--tmj-texto);
	cursor: pointer;
}

.woocommerce nav.woocommerce-pagination ul {
	border: 0 !important;
	display: flex;
	gap: 8px;
	justify-content: center;
}

.woocommerce nav.woocommerce-pagination ul li {
	border: 0 !important;
	overflow: visible;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	border: 1px solid var(--tmj-linea) !important;
	border-radius: 10px !important;
	min-width: 40px;
	height: 40px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: var(--tmj-texto) !important;
	background: #fff;
	padding: 0 12px !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
	background: var(--tmj-verde) !important;
	color: #fff !important;
	border-color: var(--tmj-verde) !important;
}

/* ================================================================== */
/* FICHA DE PRODUCTO                                                  */
/* ================================================================== */

.tmj-ficha__marca {
	display: inline-block;
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--tmj-beige);
	font-weight: 800;
	text-decoration: none;
	margin-bottom: 8px;
}

.tmj-ficha__marca:hover { color: var(--tmj-verde); }

.tmj-ficha div.product .product_title {
	font-size: clamp(22px, 2.6vw, 31px) !important;
	font-weight: 800 !important;
	line-height: 1.22 !important;
	color: var(--tmj-texto);
	margin-bottom: 10px !important;
}

.tmj-ficha div.product p.price,
.tmj-ficha div.product span.price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 28px !important;
	font-weight: 800 !important;
	color: var(--tmj-verde) !important;
	margin: 6px 0 4px !important;
}

.tmj-ficha div.product p.price del {
	font-size: 17px !important;
	color: var(--tmj-gris) !important;
	font-weight: 500 !important;
	order: 2;
}

.tmj-ficha div.product p.price ins {
	text-decoration: none !important;
	order: 1;
	background: none;
	color: var(--tmj-verde) !important;
}

.tmj-ficha__ahorro {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #eaf4ee;
	color: #17603a;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 14px !important;
}

.tmj-ficha__ahorro span { opacity: .8; }
.tmj-ficha__ahorro .amount { color: inherit; }

.tmj-ficha__guia { margin: 0 0 16px !important; font-size: 13px; }
.tmj-ficha__guia a { color: var(--tmj-verde); font-weight: 700; text-decoration: underline; }

/* Talla y color como botones */
.tmj-select-oculto { display: none !important; }

.tmj-opciones {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.tmj-opcion {
	border: 1.5px solid var(--tmj-linea);
	background: #fff;
	color: var(--tmj-texto);
	border-radius: 10px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .15s, background .15s, color .15s;
	line-height: 1.2;
}

.tmj-opcion:hover { border-color: var(--tmj-verde); }

.tmj-opcion.esta-activa {
	background: var(--tmj-verde);
	border-color: var(--tmj-verde);
	color: #fff;
}

.tmj-opcion.no-disponible {
	opacity: .38;
	cursor: not-allowed;
	text-decoration: line-through;
}

.tmj-ficha table.variations th.label {
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--tmj-gris);
	font-weight: 800;
	padding-bottom: 6px;
}

.tmj-ficha table.variations,
.tmj-ficha table.variations tbody,
.tmj-ficha table.variations tr,
.tmj-ficha table.variations th,
.tmj-ficha table.variations td {
	display: block;
	width: 100%;
	border: 0;
	padding-left: 0;
	padding-right: 0;
	background: transparent;
}

.tmj-ficha .reset_variations {
	display: inline-block;
	margin-top: 8px;
	font-size: 12px;
	color: var(--tmj-gris);
}

/* Cantidad */
.tmj-cantidad {
	display: inline-flex !important;
	align-items: stretch;
	border: 1.5px solid var(--tmj-linea);
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
}

.tmj-cantidad__boton {
	border: 0;
	background: transparent;
	width: 40px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--tmj-verde);
	font-weight: 700;
}

.tmj-cantidad__boton:hover { background: var(--tmj-crema); }

.tmj-cantidad input.qty {
	border: 0 !important;
	width: 46px !important;
	text-align: center;
	font-weight: 700;
	background: transparent;
	-moz-appearance: textfield;
}

.tmj-cantidad input.qty::-webkit-outer-spin-button,
.tmj-cantidad input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Botón principal */
.tmj-ficha .single_add_to_cart_button,
.woocommerce div.product form.cart .button {
	background: var(--tmj-verde) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 15px 34px !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	letter-spacing: .06em;
	text-transform: uppercase;
	border: 0 !important;
	flex: 1;
	min-width: 210px;
}

.tmj-ficha .single_add_to_cart_button:hover { background: var(--tmj-verde-claro) !important; }

.tmj-ficha div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 18px !important;
}

.tmj-ficha div.product form.cart.variations_form { display: block; }

.tmj-ficha div.product form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 14px;
}

.tmj-ficha__entrega {
	background: var(--tmj-crema);
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 13px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 14px !important;
	line-height: 1.5;
}

.tmj-ficha .product_meta {
	font-size: 12.5px;
	color: var(--tmj-gris);
	border-top: 1px solid var(--tmj-linea);
	padding-top: 14px;
}

/* Pestañas */
.tmj-ficha .woocommerce-tabs ul.tabs {
	padding: 0 !important;
	border-bottom: 1px solid var(--tmj-linea);
}

.tmj-ficha .woocommerce-tabs ul.tabs::before { border: 0 !important; }

.tmj-ficha .woocommerce-tabs ul.tabs li {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 22px 0 0 !important;
	padding: 0 !important;
}

.tmj-ficha .woocommerce-tabs ul.tabs li::before,
.tmj-ficha .woocommerce-tabs ul.tabs li::after { display: none !important; }

.tmj-ficha .woocommerce-tabs ul.tabs li a {
	padding: 12px 0 !important;
	font-weight: 800 !important;
	color: var(--tmj-gris) !important;
	border-bottom: 2px solid transparent;
	font-size: 14px;
}

.tmj-ficha .woocommerce-tabs ul.tabs li.active a {
	color: var(--tmj-verde) !important;
	border-bottom-color: var(--tmj-verde);
}

/* ================================================================== */
/* AVISO DE ENVÍO GRATIS                                              */
/* ================================================================== */

.tmj-envio-barra {
	background: var(--tmj-crema);
	border: 1px solid var(--tmj-linea);
	border-radius: var(--tmj-radio);
	padding: 14px 18px;
	margin-bottom: 20px;
}

.tmj-envio-barra__texto { margin: 0 0 10px; font-size: 13.5px; }
.tmj-envio-barra__texto .amount { color: var(--tmj-verde); }

.tmj-envio-barra__pista {
	height: 7px;
	background: #e2dcd2;
	border-radius: 999px;
	overflow: hidden;
}

.tmj-envio-barra__pista span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--tmj-verde), var(--tmj-beige));
	border-radius: 999px;
	transition: width .4s ease;
}

.tmj-envio-barra.esta-lista { background: #eaf4ee; border-color: #b6e0c2; }

/* ================================================================== */
/* CARRITO                                                            */
/* ================================================================== */

.tmj-carrito-pag .woocommerce table.shop_table {
	border: 1px solid var(--tmj-linea) !important;
	border-radius: var(--tmj-radio) !important;
	border-collapse: separate !important;
	overflow: hidden;
}

.tmj-carrito-pag .woocommerce table.shop_table th {
	background: var(--tmj-crema);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tmj-gris);
	padding: 14px 12px !important;
}

.tmj-carrito-pag .woocommerce table.shop_table td {
	padding: 16px 12px !important;
	vertical-align: middle;
}

.tmj-carrito-pag .woocommerce table.shop_table img {
	width: 74px !important;
	border-radius: 10px;
	border: 1px solid var(--tmj-linea);
}

.tmj-carrito-pag .product-name a {
	font-weight: 700;
	color: var(--tmj-texto);
	text-decoration: none;
}

.tmj-carrito-pag .product-name a:hover { color: var(--tmj-verde); }

.tmj-carrito-pag .woocommerce table.shop_table td.product-remove a.remove {
	color: var(--tmj-gris) !important;
	background: transparent !important;
	font-size: 22px;
}

.tmj-carrito-pag .woocommerce table.shop_table td.product-remove a.remove:hover { color: #c0392b !important; }

.tmj-carrito-pag .cart_totals h2 {
	font-size: 17px;
	font-weight: 800;
	color: var(--tmj-verde);
	margin-bottom: 12px;
}

.tmj-carrito-pag .cart_totals table {
	border: 1px solid var(--tmj-linea) !important;
	border-radius: var(--tmj-radio);
	overflow: hidden;
}

.tmj-carrito-pag .checkout-button,
.tmj-carrito-pag .wc-proceed-to-checkout a.button {
	background: var(--tmj-verde) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 15px 24px !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: 14px !important;
	text-align: center;
}

.tmj-carrito-pag .checkout-button:hover { background: var(--tmj-verde-claro) !important; }

.tmj-carrito-pag .coupon input[type="text"] {
	border: 1px solid var(--tmj-linea);
	border-radius: 999px;
	padding: 11px 16px;
}

.tmj-carrito-pag .button[name="apply_coupon"],
.tmj-carrito-pag .button[name="update_cart"] {
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--tmj-verde) !important;
	border: 1.5px solid var(--tmj-verde) !important;
	font-weight: 700 !important;
	padding: 11px 20px !important;
}

.tmj-ayuda {
	background: var(--tmj-crema);
	border: 1px solid var(--tmj-linea);
	border-radius: var(--tmj-radio);
	padding: 18px;
	margin-top: 18px;
}

.tmj-ayuda h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 800;
	color: var(--tmj-verde);
}

.tmj-ayuda p { margin: 0 0 12px; font-size: 13.5px; color: var(--tmj-gris); }

/* ================================================================== */
/* FINALIZAR COMPRA                                                   */
/* ================================================================== */

.tmj-checkout-pag .woocommerce-billing-fields h3,
.tmj-checkout-pag #order_review_heading,
.tmj-checkout-pag .woocommerce-additional-fields h3 {
	font-size: 16px;
	font-weight: 800;
	color: var(--tmj-verde);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--tmj-linea);
	margin-bottom: 16px;
}

.tmj-checkout-pag .woocommerce form .form-row label {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--tmj-texto);
	margin-bottom: 5px;
}

.tmj-checkout-pag .woocommerce form .form-row input.input-text,
.tmj-checkout-pag .woocommerce form .form-row textarea,
.tmj-checkout-pag .select2-container .select2-selection--single {
	border: 1px solid var(--tmj-linea) !important;
	border-radius: 10px !important;
	padding: 12px 14px !important;
	height: auto !important;
	font-size: 14px;
	background: #fff;
}

.tmj-checkout-pag .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 1.4;
	padding-left: 0;
}

.tmj-checkout-pag #order_review {
	background: var(--tmj-crema);
	border: 1px solid var(--tmj-linea);
	border-radius: var(--tmj-radio);
	padding: 20px;
}

.tmj-checkout-pag #order_review table.shop_table {
	border: 0 !important;
	background: transparent;
}

.tmj-checkout-pag #order_review table.shop_table th,
.tmj-checkout-pag #order_review table.shop_table td {
	padding: 10px 0 !important;
	border-color: var(--tmj-linea) !important;
}

.tmj-checkout-pag .woocommerce-checkout-payment {
	background: #fff !important;
	border-radius: 10px !important;
	border: 1px solid var(--tmj-linea);
}

.tmj-checkout-pag .wc_payment_methods li { padding: 6px 4px; }
.tmj-checkout-pag .wc_payment_methods label { font-weight: 700; font-size: 14px; }

.tmj-checkout-pag .woocommerce-checkout-payment .payment_box {
	background: var(--tmj-crema) !important;
	border-radius: 10px !important;
	font-size: 13px;
	line-height: 1.6;
}

.tmj-checkout-pag .woocommerce-checkout-payment .payment_box::before { display: none !important; }

.tmj-checkout-pag #place_order {
	background: var(--tmj-verde) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 16px 24px !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: 14px !important;
	width: 100%;
	border: 0 !important;
}

.tmj-checkout-pag #place_order:hover { background: var(--tmj-verde-claro) !important; }

@media (min-width: 993px) {
	.tmj-checkout-pag .woocommerce-checkout #order_review_heading,
	.tmj-checkout-pag .woocommerce-checkout #order_review {
		position: sticky;
		top: 20px;
	}
}

@media (max-width: 700px) {
	.tmj-ficha div.product p.price,
	.tmj-ficha div.product span.price { font-size: 24px !important; }
	.tmj-ficha .single_add_to_cart_button { width: 100%; min-width: 0; }
	.tmj-carrito-pag .woocommerce table.shop_table img { width: 58px !important; }

	.woocommerce .woocommerce-products-header,
	.tax-product_cat .ast-archive-description { padding: 18px; }
}

/* Lista de características de la descripción corta */
.tmj-ficha__puntos {
	list-style: none;
	margin: 12px 0 16px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.tmj-ficha__puntos li {
	position: relative;
	padding-left: 24px;
	font-size: 14px;
	line-height: 1.55;
	color: #45484d;
}

.tmj-ficha__puntos li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 7px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tmj-beige);
}

.tmj-ficha .woocommerce-product-details__short-description pre {
	white-space: pre-wrap;
	font-family: inherit;
	font-size: 14px;
	background: transparent;
	padding: 0;
	border: 0;
}

/* La lista de categorías del tema arriba del título duplica el meta */
.tmj-ficha .single-product-category { display: none; }

/* Aviso de entrega: que fluya como una frase */
.tmj-ficha__entrega { display: block !important; }
.tmj-ficha__entrega-icono { margin-right: 6px; }

/* Astra la imprime con más especificidad, por eso el selector completo. */
body.tmj-ficha div.product .summary .single-product-category { display: none !important; }

/* Las filas de atributos quedaban con un hueco por el select vacío */
body.tmj-ficha table.variations tr { margin-bottom: 14px; }
body.tmj-ficha table.variations td.value { min-height: 0; }
body.tmj-ficha table.variations td.value > .tmj-opciones { margin-top: 0; }

/* La caja de ayuda no debe estirarse a lo ancho del carrito */
.tmj-ayuda {
	max-width: 430px;
	clear: left;
}

.tmj-ayuda .tmj-boton--bloque {
	width: auto;
	display: inline-flex;
	margin-top: 4px;
}

/* Líneas de la descripción larga que venían con asterisco */
.tmj-ficha__punto-suelto {
	position: relative;
	padding-left: 24px;
	margin: 0 0 8px;
}

.tmj-ficha__punto-suelto::before {
	content: "";
	position: absolute;
	left: 0;
	top: .62em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tmj-beige);
}
