/* ==========================================================================
   Exotic Agrona — WooCommerce
   Sustituye los estilos por defecto de Woo (woocommerce-general/layout/smallscreen).
   ========================================================================== */

/* ---------- Botones genéricos de Woo con la píldora del tema ---------- */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-page .button,
.wc-block-components-button:not(.is-link),
.wp-element-button.wc-block-components-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border: 1px solid var(--es-surface);
	border-radius: var(--es-r-pill);
	background: var(--es-white);
	color: var(--es-strong);
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background .4s var(--es-ease), color .4s var(--es-ease), border-color .4s var(--es-ease);
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover { background: var(--es-brand); border-color: var(--es-brand); color: var(--es-on-brand); }

.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce .checkout-button,
.woocommerce #place_order,
.woocommerce .single_add_to_cart_button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background: var(--es-brand);
	border-color: var(--es-brand);
	color: var(--es-on-brand);
	font-weight: 500;
}
.woocommerce .button.alt:hover,
.woocommerce .checkout-button:hover,
.woocommerce #place_order:hover,
.woocommerce .single_add_to_cart_button:hover,
.wc-block-cart__submit-button:hover { background: var(--es-surface); border-color: var(--es-surface); color: var(--es-white); }

.woocommerce .button:disabled,
.woocommerce .button.disabled { opacity: .5; cursor: not-allowed; }
.woocommerce .button.loading { opacity: .7; pointer-events: none; }
.woocommerce .button.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: es-spin .7s linear infinite; }
@keyframes es-spin { to { transform: rotate(360deg); } }

/* ---------- Precio ---------- */
.price del,
.woocommerce-Price-amount + del { opacity: .55; font-weight: 400; margin-right: 6px; }
.price ins { text-decoration: none; }

/* ==========================================================================
   Grilla y tarjeta de producto (Agrona «product-item»)
   ========================================================================== */
ul.products {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}
@media (min-width: 1200px) {
	ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
	ul.products { grid-template-columns: 1fr; }
}
ul.products::before, ul.products::after { display: none; }
ul.products li.product { margin: 0; width: auto; float: none; }

.es-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--es-r-12);
	background: var(--es-weak);
	overflow: hidden;
}
.es-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	text-decoration: none;
}
.es-card__img {
	width: 100%;
	height: 490px;
	padding: 55px 16px;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 1s var(--es-ease);
}
.columns-3 .es-card__img { height: 400px; padding: 40px 16px; }
.es-card:hover .es-card__img { transform: scale(1.08) rotate(3deg); }
.es-card__flag {
	position: absolute;
	z-index: 4;
	top: 16px; left: 16px;
	padding: 6px 12px;
	border-radius: var(--es-r-pill);
	background: var(--es-brand);
	color: var(--es-on-brand);
	font-size: 13px;
	font-weight: 500;
}
.es-card__flag.is-out { background: var(--es-surface); color: var(--es-white); }

.es-card__info {
	position: relative;
	z-index: 1;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin-top: auto;
	padding: 24px;
	border-radius: var(--es-r-12);
	background: var(--es-soft);
	overflow: hidden;
}
.es-card__hover {
	position: absolute;
	z-index: -1;
	inset: 0 0 -1%;
	border-radius: var(--es-r-12);
	background: var(--es-brand);
	transform: translate3d(0, 105%, 0);
	transition: transform 1s var(--es-ease);
	pointer-events: none;
}
.es-card:hover .es-card__hover,
.es-card:focus-within .es-card__hover { transform: none; }

