/**
 * Catálogo de accesorios (home): filtros por categoría, buscador, grilla
 * paginada y estado vacío. Sin dependencias de Bootstrap/Foundation:
 * todo el layout usa clases propias (volvo-shop-catalog__*).
 *
 * Consumido por template-parts/volvo-shop-catalog*.php
 */

.volvo-shop-catalog {
	background-color: #fff;
	padding: 60px 0;
}

.volvo-shop-catalog__container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 15px;
	box-sizing: border-box;
}

.volvo-shop-catalog__heading {
	text-align: center;
	margin-bottom: 32px;
}

.volvo-shop-catalog__title {
	color: #000;
	font-weight: 600;
	margin-top: 0;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 36px;
	line-height: 44px;
	letter-spacing: -1px;

	@media only screen and (max-width: 768px) {
		font-size: 22px;
		line-height: 32px;
	}
}

.volvo-shop-catalog__subtitle {
	color: #5E5E5E;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 18px;
	line-height: 28px;
	margin: 16px 0 0;
	font-weight: 400;
	line-height: 28px; /* 155.556% */
	text-align: center;

	@media only screen and (max-width: 768px) {
		font-size: 16px;
		line-height: 24px;
	}
}

/* Search box */

.volvo-shop-catalog__search {
	position: relative;
	max-width: 720px;
	margin: 0 auto 32px;
	display: none;
}

.volvo-shop-catalog__search .fa {
	position: absolute;
	top: 50%;
	left: 20px;
	transform: translateY(-50%);
	color: #9a9a9a;
}

input[type="search"].volvo-shop-catalog__search-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #E0E0E0;
	border-radius: 6px;
	height: 52px;
	padding: 14px 20px 14px 52px;
	color: #707070;
	font-family: 'VolvoCentum', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
}

.volvo-shop-catalog__search-input:focus {
	outline: none;
	border-color: #1C6ABA;
}

/* Category pills + sort */

.volvo-shop-catalog__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 40px;
}

.volvo-shop-catalog__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 1;
}

.volvo-shop-catalog__pill {
	border: 1px solid #dcd7ca;
	background: #fff;
	border-radius: 999px;
	padding: 8px 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #000;
	font-family: VolvoCentum;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
	/* style.css sets `button { text-transform: capitalize }` globally (Foundation
	   default), which title-cases every category name regardless of how it was
	   typed in WordPress. Reset it here so the pill shows the term name as-is. */
	text-transform: none;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* The filters markup is re-rendered after every AJAX request, so the check
   animates in each time a pill becomes active: the pill widens smoothly and
   the stroke is drawn instead of popping in. */
.volvo-shop-catalog__pill--active svg {
	flex-shrink: 0;
	overflow: visible;
	animation: volvo-shop-catalog-check-in 0.3s ease-out both;
}

.volvo-shop-catalog__pill--active svg path {
	stroke-dasharray: 20;
	stroke-dashoffset: 20;
	animation: volvo-shop-catalog-check-draw 0.35s 0.15s ease-out forwards;
}

@keyframes volvo-shop-catalog-check-in {
	from {
		width: 0;
		margin-right: -6px;
		opacity: 0;
	}

	to {
		width: 14px;
		margin-right: 0;
		opacity: 1;
	}
}

@keyframes volvo-shop-catalog-check-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.volvo-shop-catalog__pill,
	.volvo-shop-catalog__pill--active svg,
	.volvo-shop-catalog__pill--active svg path {
		transition: none;
		animation: none;
		stroke-dashoffset: 0;
	}
}

.volvo-shop-catalog__pill:hover {
	background: #0B2DED;
	border-color: #0B2DED;
	color: #fff;
}

.volvo-shop-catalog__pill--active {
	background: #0B2DED;
	border-color: #0B2DED;
	color: #fff;
}

