/* Products Shop Block Styles */

.wp-block-blocktheme-products-shop {
	width: 100%;
	margin: 0;
	padding: 0;
}

.wp-block-blocktheme-products-shop.with-sidebar {
	display: flex;
	flex-direction: column;
}

/* Main Wrapper */
.products-shop-wrapper {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

.products-shop-wrapper.with-sidebar {
	grid-template-columns: 250px 1fr;
}

.products-shop-wrapper.full-width {
	grid-template-columns: 1fr;
}

/* Sidebar Filters */
.shop-sidebar {
	background: linear-gradient(302deg, #dc60263b 34%, #dc26263b 63%);
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 1.5rem;
	height: fit-content;
	position: sticky;
	top: 20px;
}

.filter-widget {
	margin-bottom: 2rem;
	border-bottom: 1px solid #eee;
	padding-bottom: 1.5rem;
}

.filter-widget:last-child {
	border-bottom: none;
	margin-bottom: 1.5rem;
	padding-bottom: 0;
}

.filter-title {
	margin: 0 0 1rem 0;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #333;
}

.filter-content {
	font-size: 13px;
	color: #666;
}

/* Price Filter */
.price-slider-wrapper {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.price-slider-wrapper input[type="range"] {
	width: 100%;
	height: 6px;
	border-radius: 3px;
	background: #ddd;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #dc2626;
	cursor: pointer;
	transition: background 0.3s ease;
}

.price-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
	background: #0052a3;
}

.price-slider-wrapper input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #dc2626;
	cursor: pointer;
	border: none;
	transition: background 0.3s ease;
}

.price-slider-wrapper input[type="range"]::-moz-range-thumb:hover {
	background: #0052a3;
}

.price-display {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	color: #333;
	background: #f5f5f5;
	padding: 0.75rem;
	border-radius: 4px;
	font-size: 12px;
}

.price-separator {
	color: #ccc;
}

/* Category Filter */
.category-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.category-list li {
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
}

.category-list label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	user-select: none;
	font-size: 13px;
	color: #666;
}

.category-list input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #dc2626;
}

.category-list label:hover {
	color: #dc2626;
}

/* Attribute Filter */
.attribute-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.attribute-list>li {
	margin-bottom: 1.25rem;
}

.attribute-list strong {
	display: block;
	margin-bottom: 0.75rem;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #333;
}

.attribute-list ul {
	list-style: none;
	padding: 0 0 0 0.75rem;
	margin: 0;
	border-left: 2px solid #eee;
}

.attribute-list ul li {
	margin-bottom: 0.5rem;
}

.attribute-list label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	user-select: none;
	font-size: 12px;
	color: #666;
}

.attribute-list input[type="checkbox"] {
	width: 14px;
	height: 14px;
	cursor: pointer;
	accent-color: #dc2626;
}

.attribute-list label:hover {
	color: #dc2626;
}

/* Rating Filter */
.rating-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.rating-list li {
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
}

.rating-list label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	user-select: none;
	font-size: 12px;
	color: #666;
	flex: 1;
}

.rating-list input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #dc2626;
	flex-shrink: 0;
}

.rating-list .stars {
	display: flex;
	gap: 2px;
	flex-shrink: 0;
}

.rating-list .star {
	color: #ddd;
	font-size: 12px;
	line-height: 1;
}

.rating-list .star.filled {
	color: #ffc107;
}

.rating-list .rating-text {
	color: #999;
	font-size: 11px;
	flex-shrink: 0;
}

.rating-list label:hover {
	color: #dc2626;
}

