/*
 * ZW Catálogo: estilos base.
 * Las variables permiten ajustar el diseño desde Elementor (CSS personalizado) u OceanWP
 * sin sobrescribir reglas, por ejemplo: .zw-products-grid { --zw-accent: #e30613; }
 */
.zw-brands-grid,
.zw-categories-grid,
.zw-products-grid,
.zw-product-gallery,
.zw-specifications,
.zw-catalog-menu,
.zw-breadcrumbs {
	--zw-gap: 24px;
	--zw-border: #e5e7eb;
	--zw-radius: 8px;
	--zw-bg: #fff;
	--zw-muted-bg: #f5f5f5;
	--zw-muted: #666;
	--zw-accent: currentColor;
	--zw-shadow: 0 8px 24px rgba(0, 0, 0, .09);
}

.zw-brands-grid,
.zw-categories-grid,
.zw-products-grid {
	display: grid;
	grid-template-columns: repeat(var(--zw-columns, 3), minmax(0, 1fr));
	gap: var(--zw-gap);
	margin: 1.5rem 0;
}

.zw-brand-card,
.zw-category-card,
.zw-product-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 20px;
	border: 1px solid var(--zw-border);
	border-radius: var(--zw-radius);
	background: var(--zw-bg);
	color: inherit;
	text-align: center;
	text-decoration: none;
	transition: box-shadow .2s, transform .2s;
}

.zw-brand-card:hover,
.zw-brand-card:focus,
.zw-category-card:hover,
.zw-category-card:focus,
.zw-product-card a:hover,
.zw-product-card a:focus {
	color: inherit;
	text-decoration: none;
}

.zw-brand-card:hover,
.zw-category-card:hover,
.zw-product-card:hover,
.zw-product-card:focus-within {
	box-shadow: var(--zw-shadow);
	transform: translateY(-2px);
}

.zw-brand-card:focus-visible,
.zw-category-card:focus-visible,
.zw-product-card a:focus-visible,
.zw-catalog-menu a:focus-visible,
.zw-gallery-item:focus-visible {
	outline: 2px solid var(--zw-accent);
	outline-offset: 3px;
}

.zw-brand-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 100px;
}

.zw-brand-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 110px;
	object-fit: contain;
}

.zw-brand-logo-placeholder {
	font-weight: 700;
}

.zw-brand-name,
.zw-category-name,
.zw-product-title {
	font-weight: 600;
}

.zw-category-image,
.zw-category-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 4px;
	overflow: hidden;
	background: var(--zw-muted-bg);
}

.zw-category-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.zw-category-placeholder {
	color: var(--zw-muted);
	font-weight: 600;
}

.zw-product-card a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.zw-product-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 210px;
	overflow: hidden;
}

.zw-product-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.zw-product-no-image {
	background: var(--zw-muted-bg);
	color: var(--zw-muted);
	font-size: .9rem;
}

.zw-catalog-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.zw-catalog-menu > ul {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.zw-catalog-menu li {
	position: relative;
}

.zw-catalog-menu ul ul {
	padding: 8px 0 0 14px;
}

.zw-catalog-menu a {
	text-decoration: none;
}

.zw-catalog-menu .zw-current > a {
	font-weight: 700;
}

.zw-empty {
	padding: 16px;
	border-radius: 6px;
	background: #f7f7f7;
}

.zw-product-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
	margin: 1rem 0;
}

.zw-gallery-item {
	display: block;
	padding: 6px;
	border: 1px solid var(--zw-border);
	border-radius: 6px;
}

.zw-gallery-item img {
	display: block;
	width: 100%;
	height: auto;
}

.zw-specifications table {
	width: 100%;
	border-collapse: collapse;
}

.zw-specifications th,
.zw-specifications td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--zw-border);
	text-align: left;
}

.zw-specifications th {
	width: 40%;
}

.zw-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	font-size: .9rem;
}

.zw-breadcrumbs li {
	display: flex;
	gap: 6px;
}

.zw-breadcrumbs-sep {
	color: var(--zw-muted);
}

@media (max-width: 900px) {
	.zw-brands-grid {
		grid-template-columns: repeat(min(var(--zw-columns, 3), 3), minmax(0, 1fr));
	}

	.zw-categories-grid,
	.zw-products-grid {
		grid-template-columns: repeat(min(var(--zw-columns, 3), 2), minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.zw-brands-grid,
	.zw-categories-grid,
	.zw-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		--zw-gap: 12px;
	}

	.zw-brand-card,
	.zw-category-card,
	.zw-product-card {
		padding: 12px;
	}

	.zw-product-image {
		height: 150px;
	}

	.zw-brand-logo {
		min-height: 75px;
	}

	.zw-brand-logo img {
		max-height: 75px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zw-brand-card,
	.zw-category-card,
	.zw-product-card {
		transition: none;
	}

	.zw-brand-card:hover,
	.zw-category-card:hover,
	.zw-product-card:hover,
	.zw-product-card:focus-within {
		transform: none;
	}
}
