/* ============================================
   SAPO CATEGORY PAGE STYLES
   ============================================ */

/* SAPO CATEGORY HEADER */
.sapo-category-header {
	width: 100%;
	background: #000;
	padding: 60px 0;
	margin: 0;
	position: relative;
	min-height: 200px;
	display: flex;
	align-items: center;
}
.sapo-category-header.with-background-image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	min-height: 300px;
	padding: 80px 0;
}
.sapo-category-header.with-background-image::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1;
}
.sapo-category-header-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	position: relative;
	z-index: 2;
}
.sapo-back-arrow {
	color: #fff;
	text-decoration: none;
	font-size: 32px;
	margin-right: 20px;
	display: inline-flex;
	align-items: center;
	transition: opacity 0.3s ease;
	font-weight: 600;
	line-height: 1;
}
.sapo-back-arrow:hover {
	opacity: 0.7;
}
.sapo-category-title {
	color: #fff;
	font-size: 48px;
	font-weight: 700;
	text-transform: uppercase;
	margin: 0;
	letter-spacing: 1px;
	line-height: 1.2;
}
.sapo-category-header.with-background-image .sapo-category-title {
	text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Hide original category title/page title */
.woocommerce-products-header,
.woocommerce-products-header h1,
.page-title,
.entry-title,
.woodmart-page-title {
	display: none !important;
}

/* SAPO FULL WIDTH DESCRIPTION */
.sapo-fullwidth-description {
	width: 100%;
	background: #fff;
	padding: 30px 0;
	margin: 0;
}
.sapo-description-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}
.sapo-description-container p {
	font-size: 15px;
	line-height: 1.7;
	color: #333;
	margin: 0 0 15px 0;
	font-weight: 400;
}
.sapo-description-container p:last-child {
	margin-bottom: 0;
}

/* SAPO FULL WIDTH SLIDER */
.sapo-fullwidth-slider {
	width: 100%;
	background: #fff;
	padding: 0 60px;
	margin: 0;
	position: relative;
	z-index: 1;
	overflow: visible;
}
.sapo-slider-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0;
	position: relative;
	z-index: 1;
	overflow: visible;
}
/* Wrapper for Woodmart carousel initialization - Force horizontal layout immediately */
.sapo-slider-container > [data-owl-carousel] {
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch !important;
	scrollbar-width: none;
	-ms-overflow-style: none;
	width: 100%;
}
.sapo-slider-container > [data-owl-carousel]::-webkit-scrollbar {
	display: none;
}
/* Force horizontal layout for carousel items even before Owl Carousel initialization */
.sapo-slider-container > [data-owl-carousel] .sapo-categories-carousel {
	display: flex !important;
	flex-wrap: nowrap !important;
	width: 100%;
}
.sapo-slider-container > [data-owl-carousel] .sapo-cat-item {
	flex: 0 0 auto !important;
	min-width: 0;
	width: auto !important;
}
.sapo-categories-carousel {
	position: relative;
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch !important;
	scrollbar-width: none;
	-ms-overflow-style: none;
	width: 100%;
}
.sapo-categories-carousel::-webkit-scrollbar {
	display: none;
}
/* Force horizontal layout even before Owl Carousel initialization */
.sapo-categories-carousel:not(.owl-loaded) > .sapo-cat-item {
	flex: 0 0 auto !important;
	min-width: 0;
	width: auto !important;
}
/* When Owl Carousel is loaded, it will override these styles */
.sapo-categories-carousel.owl-loaded {
	display: block !important;
	overflow: hidden !important;
}
.sapo-slider-container > [data-owl-carousel].owl-loaded {
	display: block !important;
	overflow: hidden !important;
}
.sapo-slider-container > [data-owl-carousel].owl-loaded .sapo-categories-carousel {
	display: block !important;
	overflow: hidden !important;
}
.sapo-categories-carousel.owl-carousel {
	display: block;
}
.sapo-categories-carousel .owl-stage-outer {
	position: relative;
	overflow: hidden;
}
.sapo-categories-carousel .owl-stage {
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
}
.sapo-categories-carousel .owl-item {
	float: left;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-perspective: 1000px;
	perspective: 1000px;
}
.sapo-cat-item {
	text-align: center;
	padding: 10px;
	display: block;
	width: 100%;
	flex-shrink: 0;
}
.sapo-cat-link {
	display: block;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s ease;
}
.sapo-cat-link:hover {
	transform: translateY(-3px);
}
.sapo-cat-image {
	width: 140px;
	height: 140px;
	margin: 0 auto 12px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #e0e0e0;
	background: #fff;
	transition: all 0.3s ease;
}
.sapo-cat-link:hover .sapo-cat-image {
	border-color: #333;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.sapo-cat-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.sapo-cat-name {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	margin: 0 0 6px 0;
	line-height: 1.4;
}
.sapo-cat-count {
	font-size: 12px;
	color: #666;
	margin: 0;
	font-weight: 400;
}

