/**
 * Madeco Catálogo - Frontend Styles
 * Based on the provided design with responsive grid and modern UI
 */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@600&display=swap');

/* CSS Variables */
:root {
	--madeco-primary: #00225B;
	--madeco-primary-hover: #002a6a;
	--madeco-accent: #F39200;
	--madeco-border: #e5e7eb;
	--madeco-bg-light: #f9fafb;
	--madeco-text: #1f2937;
	--madeco-text-light: #6b7280;
	--madeco-white: #ffffff;
	--madeco-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	--madeco-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	--madeco-radius: 8px;
	--madeco-radius-lg: 12px;
}

/* Wrapper */
.madeco-catalogo-wrapper {
	width: 100%;
	margin: 0 auto;
	padding: 20px 0;
}

/* Breadcrumb */
.madeco-breadcrumb {
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 20px;
	color: #00225B;
}

.madeco-breadcrumb a,
.madeco-breadcrumb span {
	color: inherit;
	text-decoration: none;
}

.madeco-breadcrumb .madeco-breadcrumb-root {
	font-weight: 700;
}

.madeco-breadcrumb .madeco-breadcrumb-link:hover {
	text-decoration: underline;
}

.madeco-breadcrumb .madeco-breadcrumb-current:not(.madeco-breadcrumb-root) {
	color: var(--madeco-accent);
}

.madeco-breadcrumb .madeco-breadcrumb-sep {
	color: #00225B;
}

.madeco-breadcrumb .madeco-breadcrumb-sep-active {
	color: var(--madeco-accent);
}

/* Category Buttons */
.madeco-category-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 30px;
	padding: 0;
}

.madeco-category-btn {
	padding: 10px 20px;
	border: 1px solid #00225B;
	background: transparent;
	color: #00225B;
	font-family: 'Roboto', sans-serif;
	font-size: 16px;
	font-weight: 600;
	font-style: normal;
	line-height: 100%;
	letter-spacing: 0;
	vertical-align: middle;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.madeco-category-btn:hover {
	border-color: #00225B;
	background: #00225B;
	color: var(--madeco-white);
}

.madeco-category-btn.active {
	background: #00225B;
	color: var(--madeco-white);
	border-color: #00225B;
}

/* Catalog Title Section */
.madeco-catalog-title-section {
	margin-bottom: 20px;
}

.madeco-catalog-title {
	font-size: 32px;
	font-weight: 700;
	color: var(--madeco-text);
	margin: 0 0 5px 0;
	line-height: 1.2;
}

.madeco-catalog-count {
	font-size: 16px;
	color: var(--madeco-text-light);
	margin: 0;
}

/* Content Layout */
.madeco-catalogo-content {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 30px;
	align-items: start;
}

/* Backdrop: siempre fuera del flujo para no invertir el grid (sidebar izquierda, productos derecha) */
.madeco-filters-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999;
	pointer-events: none;
	visibility: hidden;
	opacity: 0;
	background: rgba(0, 0, 0, 0.4);
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.madeco-catalogo-wrapper.madeco-filters-open .madeco-filters-backdrop {
	pointer-events: auto;
	visibility: visible;
	opacity: 1;
}

/* Title section: flex for hamburger on mobile */
.madeco-catalog-title-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

/* Barra móvil: filtros aplicados + hamburger (oculta en escritorio) */
.madeco-filters-mobile-bar {
	display: none;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	flex: 1;
	min-width: 0;
	justify-content: flex-end;
}

.madeco-filters-mobile-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--madeco-text-light);
	margin: 0;
}

.madeco-applied-filters-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	min-width: 0;
}

.madeco-applied-filters-inline .madeco-filter-pill {
	font-size: 12px;
	padding: 4px 8px;
}

.madeco-applied-filters-inline .madeco-no-filters {
	display: none;
}

/* Hamburger button: hidden on desktop, visible on mobile */
.madeco-toggle-filters-btn.madeco-hamburger {
	display: none;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--madeco-border);
	background: var(--madeco-white);
	border-radius: var(--madeco-radius);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.madeco-toggle-filters-btn.madeco-hamburger:hover {
	background: var(--madeco-bg-light);
	border-color: var(--madeco-primary);
}

