/* Upex category archive styles */

.upex-category-wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 30px 20px;
}

.upex-category-header {
	margin-bottom: 24px;
}

.upex-cat-title {
	font-size: 28px;
	margin-bottom: 8px;
}

.upex-cat-desc {
	color: #555;
	margin-bottom: 0;
}

/* Toolbar: count left, subcategory dropdown right */
.upex-grid-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.upex-product-count {
	font-size: 14px;
	color: #777;
	margin: 0;
}

/* 4-column grid */
.upex-product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
}

@media (max-width: 1024px) {
	.upex-product-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.upex-product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.upex-product-grid {
		grid-template-columns: 1fr;
	}
}

/* Product card — matches BodyCommerce loop layout styling */
.upex-product-card {
	border: 2px solid #e5e5e5;
	padding: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.upex-card-image-link {
	display: block;
	width: 85%;
	margin: 0 auto 10px;
}

.upex-card-image {
	width: 100%;
	height: auto;
	display: block;
}

.upex-card-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 6px;
	line-height: 1.3;
}

.upex-card-title a {
	color: inherit;
	text-decoration: none;
}

.upex-card-title a:hover {
	text-decoration: underline;
}

.upex-card-sku {
	font-size: 12px;
	color: #777;
	margin: 0 0 6px;
}

.upex-card-price {
	font-size: 16px;
	font-weight: 700;
	color: #bc1b18;
	margin: 0 0 10px;
}

.upex-poa-price {
	font-size: 16px;
	font-weight: 700;
	color: #bc1b18;
}

.upex-card-atc {
	margin-top: auto;
}

.upex-card-atc .button,
.upex-card-atc .add_to_cart_button,
.upex-product-grid .upex-product-card .upex-card-atc a.button,
.upex-product-grid .upex-product-card .upex-card-atc a.add_to_cart_button {
	background-color: #7f1107 !important;
	color: #ffffff !important;
	font-size: 12px;
	padding: 8px 16px;
	border: none !important;
	border-radius: 3px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.upex-card-atc .button:hover,
.upex-card-atc .add_to_cart_button:hover,
.upex-product-grid .upex-product-card .upex-card-atc a.button:hover,
.upex-product-grid .upex-product-card .upex-card-atc a.add_to_cart_button:hover {
	background-color: #5c0c05 !important;
	color: #ffffff !important;
}

.upex-poa-btn {
	background-color: #555 !important;
}

.upex-poa-btn:hover {
	background-color: #333 !important;
}

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

.upex-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid #ddd;
	color: #333;
	text-decoration: none;
	border-radius: 3px;
}

.upex-pagination .page-numbers.current {
	background: #7f1107;
	color: #fff;
	border-color: #7f1107;
}

.upex-pagination .page-numbers:hover:not(.current) {
	background: #f5f5f5;
}

/* Subcategory dropdown */
.upex-subcat-wrap {
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.upex-subcat-label {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
}

.upex-subcat-select {
	font-size: 14px;
	padding: 7px 12px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	color: #333;
	cursor: pointer;
	min-width: 220px;
}

.upex-subcat-select:focus {
	outline: none;
	border-color: #7f1107;
}

.upex-no-products {
	text-align: center;
	color: #777;
	padding: 40px 0;
}