.es-card__name-price { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.es-card__name { margin: 0; font-size: var(--es-h4); line-height: 1.1; font-weight: 500; color: var(--es-black); }
.columns-3 .es-card__name { font-size: 24px; }
.es-card__name a { color: inherit; text-decoration: none; }
.es-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* toda la franja lleva a la ficha */
.es-card__price { flex: none; font-size: var(--es-h4); line-height: 1.1; font-weight: 500; color: var(--es-black); text-align: right; }
.columns-3 .es-card__price { font-size: 22px; }
.es-card__price del { display: block; font-size: .6em; }
.es-card__name, .es-card__price { transition: color 1s var(--es-ease); }
.es-card:hover .es-card__name,
.es-card:hover .es-card__price,
.es-card:focus-within .es-card__name,
.es-card:focus-within .es-card__price { color: var(--es-on-brand); }

.es-card__actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.es-card__actions .button,
.es-card .es-card-btn {
	display: inline-flex;
	align-items: center;
	min-height: 0;
	padding: 12px 24px;
	border-radius: 500px;
	text-decoration: none;
	border: 1px solid var(--es-dark-green);
	background: transparent;
	color: var(--es-strong);
	font-size: 16px;
	line-height: 1.4;
	transition: background 1s var(--es-ease), border-color 1s var(--es-ease), color .4s;
}
.es-card:hover .es-card-btn,
.es-card:focus-within .es-card-btn { background: var(--es-white); border-color: var(--es-white); }
.es-card .es-card-btn:hover { background: var(--es-surface) !important; border-color: var(--es-surface) !important; color: var(--es-white); }
.es-card .es-card-btn.added::before { content: "✓"; }
.es-card .added_to_cart { display: none; }
/* En la tarjeta solo «Añadir al carrito», como Agrona; lista de deseos y comparar quedan en la ficha. */
.es-card__actions .woosc-btn, .es-card__actions .woosw-btn { display: none !important; }

/* Botones de woo-smart-wishlist / woo-smart-compare dentro de la tarjeta */
.es-card__actions .woosw-btn,
.es-card__actions .woosc-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid rgba(23, 23, 23, .15);
	border-radius: var(--es-r-pill);
	background: transparent;
	color: var(--es-strong);
	font-size: 13px;
	text-decoration: none;
}
.es-card__actions .woosw-btn:hover,
.es-card__actions .woosc-btn:hover { background: var(--es-white); }

@media (max-width: 767px) {
	.es-card__img, .columns-3 .es-card__img { height: 280px; padding: 24px 16px; }
	.es-card__info { padding: 16px; gap: 20px; }
	.es-card__name, .es-card__price, .columns-3 .es-card__name, .columns-3 .es-card__price { font-size: 22px; }
}

/* ==========================================================================
   Tienda: filtro en píldoras, barra de orden y paginación
   ========================================================================== */
.es-shop { padding: var(--es-section) 0; }
.es-filter { margin: -16px 0 32px; }
.es-filter__list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.es-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 6px 16px;
	border: 1px solid var(--es-soft);
	border-radius: var(--es-r-pill);
	background: var(--es-white);
	color: var(--es-strong);
	font-size: 14px;
	text-decoration: none;
	transition: background .4s, color .4s, border-color .4s;
}
.es-pill:hover { border-color: var(--es-brand); }
.es-pill.is-active { background: var(--es-surface); border-color: var(--es-surface); color: var(--es-white); }
.es-pill__count { min-width: 22px; padding: 0 6px; border-radius: var(--es-r-pill); background: var(--es-weak); color: var(--es-strong); font-size: 12px; text-align: center; }
.es-pill.is-active .es-pill__count { background: var(--es-brand); color: var(--es-on-brand); }
@media (max-width: 767px) {
	.es-filter__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--es-gutter) * -1); padding: 2px var(--es-gutter); }
	.es-filter__list::-webkit-scrollbar { display: none; }
	.es-pill { white-space: nowrap; }
}