/* Owl Carousel Navigation */
.sapo-categories-carousel .owl-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: calc(100% + 120px);
	left: -60px;
	right: -60px;
	pointer-events: none;
	z-index: 10;
}
.sapo-categories-carousel .owl-nav button {
	pointer-events: all;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	background: #fff !important;
	border: 2px solid #ddd !important;
	color: #333 !important;
	font-size: 20px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
	position: absolute !important;
	z-index: 10;
}
.sapo-categories-carousel .owl-nav button:hover {
	background: #333 !important;
	color: #fff !important;
	border-color: #333 !important;
	transform: scale(1.05) !important;
}
.sapo-categories-carousel .owl-nav button.owl-prev {
	left: 0 !important;
}
.sapo-categories-carousel .owl-nav button.owl-next {
	right: 0 !important;
}
.sapo-categories-carousel .owl-dots {
	display: none !important;
}

/* SIDEBAR STYLES */
.woocommerce-sidebar {
	background: #fff;
}
.woocommerce-sidebar .widget {
	margin-bottom: 30px;
}
.woocommerce-sidebar .widget-title {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	text-transform: uppercase;
	margin-bottom: 15px;
	letter-spacing: 0.5px;
}
.woocommerce-sidebar .widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.woocommerce-sidebar .widget ul li {
	margin-bottom: 8px;
}
.woocommerce-sidebar .widget ul li a {
	color: #333;
	font-size: 14px;
	text-decoration: none;
	transition: color 0.3s ease;
}
.woocommerce-sidebar .widget ul li a:hover {
	color: #000;
}
.woocommerce-sidebar .widget ul li.current-cat > a,
.woocommerce-sidebar .widget ul li.current-cat-parent > a {
	color: #000;
	font-weight: 600;
}

/* PRODUCT GRID STYLES */
.woocommerce ul.products {
	margin: 0 -15px;
}
.woocommerce ul.products li.product {
	padding: 0 15px;
	margin-bottom: 30px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	margin: 10px 0 5px 0;
	line-height: 1.4;
}
.woocommerce ul.products li.product .price {
	font-size: 14px;
	color: #333;
	font-weight: 600;
}
.woocommerce ul.products li.product .price del {
	color: #999;
	font-weight: 400;
}

/* BREADCRUMBS STYLES */
.woocommerce-breadcrumb {
	font-size: 13px;
	color: #666;
	margin-bottom: 15px;
}
.woocommerce-breadcrumb a {
	color: #666;
	text-decoration: none;
}
.woocommerce-breadcrumb a:hover {
	color: #000;
}

/* SHOP TOOLS STYLES */
.shop-loop-head {
	margin-bottom: 20px;
}
.wd-shop-tools {
	font-size: 13px;
	color: #666;
}