.volvo-shop-catalog__sort {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
	color: #000;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 400;
	line-height: 20px; /* 142.857% */
}
.volvo-shop-catalog__sort label{
	color: var(--text-primary, #000);
	font-family: VolvoCentum;
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px; /* 142.857% */
}

.volvo-shop-catalog__sort-trigger {
	border: 1px solid #000;
	display: flex;
	border-radius: 6px;
	width: 260px;
	height: 48px;
	padding: 12px 16px;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
	cursor: pointer;
	margin: 0;
	background: #fff;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #000;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px; /* 150% */
}
.volvo-shop-catalog__sort-trigger:hover {
	color: #141414;
	background: #fff;

}

.volvo-shop-catalog__sort-trigger svg {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.volvo-shop-catalog__sort-trigger[aria-expanded="true"] {
	border: 2px solid #0B2DED;
	background: #FFF;
	color: #141414;
}

.volvo-shop-catalog__sort-trigger[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.volvo-shop-catalog__sort-value {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.volvo-shop-catalog__sort-panel {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	z-index: 20;
	width: 260px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border: 1px solid #E0E0E0;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.volvo-shop-catalog__sort-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 14px;
	color: #141414;
	cursor: pointer;
}

.volvo-shop-catalog__sort-option:hover {
	background: #F5F5F5;
}

.volvo-shop-catalog__sort-option--active {
	background: #E7EBFE;
	color: #0B2DED;
}

.volvo-shop-catalog--loading .volvo-shop-catalog__sort-trigger {
	background: #F5F5F5;
	border-color: #E0E0E0;
	color: #9a9a9a;
	pointer-events: none;
}

.volvo-shop-catalog--loading .volvo-shop-catalog__sort-trigger svg path {
	stroke: #9a9a9a;
}

.volvo-shop-catalog__counter {
	margin: 0 0 24px;
	color: #5E5E5E;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px; /* 142.857% */
}

/* Grid + cards */

.volvo-shop-catalog--loading .volvo-shop-catalog__grid-wrap {
	opacity: 0.5;
}

.volvo-shop-catalog__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px 20px;
}

.volvo-shop-catalog__card {
	text-align: center;
	display: flex;
	flex-direction: column;
	transition: all 350ms ease-in-out;
	border: 1px solid #E0E0E0;
	border-radius: 12px;
	overflow: hidden;
}
.volvo-shop-catalog__card:hover .volvo-shop-catalog__card-link {
	border-bottom: 2px solid #0B2DED;
}
.volvo-shop-catalog__card:hover {
	border: 1px solid #BDBDBD;
}

.volvo-shop-catalog__card-media {
	position: relative;
	background: #fff;
	border-radius: 12px 12px 0 0;
	/* margin-bottom: 16px; */
}
.volvo-shop-catalog__card-media a {
	display: flex;
	width: 100%;
	height: 190px;
	align-items: center;
	justify-content: center;
	background: #fff;
}
.volvo-shop-catalog__card-media img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	object-fit: contain;
	max-height: 100%;
	width: 100%;
}
.volvo-shop-catalog__card-body {
	display: flex;
	padding: 20px;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	flex: 1 0 0;
	align-self: stretch;
	background: #f5f5f3;
}
.volvo-shop-catalog__card-title {
	color: #000;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-style: normal;
	font-weight: 500;
	line-height: 28px; /* 140% */
	font-size: 12px;
	text-align: left;
	margin: 0;
}

.volvo-shop-catalog__card-title a {
	color: inherit;
}

.volvo-shop-catalog__card-detail {
	color: #707070;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	text-align: left;
	margin: -8px 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.volvo-shop-catalog__tag {
	background: #f0f0f0;
	color: #707070;
	font-size: 11px;
	border-radius: 4px;
	padding: 3px 8px;
}

.volvo-shop-catalog__card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	width: 100%;
}

.volvo-shop-catalog__card-price {
	color: #000;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 600;
	line-height: 24px; /* 133.333% */
}

.volvo-shop-catalog__card-link {
	display: flex;
	padding: 6px 4px;
	justify-content: center;
	align-items: center;
	gap: 6px;
	color: #000;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-style: normal;
	font-weight: 400;
	line-height: 20px;
	border-bottom: 2px solid transparent;
	transition: all 350ms ease-in-out;
}

.volvo-shop-catalog__card-link:hover {
	text-decoration: none;
	color: #141414;
}

/* Add to cart — same button/font language as the rest of the card, wired to
   WooCommerce's own AJAX add-to-cart (see volvo-shop-catalog-card.php). */
a.button.volvo-shop-catalog__add-to-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	margin-top: 0;
	border: none;
	border-radius: 6px;
	background-color: #4A4A4A !important;
	color: #fff !important;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif  !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 24px;
	text-align: center;
	text-transform: none !important;
	cursor: pointer;
	box-sizing: border-box;
	transition: all 350ms ease-in-out;
	padding: 8px !important;
}

a.button.volvo-shop-catalog__add-to-cart:hover {
	background: #0B2DED !important;
	color: #fff !important;
	text-decoration: none;
}

.volvo-shop-catalog__add-to-cart.loading {
	opacity: 0.6;
	cursor: progress;
}

/* Added state: button turns blue and its label swaps to "Añadido al carrito",
   same pattern shared by the catalog card, related products and single
   product page (all render the button via volvo-shop-catalog-card.php or
   the equivalent markup in nasa-single-product-new.php). */
a.button.volvo-shop-catalog__add-to-cart.added {
	background-color: #0B2DED !important;
}

a.button.volvo-shop-catalog__add-to-cart.added .volvo-shop-catalog__add-to-cart-label {
	font-size: 0;
}

a.button.volvo-shop-catalog__add-to-cart.added .volvo-shop-catalog__add-to-cart-label::before {
	content: "Añadido al carrito";
	font-size: 15px;
}

.volvo-shop-catalog__add-to-cart--disabled {
	background: #F5F5F5;
	color: #9a9a9a;
	cursor: not-allowed;
}

/* WooCommerce injects this "View cart" link right after an AJAX add. */
.volvo-shop-catalog__card-body a.added_to_cart {
	display: block;
	margin-top: 8px;
	text-align: center;
	color: #1C6ABA;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-weight: 600;
}

/* Empty state */

.volvo-shop-catalog__empty {
	text-align: center;
	padding: 60px 20px;
}

.volvo-shop-catalog__empty-icon {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	background: #F5F5F5;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 24px;
}

.volvo-shop-catalog__empty-title {
	margin: 0 0 20px;
	color: var(--text-primary, #000);
	text-align: center;
	font-family: VolvoCentum;
	font-size: 22px;
	font-style: normal;
	font-weight: 600;
	line-height: 28px; /* 127.273% */
}

.volvo-shop-catalog__empty-text {
	color: #707070;
	font-size: 14px;
	max-width: 480px;
	margin: 0 auto 24px;
}

.volvo-shop-catalog__empty-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.volvo-shop-catalog__empty-reset,
.volvo-shop-catalog__empty-clear {
	border-radius: 4px;
	color: var(--text-secondary, #5E5E5E);
	text-align: center;
	font-family: VolvoCentum, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px; /* 150% */
}

.volvo-shop-catalog__empty-reset {
	border: 1px solid #dcd7ca;
	background: #fff;
	color: #141414;
	border-radius: var(--radius-pill, 999px);
	border: 1.5px solid var(--border-strong, #000);
	color: var(--text-primary, #000);
	font-family: VolvoCentum;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px; /* 150% */
}

.volvo-shop-catalog__empty-clear {
	background: #fff;
	border: none;
	color: var(--text-primary, #000);
	font-family: VolvoCentum;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	border-radius: var(--radius-pill, 999px);
	line-height: 24px; /* 150% */
}

.volvo-shop-catalog__empty-reset:hover,
.volvo-shop-catalog__empty-clear:hover {
	background: #141414;
	border-color: #141414;
	color: #fff;
}

/* Pagination */

.volvo-shop-catalog__pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 40px;
}

.volvo-shop-catalog__page-nav,
.volvo-shop-catalog__page-number {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid transparent;
	background: #fff;
	color: #141414;
	padding: 0;
	font-size: 14px;
}

.volvo-shop-catalog__page-nav:hover,
.volvo-shop-catalog__page-number:hover {
	background: #000;
	color: #fff;
}
.volvo-shop-catalog__page-nav:hover svg path,
.volvo-shop-catalog__page-number:hover svg path {
	stroke: #fff;
}

.volvo-shop-catalog__page-nav[disabled] {
	opacity: 0.4;
	background: transparent;
 	border-color: transparent;
	border-radius: 50%;
}

.volvo-shop-catalog__page-nav[disabled]:hover {
	opacity: 0.4;
	background: transparent;
 	border-color: transparent;
	border-radius: 50%;
}

.volvo-shop-catalog__page-nav[disabled]:hover  svg path {
	stroke: #000;
}

.volvo-shop-catalog__page-number--active {
	background: #141414;
	border-color: #141414;
	color: #fff;
}

.volvo-shop-catalog__terms {
	text-align: center;
	color: #707070;
	font-size: 12px;
	margin-top: 40px;
}

@media only screen and (max-width: 992px) {
	.volvo-shop-catalog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media only screen and (max-width: 768px) {
	.volvo-shop-catalog {
		padding: 5rem 0 0 0;
	}

	/* Single row of pills with horizontal scroll instead of wrapping */
	.volvo-shop-catalog__pills {
		flex: 1 1 100%;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100%;
		min-width: 0;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		/* Thin visible scrollbar hints that the row can be scrolled */
		scrollbar-width: thin;
		scrollbar-color: #0B2DED #ebe8e0;
		padding-bottom: 10px;
	}

	.volvo-shop-catalog__pills::-webkit-scrollbar {
		height: 3px;
	}

	.volvo-shop-catalog__pills::-webkit-scrollbar-track {
		background: #ebe8e0;
		border-radius: 999px;
	}

	.volvo-shop-catalog__pills::-webkit-scrollbar-thumb {
		background: #0B2DED;
		border-radius: 999px;
	}

	.volvo-shop-catalog__pill {
		flex: 0 0 auto;
		padding: 6px 12px;
		font-size: 13px;
		line-height: 18px;
		white-space: nowrap;
	}

	/* Match the sort control text size with the mobile pills */
	.volvo-shop-catalog__sort,
	.volvo-shop-catalog__sort label {
		font-size: 13px;
		line-height: 18px;
	}

	.volvo-shop-catalog__sort-trigger {
		height: 40px;
		padding: 10px 12px;
		font-size: 13px;
		line-height: 18px;
	}

	.volvo-shop-catalog__sort-option {
		padding: 8px 10px;
		font-size: 13px;
		line-height: 18px;
	}
}

@media only screen and (max-width: 640px) {
	.volvo-shop-catalog__grid {
		grid-template-columns: 1fr;
	}

	.volvo-shop-catalog__filters {
		flex-direction: column;
		align-items: flex-start;
	}
}

a.btn--purchase {
	border-radius: 6px;
    padding: 13px 35px;
}
a.checkout-button:hover {
	background: #141414 !important;
	color: #fff !important;
}
a.checkout-button {
	border-color: #1C6ABA !important;
	background: #1C6ABA !important;
	color: #fff !important;
	border-radius: 6px;
    padding: 13px 35px;
}
a.btn--purchase:hover {
	background: #141414 !important;
	color: #fff !important;
}

.single-product .site-main {
	background: #fff;
}
