/* ========================================================================== 
   PerfectBud — unified mobile rhythm
   Version: 0.9.5.2
   Scope: <= 767px only. Desktop is intentionally untouched.
   ========================================================================== */

@media (max-width: 767px) {
	:root {
		--mobile-section-gap: calc(var(--pb-space-xl) + var(--pb-space-xs) - 2px);
		--mobile-card-gap: var(--pb-container-mobile);
		--mobile-content-gap: var(--pb-space-md);
		--mobile-page-padding: var(--pb-space-md);
		--pb-mobile-header-height: 70px;
	}

	html,
	body {
		max-width: 100%;
		overflow-x: clip;
	}

	/* Shared horizontal rhythm. */
	.pb-shop__container,
	.pb-product-container,
	.pb-cart-shell,
	.pb-checkout-shell,
	.pb-account-shell,
	.pb-thankyou-shell,
	.pb-site-footer__inner,
	.pb-site-footer__gallery-wrap {
		width: calc(100% - (2 * var(--mobile-page-padding)));
		max-width: none;
		margin-inline: auto;
	}

	/* Header. */
	.pb-site-header__inner,
	.pb-site-header.is-sticky .pb-site-header__inner {
		width: calc(100% - 24px);
		min-height: var(--pb-mobile-header-height);
		padding: 0;
		gap: 6px;
	}

	.pb-site-header__logo,
	.pb-site-header__logo img,
	.pb-site-header.is-sticky .pb-site-header__logo,
	.pb-site-header.is-sticky .pb-site-header__logo img {
		width: 108px;
		max-width: 108px;
	}

	.pb-site-header__right,
	.pb-site-header__actions {
		align-items: center;
		gap: 0;
	}

	.pb-header-action,
	.pb-menu-toggle {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
		padding: 0;
		border: 0;
		border-radius: 50%;
	}

	.pb-header-action svg {
		display: block;
		width: 20px;
		height: 20px;
	}

	.pb-menu-toggle {
		background: #e73324;
	}

	.pb-menu-toggle span {
		position: absolute;
		left: 50%;
		display: block;
		width: 18px;
		height: 2px;
		margin: 0;
		border-radius: 999px;
		background: #fff;
		transform: translateX(-50%);
	}

	.pb-menu-toggle span:nth-child(1) { top: 13px; }
	.pb-menu-toggle span:nth-child(2) { top: 19px; }
	.pb-menu-toggle span:nth-child(3) { top: 25px; }

	.pb-header-action__count {
		top: -2px;
		right: -2px;
		min-width: 18px;
		height: 18px;
		padding: 0 4px;
		font-size: 10px;
		line-height: 18px;
	}

	/* Mobile navigation. */
	.pb-mobile-menu {
		z-index: 10020;
		align-items: stretch;
		justify-content: flex-end;
		background: rgba(4, 7, 10, .72);
	}

	.pb-mobile-menu__panel {
		width: min(92vw, 410px);
		max-width: 100%;
		height: 100dvh;
		max-height: 100dvh;
		padding: 24px 20px max(24px, env(safe-area-inset-bottom));
		overflow-y: auto;
		overscroll-behavior: contain;
		background: #0c1015;
	}

	.pb-mobile-menu__top {
		position: sticky;
		top: -24px;
		z-index: 3;
		margin: -24px -20px 16px;
		padding: 24px 20px 16px;
		background: #0c1015;
	}

	.pb-mobile-menu__title {
		font-size: 34px;
		line-height: 1;
	}

	.pb-mobile-menu__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 50%;
		font-size: 22px;
		line-height: 1;
	}

	.pb-mobile-nav,
	.pb-mobile-nav ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.pb-mobile-nav > li {
		border-bottom: 1px solid rgba(255, 255, 255, .12);
	}

	.pb-mobile-nav a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 54px;
		padding: 10px 0;
		font-size: 24px;
		line-height: 1.15;
	}

	.pb-mobile-nav .menu-item-has-children > a::after {
		content: "+";
		flex: 0 0 auto;
		margin-left: 16px;
		font-family: Arial, sans-serif;
		font-size: 24px;
		font-weight: 400;
		transition: transform .2s ease;
	}

	.pb-mobile-nav .menu-item-has-children.is-mobile-open > a::after {
		transform: rotate(45deg);
	}

	.pb-mobile-nav .sub-menu {
		display: none;
		padding: 0 0 10px 14px;
	}

	.pb-mobile-nav .menu-item-has-children.is-mobile-open > .sub-menu {
		display: block;
	}

	.pb-mobile-nav .sub-menu li {
		border-top: 1px solid rgba(255, 255, 255, .08);
	}

	.pb-mobile-nav .sub-menu a {
		min-height: 44px;
		padding: 8px 0;
		color: rgba(255, 255, 255, .76);
		font-size: 19px;
	}

	.pb-mobile-nav .sub-menu .sub-menu {
		padding-left: 14px;
	}

	.pb-mobile-nav .sub-menu .sub-menu a {
		font-size: 17px;
	}

	.pb-mobile-menu__phone {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 50px;
		margin-top: 20px;
		padding: 10px 16px;
		border-radius: 10px;
		background: #e73324;
		color: #fff;
		font-size: 19px;
	}

	/* Sticky CTA safety. */
	body.pb-ui-open .perfectbud-sticky-cta,
	body.single-product .perfectbud-sticky-cta,
	body.woocommerce-cart .perfectbud-sticky-cta,
	body.woocommerce-checkout .perfectbud-sticky-cta,
	body.woocommerce-account .perfectbud-sticky-cta,
	body.woocommerce-order-received .perfectbud-sticky-cta {
		display: none;
	}

	body:not(.woocommerce):not(.woocommerce-page) .perfectbud-sticky-cta {
		right: 12px;
		bottom: max(16px, env(safe-area-inset-bottom));
		min-height: 44px;
		max-width: calc(100vw - 24px);
		padding: 9px 14px;
		gap: 8px;
		font-size: 12px;
		box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
	}

	body.woocommerce-shop .perfectbud-sticky-cta,
	body.tax-product_cat .perfectbud-sticky-cta,
	body.tax-product_tag .perfectbud-sticky-cta {
		right: 10px;
		bottom: max(12px, env(safe-area-inset-bottom));
		min-height: 40px;
		max-width: min(220px, calc(100vw - 20px));
		padding: 8px 12px;
		gap: 7px;
		font-size: 10px;
	}

	/* Shop and product grids. */
	.pb-shop__body,
	.pb-shop-catalogue,
	.pb-shop-catalogue ul.products,
	.pb-shop-catalogue ul.products li.product,
	.pb-product-related ul.products,
	.pb-product-related ul.products li.product {
		width: 100%;
		max-width: none;
		min-width: 0;
	}

	.pb-shop-catalogue ul.products,
	body.single-product .pb-product-related ul.products,
	.woocommerce ul.products {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin: 0;
	}

	.pb-shop-catalogue ul.products li.product,
	body.single-product .pb-product-related ul.products li.product,
	.woocommerce ul.products li.product {
		width: auto;
		max-width: none;
		min-width: 0;
		margin: 0;
	}

	.pb-product-card__inner {
		display: flex;
		flex-direction: column;
		height: 100%;
		border-radius: 12px;
	}

	.pb-product-card__media {
		flex: 0 0 auto;
		aspect-ratio: 1 / 1;
		margin: 6px 6px 0;
		border-radius: 8px;
	}

	.pb-product-card__image-link {
		padding: 8px;
	}

	.pb-product-card__badges {
		top: 7px;
		left: 7px;
		gap: 3px;
	}

	.pb-product-card__badge {
		min-height: 19px;
		padding: 3px 5px;
		font-size: 7px;
		letter-spacing: .03em;
	}

	.pb-product-card__content {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-height: 0;
		padding: 10px 9px 9px;
	}

	.pb-product-card__category,
	.pb-product-card__category a {
		font-size: 8px;
		letter-spacing: .07em;
	}

	.pb-product-card__title {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		min-height: 34px;
		max-height: 34px;
		margin: 7px 0 8px;
		font-size: 14px;
		line-height: 1.2;
	}

	.pb-product-card__footer {
		margin-top: auto;
		gap: 8px;
	}

	.pb-product-card__price-wrap {
		min-height: 26px;
		gap: 3px;
		flex-wrap: wrap;
	}

	.pb-product-card__price {
		font-size: 15px;
	}

	.pb-product-card__tax-note {
		font-size: 8px;
	}

	.pb-product-card__button {
		width: 100%;
		min-height: 40px;
		padding: 8px 6px;
		border-radius: 7px;
		font-size: 8px;
		letter-spacing: .02em;
	}

	/* Single product rhythm. */
	body.single-product .pb-product-hero {
		padding-top: 20px;
		padding-bottom: 32px;
	}

	.pb-product-container {
		padding-top: 0;
	}

	.pb-product-breadcrumbs {
		margin: 0 0 12px;
	}

	.pb-product-grid {
		gap: var(--mobile-content-gap);
	}

	.pb-product-gallery {
		position: static;
		top: auto;
	}

	.pb-product-gallery,
	.pb-product-gallery .woocommerce-product-gallery,
	.pb-product-gallery .woocommerce-product-gallery__wrapper,
	.pb-product-gallery .woocommerce-product-gallery__image {
		min-height: 0;
	}

	.pb-product-gallery .woocommerce-product-gallery__image {
		aspect-ratio: 1 / 1;
	}

	.pb-product-gallery .woocommerce-product-gallery__image img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	.pb-product-summary {
		padding: 20px 16px;
	}

	.pb-product-title {
		font-size: clamp(32px, 9.5vw, 44px);
	}

	.pb-product-details {
		padding-block: 40px;
	}

	.pb-product-related {
		padding-block: 40px 52px;
	}

	/* Cart rhythm. */
	body.woocommerce-cart .woocommerce,
	body.woocommerce-checkout .woocommerce,
	body.woocommerce-account .woocommerce {
		max-width: 100%;
		overflow: visible;
	}

	.pb-cart-layout,
	.pb-checkout-layout,
	.pb-account-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--mobile-content-gap);
	}

	.pb-cart-card,
	.pb-cart-summary,
	.pb-checkout-card,
	.pb-checkout-summary,
	.pb-account-navigation,
	.pb-account-content {
		width: 100%;
		max-width: none;
		min-width: 0;
	}

	.pb-cart-shipping {
		grid-template-columns: 1fr;
		gap: 10px;
		margin-top: 16px;
		margin-bottom: 16px;
		padding: 14px 16px;
	}

	.pb-cart-coupon,
	.pb-cart-actions,
	.pb-cart-quote-form,
	.pb-checkout-card,
	.pb-checkout-summary {
		padding-right: 16px;
		padding-left: 16px;
	}

	.pb-cart-actions {
		min-height: 0;
		gap: 10px;
	}

	.pb-cart-actions .button,
	.pb-cart-coupon .button,
	.pb-cart-coupon input,
	.pb-cart-quote-form input,
	.pb-cart-quote-form textarea {
		width: 100%;
		max-width: none;
	}

	.pb-cart-quote,
	.pb-cart-quote-form {
		margin-top: 16px;
	}

	.pb-cart-quote-form textarea {
		min-height: 96px;
	}

	/* Checkout rhythm. */
	.pb-checkout-steps {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.pb-checkout-step {
		min-height: 68px;
	}

	.pb-checkout-card,
	.pb-checkout-summary {
		padding-top: 18px;
		padding-bottom: 18px;
	}

	.pb-checkout-summary {
		position: static;
		top: auto;
	}

	.pb-checkout .form-row {
		margin-bottom: 10px;
	}

	.pb-checkout input.input-text,
	.pb-checkout textarea,
	.pb-checkout select,
	.pb-checkout .select2-selection {
		min-height: 48px;
	}

	/* Account / thank-you rhythm. */
	.pb-account-layout,
	.pb-thankyou-layout {
		gap: var(--mobile-content-gap);
	}

	.pb-account-navigation,
	.pb-account-content,
	.pb-thankyou-card {
		padding: 18px 16px;
	}

	/* Footer. */
	.pb-site-footer__social-gallery {
		padding-top: 24px;
	}

	.pb-site-footer__gallery {
		gap: 6px;
	}

	.pb-site-footer__main {
		padding: 30px 0 34px;
	}

	.pb-site-footer__inner {
		gap: 20px;
	}

	.pb-site-footer__brand {
		text-align: left;
	}

	.pb-site-footer__logo {
		width: 120px;
		min-width: 0;
		margin: 0;
	}

	.pb-site-footer__facebook {
		margin: 16px 0 0;
	}

	.pb-site-footer__copyright {
		margin-top: 12px;
	}

	.pb-site-footer h2 {
		margin-bottom: 8px;
	}

	.pb-footer-menu > li > a {
		min-height: 26px;
		padding: 2px 0;
	}

	.pb-site-footer__phone-card {
		min-height: 56px;
	}

	/* Search overlay. */
	.pb-search-overlay {
		padding: 0;
	}

	.pb-search-overlay__panel {
		width: 100%;
		min-height: 100dvh;
		padding: 24px var(--mobile-page-padding) max(24px, env(safe-area-inset-bottom));
		border-radius: 0;
	}

	.pb-search-overlay__header {
		align-items: flex-start;
		gap: 10px;
	}

	.pb-search-overlay__header h2 {
		font-size: clamp(40px, 12vw, 58px);
	}

	.pb-search-overlay__close {
		flex: 0 0 44px;
		width: 44px;
		height: 44px;
	}

	.pb-search-form {
		display: block;
		position: relative;
	}

	.pb-search-form input[type="search"] {
		width: 100%;
		min-height: 54px;
		padding: 10px 46px 10px 14px;
		font-size: 17px;
	}

	.pb-search-form__icon {
		left: auto;
		right: 15px;
		top: 15px;
	}

	.pb-search-form__submit {
		display: none;
	}

	.pb-live-search-results {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--pb-space-xs);
	}

	.pb-live-search-card {
		grid-template-columns: 86px minmax(0, 1fr) 40px;
		align-items: center;
		gap: 12px;
		min-height: 110px;
		padding: 12px;
	}

	.pb-live-search-card__image {
		width: 86px;
		height: 86px;
	}

	.pb-live-search-card__content {
		display: flex;
		min-width: 0;
		flex-direction: column;
		align-items: flex-start;
	}

	.pb-live-search-card__category {
		margin-bottom: var(--pb-space-xxs);
		font-size: 10px;
	}

	.pb-live-search-card__title {
		display: -webkit-box;
		overflow: hidden;
		margin: 0 0 var(--pb-space-xxs);
		font-size: 21px;
		line-height: 1.05;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.pb-live-search-card__price {
		font-size: 16px;
		line-height: 1.2;
	}

	.pb-live-search-card__arrow {
		width: 40px;
		height: 40px;
	}
}