.es-shop__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.es-shop__toolbar .woocommerce-notices-wrapper { width: 100%; }
.woocommerce-result-count { margin: 0; color: var(--es-muted); font-size: 14px; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select {
	min-height: 44px;
	padding: 8px 40px 8px 16px;
	border-radius: var(--es-r-pill);
	border-color: var(--es-soft);
	font-size: 14px;
	-webkit-appearance: none;
	appearance: none;
	background: var(--es-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23171717' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.woocommerce-pagination { margin-top: 56px; }
.woocommerce-info.woocommerce-no-products-found,
.woocommerce-no-products-found { text-align: center; }

/* ==========================================================================
   Avisos
   ========================================================================== */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	list-style: none;
	margin: 0 0 24px;
	padding: 16px 20px 16px 52px;
	border-radius: var(--es-r-12);
	background: var(--es-weak);
	border: 1px solid var(--es-soft);
	color: var(--es-strong);
	font-size: 15px;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	content: "";
	position: absolute;
	left: 20px; top: 50%;
	width: 18px; height: 18px;
	margin-top: -9px;
	border-radius: 50%;
	background: var(--es-brand);
}
.woocommerce-message { background: #eefcf4; border-color: var(--es-light-green); }
.woocommerce-info::before { background: var(--es-dark-green); }
.woocommerce-error { background: #fff4f2; border-color: #ffd6cf; display: block; }
.woocommerce-error::before { background: #d92d20; top: 26px; }
.woocommerce-error li + li { margin-top: 6px; }
.woocommerce-message .button,
.woocommerce-info .button { order: 2; min-height: 40px; padding: 8px 18px; font-size: 14px; }
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-error a:not(.button) { color: var(--es-dark-green); }
.wc-block-components-notice-banner { padding-left: 20px; }
.wc-block-components-notice-banner.is-success { background: #eefcf4; border-color: var(--es-light-green); }
.wc-block-components-notice-banner.is-error { background: #fff4f2; border-color: #ffd6cf; }
.wc-block-components-notice-banner > svg { background: var(--es-brand); border-radius: 50%; fill: var(--es-on-brand); }

.woocommerce-store-notice,
p.demo_store {
	position: fixed; z-index: 990; left: 0; right: 0; bottom: 0;
	margin: 0; padding: 12px 16px;
	background: var(--es-dark-green); color: var(--es-white);
	text-align: center; font-size: 14px;
}
.woocommerce-store-notice a { color: var(--es-light-green); }

/* ==========================================================================
   Ficha de producto
   ========================================================================== */
.es-single__top { padding: 96px 0 72px; }
.es-single__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.es-single__gallery { position: relative; }
.es-single__flag { top: 20px; left: 20px; }

/* Galería Woo: imagen grande sobre gris + miniaturas en columna a la derecha (Agrona) */
.woocommerce-product-gallery {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 100px;
	gap: 16px;
	margin: 0;
	opacity: 1 !important;
}
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery__wrapper { grid-column: 1; border-radius: var(--es-r-12); background: var(--es-weak); overflow: hidden; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image { background: var(--es-weak); }
.woocommerce-product-gallery__image a { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1.05; padding: 40px; }
.woocommerce-product-gallery__image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.woocommerce-product-gallery__image .zoomImg { background: var(--es-white); }
.woocommerce-product-gallery .flex-control-thumbs {
	grid-column: 2;
	grid-row: 1;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	max-height: 100%;
	overflow-y: auto;
	scrollbar-width: thin;
}
.woocommerce-product-gallery .flex-control-thumbs li { flex: none; }
.woocommerce-product-gallery .flex-control-thumbs img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	padding: 8px;
	border: 1px solid transparent;
	border-radius: var(--es-r-8);
	background: var(--es-weak);
	cursor: pointer;
	opacity: .7;
	transition: opacity .3s, border-color .3s;
}
.woocommerce-product-gallery .flex-control-thumbs img:hover,
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--es-brand); }
/* Una sola imagen: sin columna de miniaturas. */
.woocommerce-product-gallery--columns-4:not(.woocommerce-product-gallery--with-images),
.woocommerce-product-gallery:not(:has(.flex-control-thumbs)) { grid-template-columns: 1fr; }
.woocommerce-product-gallery__trigger {
	position: absolute;
	z-index: 5;
	top: 16px; right: 132px;
	width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--es-white);
	text-indent: -9999px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}
.woocommerce-product-gallery:not(:has(.flex-control-thumbs)) .woocommerce-product-gallery__trigger { right: 16px; }
.woocommerce-product-gallery__trigger::before {
	content: "";
	position: absolute;
	width: 14px; height: 14px;
	border: 2px solid var(--es-strong);
	border-radius: 50%;
	top: 12px; left: 12px;
}
.woocommerce-product-gallery__trigger::after {
	content: "";
	position: absolute;
	width: 2px; height: 8px;
	background: var(--es-strong);
	top: 25px; left: 28px;
	transform: rotate(-45deg);
}
.woocommerce-product-gallery__trigger img { display: none !important; }

@media (max-width: 767px) {
	.woocommerce-product-gallery { grid-template-columns: 1fr; }
	.woocommerce-product-gallery .flex-control-thumbs { grid-column: 1; grid-row: auto; flex-direction: row; overflow-x: auto; }
	.woocommerce-product-gallery .flex-control-thumbs li { width: 76px; }
	.woocommerce-product-gallery__trigger { right: 16px; }
	.woocommerce-product-gallery__image a { padding: 24px; }
}

/* Resumen */
.es-single__summary { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; }
.es-single__summary .product_title { font-size: var(--es-h2); line-height: 1.05; color: var(--es-strong); }
.es-single__summary .price { font-size: 28px; font-weight: 500; color: var(--es-strong); margin: 0; }
.es-single__summary .woocommerce-product-rating { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.es-single__summary .woocommerce-review-link { color: var(--es-muted); }
.es-single__summary .woocommerce-product-details__short-description { color: var(--es-surface); }
.es-single__summary .woocommerce-product-details__short-description > * + * { margin-top: .8em; }
.es-single__summary .stock { font-size: 14px; color: var(--es-dark-green); margin: 0; }
.es-single__summary .stock.out-of-stock { color: #b42318; }

.es-single__summary form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 0; padding: 24px 0; border-top: 1px solid var(--es-soft); border-bottom: 1px solid var(--es-soft); }
.es-single__summary form.cart .single_add_to_cart_button { min-height: 52px; padding: 14px 32px; flex: 1 1 200px; max-width: 320px; }
.quantity { display: inline-flex; align-items: center; }
.quantity .qty {
	width: 72px;
	min-height: 52px;
	padding: 8px;
	border: 1px solid var(--es-sub);
	border-radius: var(--es-r-pill);
	text-align: center;
	-moz-appearance: textfield;
}
.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quantity.has-buttons { border: 1px solid var(--es-sub); border-radius: var(--es-r-pill); padding: 2px; }
.quantity.has-buttons .qty { width: 48px; border: 0; padding: 0; min-height: 46px; }
.es-qty-btn { width: 44px; height: 46px; border: 0; background: transparent; border-radius: 50%; font-size: 20px; line-height: 1; }
.es-qty-btn:hover { background: var(--es-weak); }

.es-single-perks { list-style: none; display: grid; gap: 10px; font-size: 15px; color: var(--es-surface); }
.es-single-perks li { display: flex; align-items: center; gap: 10px; }
.es-single-perks .es-icon { color: var(--es-dark-green); flex: none; }

.product_meta { display: grid; gap: 6px; font-size: 14px; color: var(--es-muted); }
.product_meta a { color: var(--es-dark-green); }
.product_meta > span { display: block; }

/* Wishlist/compare en la ficha */
.es-single__summary .woosw-btn,
.es-single__summary .woosc-btn { display: inline-flex; align-self: flex-start; width: auto; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--es-soft); border-radius: var(--es-r-pill); background: var(--es-white); color: var(--es-strong); font-size: 14px; text-decoration: none; margin: 0 8px 0 0; }

@media (max-width: 991px) {
	.es-single__grid { grid-template-columns: 1fr; gap: 32px; }
	.es-single__summary { padding-top: 0; }
}
@media (max-width: 767px) { .es-single__top { padding: 40px 0 48px; } }

/* Descripción, atributos */
.es-single__desc { padding: 24px 0 var(--es-section); }
.es-single__desc-inner { max-width: 900px; }
.es-single__h { font-size: var(--es-h5); padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--es-soft); }
.es-single__attrs { margin-top: 32px; }
.woocommerce-product-attributes { width: 100%; border-collapse: collapse; }
.woocommerce-product-attributes th,
.woocommerce-product-attributes td { padding: 12px 0; border-bottom: 1px solid var(--es-soft); text-align: left; font-weight: 400; }
.woocommerce-product-attributes th { width: 40%; color: var(--es-muted); }
.woocommerce-product-attributes td p { margin: 0; }

/* ¿Por qué comprar con nosotros? (Agrona «Why Shop With Us?») */
.es-why { padding: var(--es-section) 0; }
.es-why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.es-why__media { height: 560px; border-radius: var(--es-r-12); background: var(--es-light-green); }
.es-why__img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--es-r-12); }
.es-why__title { font-size: var(--es-h3); margin-bottom: 32px; }
.es-why__list { padding-left: 1.4em; display: grid; gap: 18px; font-size: 18px; font-weight: 500; color: var(--es-strong); }
.es-why__list li::marker { color: var(--es-dark-green); font-weight: 700; }
@media (max-width: 767px) { .es-why__grid { grid-template-columns: 1fr; gap: 32px; } .es-why__media { height: 320px; } .es-why__list { font-size: 16px; } }

/* Reseñas (solo reales; colapsadas si no hay) */
.es-single__reviews { padding: 0 0 var(--es-section); }
.es-reviews { max-width: 900px; border-top: 1px solid var(--es-soft); border-bottom: 1px solid var(--es-soft); }
.es-reviews__summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; font-size: 20px; font-weight: 500; cursor: pointer; list-style: none; }
.es-reviews__summary::-webkit-details-marker { display: none; }
.es-reviews__icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--es-soft); border-radius: 50%; transition: transform .4s var(--es-ease); }
.es-reviews[open] .es-reviews__icon { transform: rotate(45deg); }
.es-reviews__body { padding-bottom: 24px; }
.woocommerce-Reviews-title { font-size: 18px; margin-bottom: 16px; }
.commentlist { list-style: none; padding: 0; display: grid; gap: 16px; }
.commentlist .comment_container { display: flex; gap: 12px; padding: 16px; border-radius: var(--es-r-12); background: var(--es-weak); }
.commentlist .avatar { border-radius: 50%; width: 40px; height: 40px; }
.commentlist .comment-text { flex: 1; }
.commentlist .meta { font-size: 14px; color: var(--es-muted); margin-bottom: 6px; }
#review_form_wrapper { margin-top: 24px; }
#reply-title { display: block; font-size: 18px; font-weight: 500; margin-bottom: 12px; }
.comment-form-rating label { display: block; margin-bottom: 6px; }
p.stars { margin: 0 0 12px; }
p.stars a { display: inline-block; width: 28px; height: 28px; overflow: hidden; text-indent: 100%; white-space: nowrap; position: relative; color: var(--es-sub); text-decoration: none; }
p.stars a::before { content: "★"; position: absolute; inset: 0; text-indent: 0; font-size: 26px; line-height: 28px; color: var(--es-sub); }
p.stars:hover a::before,
p.stars.selected a.active::before,
p.stars.selected a:not(.active)::before { color: var(--es-brand); }
p.stars.selected a.active ~ a::before,
p.stars a:hover ~ a::before { color: var(--es-sub); }

