/**
 * Shop / Catalog Stylesheet - Twenty Twenty-Five Child (Digital Innova)
 * Dynamic WooCommerce Catalog & Category Archives with collapsible filter panel (closed by default),
 * flat desktop filter layout (no border/box-padding), 12px layout gap,
 * neutralized Gutenberg has-global-padding, and unified 14px mobile grid matching homepage.
 */

:root {
	--innova-blue: #258cff;
	--innova-blue-deep: #1668ed;
	--innova-purple: #b62cdc;
	--innova-pink: #d228cc;
	--innova-navy: #111a42;
	--innova-navy-dark: #070b35;
	--innova-text-dark: #172044;
	--innova-text-heading: #51545b;
	--innova-text-muted: #687080;
	--innova-text-subtle: #8992a4;
	--innova-border: #e8eaf0;
	--innova-bg-light: #fafbfc;
	--innova-sale-red: #E5002B;
	--innova-radius: 16px;
	--innova-site-max-width: 1870px;
}

/* ==========================================================================
   Global Padding & Layout Resets (Elimina has-global-padding de WordPress)
   ========================================================================== */
.shop-page-main.has-global-padding,
.shop-page-section.has-global-padding,
.wp-block-group.shop-page-main,
.wp-block-group.shop-page-section,
.has-global-padding > .shop-page-main,
.has-global-padding > .shop-page-section {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.shop-page-section {
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
	box-sizing: border-box;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.shop-catalog-container {
	width: min(var(--innova-site-max-width), 95vw) !important;
	max-width: var(--innova-site-max-width) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ==========================================================================
   Shop Intro & Header
   ========================================================================== */
.shop-intro {
	padding: 24px 0 28px;
	width: 100%;
	box-sizing: border-box;
}

.shop-breadcrumbs {
	font-size: 13px;
	color: #687080;
	margin-bottom: 14px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	line-height: 1.4;
}

.shop-breadcrumbs a {
	color: #687080;
	text-decoration: none;
	transition: color 0.2s ease;
}

.shop-breadcrumbs a:hover {
	color: var(--innova-blue);
	text-decoration: underline;
}

.shop-breadcrumbs .crumb-sep {
	color: #aeb4c0;
	font-size: 11px;
}

.shop-breadcrumbs .crumb-current {
	color: #172044;
	font-weight: 500;
}

.shop-intro-heading {
	font-size: clamp(28px, 3.5vw, 52px);
	font-weight: 400;
	line-height: 1.12;
	color: #172044;
	margin: 0 0 10px;
	letter-spacing: -0.02em;
}

.shop-intro-desc {
	font-size: clamp(14px, 1.1vw, 16px);
	color: #555a64;
	line-height: 1.6;
	max-width: 840px;
	margin: 0;
}

.shop-intro-desc p {
	margin: 0 0 8px;
	color: inherit;
}

.shop-intro-desc b,
.shop-intro-desc strong {
	color: #172044;
	font-weight: 600;
}

/* ==========================================================================
   Shop Toolbar (Filters Toggle, Counter & Sort Dropdown)
   ========================================================================== */
.shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0 24px;
	border-bottom: 1px solid var(--innova-border);
	margin-bottom: 24px;
	width: 100%;
	box-sizing: border-box;
	flex-wrap: wrap;
}

.shop-filter-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border: 1.5px solid #373a43;
	border-radius: 24px;
	padding: 8px 18px;
	font-size: 12px;
	font-weight: 500;
	color: #172044;
	cursor: pointer;
	transition: all 0.25s ease;
	user-select: none;
}

.shop-filter-toggle:hover {
	background: #f4f5f6;
	border-color: #172044;
}

.shop-filter-toggle.is-active,
.shop-filter-toggle.has-active {
	background: #172044;
	color: #ffffff;
	border-color: #172044;
}

.shop-filter-toggle.is-active svg,
.shop-filter-toggle.has-active svg {
	color: #ffffff;
	stroke: #ffffff;
}

.shop-filter-toggle svg {
	color: #172044;
	flex-shrink: 0;
	transition: color 0.2s ease;
}

.desktop-filter-label {
	display: inline;
}

.mobile-filter-label {
	display: none;
}

.shop-toolbar-right {
	display: flex;
	align-items: center;
	gap: 14px;
	color: #687080;
	font-size: 14px;
}

.shop-count-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #555a64;
}

.shop-toolbar-sep {
	color: #d1d5db;
}

.shop-sort-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.shop-sort-trigger {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	outline: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	color: var(--innova-blue-deep);
	cursor: pointer;
	padding: 2px 20px 2px 0;
	white-space: nowrap;
}

.shop-sort-trigger .sort-check {
	flex-shrink: 0;
}

.shop-sort-wrapper .sort-chevron {
	position: absolute;
	right: 0;
	pointer-events: none;
	color: var(--innova-text-muted);
	transition: transform 0.2s ease;
}