/* Clear Filters Button */
.clear-filters-btn {
	width: 100%;
	padding: 0.75rem;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.clear-filters-btn:hover {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

/* Main Content Area */
.products-shop-main {
	width: 100%;
}

/* Breadcrumb Navigation */
.products-shop-breadcrumb-wrapper {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0 1rem;
	margin-bottom: 1.5rem;
}

.products-shop-breadcrumb {
	font-size: 14px;
	color: #666;
}

.products-shop-breadcrumb a {
	color: #dc2626;
	text-decoration: none;
	transition: color 0.3s ease;
}

.products-shop-breadcrumb a:hover {
	color: #0052a3;
	text-decoration: underline;
}

.products-shop-breadcrumb .separator {
	margin: 0 0.5rem;
	color: #ccc;
}

.products-shop-breadcrumb .current {
	font-weight: 600;
	color: #333;
}

/* Mobile Show Control */
.mobile-show-control {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.mobile-show-control .show-label {
	font-weight: 600;
	color: #333;
	font-size: 14px;
	white-space: nowrap;
}

.mobile-show-control .show-select {
	border: none;
	background: none;
	padding: 0.25rem 0.5rem;
	color: #666;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
}

/* Shop Header Controls */
.products-shop-header {
	background: linear-gradient(81deg, #dc602640 34%, #dc262682 63%);
	padding: 1.5rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 2rem;
}

.shop-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	gap: 2rem;
	flex-wrap: wrap;
}

/* Display Options (Hidden on small screens) */
.products-display {
	display: none;
	align-items: center;
	gap: 0.75rem;
}

.products-display .display-label {
	font-weight: 600;
	color: #333;
	margin-right: 0.5rem;
	white-space: nowrap;
}

.products-display button {
	padding: 0.5rem 1rem;
	border: 1px solid #ddd;
	background: #fff;
	color: #666;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.3s ease;
	font-weight: 500;
	min-width: 40px;
}

.products-display button:hover {
	border-color: #dc2626;
	color: #dc2626;
}

.products-display button.active {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

/* View Mode Toggle - Desktop Only Elements */
.view-mode-btn.desktop-only {
	display: none;
}

.view-mode-separator.desktop-only {
	display: none;
}

/* View Mode Toggle */
.view-mode-toggle {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 0.25rem;
	background: #fff;
}

.view-mode-group {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.view-mode-separator {
	width: 1px;
	height: 24px;
	background: #ddd;
	margin: 0 0.25rem;
}

.view-mode-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	color: #666;
	cursor: pointer;
	border-radius: 3px;
	transition: all 0.3s ease;
	padding: 0;
}

.view-mode-btn:hover {
	background: #f0f0f0;
	color: #dc2626;
}

.view-mode-btn.active {
	background: #dc2626;
	color: #fff;
}

.view-mode-btn svg {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

/* Grid Columns Toggle */
/* Removed - functionality integrated into view-mode-toggle */

/* Sort Control */
.sort-control {
	flex: 1;
	min-width: 200px;
}

.sort-control select {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font-size: 14px;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.2em;
	padding-right: 2.5rem;
}

.sort-control select:hover {
	border-color: #dc2626;
}

.sort-control select:focus {
	outline: none;
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Products Grid/List */
.products-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.5rem;
	padding: 0 1rem;
	margin-bottom: 2rem;
}

.products-container.view-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.product-item {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	height: 100%;
}

.product-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: #dc2626;
	transform: translateY(-4px);
}

/* Grid View */
.product-view-grid {
	display: flex;
	flex-direction: column;
}

.product-grid-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.product-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
	transform: scale(1.05);
}

/* List View */
.product-view-list {
	display: flex;
	flex-direction: row;
	height: auto;
	min-height: 180px;
}

.product-list-wrapper {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: 100%;
}

.product-content {
	padding: 1rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.product-image-left {
	width: 250px;
	min-width: 250px;
	height: 200px;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-image-left img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-item:hover .product-image-left img {
	transform: scale(1.05);
}

.product-content-right {
	padding: 1.5rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.product-title {
	margin: 0 0 0.75rem 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	color: #333;
}

.product-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.product-title a:hover {
	color: #dc2626;
}

/* List View - Meta Info */
.product-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	gap: 1rem;
}

.product-category {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.product-description {
	font-size: 13px;
	color: #666;
	margin-bottom: 1rem;
	line-height: 1.5;
	flex-grow: 1;
}

.product-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.product-price {
	font-size: 16px;
	font-weight: bold;
	color: #dc2626;
	margin-bottom: 0.75rem;
}

.product-rating {
	font-size: 12px;
	color: #999;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.product-rating .stars {
	display: inline-block;
	width: 80px;
	height: 12px;
	background: linear-gradient(90deg, #ffc107 0%, #ffc107 var(--star-width, 0%), #ddd var(--star-width, 0%), #ddd 100%);
}

.product-button {
	margin-top: auto;
	display: block;
}

.product-button a {
	width: 100%;
	padding: 0.75rem;
	background: linear-gradient(135deg, #dc2626 0%, #dc6026 100%);
	color: #fff !important;
	text-align: center;
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.3s ease;
	font-weight: 600;
	font-size: 14px;
	border: none;
	cursor: pointer;
}

.product-button a:hover {
	background: #dc6026;
}

.no-products {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem 1rem;
	color: #999;
	font-size: 16px;
}

/* Pagination */
.products-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	padding: 2rem 1rem;
	margin-top: 2rem;
	border-top: 1px solid #eee;
}

.products-pagination a,
.products-pagination span {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #dc2626;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-block;
}

.products-pagination a:hover {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

.products-pagination span.page-numbers.current {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

/* Medium Screens */
@media (min-width: 768px) {
	.products-display {
		display: flex;
	}

	.view-mode-toggle {
		display: flex;
	}

	/* Show desktop-only elements */
	.view-mode-btn.desktop-only {
		display: flex;
	}

	.view-mode-separator.desktop-only {
		display: block;
	}

	/* Hide mobile show control */
	.mobile-show-control {
		display: none;
	}

	.products-shop-header {
		justify-content: space-between;
	}

	.shop-controls {
		width: auto;
		flex-wrap: nowrap;
	}

	.sort-control {
		flex: 0 1 300px;
	}

	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}

	.products-container {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}

	.product-view-list {
		min-height: 200px;
	}

	.product-image-left {
		width: 280px;
		min-width: 280px;
		height: 220px;
	}

	/* Sidebar should be hidden on tablets */
	.products-shop-wrapper.with-sidebar {
		grid-template-columns: 1fr;
	}

	.shop-sidebar {
		display: none;
	}
}

/* Large Screens */
@media (min-width: 1024px) {
	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 2rem;
	}

	.products-shop-header {
		padding: 2rem;
	}

	.shop-controls {
		gap: 3rem;
	}

	/* Show sidebar on large screens */
	.products-shop-wrapper.with-sidebar {
		grid-template-columns: 280px 1fr;
	}

	.shop-sidebar {
		display: block;
	}
}

/* Extra Large Screens */
@media (min-width: 1440px) {
	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}

	.products-shop-wrapper.with-sidebar {
		grid-template-columns: 300px 1fr;
	}

	.shop-sidebar {
		padding: 2rem;
	}
}

/* Loading State */
.products-grid.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Editor Preview */
.editor-preview {
	background: #fff;
	border: 2px dashed #ccc;
	padding: 1rem;
	border-radius: 4px;
}

.editor-preview .products-grid {
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem;
	padding: 0;
}

.editor-preview .product-item {
	background: #f9f9f9;
	border: 1px solid #ddd;
	padding: 1rem;
	text-align: center;
	min-height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
}

/* RTL Support */
[dir="rtl"] .products-shop-breadcrumb .separator {
	margin: 0 0.5rem;
}

[dir="rtl"] .products-display button,
[dir="rtl"] .sort-control select {
	direction: rtl;
}

[dir="rtl"] .sort-control select {
	background-position: left 0.75rem center;
	padding-right: 0.75rem;
	padding-left: 2.5rem;
}

/* RTL Sidebar */
[dir="rtl"] .products-shop-wrapper.with-sidebar {
	grid-template-columns: 1fr 250px;
}

[dir="rtl"] .shop-sidebar {
	border-left: 1px solid #eee;
	border-right: none;
}

[dir="rtl"] .attribute-list ul {
	border-left: none;
	border-right: 2px solid #eee;
	padding: 0 0.75rem 0 0;
	margin-left: 0.75rem;
}

[dir="rtl"] .category-list label,
[dir="rtl"] .attribute-list label,
[dir="rtl"] .rating-list label {
	flex-direction: row-reverse;
}

@media (min-width: 1024px) {
	[dir="rtl"] .products-shop-wrapper.with-sidebar {
		grid-template-columns: 1fr 280px;
	}
}

@media (min-width: 1440px) {
	[dir="rtl"] .products-shop-wrapper.with-sidebar {
		grid-template-columns: 1fr 300px;
	}
}