.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; overflow: hidden; font-size: 15px; line-height: 1; }
.star-rating::before { content: "★★★★★"; position: absolute; inset: 0; color: var(--es-sub); letter-spacing: .1em; }
.star-rating span { position: absolute; inset: 0 auto 0 0; overflow: hidden; padding-top: 1.5em; }
.star-rating span::before { content: "★★★★★"; position: absolute; top: 0; left: 0; color: var(--es-brand); letter-spacing: .1em; }

/* Relacionados */
.es-related { padding: var(--es-section) 0; }

/* PhotoSwipe (lightbox) un poco más acorde */
.pswp__bg { background: var(--es-strong); }

/* ==========================================================================
   Mini-carrito (cajón lateral)
   ========================================================================== */
.es-free-ship { padding: 16px 24px; border-bottom: 1px solid var(--es-soft); background: var(--es-weak); }
.es-free-ship__text { font-size: 14px; color: var(--es-strong); }
.es-free-ship__bar { margin-top: 10px; height: 6px; border-radius: var(--es-r-pill); background: var(--es-soft); overflow: hidden; }
.es-free-ship__bar span { display: block; height: 100%; border-radius: inherit; background: var(--es-brand); transition: width .6s var(--es-ease); }

.woocommerce-mini-cart { list-style: none; padding: 0; margin: 0; }
.woocommerce-mini-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 72px 1fr;
	grid-template-rows: auto auto;
	column-gap: 16px;
	align-items: center;
	padding: 16px 32px 16px 0;
	border-bottom: 1px solid var(--es-soft);
	font-size: 15px;
}
.woocommerce-mini-cart-item > a:not(.remove) { grid-row: 1 / span 2; display: contents; color: var(--es-strong); text-decoration: none; font-weight: 500; }
.woocommerce-mini-cart-item img {
	grid-row: 1 / span 2;
	width: 72px; height: 72px;
	object-fit: contain;
	padding: 6px;
	border-radius: var(--es-r-8);
	background: var(--es-weak);
	mix-blend-mode: multiply;
}
.woocommerce-mini-cart-item .quantity { display: block; color: var(--es-muted); font-size: 14px; }
.woocommerce-mini-cart-item .remove,
.woocommerce a.remove {
	position: absolute;
	top: 16px; right: 0;
	width: 26px; height: 26px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--es-weak);
	color: var(--es-strong) !important;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
	transition: background .3s, color .3s;
}
.woocommerce-mini-cart-item .remove:hover,
.woocommerce a.remove:hover { background: #d92d20; color: var(--es-white) !important; }
.woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 20px 0 16px; padding-top: 4px; font-size: 18px; }
.woocommerce-mini-cart__total strong { font-weight: 500; }
.woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: auto 0 0; }
.woocommerce-mini-cart__buttons .button { width: 100%; }
.woocommerce-mini-cart__buttons .button.checkout { background: var(--es-brand); border-color: var(--es-brand); color: var(--es-on-brand); font-weight: 500; }
.woocommerce-mini-cart__buttons .button.checkout:hover { background: var(--es-surface); border-color: var(--es-surface); color: var(--es-white); }
.woocommerce-mini-cart__empty-message { margin: 32px 0; text-align: center; color: var(--es-muted); }
.es-cart .widget_shopping_cart_content > .woocommerce-mini-cart__empty-message::after {
	content: "";
	display: block;
	width: 64px; height: 64px;
	margin: 20px auto 0;
	border-radius: 50%;
	background: var(--es-light-green);
}
.blockUI.blockOverlay { background: rgba(255, 255, 255, .6) !important; }