@media (max-width: 390px) {
	:root {
		--mobile-page-padding: var(--pb-container-mobile);
	}

	.pb-site-header__inner,
	.pb-site-header.is-sticky .pb-site-header__inner {
		width: calc(100% - 16px);
		gap: 2px;
	}

	.pb-site-header__logo,
	.pb-site-header__logo img,
	.pb-site-header.is-sticky .pb-site-header__logo,
	.pb-site-header.is-sticky .pb-site-header__logo img {
		width: 98px;
		max-width: 98px;
	}

	.pb-header-action,
	.pb-menu-toggle {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
		min-width: 38px;
		min-height: 38px;
	}

	.pb-shop-catalogue ul.products,
	body.single-product .pb-product-related ul.products,
	.woocommerce ul.products {
		gap: 10px;
	}

	.pb-live-search-results {
		gap: var(--pb-space-xs);
	}
}

@media (max-width: 340px) {
	:root {
		--mobile-page-padding: 12px;
	}

	.pb-site-header__logo,
	.pb-site-header__logo img,
	.pb-site-header.is-sticky .pb-site-header__logo,
	.pb-site-header.is-sticky .pb-site-header__logo img {
		width: 90px;
		max-width: 90px;
	}

	.pb-header-action,
	.pb-menu-toggle {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
		min-width: 36px;
		min-height: 36px;
	}

	.pb-product-card__content {
		padding: 9px 8px 8px;
	}

	.pb-product-card__title {
		font-size: 13px;
	}

	.pb-product-card__price {
		font-size: 14px;
	}

	.pb-product-card__button {
		font-size: 7.5px;
	}
}