.madeco-hamburger-box {
	display: inline-block;
	width: 22px;
	height: 18px;
	position: relative;
}

.madeco-hamburger-inner {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--madeco-primary);
	border-radius: 1px;
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	transition: background 0.2s ease;
}

.madeco-hamburger-inner::before,
.madeco-hamburger-inner::after {
	content: '';
	display: block;
	width: 100%;
	height: 2px;
	background: var(--madeco-primary);
	border-radius: 1px;
	position: absolute;
	left: 0;
	transition: transform 0.25s ease, top 0.25s ease;
}

.madeco-hamburger-inner::before {
	top: -6px;
}

.madeco-hamburger-inner::after {
	top: 6px;
}

.madeco-filters-open .madeco-toggle-filters-btn.madeco-hamburger .madeco-hamburger-inner {
	background: transparent;
}

.madeco-filters-open .madeco-toggle-filters-btn.madeco-hamburger .madeco-hamburger-inner::before {
	top: 0;
	transform: rotate(45deg);
}

.madeco-filters-open .madeco-toggle-filters-btn.madeco-hamburger .madeco-hamburger-inner::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Filters Sidebar */
.madeco-filters-sidebar {
	background: var(--madeco-white);
	border: 1px solid var(--madeco-border);
	border-radius: var(--madeco-radius-lg);
	padding: 20px;
	position: sticky;
	top: 20px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

.madeco-filters-sidebar--solo-marcas #madeco-dynamic-filters,
.madeco-filters-sidebar--solo-marcas .madeco-price-filter {
	display: none !important;
}

.madeco-search-box {
	margin-bottom: 20px;
}

.madeco-search-form {
	display: flex;
	gap: 8px;
	max-width: 400px;
}

.madeco-filters-sidebar .madeco-search-box .madeco-search-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.madeco-search-input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--madeco-border);
	border-radius: 6px;
	font-size: 16px;
}

.madeco-search-input:focus {
	outline: none;
	border-color: var(--madeco-primary);
}

.madeco-search-submit {
	padding: 10px 20px;
	background: var(--madeco-primary);
	color: var(--madeco-white);
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.madeco-search-submit:hover {
	background: var(--madeco-primary-hover);
}

.madeco-products-page .madeco-search-box-hierarchical {
	margin-bottom: 24px;
}

/* Applied Filters Section */
.madeco-applied-filters-section {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--madeco-border);
}

.madeco-applied-filters-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.madeco-applied-filters-header h4 {
	font-size: 16px;
	font-weight: 700;
	color: var(--madeco-text);
	margin: 0;
}

.madeco-btn-clear-link {
	background: none;
	border: none;
	color: var(--madeco-primary);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	transition: color 0.3s ease;
}

.madeco-btn-clear-link:hover, .madeco-btn-clear-link:focus {
	color: var(--madeco-primary-hover);
	background-color: transparent !important;
	border-color: unset !important;
}

.madeco-applied-filters-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.madeco-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--madeco-bg-light);
	border: 1px solid var(--madeco-border);
	border-radius: 20px;
	font-size: 13px;
	color: var(--madeco-text);
	line-height: 1;
}

.madeco-filter-pill-remove {
	background: none;
	border: none;
	color: var(--madeco-text);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.3s ease;
}

.madeco-filter-pill-remove:hover {
	color: #dc2626;
}

.madeco-no-filters {
	font-size: 13px;
	color: var(--madeco-text-light);
	margin: 0;
	font-style: italic;
}

.madeco-filter-group {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--madeco-border);
}

.madeco-filter-group:last-of-type {
	border-bottom: none;
}

.madeco-price-filter .madeco-price-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.madeco-price-filter .madeco-price-input {
	width: 100%;
	max-width: 100px;
	padding: 8px 12px;
	border: 1px solid var(--madeco-border);
	border-radius: 6px;
	font-size: 14px;
}

.madeco-price-filter .madeco-price-separator {
	color: var(--madeco-text-light);
	font-weight: 500;
}

.madeco-price-filter .madeco-price-range-hint {
	font-size: 12px;
	color: var(--madeco-text-light);
	margin: 0;
}

