@media (max-width: 1120px) {
	.bbco-product-grid,
	.bbco-product-grid--compact,
	.bbco-vendor-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bbco-category-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.bbco-how-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bbco-hero__inner {
		grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
		gap: var(--bbco-space-32);
	}

	.bbco-product-body,
	.bbco-product-detail__grid,
	.bbco-vendor-storefront {
		grid-template-columns: 1fr;
	}

	.bbco-detail-panel,
	.bbco-quote-panel,
	.bbco-vendor-sidebar {
		position: static;
	}
}

@media (max-width: 960px) {
	body.is-menu-open .bbco-site-header {
		z-index: var(--bbco-z-header-stuck);
	}

	body.is-menu-open {
		overflow: hidden;
	}

	body.is-menu-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: var(--bbco-z-overlay);
		background: color-mix(in srgb, var(--bbco-ink) 36%, transparent);
	}

	.bbco-header__inner {
		grid-template-columns: auto auto 1fr auto;
		gap: var(--bbco-space-12);
		min-height: 70px;
	}

	.bbco-menu-toggle {
		display: inline-flex;
	}

	.bbco-brand {
		justify-self: start;
	}

	.bbco-brand img,
	.bbco-brand .custom-logo {
		max-height: 38px;
		max-width: 170px;
	}

	.bbco-header__actions {
		grid-column: 4;
		justify-content: flex-end;
	}

	.bbco-primary-nav {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: var(--bbco-z-drawer);
		display: flex;
		flex-direction: column;
		width: min(86vw, 320px);
		max-width: 100%;
		height: 100dvh;
		border: 0;
		border-radius: 0;
		background: var(--bbco-surface);
		box-shadow: var(--bbco-shadow-ink-md);
		transform: translateX(-102%);
		transition: transform var(--bbco-dur-base) var(--bbco-ease), visibility var(--bbco-dur-base) var(--bbco-ease);
		visibility: hidden;
		overflow: hidden;
	}

	body.is-menu-open .bbco-primary-nav {
		transform: translateX(0);
		visibility: visible;
	}

	.bbco-drawer__head {
		flex: 0 0 auto;
	}

	.bbco-primary-nav .bbco-menu {
		flex: 1 1 auto;
		align-content: start;
		min-height: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.bbco-drawer__actions {
		flex: 0 0 auto;
	}

	.bbco-drawer__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 68px;
		padding: var(--bbco-space-12) var(--bbco-space-16);
		border-bottom: 1px solid var(--bbco-border);
	}

	.bbco-drawer__brand img,
	.bbco-drawer__brand .custom-logo {
		max-height: 36px;
		max-width: 160px;
	}

	.bbco-drawer__close {
		display: inline-grid;
		place-items: center;
		width: 38px;
		height: 38px;
		border: 0;
		background: transparent;
		color: var(--bbco-primary);
		font-size: 28px;
		line-height: 1;
		cursor: pointer;
	}

	.bbco-menu {
		display: grid;
		gap: 0;
	}

	.bbco-menu li {
		border-bottom: 1px solid var(--bbco-border);
	}

	.bbco-menu a,
	.bbco-drawer__actions a,
	.bbco-drawer__actions span {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 52px;
		padding: var(--bbco-space-12) var(--bbco-space-16);
		color: var(--bbco-text);
		font-weight: var(--bbco-weight-semibold);
	}

	.bbco-menu a:hover,
	.bbco-menu .current-menu-item > a,
	.bbco-drawer__actions a:hover {
		background: color-mix(in srgb, var(--bbco-primary) 6%, transparent);
		color: var(--bbco-primary);
	}

	.bbco-menu .menu-item-has-children > a::after {
		margin-left: auto;
		transition: transform var(--bbco-dur-fast) var(--bbco-ease);
	}

	.bbco-menu .menu-item-has-children.is-open > a::after {
		transform: rotate(225deg) translateY(-2px);
	}

	.bbco-menu .menu-item-has-children {
		position: static;
	}

	.bbco-menu .sub-menu {
		position: static;
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: color-mix(in srgb, var(--bbco-primary) 4%, transparent);
		box-shadow: none;
	}

	.bbco-menu .menu-item-has-children.is-open > .sub-menu {
		display: grid;
	}

	.bbco-menu .sub-menu a {
		padding-left: var(--bbco-space-32);
		white-space: normal;
		font-weight: var(--bbco-weight-medium);
		min-height: 44px;
	}

	.bbco-menu .sub-menu .sub-menu {
		margin-left: 0;
	}

	.bbco-menu .sub-menu .sub-menu a {
		padding-left: var(--bbco-space-48);
	}

	.bbco-market-layout,
	.bbco-dashboard-layout {
		grid-template-columns: 1fr;
	}

	.bbco-filter-toggle {
		display: inline-flex;
		margin-bottom: var(--bbco-space-16);
	}

	.bbco-filter-panel {
		position: fixed;
		inset: auto 0 0;
		z-index: var(--bbco-z-filter);
		display: none;
		max-height: 86vh;
		background: var(--bbco-surface);
		border-radius: var(--bbco-radius-lg) var(--bbco-radius-lg) 0 0;
		box-shadow: var(--bbco-shadow-md);
		overflow-y: auto;
	}

	body.is-filter-open .bbco-filter-panel {
		display: block;
	}

	.bbco-filter-form {
		border: 0;
		border-radius: var(--bbco-radius-lg) var(--bbco-radius-lg) 0 0;
		box-shadow: none;
		max-height: none;
	}

	.bbco-filter-form__fields {
		overflow: visible;
	}

	.bbco-filter-form__close {
		display: inline-grid;
		place-items: center;
	}

	.bbco-results-toolbar,
	.bbco-toolbar-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.bbco-toolbar-actions {
		width: 100%;
	}

	.bbco-sort-form,
	.bbco-sort-form select,
	.bbco-view-toggle {
		width: 100%;
	}

	.bbco-pagination .nav-links {
		justify-content: center;
	}

	.bbco-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bbco-dashboard-nav {
		position: static;
	}
}


