/* Cabecera de archivo: título y migas sobre el azul corporativo. */
body.woocommerce-shop,
body.tax-product_cat,
body.tax-product_tag,
body.tax-product_brand,
body.woocommerce-cart {
	overflow-x: clip;
}

body.woocommerce-shop #content > .ast-container,
body.tax-product_cat #content > .ast-container,
body.tax-product_tag #content > .ast-container,
body.tax-product_brand #content > .ast-container {
	flex-wrap: wrap;
	align-items: flex-start;
}

.gm-shop-hero {
	flex: 1 0 100%;
	order: -1;
	box-sizing: border-box;
	width: 100vw;
	max-width: 100vw;
	margin: 0 calc((100% - 100vw) / 2) 28px;
	padding: 32px calc((100vw - 100%) / 2 + 36px) 28px;
	border-radius: 0;
	background: linear-gradient(135deg, #174a9c 0%, #102f66 100%);
	color: #fff;
}

.gm-shop-hero__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.gm-shop-hero__crumbs a {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gm-shop-hero__crumbs a:hover {
	background: #ffc400;
	color: #102f66;
}

.gm-shop-hero__sep {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #ffc400;
}

.gm-shop-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(34px, 4vw, 48px);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.gm-shop-hero__title::after {
	content: "";
	display: block;
	width: 52px;
	height: 4px;
	margin-top: 14px;
	border-radius: 999px;
	background: #ffc400;
}

.gm-shop-intro {
	max-width: 760px;
	margin: 0 0 18px;
	color: #0b192c;
	font-size: 17px;
	line-height: 1.5;
}

/* El título y las migas originales quedan sustituidos por la cabecera. */
.ast-woocommerce-container > .woocommerce-breadcrumb,
.woocommerce-products-header > .woocommerce-products-header__title {
	display: none;
}

.woocommerce-products-header {
	margin-bottom: 8px;
}

.woocommerce-products-header .page-description,
.woocommerce-products-header .wp-block-search {
	margin: 0 0 16px;
}

.woocommerce-products-header .wp-block-search__label {
	display: block;
	margin-bottom: 6px;
	color: #64748b;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.woocommerce-products-header .wp-block-search__inside-wrapper {
	display: flex;
	gap: 8px;
	max-width: 560px;
}

.woocommerce-products-header .wp-block-search__input {
	flex: 1;
	min-height: 46px;
	padding: 0 14px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.woocommerce-products-header .wp-block-search__button {
	min-height: 46px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: #174a9c;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.woocommerce-products-header .wp-block-search__button:hover {
	background: #102f66;
}

/* La barra de filtros deja sitio a las fichas. */
@media (min-width: 922px) {
	body.woocommerce-shop #primary,
	body.tax-product_cat #primary,
	body.tax-product_tag #primary,
	body.tax-product_brand #primary {
		width: calc(100% - 250px) !important;
		padding-right: 8px;
		border: 0 !important;
	}

	body.woocommerce-shop #secondary,
	body.tax-product_cat #secondary,
	body.tax-product_tag #secondary,
	body.tax-product_brand #secondary {
		width: 250px !important;
		padding: 4px 0 0 8px !important;
		border: 0 !important;
		margin: 0 !important;
	}
}

#secondary .widget,
#secondary .ast-woo-sidebar-widget {
	margin-bottom: 18px;
}

#secondary .widget-title,
#secondary .wp-block-heading,
#secondary h2 {
	margin: 0 0 10px;
	color: #102f66;
	font-size: 16px;
	font-weight: 800;
}

#secondary .wc-block-product-filters__overlay-content,
#secondary .wc-block-product-filters {
	font-size: 14px;
}

/* Fichas al estilo de los productos destacados. */
.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0 0 28px !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	content: none !important;
	display: none !important;
}