.shop-sort-wrapper.is-open .sort-chevron {
	transform: rotate(180deg);
}

.shop-sort-options {
	display: none;
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 200px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #ffffff;
	border: 1px solid var(--innova-border);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(7, 11, 53, 0.12);
	z-index: 60;
	box-sizing: border-box;
}

.shop-sort-wrapper.is-open .shop-sort-options {
	display: block;
}

.shop-sort-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	color: var(--innova-text-dark);
	padding: 7px 10px;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.shop-sort-option:hover {
	background: var(--innova-bg-light);
}

.shop-sort-option.is-selected {
	font-weight: 700;
	color: var(--innova-blue-deep);
}

.shop-sort-option .sort-option-check {
	flex-shrink: 0;
	color: var(--innova-blue-deep);
	opacity: 0;
}

.shop-sort-option.is-selected .sort-option-check {
	opacity: 1;
}

/* ==========================================================================
   Shop Content Layout (12px gap)
   ========================================================================== */
.shop-content-layout {
	display: flex;
	gap: 12px !important;
	align-items: flex-start;
	width: 100%;
	box-sizing: border-box;
	position: relative;
}

/* --------------------------------------------------------------------------
   Filter Panel (Flat desktop layout without box border or padding)
   -------------------------------------------------------------------------- */
.filter-panel {
	display: none;
	width: 250px;
	flex: 0 0 250px;
	background: #ffffff;
	box-sizing: border-box;
	border: 0 !important;
	padding: 0 14px 0 0 !important;
	animation: filterPanelFadeIn 0.25s ease forwards;
}

.filter-panel.is-open {
	display: block;
}

@keyframes filterPanelFadeIn {
	from {
		opacity: 0;
		transform: translateX(-6px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.filter-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 1.5px solid #172044;
	margin-bottom: 12px;
}

.filter-panel-title {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #172044;
	margin: 0;
}

.filter-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-reset-btn {
	background: none;
	border: 1px solid var(--innova-border);
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	color: #687080;
	cursor: pointer;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.filter-reset-btn:hover {
	color: var(--innova-blue);
	border-color: var(--innova-blue);
	background: #f0f7ff;
}

.filter-close-btn {
	display: none;
	background: none;
	border: 0;
	color: #172044;
	cursor: pointer;
	padding: 2px;
}

/* Filter Groups & Accordions (Closed by default) */
.filter-groups-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.filter-group-item {
	border-bottom: 1px solid var(--innova-border);
	padding: 12px 0;
}

.filter-group-item:last-child {
	border-bottom: 0;
}

.filter-group-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: 0;
	padding: 4px 0;
	font-size: 14px;
	font-weight: 600;
	color: #30333b;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: color 0.2s ease;
}

.filter-group-toggle:hover {
	color: var(--innova-blue);
}

.filter-group-toggle .toggle-icon {
	color: #8992a4;
	font-size: 16px;
	font-weight: 600;
	transition: transform 0.2s ease;
	line-height: 1;
}

.filter-group-content {
	padding-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.filter-option-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	color: #555a64;
	text-decoration: none !important;
	padding: 6px 8px;
	border-radius: 6px;
	background: transparent;
	transition: all 0.2s ease;
}

.filter-option-link:hover {
	background: #f4f5f6;
	color: #172044;
}

.filter-option-link.is-active {
	background: #ebf4ff;
	color: var(--innova-blue);
	font-weight: 600;
}

.filter-option-count {
	font-size: 11px;
	color: #8992a4;
	background: #f4f5f6;
	padding: 2px 7px;
	border-radius: 10px;
	font-weight: 500;
}

.filter-option-link.is-active .filter-option-count {
	background: #dbeafe;
	color: var(--innova-blue);
}

/* --------------------------------------------------------------------------
   Product Grid Area (Occupies full space when filters are closed)
   -------------------------------------------------------------------------- */
.shop-product-grid-wrapper {
	flex: 1 1 100%;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

.shop-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 16px;
	row-gap: 36px;
	width: 100%;
	box-sizing: border-box;
}

/* Product Card */
.shop-product-card {
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	color: inherit;
	background: #ffffff;
	position: relative;
	min-width: 0;
	box-sizing: border-box;
	transition: transform 0.2s ease;
}

.shop-product-card:hover .shop-product-thumb img {
	transform: scale(1.04);
}

.shop-product-thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	background: var(--innova-bg-light);
	border-radius: 0;
	overflow: hidden;
	display: grid;
	place-items: center;
	position: relative;
	margin-bottom: 12px;
	box-sizing: border-box;
}

.shop-product-thumb img {
	max-width: 88%;
	max-height: 88%;
	width: auto;
	height: auto;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 0.3s ease;
}

.shop-product-card-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--innova-sale-red);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	z-index: 2;
}