/* ==========================================================================
   Carrito, pago y mi cuenta (shortcodes clásicos)
   ========================================================================== */
.es-woo-page { font-size: 16px; }
.es-woo-page h2, .es-woo-page h3 { font-size: var(--es-h5); margin: 0 0 16px; }

table.shop_table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--es-soft);
	border-radius: var(--es-r-12);
	overflow: hidden;
	margin: 0 0 32px;
}
table.shop_table th,
table.shop_table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--es-soft); vertical-align: middle; }
table.shop_table thead th { background: var(--es-weak); font-weight: 500; font-size: 14px; }
table.shop_table tr:last-child > td,
table.shop_table tr:last-child > th { border-bottom: 0; }
table.shop_table .product-thumbnail img { width: 72px; height: 72px; object-fit: contain; padding: 6px; border-radius: var(--es-r-8); background: var(--es-weak); mix-blend-mode: multiply; }
table.shop_table .product-name a { color: var(--es-strong); text-decoration: none; font-weight: 500; }
table.shop_table .product-remove { width: 48px; }
table.shop_table .product-remove a.remove { position: static; }
table.shop_table td.actions { background: var(--es-weak); }
table.shop_table .coupon { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
table.shop_table .coupon label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
table.shop_table .coupon .input-text { width: 200px; border-radius: var(--es-r-pill); }
table.shop_table td.actions > .button { float: right; }

.woocommerce-cart-form { margin-bottom: 40px; }
.cart-collaterals { display: flex; justify-content: flex-end; }
.cart_totals { width: 100%; max-width: 480px; padding: 24px; border-radius: var(--es-r-12); background: var(--es-weak); }
.cart_totals table.shop_table { background: var(--es-white); }
.cart_totals .wc-proceed-to-checkout { margin-top: 16px; }
.cart_totals .checkout-button { width: 100%; min-height: 54px; }
.woocommerce-shipping-methods { list-style: none; padding: 0; display: grid; gap: 6px; }
.woocommerce-shipping-calculator .shipping-calculator-form { display: grid; gap: 10px; margin-top: 12px; }
.cross-sells { margin-top: 56px; }
.cross-sells > h2 { text-align: center; }

@media (max-width: 767px) {
	table.shop_table_responsive thead { display: none; }
	table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--es-soft); }
	table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 10px 16px; text-align: right; }
	table.shop_table_responsive td::before { content: attr(data-title); font-weight: 500; text-align: left; }
	table.shop_table_responsive td.product-remove,
	table.shop_table_responsive td.product-thumbnail { justify-content: flex-start; }
	table.shop_table_responsive td.product-remove::before,
	table.shop_table_responsive td.product-thumbnail::before,
	table.shop_table_responsive td.actions::before { display: none; }
	table.shop_table_responsive td.actions { flex-direction: column; align-items: stretch; }
	table.shop_table .coupon { display: grid; }
	table.shop_table .coupon .input-text { width: 100%; }
	table.shop_table td.actions > .button { float: none; width: 100%; }
}

