/*
Theme Name: Automize Child
Theme URI: https://automize.risingbamboo.com/
Description: Child theme for the Automize theme by Rising Bamboo.
Author: Rising Bamboo
Author URI: https://risingbamboo.com
Template: automize
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: automize-child
*/

/* ==========================================================================
   Add your custom styles below this line
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shop Top Filter Bar
   -------------------------------------------------------------------------- */

/* Allow the top bar to wrap so filters sit above grid/list + result count */
.category-top-bar {
	flex-wrap: wrap;
}

.rbb-topbar-filter-wrap {
	width: 100%;
	margin-bottom: 20px;
	order: -1;               /* push above result-count & ordering inside the flex container */
	flex: 0 0 100%;
}

.rbb-topbar-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding: 15px 20px;
	border: 1px solid var(--rbb-general-button-bg-color, #e5e5e5);
	border-radius: 10px;
	background: #fff;
}

/* Individual select wrapper — reuse sidebar widget class for visual consistency */
.rbb-topbar-filter-group {
	flex: 1 1 160px;
	min-width: 140px;
	max-width: 220px;
}

.rbb-topbar-select {
	width: 100%;
	height: 42px;
	padding: 0 32px 0 12px;
	font-size: 13px;
	font-family: var(--typography-body, inherit);
	color: var(--rbb-general-body-text-color, #666);
	border: 1px solid var(--rbb-general-button-bg-color, #e5e5e5);
	border-radius: 5px;
	background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 10px center / 12px 12px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: border-color 0.2s;
}

.rbb-topbar-select:focus {
	outline: none;
	border-color: var(--rbb-general-primary-color, #000);
}

/* Highlight selects that have an active filter value */
.rbb-topbar-select:not([value=""]):valid:not(:first-child) {
	border-color: var(--rbb-general-primary-color, #000);
}

/* Buttons */
.rbb-topbar-filter-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex: 0 0 auto;
	margin-left: auto;
}

.rbb-topbar-filter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.25s, color 0.25s, border-color 0.25s;
	white-space: nowrap;
}

.rbb-topbar-filter-reset {
	background: transparent;
	color: var(--rbb-general-body-text-color, #666);
	border: 1px solid var(--rbb-general-button-bg-color, #e5e5e5);
	text-decoration: none;
}

.rbb-topbar-filter-reset:hover {
	border-color: var(--rbb-general-primary-color, #000);
	color: var(--rbb-general-primary-color, #000);
}

/* Responsive — stack on mobile */
@media (max-width: 767px) {
	.rbb-topbar-filter {
		flex-direction: column;
		padding: 12px 15px;
	}

	.rbb-topbar-filter-group {
		max-width: 100%;
		flex: 1 1 100%;
	}

	.rbb-topbar-filter-actions {
		width: 100%;
		margin-left: 0;
		justify-content: stretch;
	}

	.rbb-topbar-filter-btn {
		flex: 1;
	}
}