.woocommerce ul.products li.product {
	display: flex !important;
	flex-direction: column;
	justify-content: space-between;
	width: auto !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	background: #fff;
	border: 1px solid #f1f5f9;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-6px);
	border-color: #cbd5e1;
	box-shadow: 0 20px 30px -10px rgba(11, 25, 44, 0.12);
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 200px;
	margin: 0;
	padding: 16px;
	background: #fff;
	border-bottom: 1px solid #f8fafc;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-loop-product__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	max-height: 168px !important;
	margin: 0 !important;
	object-fit: contain;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.woocommerce ul.products li.product:hover .astra-shop-thumbnail-wrap img {
	transform: scale(1.06);
}

.woocommerce ul.products li.product .ast-on-card-button:not(.ast-onsale-card) {
	display: none !important;
}

.woocommerce ul.products li.product .ast-onsale-card {
	position: absolute;
	top: 12px;
	left: 12px;
	right: auto !important;
	z-index: 2;
	display: inline-block;
	width: fit-content !important;
	max-width: max-content;
	padding: 4px 10px;
	border-radius: 999px;
	background: #ef4444 !important;
	color: #fff !important;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}

.woocommerce ul.products li.product .astra-shop-summary-wrap {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 16px 16px 16px;
}

.woocommerce ul.products li.product .ast-woo-product-category {
	display: block;
	margin: 0 0 4px;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	min-height: 2.6em;
	margin: 0 0 12px;
	color: #0b192c;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
}

.woocommerce ul.products li.product .ast-loop-product__link {
	color: #0b192c;
	text-decoration: none;
}

.woocommerce ul.products li.product .ast-loop-product__link:hover .woocommerce-loop-product__title {
	color: #174a9c;
}

.woocommerce ul.products li.product .price {
	margin: auto 0 12px !important;
	color: #0b192c;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	text-align: left;
}

.woocommerce ul.products li.product .price del {
	margin-right: 8px;
	color: #94a3b8;
	font-size: 13px;
	font-weight: 500;
}

.woocommerce ul.products li.product .price ins {
	color: #0284c7;
	text-decoration: none;
}

.woocommerce ul.products li.product .astra-shop-summary-wrap > .button,
.woocommerce ul.products li.product .astra-shop-summary-wrap > a.button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0 !important;
	padding: 12px 16px;
	border: 0;
	border-radius: 12px;
	background: #0b192c !important;
	color: #fff !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: none;
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.woocommerce ul.products li.product:hover .astra-shop-summary-wrap > .button,
.woocommerce ul.products li.product:hover .astra-shop-summary-wrap > a.button {
	background: #f59e0b !important;
	color: #0b192c !important;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.woocommerce ul.products li.product .button.added,
.woocommerce ul.products li.product .button.loading {
	background: #10b981 !important;
	color: #fff !important;
}

.woocommerce ul.products li.product .added_to_cart {
	display: block;
	margin-top: 8px;
	color: #0b192c;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.woocommerce nav.woocommerce-pagination {
	margin-top: 8px;
	text-align: center;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	gap: 6px;
	border: 0;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers li {
	border: 0;
	margin: 0;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers a,
.woocommerce nav.woocommerce-pagination ul.page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 999px;
	background: #fff;
	color: #0b192c;
	font-weight: 700;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers span.current {
	background: #174a9c;
	color: #fff;
}

.woocommerce nav.woocommerce-pagination ul.page-numbers a:hover {
	background: #ffc400;
	color: #102f66;
}

/* Carrito: misma cabecera y mismas fichas en «Nuevo en la tienda». */
body.woocommerce-cart #content > .ast-container {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

body.woocommerce-cart #primary {
	flex: 1 0 100%;
	width: 100%;
}

body.woocommerce-cart .entry-header {
	display: none;
}

body.woocommerce-cart .wc-block-grid__products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 8px 0 28px !important;
	padding: 0;
	list-style: none;
}

body.woocommerce-cart .wc-block-grid__product {
	position: relative;
	display: flex !important;
	flex-direction: column;
	width: auto !important;
	max-width: none !important;
	flex: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	background: #fff;
	border: 1px solid #f1f5f9;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	text-align: left;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

body.woocommerce-cart .wc-block-grid__product:hover {
	transform: translateY(-6px);
	border-color: #cbd5e1;
	box-shadow: 0 20px 30px -10px rgba(11, 25, 44, 0.12);
}

body.woocommerce-cart .wc-block-grid__product-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

body.woocommerce-cart .wc-block-grid__product-image {
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 200px;
	margin: 0;
	padding: 16px;
	background: #fff;
	border-bottom: 1px solid #f8fafc;
}

body.woocommerce-cart .wc-block-grid__product-image img {
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	max-height: 168px !important;
	margin: 0 !important;
	object-fit: contain;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.woocommerce-cart .wc-block-grid__product:hover .wc-block-grid__product-image img {
	transform: scale(1.06);
}

body.woocommerce-cart .wc-block-grid__product-onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	width: fit-content !important;
	margin: 0;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}

body.woocommerce-cart .gm-card__cat {
	display: block;
	margin: 16px 16px 4px;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
}

body.woocommerce-cart .wc-block-grid__product-title {
	min-height: 2.6em;
	margin: 16px 16px 0;
	padding: 0 !important;
	color: #0b192c !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	text-align: left;
}

body.woocommerce-cart .gm-card__cat + .wc-block-grid__product-title {
	margin-top: 0;
}

body.woocommerce-cart .wc-block-grid__product-link:hover .wc-block-grid__product-title {
	color: #174a9c !important;
}

body.woocommerce-cart .wc-block-grid__product .wc-block-grid__product-price {
	margin: auto 0 12px !important;
	padding: 12px 16px 0;
	color: #0b192c;
	font-size: 18px !important;
	font-weight: 800 !important;
	line-height: 1.2;
	text-align: left;
}

body.woocommerce-cart .wc-block-grid__product .wc-block-grid__product-price .amount {
	font-size: 18px !important;
	font-weight: 800 !important;
	color: #0b192c;
}

body.woocommerce-cart .wc-block-grid__product-price del {
	margin-right: 8px;
	color: #94a3b8;
	font-size: 13px;
	font-weight: 500;
}

body.woocommerce-cart .wc-block-grid__product-price ins {
	color: #0284c7;
	text-decoration: none;
}

body.woocommerce-cart .wc-block-grid__product-add-to-cart {
	width: 100%;
	margin: 0;
	padding: 0 16px 16px;
}

body.woocommerce-cart .wc-block-grid__product-add-to-cart .wp-block-button__link,
body.woocommerce-cart .wc-block-grid__product-add-to-cart .add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0 !important;
	padding: 12px 16px;
	border: 0;
	border-radius: 12px;
	background: #0b192c !important;
	color: #fff !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: none;
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

body.woocommerce-cart .wc-block-grid__product:hover .wc-block-grid__product-add-to-cart .wp-block-button__link,
body.woocommerce-cart .wc-block-grid__product:hover .wc-block-grid__product-add-to-cart .add_to_cart_button {
	background: #f59e0b !important;
	color: #0b192c !important;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

body.woocommerce-cart .wc-block-grid__product .add_to_cart_button.added,
body.woocommerce-cart .wc-block-grid__product .add_to_cart_button.loading {
	background: #10b981 !important;
	color: #fff !important;
}

body.woocommerce-cart .wc-block-grid__product .added_to_cart {
	display: block;
	margin-top: 8px;
	color: #0b192c;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

@media (max-width: 921px) {
	.woocommerce ul.products,
	body.woocommerce-cart .wc-block-grid__products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	body.woocommerce-shop #secondary,
	body.tax-product_cat #secondary,
	body.tax-product_tag #secondary,
	body.tax-product_brand #secondary {
		width: 100% !important;
		margin-top: 28px !important;
		padding: 0 !important;
	}
}

@media (max-width: 640px) {
	.gm-shop-hero {
		padding: 22px calc((100vw - 100%) / 2 + 20px) 20px;
		border-radius: 0;
	}

	.woocommerce ul.products,
	body.woocommerce-cart .wc-block-grid__products {
		grid-template-columns: 1fr !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product,
	.woocommerce ul.products li.product img,
	body.woocommerce-cart .wc-block-grid__product,
	body.woocommerce-cart .wc-block-grid__product img,
	.gm-shop-hero__crumbs a {
		transition: none;
	}

	.woocommerce ul.products li.product:hover,
	.woocommerce ul.products li.product:hover img,
	body.woocommerce-cart .wc-block-grid__product:hover,
	body.woocommerce-cart .wc-block-grid__product:hover img {
		transform: none;
	}
}