.shop-product-title {
	font-size: 15px;
	font-weight: 600;
	color: #30333b;
	margin: 0 0 8px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 2.7em;
}

.shop-product-prices {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	flex-wrap: wrap;
}

.shop-product-price {
	font-size: 15px;
	font-weight: 600;
	color: #494B51;
	line-height: 1.2;
}

.shop-product-price.sale-price,
.shop-product-prices .sale-price {
	background: var(--innova-sale-red);
	color: #ffffff !important;
	padding: 2px 8px;
	font-size: 13px;
	font-weight: 700;
	order: 1;
	border-radius: 3px;
}

.shop-product-prices del {
	font-size: 13px;
	color: #8992a4;
	text-decoration: line-through;
	font-weight: 400;
	order: 2;
}

/* No Products Found */
.shop-no-products {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 20px;
	background: #fafbfc;
	border-radius: 16px;
	border: 1px dashed var(--innova-border);
}

.shop-no-products p {
	font-size: 16px;
	color: #555a64;
	margin: 0 0 20px;
}

/* ==========================================================================
   Shop Pagination (Official & Functional WooCommerce / WP Controls)
   ========================================================================== */
.shop-pagination-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 50px 0 20px;
	width: 100%;
}

.shop-pagination-list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	list-style: none;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.shop-pagination-item {
	display: inline-flex;
	margin: 0;
}

.shop-pagination-nav .page-numbers {
	min-width: 42px;
	height: 42px;
	padding: 0 10px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: #494B51;
	background: #ffffff;
	border: 1.5px solid var(--innova-border);
	text-decoration: none !important;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.shop-pagination-nav a.page-numbers:hover {
	border-color: var(--innova-blue);
	color: var(--innova-blue);
	background: #f0f7ff;
	transform: translateY(-1px);
}

.shop-pagination-nav .page-numbers.current {
	background: var(--innova-blue) !important;
	border-color: var(--innova-blue) !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(37, 140, 255, 0.35);
}

.shop-pagination-nav .page-numbers.dots {
	border: 0;
	background: transparent;
	color: #8992a4;
	cursor: default;
	min-width: 24px;
}

.shop-pagination-nav .page-numbers.prev,
.shop-pagination-nav .page-numbers.next {
	background: #ffffff;
	color: #172044;
	padding: 0;
	width: 42px;
	height: 42px;
}

.shop-pagination-nav .page-numbers.prev svg,
.shop-pagination-nav .page-numbers.next svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* ==========================================================================
   Responsive Adaptations (Matches 14px mobile grid of homepage)
   ========================================================================== */
@media (max-width: 1280px) {
	.shop-product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 14px;
		row-gap: 30px;
	}
}

@media (max-width: 800px) {
	.has-global-padding,
	.shop-page-main.has-global-padding,
	.shop-page-section.has-global-padding {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.shop-catalog-container {
		width: 100% !important;
		padding-left: 14px !important;
		padding-right: 14px !important;
		box-sizing: border-box !important;
	}

	.shop-content-layout {
		display: block;
	}

	.desktop-filter-label {
		display: none;
	}

	.mobile-filter-label {
		display: inline;
	}

	/* Mobile Filter Drawer / Bottom Sheet */
	.shop-filter-backdrop {
		position: fixed;
		inset: 0;
		background: rgba(8, 14, 39, 0.55);
		z-index: 998;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.28s ease, visibility 0.28s ease;
	}

	.shop-filter-backdrop.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.filter-panel {
		position: fixed;
		z-index: 999;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-height: 80vh;
		overflow-y: auto;
		padding: 22px 20px 32px !important;
		background: #ffffff;
		border-radius: 24px 24px 0 0;
		box-shadow: 0 -10px 40px rgba(17, 26, 66, 0.25);
		transform: translateY(105%);
		visibility: hidden;
		transition: transform 0.3s ease, visibility 0.3s ease;
		display: block !important;
		border: 0 !important;
	}

	.filter-panel.is-open {
		transform: translateY(0);
		visibility: visible;
	}

	.filter-close-btn {
		display: block;
	}

	.shop-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
		row-gap: 28px;
	}

	.shop-intro {
		padding: 12px 0 16px;
	}

	.shop-intro-heading {
		font-size: 26px;
		margin-bottom: 6px;
	}

	.shop-toolbar {
		padding: 10px 0 18px;
		margin-bottom: 20px;
		gap: 12px;
	}

	.shop-toolbar-right {
		width: 100%;
		justify-content: space-between;
	}

	.shop-product-title {
		font-size: 13px;
		min-height: 2.6em;
	}

	.shop-product-price {
		font-size: 13px;
	}

	.shop-pagination-nav {
		padding: 35px 0 10px;
	}

	.shop-pagination-list {
		gap: 6px;
	}

	.shop-pagination-nav .page-numbers {
		min-width: 36px;
		height: 36px;
		font-size: 13px;
	}
}