.madeco-filter-group h4 {
	font-size: 16px;
	font-weight: 700;
	color: var(--madeco-text);
	margin: 0 0 12px 0;
}

.madeco-filter-label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 4px;
	cursor: pointer;
	transition: background 0.2s ease;
	border-radius: 4px;
}

.madeco-filter-label:hover {
	background: var(--madeco-bg-light);
}

.madeco-filter-label input[type="checkbox"],
.madeco-filter-label input[type="radio"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--madeco-primary);
}

.madeco-filter-label span {
	font-size: 14px;
	color: var(--madeco-text);
	flex: 1;
}

/* Products Main */
.madeco-products-main {
	width: 100%;
	min-width: 0;
}

/* Products Grid */
.madeco-products-grid {
	display: grid;
	grid-template-columns: repeat(var(--columns, 3), 1fr);
	gap: 24px;
	margin-bottom: 40px;
}

/* Product Card */
.madeco-product-card {
	background: var(--madeco-white);
	border: 1px solid var(--madeco-border);
	border-radius: var(--madeco-radius-lg);
	overflow: visible;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.madeco-product-card:hover {
	box-shadow: var(--madeco-shadow-hover);
	transform: translateY(-4px);
}

/* Miniatura: 320×303 fija en escritorio; proporción mantenida en todos los tamaños */
.madeco-product-image {
	width: 100%;
	max-width: 320px;
	height: auto;
	aspect-ratio: 320 / 303;
	margin-left: auto;
	margin-right: auto;
	padding: 20px;
	background: var(--madeco-white);
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	overflow: hidden;
	border-radius: var(--madeco-radius-lg) var(--madeco-radius-lg) 0 0;
}

.madeco-product-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.madeco-product-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.madeco-product-card:hover .madeco-product-image img {
	transform: scale(1.05);
}

/* Colores: mismo aspecto que single-product (custom-paint-swatches-wrapper) */
.madeco-product-card .madeco-product-colors {
	position: relative;
	z-index: 1;
	padding: 10px 20px 14px;
	border-top: 1px solid var(--madeco-border);
	background: var(--madeco-white, #fff);
}

.madeco-product-card .madeco-product-colors-label {
	position: relative;
	z-index: 2;
	font-size: 14px;
	color: var(--madeco-text-light, #666);
	margin-bottom: 6px;
}

.madeco-product-card .custom-paint-swatches-wrapper.madeco-product-colors-swatches {
	position: relative;
	z-index: 10;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
	align-items: center;
}

.madeco-product-card .custom-paint-swatch {
	display: inline-block;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid #d0d0d0;
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.madeco-product-card .custom-paint-swatch:hover {
	z-index: 100;
	transform: scale(1.2);
	border-color: var(--madeco-primary, #0066cc);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.madeco-product-card .custom-paint-swatch::after {
	content: attr(title);
	position: absolute;
	bottom: calc(100% + 7px);
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 11px;
	line-height: 1.3;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 20;
}

.madeco-product-card .custom-paint-swatch:hover::after {
	opacity: 1;
}

.madeco-product-content {
	padding: 20px;
	border-top: 1px solid var(--madeco-border);
	display: flex;
	flex-direction: column;
	flex: 1;
}

.madeco-product-title {
	margin: 0 0 10px 0;
	font-size: 16px;
	line-height: 1.4;
}

.madeco-product-title a {
	color: var(--madeco-text);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s ease;
}

.madeco-product-title a:hover {
	color: var(--madeco-primary);
}

.madeco-product-meta {
	margin-bottom: 8px;
}

.madeco-product-brand {
	font-size: 13px;
	color: var(--madeco-text-light);
	font-weight: 500;
}

.madeco-product-location {
	margin-bottom: 10px;
}

.madeco-product-location span {
	font-size: 13px;
	color: var(--madeco-text-light);
}

.madeco-product-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
}

.madeco-stars {
	color: #fbbf24;
	font-size: 14px;
	letter-spacing: 2px;
}

.madeco-rating-count {
	font-size: 13px;
	color: var(--madeco-text-light);
}

.madeco-product-price {
	font-size: 24px;
	font-weight: 700;
	color: var(--madeco-text);
	margin: auto 0 16px 0;
}

.madeco-btn-add-cart {
	display: block;
	text-align: center;
	background: var(--madeco-primary);
	color: var(--madeco-white) !important;
	padding: 12px 20px;
	border-radius: var(--madeco-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	border: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.madeco-btn-add-cart:hover {
	background: var(--madeco-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 59, 146, 0.3);
}

/* Pagination */
.madeco-pagination {
	text-align: center;
	margin-top: 40px;
}

.madeco-btn-load-more {
	padding: 14px 32px;
	background: var(--madeco-primary);
	color: var(--madeco-white);
	border: 2px solid var(--madeco-primary);
	border-radius: 50px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.madeco-btn-load-more:hover:not(:disabled) {
	background: var(--madeco-primary-hover);
	border-color: var(--madeco-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 59, 146, 0.4);
}

.madeco-btn-load-more:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* No Results */
.madeco-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: var(--madeco-text-light);
	font-size: 18px;
}

/* Error Message */
.madeco-error {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #dc2626;
	background: #fee2e2;
	border-radius: var(--madeco-radius);
	font-size: 16px;
}

/* Loading State */
.madeco-loading {
	opacity: 0.6;
	pointer-events: none;
}

.madeco-skeleton-grid {
	display: grid;
	grid-template-columns: repeat(var(--columns, 3), 1fr);
	gap: 24px;
	grid-column: 1 / -1;
}

.madeco-skeleton-card {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s infinite;
	border-radius: var(--madeco-radius-lg);
	height: 400px;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Responsive Design */

/* Tablets */
@media (max-width: 1024px) {
	.madeco-catalogo-content {
		grid-template-columns: 240px 1fr;
		gap: 20px;
	}

	.madeco-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.madeco-skeleton-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile */
@media (max-width: 768px) {
	.madeco-catalog-count{
		margin-bottom: 0px !important;
	}
	
	.madeco-catalogo-wrapper {
		padding: 15px 0;
	}

	.madeco-category-buttons {
		padding: 15px;
		gap: 8px;
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.madeco-category-btn {
		padding: 10px 20px;
		font-size: 14px;
		flex-shrink: 0;
	}

	.madeco-catalog-title-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.madeco-filters-mobile-bar {
		display: flex;
		margin-top: 0;
		margin-bottom: 0;
		justify-content: flex-start;
	}

	.madeco-catalog-title-inner > div:first-child {
		margin-bottom: 0;
	}

	.madeco-clear-filters-mobile {
		display: none;
		flex-shrink: 0;
		white-space: nowrap;
		font-size: 13px;
	}

	.madeco-clear-filters-mobile.is-visible {
		display: inline-block;
	}

	.madeco-toggle-filters-btn.madeco-hamburger {
		display: flex;
	}

	.madeco-catalogo-content {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.madeco-product-card .custom-paint-swatch {
		width: 28px;
		height: 28px;
	}

	.madeco-product-card .custom-paint-swatches-wrapper.madeco-product-colors-swatches {
		gap: 8px;
	}

	.madeco-filters-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		max-width: 320px;
		bottom: 0;
		z-index: 1000;
		max-height: none;
		margin: 0;
		border-radius: 0;
		overflow-y: auto;
		transform: translateX(-100%);
		transition: transform 0.25s ease, visibility 0.25s ease;
		visibility: hidden;
		box-shadow: none;
	}

	.madeco-catalogo-wrapper.madeco-filters-open .madeco-filters-sidebar {
		transform: translateX(0);
		visibility: visible;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
	}

	.madeco-catalogo-wrapper.madeco-filters-open {
		overflow: hidden;
	}

	.madeco-products-grid {
		grid-template-columns: repeat(var(--columns-mobile, 1), 1fr);
		gap: 16px;
	}

	.madeco-skeleton-grid {
		grid-template-columns: repeat(var(--columns-mobile, 1), 1fr);
	}

	.madeco-product-price {
		font-size: 20px;
	}

	.madeco-btn-load-more {
		width: 100%;
		padding: 12px 24px;
		font-size: 15px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.madeco-category-buttons {
		gap: 6px;
		padding: 12px;
	}

	.madeco-category-btn {
		padding: 8px 16px;
		font-size: 13px;
	}

	.madeco-product-card {
		border-radius: var(--madeco-radius);
	}

	.madeco-product-image {
		padding: 15px;
	}

	.madeco-product-content {
		padding: 15px;
	}

	.madeco-product-title {
		font-size: 15px;
	}

	.madeco-product-card .custom-paint-swatch {
		width: 26px;
		height: 26px;
	}

	.madeco-product-price {
		font-size: 18px;
		margin-bottom: 12px;
	}
}

/* Print Styles */
@media print {
	.madeco-category-buttons,
	.madeco-filters-sidebar,
	.madeco-pagination,
	.madeco-btn-view {
		display: none !important;
	}

	.madeco-catalogo-content {
		display: block;
	}

	.madeco-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.madeco-product-card {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}
}

/* ========================================
   MODO JERÁRQUICO
   ======================================== */

/* Vista principal de categorías */
.madeco-hierarchy-view {
	width: 100%;
}

.madeco-category-section {
	margin-bottom: 48px;
}

.madeco-parent-title {
	font-family: 'Roboto', sans-serif;
	font-size: 36px;
	font-weight: 700;
	font-style: normal;
	line-height: 100%;
	letter-spacing: 0;
	vertical-align: middle;
	color: #00225B;
	margin: 0 0 20px 0;
	padding-bottom: 12px;
}

.madeco-parent-title-link {
	color: inherit;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

.madeco-parent-title-link:hover {
	color: var(--madeco-accent);
}

/* Grid de categorías hijas */
.madeco-children-grid {
	display: grid;
	gap: 16px;
	justify-items: center;
}

.madeco-child-category-btn {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 320px;
	height: 209px;
	padding: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 15px;
	color: #00225B;
	font-family: 'Roboto', sans-serif;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	text-decoration: none !important;
}

.madeco-child-category-btn:hover {
	color: #00225B !important;
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 34, 91, 0.15);
	border-color: #00225B;
}

.madeco-child-category-image {
	width: 100%;
	height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #f9fafb;
	flex-shrink: 0;
}

.madeco-child-category-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.madeco-child-category-btn:hover .madeco-child-category-image img {
	transform: scale(1.08);
}

.madeco-child-category-name {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 0;
	padding: 16px 12px;
	line-height: 1.3;
	background: #fff;
	font-size: 24px;
	text-align: center;
	overflow-wrap: break-word;
	word-wrap: break-word;
	overflow: visible;
}

/* Banners en vista jerárquica */
.madeco-hierarchy-banner {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	background: transparent;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	border: none;
	margin-bottom: 32px;
	text-decoration: none;
	color: inherit;
}

a.madeco-hierarchy-banner:hover {
	box-shadow: none;
}

/* Columnas del banner (estructura WordPress Columns) */
.madeco-hierarchy-banner .madeco-banner-columns,
.madeco-hierarchy-banner .wp-block-columns {
	display: flex;
	flex-wrap: nowrap;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

.madeco-hierarchy-banner .wp-block-column,
.madeco-hierarchy-banner a.madeco-banner-column-link {
	min-width: 0;
	box-sizing: border-box;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	text-decoration: none !important;
	color: inherit;
}

.madeco-hierarchy-banner a.madeco-banner-column-link:hover {
	opacity: 0.95;
}

.madeco-hierarchy-banner .wp-block-image,
.madeco-hierarchy-banner figure.wp-block-image {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	line-height: 0;
}

.madeco-hierarchy-banner .wp-block-image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	vertical-align: top;
}

/* En móvil, las columnas se apilan verticalmente */
@media (max-width: 767px) {
	.madeco-hierarchy-banner .madeco-banner-columns,
	.madeco-hierarchy-banner .wp-block-columns {
		flex-direction: column;
	}
	.madeco-hierarchy-banner .wp-block-column,
	.madeco-hierarchy-banner a.madeco-banner-column-link {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
}

.madeco-hierarchy-banner .madeco-banner-content {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.madeco-hierarchy-banner .madeco-banner-title {
	font-family: 'Roboto', sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: #00225B;
	margin: 0;
	line-height: 1.3;
}

.madeco-hierarchy-banner .madeco-banner-btn {
	display: inline-block;
	padding: 10px 20px;
	background: var(--madeco-accent);
	color: #fff;
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
	align-self: flex-start;
	transition: background 0.3s ease;
}

.madeco-hierarchy-banner .madeco-banner-btn:hover {
	background: #e08500;
	color: #fff;
}

/* Grid de banners al inicio (2 columnas en desktop) */
/* Banner en vista horizontal (debajo del breadcrumb) */
.madeco-flat-banner {
	margin-bottom: 24px;
}

.madeco-hierarchy-banners-top {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin-bottom: 32px;
}

@media (min-width: 768px) {
	.madeco-hierarchy-banners-top {
		grid-template-columns: repeat(2, 1fr);
	}
}

.madeco-child-category-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #cbd5e1;
}

.madeco-child-category-placeholder svg {
	opacity: 0.5;
}

/* Vista de productos */
.madeco-products-view {
	width: 100%;
}

.madeco-hierarchical-header {
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e5e7eb;
}

.madeco-back-to-catalog {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: #00225B;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-bottom: 16px;
	text-decoration: none;
}

.madeco-back-to-catalog:hover {
	background: #001940;
	transform: translateX(-4px);
}

.madeco-back-to-catalog .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.madeco-breadcrumb-hierarchical {
	display: flex;
	align-items: center;
	font-size: 14px;
	line-height: 1.5;
}

.madeco-breadcrumb-item {
	color: #00225B;
}

.madeco-breadcrumb-root {
	font-weight: 700;
}

.madeco-breadcrumb-parent {
	color: #00225B;
}

.madeco-breadcrumb-current {
	color: var(--madeco-accent);
	font-weight: 600;
}

.madeco-breadcrumb-sep {
	margin: 0 8px;
	color: #00225B;
}

/* Contenedor de productos (usa estilos de WooCommerce del tema) */
.madeco-products-container {
	width: 100%;
}

/* Loading state */
.madeco-loading {
	text-align: center;
	padding: 60px 20px;
	font-size: 18px;
	color: #6b7280;
}

/* Error state */
.madeco-error {
	text-align: center;
	padding: 40px 20px;
	font-size: 16px;
	color: #ef4444;
	background: #fee;
	border-radius: 8px;
	border: 1px solid #fcc;
}

/* Responsive - Modo Jerárquico */
@media (max-width: 1024px) {
	.madeco-child-category-btn {
		width: 280px;
		height: auto;
		min-height: 190px;
	}
	
	.madeco-child-category-image {
		height: 130px;
		flex-shrink: 0;
	}
	
	.madeco-child-category-name {
		min-height: 48px;
		flex-shrink: 0;
	}
}

@media (max-width: 768px) {
	.madeco-children-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px;
	}
	
	.madeco-parent-title {
		font-size: 28px;
	}
	
	.madeco-child-category-btn {
		width: 100%;
		max-width: 280px;
		height: auto;
		min-height: 180px;
		font-size: 16px;
	}
	
	.madeco-child-category-image {
		height: 120px;
		flex-shrink: 0;
	}
	
	.madeco-child-category-name {
		padding: 12px 10px;
		min-height: 44px;
		flex-shrink: 0;
	}
	
	.madeco-breadcrumb-hierarchical {
		flex-wrap: wrap;
		gap: 8px;
	}
}

@media (max-width: 480px) {
	.madeco-children-grid {
		grid-template-columns: 1fr !important;
	}
	
	.madeco-category-section {
		margin-bottom: 32px;
	}
	
	.madeco-child-category-btn {
		width: 100%;
		max-width: 100%;
		height: auto;
		min-height: 200px;
		font-size: 15px;
	}
	
	.madeco-child-category-image {
		height: 140px;
		flex-shrink: 0;
	}
	
	.madeco-child-category-name {
		padding: 12px;
		min-height: 44px;
		flex-shrink: 0;
	}
	
	.madeco-back-to-catalog {
		padding: 8px 14px;
		font-size: 13px;
	}
	
	.madeco-breadcrumb-hierarchical {
		font-size: 12px;
	}
	
	.madeco-breadcrumb-sep {
		margin: 0 4px;
	}
}
