/* Product tabs — sticky category bar. */

/* The JS tags the WPBakery row that holds the bar; the row is what sticks,
   because only a direct child of the page body can stay stuck for the whole page. */
.ags-ptabs-row {
	position: sticky;
	top: var(--ags-ptabs-top, 78px);
	z-index: 30;
}

/* On tablet and phone the theme clips the page wrapper and body with
   overflow:hidden, which makes them scroll containers and stops the row
   sticking (the bar then slides under the header leaving a white sliver).
   `clip` hides the same overflow without creating a scroll container. */
@media (max-width: 1024px) {
	body:has(.ags-ptabs) {
		overflow-x: clip !important;
		overflow-y: visible !important;
	}

	body:has(.ags-ptabs) #wrap {
		overflow: clip !important;
	}
}

.ags-ptabs {
	background: #fff;
	border-top: 1px solid rgba(19, 31, 40, .12);
	border-bottom: 1px solid rgba(19, 31, 40, .12);
}

.ags-ptabs__inner {
	max-width: var(--ags-max);
	margin-inline: auto;
	padding: 12px var(--ags-pad-x);
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scrollbar-width: none;
}

.ags-ptabs__inner::-webkit-scrollbar {
	display: none;
}

.ags-ptabs__tab {
	flex: none;
	padding: 9px 18px;
	border-radius: 999px;
	border: 1px solid rgba(19, 31, 40, .18);
	background: #fff;
	color: var(--ags-secondary);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
}

/* Phone: four tabs share the full width, no gap left on the right. */
@media (max-width: 767px) {
	.ags-ptabs__inner {
		gap: 6px;
	}

	.ags-ptabs__tab {
		flex: 1 1 0;
		min-width: 0;
		padding: 9px 4px;
		font-size: 12px;
		text-align: center;
	}
}

.ags-ptabs__tab:hover,
.ags-ptabs__tab.is-active {
	background: var(--ags-primary);
	border-color: var(--ags-primary);
	color: #fff;
}
