/* never show the filter button outside phones */
.vobler-fbtn { display: none; }
/* Vobler — mobile layout (header, front page, catalog landing). Loaded last; only <= 768px, desktop is untouched. */
@media (max-width: 768px) {

	/* ---------- Header: logo + quick links + cart + login on row 1, search + language on row 2 ---------- */
	.custom-main-header { padding: 8px 0 10px; }
	.main-header-wrapper { padding: 0 12px; }
	.main-header-content {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto auto;
		grid-template-areas: "logo . cart acc" "ql ql ql ql" "search search search lang";
		gap: 8px 8px;
		align-items: center;
		width: 100%;
	}
	.main-header-content::after { display: none !important; }
	.header-logo { grid-area: logo; flex: none; width: auto; }
	.header-logo > a:last-child { margin-left: 0; }
	.header-logo img { max-height: 44px; width: auto; }
	.header-quick-links { grid-area: ql; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	.header-quick-links a { font-size: 12px; line-height: 1; padding: 9px 6px; white-space: nowrap; text-align: center; }
	.header-cart { grid-area: cart; justify-self: end; }
	.header-account { grid-area: acc; }
	.header-account a, .header-account .button { font-size: 12px; padding: 8px 10px; white-space: nowrap; }
	.header-search { grid-area: search; max-width: 100%; min-width: 0; }
	.header-lang-mobile { grid-area: lang; width: 72px; }
	.header-lang-mobile select { height: 36px; }

	/* ---------- Page gutters ---------- */
	.site-content > .col-full { margin-left: 0; margin-right: 0; max-width: 100%; padding-left: 14px; padding-right: 14px; }
	body.tax-product_cat #primary, body.tax-product_brand #primary, body.tax-product_tag #primary, body.post-type-archive-product #primary,
	.vobler-home { padding-left: 0; padding-right: 0; padding-top: 12px; }

	/* ---------- Front page ---------- */
	/* yellow strip: 2 x 2 instead of four full-width lines */
	.vobler-home__notice { padding-top: 10px; padding-bottom: 10px; }
	.vobler-home__notice > .wp-block-group__inner-container { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
	.vobler-notice__item > .wp-block-group__inner-container { display: flex; align-items: center; gap: 6px; }
	.vobler-notice__item p { font-size: 12px; line-height: 1.25; margin: 0; }
	.vobler-notice__item figure { flex: 0 0 22px; margin: 0; }
	.vobler-notice__item img { width: 22px; height: 22px; }

	.vobler-home__hero, .vobler-home__banners, .vobler-home__sliders, .vobler-home__stories, .vobler-home__facebook, .vobler-home__youtube { margin-top: 14px; margin-bottom: 14px; padding-top: 0; padding-bottom: 0; }
	.vobler-home h2.wp-block-heading { font-size: 22px; margin: 0 0 10px; }

	/* three promo banners: one swipeable row instead of three 300px blocks */
	.vobler-banners {
		display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 92%;
		gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
		padding-bottom: 6px; scrollbar-width: none;
	}
	.vobler-banners::-webkit-scrollbar { display: none; }
	.vobler-banner { scroll-snap-align: start; height: 210px; min-height: 0; border-radius: 12px; scroll-snap-stop: always; overflow: hidden; }
	.vobler-banner__text { font-size: 17px; line-height: 1.25; }

	/* Instagram stories: one big square at a time, swipe sideways (the plugin sets pixel sizes and a negative margin) */
	body .vobler-home__stories .jr-insta-thumb ul.thumbnails:is(.jr_col_5, .jr_col_6) {
		display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch; margin: 0 !important; padding: 0 0 6px; scrollbar-width: none;
	}
	body .vobler-home__stories .jr-insta-thumb ul.thumbnails:is(.jr_col_5, .jr_col_6)::-webkit-scrollbar { display: none; }
	body .vobler-home__stories .jr-insta-thumb ul.thumbnails:is(.jr_col_5, .jr_col_6) > li {
		flex: 0 0 92%; width: auto !important; height: auto !important; float: none; margin: 0 !important; scroll-snap-align: start; scroll-snap-stop: always;
	}
	body .vobler-home__stories .jr-insta-thumb ul.thumbnails:is(.jr_col_5, .jr_col_6) > li > div {
		width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; background-size: cover !important; background-position: center !important; border-radius: 12px;
	}
	body .vobler-home__stories .jr-insta-thumb ul.thumbnails:is(.jr_col_5, .jr_col_6) > li > div > a { display: block; width: 100%; height: 100%; }

	/* YouTube: one card at a time, swipe sideways, readable titles */
	.ytffv__list { display: flex !important; flex-wrap: nowrap !important; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 0 0 6px; margin: 0; scrollbar-width: none; }
	.ytffv__list::-webkit-scrollbar { display: none; }
	.ytffv__item { flex: 0 0 92% !important; width: auto !important; max-width: none !important; margin: 0 !important; scroll-snap-align: start; scroll-snap-stop: always; }
	.ytffv__link, .ytffv__img { border-radius: 12px; }
	.ytffv__title { color: #fff !important; font-size: 14px; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.8); background: linear-gradient(transparent, rgba(0,0,0,.78)); padding: 26px 12px 12px; }

	/* product / category sliders: the plugin wrappers add 20px each side, use the page gutter instead */
	.cps-slider-wrap, .cps-cat-slider-wrap { padding-left: 0; padding-right: 0; }

	/* ---------- Catalog landing: compact 2-column tiles ---------- */
	.vobler-catalog__title { font-size: 26px; margin: 4px 0 14px; }
	.vcc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
	.vcc-card { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px; }
	.vcc-card__media { flex: none; width: 100%; max-width: 150px; }
	.vcc-card__body { align-items: center; gap: 4px; width: 100%; }
	.vcc-card__title { flex-wrap: wrap; justify-content: center; font-size: 14px; }
	.vcc-card__subcats { display: none; }

	/* ---------- Product grid (category, brand, search, related): 2 per row ---------- */
	.woocommerce ul.products, .woocommerce-page ul.products, .woocommerce ul.products[class*="columns-"] {
		display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0;
	}
	.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
	.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
		width: auto !important; float: none !important; margin: 0 !important; padding: 8px 8px 10px;
		display: flex; flex-direction: column; min-width: 0;
	}
	.woocommerce ul.products li.product img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 0 6px; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title,
	.woocommerce-page ul.products li.product h2.woocommerce-loop-product__title {
		font-size: 13px !important; line-height: 1.3 !important; min-height: 0 !important; height: auto !important; margin: 0 0 6px !important; padding: 0 !important;
		display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; align-items: initial; justify-content: initial;
	}
	.woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price { font-size: 15px !important; margin: auto 0 8px; }
	.woocommerce ul.products li.product .button, .woocommerce-page ul.products li.product .button {
		display: block !important; opacity: 1 !important; visibility: visible !important; position: static !important; transform: none !important;
		font-size: 13px; padding: 9px 6px; margin: 0; width: 100%; text-align: center; box-sizing: border-box;
	}

	/* ---------- Cookie banner: compact, one row of buttons ---------- */
	body #vobler-cookie-notice { padding: 10px 12px; font-size: 12px; line-height: 1.35; }
	body #vobler-cookie-notice .vobler-cookie-inner { gap: 8px; }
	body #vobler-cookie-notice .vobler-cookie-actions { flex-wrap: nowrap; gap: 6px; }
	body #vobler-cookie-notice button { flex: 1 1 0; padding: 8px 4px; font-size: 12px; }

	/* ---------- Facebook feed: swipe row instead of narrow stacked cards ---------- */
	.vobler-home__facebook .wbfb_masonry_container { display: flex !important; flex-wrap: nowrap; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; height: auto !important; scrollbar-width: none; }
	.vobler-home__facebook .wbfb_masonry_container::-webkit-scrollbar { display: none; }
	.vobler-home__facebook .wbfb_masonry_post { position: static !important; flex: 0 0 82%; width: auto !important; margin: 0 !important; scroll-snap-align: start; }

	/* ---------- Catalog filters: button + accordion (assets/js/mobile.js) ---------- */
	.vobler-fbtn { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 12px; padding: 12px 14px; background: #ffe600; border: 0; border-radius: 8px; color: #000; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
	.vobler-fbtn:hover, .vobler-fbtn:focus, .vobler-fbtn:active { background: #ffe600; color: #000; outline: 0; box-shadow: none; }
	.vobler-fbtn span { flex: 1; }
	.vobler-fbtn b { min-width: 22px; height: 22px; line-height: 22px; border-radius: 11px; background: #000; color: #fff; font-size: 12px; text-align: center; }
	.vobler-fbtn i { width: 8px; height: 8px; border-right: 2px solid #000; border-bottom: 2px solid #000; transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s; }
	.vobler-fbtn.is-open i { transform: rotate(-135deg); margin-top: 4px; }
	html.vobler-fm .vobler-catalog__side { display: none; margin-bottom: 14px; }
	html.vobler-fm .vobler-catalog__side.is-open { display: block; }
	html.vobler-fm .vbf-wrap { border-bottom: 1px solid #e6e6e6; margin: 0; }
	html.vobler-fm .vbf__title { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; margin: 0; cursor: pointer; }
	html.vobler-fm .vbf__title::after { content: ""; width: 7px; height: 7px; border-right: 2px solid #555; border-bottom: 2px solid #555; transform: rotate(-135deg); transition: transform .2s; margin-right: 4px; }
	html.vobler-fm .vbf-wrap.is-collapsed .vbf__title::after { transform: rotate(45deg); }
	html.vobler-fm .vbf-wrap.is-collapsed .vbf__list { display: none; }
	html.vobler-fm .vbf__list { padding-bottom: 8px; }
	html.vobler-fm .vbf--scroll .vbf__list { max-height: 55vh; }

	/* product / category slider cards: smaller text, two per view */
	.cps-slider-wrap .cps-title, .cps-cat-slider-wrap .cps-cat-title, .cps-slide .cps-title { font-size: 13px !important; line-height: 1.3; }
	.cps-slide .cps-price { font-size: 15px; }

	/* category page order on phones: intro, subcategories, filters button, sorting, products */
	html.vobler-fm .vobler-catalog__main { display: flex; flex-direction: column; }
	html.vobler-fm .vobler-catalog__main > * { order: 10; min-width: 0; }
	html.vobler-fm .vobler-catalog__main > .woocommerce-products-header { order: 0; }
	html.vobler-fm .vobler-catalog__main > .sc-brand-intro { order: 1; }
	html.vobler-fm .vobler-catalog__main > .sc-category-intro { order: 2; }
	html.vobler-fm .vobler-catalog__main > .sc-subcat-buttons { order: 3; }
	html.vobler-fm .vobler-catalog__main > .vobler-fbtn { order: 4; margin-top: 8px; }
	html.vobler-fm .vobler-catalog__main > .vobler-catalog__side { order: 5; }
	html.vobler-fm .vobler-catalog__main > .storefront-sorting:first-of-type { order: 6; }
	html.vobler-fm .vobler-catalog__main > ul.products { order: 7; }
	html.vobler-fm .vobler-catalog__main > .storefront-sorting ~ .storefront-sorting { order: 8; }
	html.vobler-fm .vobler-catalog__main > .sc-category-links { order: 9; }

	.sc-category-intro { display: block; }
	.sc-category-intro__logo img { max-width: 120px; height: auto; border-radius: 8px; }
	.sc-subcat-buttons { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 !important; padding: 0 !important; }
	.sc-subcat-buttons a { display: flex !important; flex-direction: column; justify-content: center; margin: 0 !important; padding: 12px 10px !important; background: #f3f3f3; border-radius: 10px; text-align: center; font-size: 13px !important; line-height: 1.25; min-height: 52px; box-sizing: border-box; }
	.sc-subcat-buttons a span { font-size: 11px; font-weight: 400; opacity: .6; }
	html.vobler-fm .vobler-catalog__main > .storefront-sorting:first-of-type .woocommerce-pagination { display: none; }

	/* ---------- All content pages: the white card has 2em side padding on top of the page gutter ---------- */
	body #primary.content-area { padding-left: 0; padding-right: 0; }
	.entry-title, .page .entry-title { font-size: 28px; line-height: 1.15; margin: 8px 0 14px; }
	.woocommerce-info, .woocommerce-message, .woocommerce-error { padding: 12px 14px 12px 44px !important; font-size: 14px; }
	.woocommerce-info::before, .woocommerce-message::before, .woocommerce-error::before { left: 14px; top: 12px; }
	.woocommerce-info .button, .woocommerce-message .button { float: none !important; display: block; margin: 0 0 10px; text-align: center; }

	/* ---------- Cart ---------- */
	.woocommerce-cart table.shop_table_responsive tr { margin-bottom: 12px; }
	.woocommerce-cart .cart-collaterals, .woocommerce-cart .cart_totals { float: none !important; width: 100% !important; }
	.woocommerce-cart .cart_totals h2 { font-size: 22px; }
	.woocommerce-cart .coupon { display: flex; flex-wrap: wrap; gap: 8px; }
	.woocommerce-cart .coupon input.input-text { flex: 1 1 140px; width: auto !important; margin: 0 !important; }
	.woocommerce-cart .coupon .button, .woocommerce-cart td.actions > .button { flex: 1 1 140px; width: 100%; }
	.woocommerce-cart .wc-proceed-to-checkout .checkout-button { font-size: 16px; padding: 16px; }

	/* ---------- Shipping and totals (cart + checkout): label above value, methods use the full width ---------- */
	.woocommerce-checkout-review-order-table, .cart_totals table.shop_table { display: block; width: 100%; border: 0; }
	.woocommerce-checkout-review-order-table thead, .woocommerce-checkout-review-order-table tbody, .woocommerce-checkout-review-order-table tfoot,
	.cart_totals table.shop_table tbody { display: block; width: 100%; }
	.woocommerce-checkout-review-order-table tr, .cart_totals table.shop_table tr { display: flex !important; flex-wrap: wrap; justify-content: space-between; align-items: baseline; width: 100%; border-bottom: 1px solid #ececec; padding: 10px 0; box-sizing: border-box; }
	.woocommerce-checkout-review-order-table th, .woocommerce-checkout-review-order-table td, .cart_totals table.shop_table th, .cart_totals table.shop_table td { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; background: none; text-align: left; }
	.woocommerce-checkout-review-order-table td:last-child, .cart_totals table.shop_table tr:not(.shipping):not(.woocommerce-shipping-totals) td { text-align: right; }
	.woocommerce-checkout-review-order-table .shipping > *, .cart_totals .woocommerce-shipping-totals > * { flex: 0 0 100%; width: 100% !important; text-align: left !important; }
	.woocommerce-checkout-review-order-table .shipping th, .cart_totals .woocommerce-shipping-totals th { margin-bottom: 6px; }
	ul#shipping_method { margin: 0; padding: 0; list-style: none; }
	ul#shipping_method li { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px !important; padding: 0 !important; text-indent: 0 !important; }
	ul#shipping_method li input { flex: 0 0 auto; margin: 3px 0 0 !important; }
	ul#shipping_method li label { flex: 1; margin: 0 !important; padding: 0 !important; line-height: 1.35; font-size: 14px; }
	ul#shipping_method li label img { display: block; height: 22px; width: auto; margin: 6px 0 0 !important; float: none !important; }
	.woocommerce-shipping-destination, .shipping-calculator-button { font-size: 13px; }

	/* ---------- Checkout ---------- */
	.woocommerce-checkout h3, .woocommerce-checkout #order_review_heading { font-size: 20px; margin: 18px 0 10px; }
	.woocommerce-checkout .form-row { margin-bottom: 12px; }
	.woocommerce-checkout .form-row input.input-text, .woocommerce-checkout .form-row textarea, .woocommerce-checkout .form-row select { font-size: 16px; padding: 12px; } /* 16px stops iOS zoom on focus */
	.woocommerce-checkout #payment { padding: 0; }
	.woocommerce-checkout #payment ul.payment_methods > li > label { font-size: 15px; }
	.woocommerce-checkout #payment div.form-row { padding: 12px 0 0; }
	.woocommerce-checkout #place_order { width: 100%; font-size: 17px; padding: 16px; }

	.cart_totals table.shop_table td::before { display: none !important; }
	.cart_totals table.shop_table .woocommerce-shipping-totals td { padding-top: 0 !important; }

	/* my account: social login block has an inline 31px offset */
	div:has(> .xs-login) { margin-left: 0 !important; margin-right: 0 !important; width: 100% !important; }
	.woocommerce-account .u-column1, .woocommerce-account .u-column2 { float: none !important; width: 100% !important; }
	.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none !important; width: 100% !important; margin: 0 0 14px !important; padding: 0; }
	.woocommerce-account .woocommerce-MyAccount-navigation { padding: 6px 12px; }

	/* variable products */
	.variations, .variations tbody, .variations tr, .variations th, .variations td { display: block; width: 100%; padding: 0; margin-left: 0; }
	.woocommerce-variation-add-to-cart { margin: 12px 0 0 !important; }
	.variations tr { margin-bottom: 12px; }
	.variations label { font-weight: 700; display: block; margin-bottom: 4px; }
	.variations select { width: 100% !important; max-width: 100% !important; font-size: 16px; padding: 12px 10px; border-radius: 6px; }
	.single_variation_wrap .single_add_to_cart_button, .single-product form.cart .single_add_to_cart_button { flex: 1; min-height: 48px; }
	.single-product form.cart:not(.variations_form), .woocommerce-variation-add-to-cart { display: flex; gap: 10px; align-items: stretch; }

	/* ---------- Footer: everything centred ---------- */
	.site-footer .vobler-footer { align-items: center !important; text-align: center; gap: 18px; padding-top: 8px; }
	.vobler-footer__logo { display: block; }
	.vobler-footer__contacts, .vobler-footer__legal { align-items: center; gap: 10px; }
	.vobler-footer__social { justify-content: center; }
	.vobler-footer__copy { align-self: stretch; }
}