/* CONTENT WITH PRODUCTS */
.content-with-products {
	padding-top: 50px;
}
.woodmart-archive-shop .container .content-layout-wrapper  {
	padding-top: 50px !important;
}
/* Ensure filter buttons are clickable */
.wd-show-sidebar-btn,
.wd-show-sidebar-btn a,
.wd-filter-buttons,
.wd-filter-buttons a,
.open-filters,
.wd-sidebar-opener,
.wd-sidebar-opener a {
	pointer-events: auto !important;
	cursor: pointer !important;
	z-index: 999 !important;
	position: relative !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Ensure filters area is visible and functional */
.filters-area {
	z-index: 100 !important;
	position: relative !important;
}

/* Make sure sidebar container is properly styled */
.sidebar-container {
	z-index: 1000 !important;
}

.sidebar-container.wd-opened {
	z-index: 1001 !important;
}

/* Make sure our custom header doesn't block clicks on elements below */
.sapo-category-header,
.sapo-fullwidth-description,
.sapo-fullwidth-slider {
	position: relative;
	z-index: 1;
}

/* Ensure shop tools area doesn't block clicks */
.shop-loop-head,
.wd-shop-tools {
	position: relative;
	z-index: 10;
}

/* Responsive Styles */
@media (max-width: 1024px) {
	.sapo-fullwidth-slider {
		padding: 0 50px;
	}
	.sapo-categories-carousel .owl-nav {
		width: calc(100% + 100px);
		left: -50px;
		right: -50px;
	}
	.sapo-cat-image {
		width: 120px;
		height: 120px;
	}
	.sapo-categories-carousel .owl-nav button {
		width: 36px !important;
		height: 36px !important;
		font-size: 18px !important;
	}
	.sapo-categories-carousel .owl-nav button.owl-prev {
		left: 0 !important;
	}
	.sapo-categories-carousel .owl-nav button.owl-next {
		right: 0 !important;
	}
}

@media (max-width: 768px) {
	.sapo-category-header {
		padding: 40px 0;
		min-height: 150px;
	}
	.sapo-category-header.with-background-image {
		min-height: 220px;
		padding: 50px 0;
	}
	.sapo-category-header-container {
		padding: 0 15px;
	}
	.sapo-back-arrow {
		font-size: 24px;
		margin-right: 15px;
	}
	.sapo-category-title {
		font-size: 32px;
	}
	.sapo-fullwidth-description {
		padding: 25px 0;
	}
	.sapo-description-container p {
		font-size: 14px;
	}
	.sapo-fullwidth-slider {
		padding: 0 40px;
	}
	.sapo-categories-carousel .owl-nav {
		width: calc(100% + 80px);
		left: -40px;
		right: -40px;
	}
	.sapo-cat-image {
		width: 100px;
		height: 100px;
	}
	.sapo-cat-name {
		font-size: 14px;
	}
	.sapo-cat-count {
		font-size: 11px;
	}
	.sapo-categories-carousel .owl-nav button {
		width: 32px !important;
		height: 32px !important;
		font-size: 16px !important;
	}
	.sapo-categories-carousel .owl-nav button.owl-prev {
		left: 0 !important;
	}
	.sapo-categories-carousel .owl-nav button.owl-next {
		right: 0 !important;
	}
}

@media (max-width: 480px) {
	.sapo-category-header {
		padding: 30px 0;
		min-height: 120px;
	}
	.sapo-category-header.with-background-image {
		min-height: 180px;
		padding: 40px 0;
	}
	.sapo-category-header-container {
		padding: 0 15px;
	}
	.sapo-back-arrow {
		font-size: 20px;
		margin-right: 12px;
	}
	.sapo-category-title {
		font-size: 24px;
	}
	.sapo-fullwidth-description {
		padding: 20px 0;
	}
	.sapo-description-container {
		padding: 0 15px;
	}
	.sapo-description-container p {
		font-size: 13px;
	}
	.sapo-fullwidth-slider {
		padding: 0 35px;
	}
	.sapo-categories-carousel .owl-nav {
		width: calc(100% + 70px);
		left: -35px;
		right: -35px;
	}
	.sapo-cat-image {
		width: 85px;
		height: 85px;
	}
	.sapo-cat-name {
		font-size: 13px;
	}
	.sapo-cat-count {
		font-size: 10px;
	}
	.sapo-categories-carousel .owl-nav button {
		width: 30px !important;
		height: 30px !important;
		font-size: 14px !important;
	}
	.sapo-categories-carousel .owl-nav button.owl-prev {
		left: 0 !important;
	}
	.sapo-categories-carousel .owl-nav button.owl-next {
		right: 0 !important;
	}
}