@media (max-width: 640px) {
	.bbco-header__inner {
		grid-template-columns: 44px 1fr 44px;
		gap: var(--bbco-space-8);
		min-height: 70px;
	}

	.bbco-menu-toggle {
		grid-column: 1;
		justify-self: start;
	}

	.bbco-brand {
		grid-column: 2;
		justify-self: center;
	}

	.bbco-brand img,
	.bbco-brand .custom-logo {
		max-height: 38px;
		max-width: 170px;
	}

	.bbco-header__actions {
		display: none;
	}

	.bbco-drawer__actions {
		display: grid;
		gap: 0;
	}

	.bbco-drawer__actions a,
	.bbco-drawer__actions span {
		border-bottom: 1px solid var(--bbco-border);
	}

	.bbco-pagination .page-numbers {
		min-width: 40px;
		min-height: 40px;
	}
}

@media (max-width: 720px) {
	.bbco-container {
		width: min(calc(100% - var(--bbco-space-24)), var(--bbco-container));
	}

	.bbco-section {
		padding: var(--bbco-space-48) 0;
	}

	.bbco-section__header {
		display: grid;
		align-items: start;
		justify-content: center;
		gap: var(--bbco-space-12);
	}

	/* Center home section headers only on mobile. Desktop keeps title/content left and CTA right. */
	.bbco-home-section__header {
		justify-items: center;
		text-align: center;
		gap: var(--bbco-space-16);
	}

	.bbco-home-section__header h2 {
		font-size: clamp(1.95rem, 8vw, 2.25rem);
	}

	.bbco-home-section__header p {
		margin-top: var(--bbco-space-12);
	}

	.bbco-hero,
	.bbco-hero__inner {
		min-height: auto;
	}

	.bbco-hero {
		background: var(--bbco-surface);
	}

	.bbco-hero__inner {
		grid-template-columns: 1fr;
		padding: var(--bbco-space-48) 0 var(--bbco-space-32);
	}

	.bbco-hero__decor--rings {
		max-width: 180px;
		opacity: 0.45;
	}

	.bbco-hero__decor--arrow {
		top: 18px;
		width: 58px;
	}

	.bbco-hero__pill {
		min-height: 44px;
		margin-bottom: var(--bbco-space-20);
		padding: var(--bbco-space-8) var(--bbco-space-20);
		font-size: var(--bbco-text-sm);
	}

	.bbco-hero__content h1 {
		font-size: var(--bbco-text-3xl);
	}

	.bbco-hero-search,
	.bbco-archive-search,
	.bbco-newsletter {
		grid-template-columns: 1fr;
	}

	.bbco-hero-search .bbco-btn {
		width: 100%;
	}

	.bbco-hero__media {
		justify-content: center;
	}

	.bbco-hero__media img {
		width: min(100%, 360px);
	}

	.bbco-prefooter-cta {
		padding: 0;
	}

	.bbco-prefooter-cta__card {
		padding: var(--bbco-space-24) 0;
		text-align: center;
	}

	.bbco-prefooter-cta__content {
		max-width: 560px;
		margin: 0 auto var(--bbco-space-16);
	}

	.bbco-product-grid,
	.bbco-product-grid--compact,
	.bbco-vendor-grid,
	.bbco-dashboard-cards {
		grid-template-columns: 1fr;
	}

	.bbco-how-grid {
		grid-template-columns: 1fr;
	}

	.bbco-how-step,
	.bbco-how-cta {
		padding: var(--bbco-space-20);
	}

	.bbco-how-step--middle .bbco-how-step__media {
		order: 0;
		margin-top: 0;
	}

	.bbco-category-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bbco-product-grid.is-list .bbco-product-card,
	.bbco-post-card {
		grid-template-columns: 1fr;
	}

	.bbco-vendor-card {
		grid-template-columns: 124px minmax(0, 1fr);
	}

	.bbco-vendor-card__logo {
		width: 124px;
	}

	.bbco-product-detail-hero__inner {
		grid-template-columns: 1fr;
	}

	.bbco-gallery__thumbs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.bbco-spec-table div,
	.bbco-info-list div,
	.bbco-spec-mini div {
		grid-template-columns: 1fr;
		gap: var(--bbco-space-4);
	}

	.bbco-inline-actions {
		grid-template-columns: 1fr;
	}

	.bbco-vendor-profile {
		align-items: flex-start;
		flex-direction: column;
	}

	.bbco-footer__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 460px) {
	.bbco-category-grid {
		grid-template-columns: 1fr;
	}

	.bbco-vendor-card {
		grid-template-columns: 1fr;
	}

	.bbco-vendor-card__logo,
	.bbco-vendor-card .bbco-btn--small {
		width: 100%;
	}

	.bbco-btn,
	.bbco-product-card__actions a,
	.bbco-inline-actions a,
	.bbco-inline-actions button {
		width: 100%;
		white-space: normal;
	}

	.bbco-home-section__header .bbco-btn {
		width: auto;
		min-width: 168px;
		white-space: nowrap;
	}

	.bbco-product-card__footer {
		align-items: stretch;
		flex-direction: column;
	}

	.bbco-tabs__panel,
	.bbco-page-content {
		padding: var(--bbco-space-16);
	}

	.bbco-how-step__index strong {
		font-size: clamp(2.2rem, 11vw, 2.6rem);
	}
}

@media (max-width: 780px) {
	.bbco-auth-grid {
		grid-template-columns: 1fr;
	}

	.bbco-user-menu__dropdown {
		right: auto;
		left: 0;
	}
}