/* Formularios de Woo */
.woocommerce form .form-row { margin: 0 0 16px; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 15px; }
.woocommerce form .form-row .required { color: #b42318; text-decoration: none; }
.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: #d92d20; }
.woocommerce form .form-row-first,
.woocommerce form .form-row-last { width: calc(50% - 8px); display: inline-block; vertical-align: top; }
.woocommerce form .form-row-first { margin-right: 12px; }
.woocommerce form .form-row-wide { clear: both; }
@media (max-width: 599px) {
	.woocommerce form .form-row-first,
	.woocommerce form .form-row-last { width: 100%; margin-right: 0; }
}
.woocommerce-input-wrapper { display: block; }
.woocommerce form .input-checkbox,
.woocommerce form input[type="checkbox"],
.woocommerce form input[type="radio"] { accent-color: var(--es-brand); width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }
.select2-container .select2-selection--single { height: 48px !important; border: 1px solid var(--es-sub) !important; border-radius: var(--es-r-8) !important; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px !important; padding-left: 16px !important; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 46px !important; right: 8px !important; }
.select2-dropdown { border-color: var(--es-sub) !important; border-radius: var(--es-r-8) !important; }
.select2-results__option--highlighted { background: var(--es-brand) !important; color: var(--es-on-brand) !important; }

/* Pago */
form.checkout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
form.checkout #customer_details { grid-column: 1; }
form.checkout #order_review_heading,
form.checkout #order_review { grid-column: 2; }
form.checkout #order_review_heading { grid-row: 1; margin: 0 0 16px; }
form.checkout #order_review { grid-row: 2 / span 3; position: sticky; top: 110px; padding: 24px; border-radius: var(--es-r-12); background: var(--es-weak); }
form.checkout #order_review table.shop_table { background: var(--es-white); }
form.checkout .col2-set .col-1,
form.checkout .col2-set .col-2 { width: 100%; float: none; }
form.checkout .col2-set .col-2 { margin-top: 24px; }
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table tfoot td { text-align: right; }
.woocommerce-checkout-review-order-table .order-total { font-size: 18px; }
#payment { margin-top: 8px; }
#payment .wc_payment_methods { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
#payment .wc_payment_method { padding: 14px 16px; border: 1px solid var(--es-soft); border-radius: var(--es-r-12); background: var(--es-white); }
#payment .wc_payment_method > label { font-weight: 500; cursor: pointer; }
#payment .wc_payment_method img { display: inline-block; max-height: 22px; margin-left: 6px; vertical-align: middle; }
#payment .payment_box { margin-top: 12px; padding: 12px; border-radius: var(--es-r-8); background: var(--es-weak); font-size: 14px; }
#payment .place-order { margin: 0; }
#payment #place_order { width: 100%; min-height: 56px; font-size: 17px; }
.woocommerce-terms-and-conditions-wrapper { margin-bottom: 16px; font-size: 14px; }
.woocommerce-privacy-policy-text { font-size: 13px; color: var(--es-muted); }
.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-form-login-toggle .woocommerce-info { display: block; }
form.checkout_coupon,
form.woocommerce-form-login { padding: 20px; margin: 0 0 24px; border: 1px solid var(--es-soft); border-radius: var(--es-r-12); }
@media (max-width: 991px) {
	form.checkout { grid-template-columns: 1fr; }
	form.checkout #order_review_heading,
	form.checkout #order_review { grid-column: 1; grid-row: auto; position: static; }
	form.checkout #order_review_heading { margin-top: 32px; }
}

/* Pedido recibido */
.woocommerce-order-overview { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 32px; }
.woocommerce-order-overview li { padding: 16px; border-radius: var(--es-r-12); background: var(--es-weak); font-size: 14px; }
.woocommerce-order-overview li strong { display: block; margin-top: 4px; font-size: 16px; color: var(--es-strong); }
.woocommerce-thankyou-order-received { font-size: 20px; font-weight: 500; color: var(--es-dark-green); margin-bottom: 20px; }
.woocommerce-customer-details address { padding: 20px; border: 1px solid var(--es-soft); border-radius: var(--es-r-12); }

/* Mi cuenta */
.woocommerce-account .es-woo-page > .woocommerce { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.woocommerce-account .es-woo-page > .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 8px; display: grid; gap: 4px; border-radius: var(--es-r-12); background: var(--es-weak); }
.woocommerce-MyAccount-navigation a { display: block; padding: 12px 16px; border-radius: var(--es-r-pill); color: var(--es-strong); text-decoration: none; transition: background .3s, color .3s; }
.woocommerce-MyAccount-navigation a:hover { background: var(--es-white); }
.woocommerce-MyAccount-navigation .is-active a { background: var(--es-surface); color: var(--es-white); }
.woocommerce-MyAccount-content > p:first-child { font-size: 18px; }
.woocommerce-MyAccount-content a:not(.button) { color: var(--es-dark-green); }
.woocommerce-Addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.woocommerce-Address { padding: 20px; border: 1px solid var(--es-soft); border-radius: var(--es-r-12); }
.woocommerce-Address-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.woocommerce-Address-title h2 { margin: 0; }
/* Ingreso / registro sin sesión */
.woocommerce-account:not(.logged-in) .es-woo-page > .woocommerce { display: block; }
.u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.u-columns .u-column1,
.u-columns .u-column2 { padding: 32px; border-radius: var(--es-r-12); background: var(--es-weak); }
.woocommerce-form-login__rememberme { display: block; margin: 8px 0 16px; }
.woocommerce-LostPassword { margin-top: 12px; }
.woocommerce-LostPassword a { color: var(--es-dark-green); }
@media (max-width: 767px) {
	.woocommerce-account .es-woo-page > .woocommerce,
	.woocommerce-Addresses,
	.u-columns.col2-set { grid-template-columns: 1fr; }
	.woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; scrollbar-width: none; }
	.woocommerce-MyAccount-navigation a { white-space: nowrap; }
}

/* ==========================================================================
   Carrito y pago en bloques (si las páginas usan bloques de Woo)
   ========================================================================== */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout { font-family: var(--es-font); }
.wc-block-components-sidebar-layout .wc-block-components-sidebar { padding: 24px; border-radius: var(--es-r-12); background: var(--es-weak); }
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select__select { border-radius: var(--es-r-8) !important; border-color: var(--es-sub) !important; }
.wc-block-components-text-input.is-active input:focus { border-color: var(--es-brand) !important; box-shadow: 0 0 0 1px var(--es-brand) !important; }
.wc-block-components-button:not(.is-link) { border-radius: var(--es-r-pill) !important; }
.wc-block-components-product-name { color: var(--es-strong); font-weight: 500; text-decoration: none; }
.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img { border-radius: var(--es-r-8); background: var(--es-weak); }
.wc-block-components-radio-control__input:checked { border-color: var(--es-brand) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--es-brand) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input:checked { background: var(--es-brand) !important; border-color: var(--es-brand) !important; }
