/* BEWARD mobile UI — clean standalone layer. Desktop rules are untouched. */
#beward-mobile-bar,
#beward-mobile-drawer,
#beward-mobile-drawer-overlay,
#beward-mobile-home-intro,
.beward-mobile-category-photo { display: none; }

@media (max-width: 1023px) {
	:root {
		--bm-red: #b00000;
		--bm-red-dark: #8c0000;
		--bm-ink: #162033;
		--bm-muted: #748096;
		--bm-line: #e3e7ed;
		--bm-surface: #ffffff;
		--bm-bg: #f3f5f8;
		--bm-drawer: #ffffff;
	}

	html { background: var(--bm-bg); }
	body { min-width: 0 !important; overflow-x: hidden; background: var(--bm-bg); color: var(--bm-ink); }
	body.mobile-drawer-open { overflow: hidden; }

	/* Old desktop navigation never participates in the mobile composition. */
	#top-line { display: none !important; }

	/* App bar */
	#beward-mobile-bar {
		position: relative;
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr) auto;
		align-items: center;
		gap: 10px;
		height: 66px;
		padding: 9px 14px;
		background: linear-gradient(135deg, #bd0000 0%, #9e0000 100%);
		box-shadow: 0 8px 22px rgba(122,0,0,.24);
	}
	.beward-mobile-menu-toggle,
	.beward-mobile-actions a,
	.beward-mobile-drawer-close {
		display: grid;
		place-items: center;
		width: 42px;
		height: 42px;
		padding: 0;
		border: 1px solid rgba(255,255,255,.42);
		border-radius: 12px;
		background: rgba(255,255,255,.08);
		color: #fff;
		font-size: 18px;
	}
	.beward-mobile-menu-toggle svg,
	.beward-mobile-actions svg,
	.beward-mobile-drawer-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
	.beward-mobile-logo {
		display: flex;
		min-width: 0;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.beward-mobile-logo img {
		display: block;
		width: 142px;
		height: auto;
		max-width: 100%;
		object-fit: contain;
		filter: brightness(0) invert(1);
	}
	.beward-mobile-logo span { display: block; margin-top: 4px; color: #fff; font-size: 5.5px; font-weight: 700; letter-spacing: .25px; line-height: 1; text-transform: uppercase; }
	.beward-mobile-actions { display: flex; gap: 7px; }
	.beward-mobile-cart { position: relative; }
	.beward-mobile-cart span {
		position: absolute;
		top: -6px;
		right: -5px;
		min-width: 19px;
		height: 19px;
		padding: 0 5px;
		border-radius: 10px;
		background: #ff7a00;
		color: #fff;
		font: 700 11px/19px Arial, sans-serif;
		text-align: center;
	}

	/* Search */
	#header { position: relative; padding: 0 14px 16px !important; background: linear-gradient(135deg, #bd0000 0%, #9e0000 100%) !important; line-height: normal !important; }
	#header:after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #ff7a00; pointer-events: none; }
	#header .container { width: auto; padding: 0; }
	#header .row { margin: 0; }
	#header .row > div { float: none; width: 100%; padding: 0; }
	#header .row > div:first-child,
	#header .row > div:last-child { display: none; }
	#header .search { margin: 0 !important; }
	#header .search form {
		position: relative;
		height: 48px;
		border: 1px solid rgba(255,255,255,.12);
		border-radius: 24px;
		background: #fff;
		box-shadow: none;
		overflow: hidden;
	}
	#header .search .input { margin-right: 48px; }
	#header .search .input input {
		display: block;
		width: 100%;
		height: 48px;
		padding: 0 5px 0 18px;
		border: 0;
		background: transparent;
		color: var(--bm-ink);
		font-size: 15px;
	}
	#header .search .input input::placeholder { color: #8a8f99; opacity: 1; }
	#header .search .submit {
		position: absolute !important;
		top: 4px !important;
		right: 4px !important;
		display: grid;
		place-items: center;
		float: none !important;
		width: 40px !important;
		height: 40px !important;
		margin: 0 !important;
		border-radius: 50%;
		background: linear-gradient(135deg, #d52121, var(--bm-red));
		color: #fff;
		transform: none !important;
		z-index: 2;
	}
	#header .search .submit i { display: none; }
	#header .search .submit svg { position: relative !important; z-index: 2; display: block !important; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
	#header .search .submit input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
	#header .search-clear { right: 48px; }

	/* Drawer */
	#beward-mobile-drawer-overlay {
		position: fixed;
		z-index: 200000;
		inset: 0;
		display: block;
		background: rgba(21,12,12,.62);
		opacity: 0;
		pointer-events: none;
		transition: opacity .24s ease;
	}
	#beward-mobile-drawer {
		position: fixed;
		z-index: 200001;
		top: 0;
		bottom: 0;
		left: 0;
		display: block;
		width: min(92vw, 360px);
		padding: 12px 18px 28px;
		overflow-y: auto;
		background: #fff;
		color: var(--bm-ink);
		box-shadow: 16px 0 45px rgba(55,0,0,.25);
		transform: translateX(-105%);
		transition: transform .27s ease;
	}
	body.mobile-drawer-open #beward-mobile-drawer-overlay { opacity: 1; pointer-events: auto; }
	body.mobile-drawer-open #beward-mobile-drawer { transform: translateX(0); }
	body.mobile-drawer-open #custom-live-chat { visibility: hidden !important; pointer-events: none !important; }
	.beward-mobile-drawer-head { display: flex; min-height: 48px; align-items: center; justify-content: space-between; }
	.beward-mobile-drawer-logo { display: flex; width: 150px; min-height: 44px; flex-direction: column; align-items: flex-start; justify-content: center; }
	.beward-mobile-drawer-logo img { display: block; width: 145px; height: auto; filter: none; }
	.beward-mobile-drawer-logo span { display: block; margin-top: 4px; color: var(--bm-red); font-size: 5.5px; font-weight: 700; letter-spacing: .2px; text-transform: uppercase; }
	#beward-mobile-drawer .beward-mobile-drawer-close { border-color: #e3b0b0; background: #fff5f5; color: var(--bm-red); }
	.beward-mobile-login {
		display: grid;
		grid-template-columns: 48px 1fr 15px;
		align-items: center;
		gap: 12px;
		margin: 14px 0 16px;
		padding: 13px;
		border: 1px solid #efd8d8;
		border-radius: 14px;
		background: #fff8f8;
		color: var(--bm-ink) !important;
	}
	.beward-mobile-login > i { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #e7b9b9; border-radius: 50%; color: var(--bm-red); font-size: 20px; }
	.beward-mobile-login strong { display: block; font-size: 15px; }
	.beward-mobile-login small { display: block; margin-top: 3px; color: var(--bm-muted); font-size: 11px; }
	.beward-mobile-login b,
	.beward-mobile-drawer-nav b { color: #a77a7a; font-size: 26px; font-weight: 400; text-align: right; }
	.beward-mobile-drawer-nav a {
		display: grid;
		min-height: 49px;
		grid-template-columns: 29px minmax(0,1fr) auto 14px;
		align-items: center;
		gap: 7px;
		border-bottom: 1px solid #eee4e4;
		color: var(--bm-ink) !important;
		font-size: 14px;
		font-weight: 700;
	}
	.beward-mobile-drawer-nav a > i { color: var(--bm-red); font-size: 16px; text-align: center; }
	.beward-mobile-drawer-nav em { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: #ff7a00; color: #fff; font-size: 11px; font-style: normal; line-height: 21px; text-align: center; }
	.beward-mobile-drawer-contacts { display: grid; gap: 3px; margin-top: 25px; }
	.beward-mobile-drawer-contacts small { margin-top: 10px; color: var(--bm-muted); font-size: 11px; }
	.beward-mobile-drawer-contacts a { color: var(--bm-ink); font-size: 17px; font-weight: 700; }
	.beward-mobile-drawer-contacts .email { margin-top: 15px; color: var(--bm-red); font-size: 13px; }

	/* Home intro */
	body.main #beward-mobile-home-intro { display: block; padding: 14px 14px 0; }
	.beward-mobile-contacts { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; padding: 4px; border: 1px solid rgba(176,0,0,.1); border-radius: 19px; background: linear-gradient(135deg,#fff 0%,#fff7f7 100%); box-shadow: 0 12px 28px rgba(85,20,25,.08); overflow: hidden; }
	.beward-mobile-contacts:before { content: ''; position: absolute; top: 10px; bottom: 10px; left: 50%; width: 1px; background: linear-gradient(transparent,rgba(176,0,0,.14),transparent); }
	.beward-mobile-contacts a {
		position: relative;
		display: flex;
		min-height: 62px;
		padding: 10px 43px 10px 11px;
		flex-direction: row;
		justify-content: center;
		border: 0;
		border-radius: 14px;
		background: transparent;
		box-shadow: none;
		color: var(--bm-ink);
	}
	.beward-mobile-contacts a:active { background: rgba(176,0,0,.05); transform: scale(.985); }
	.beward-mobile-contacts span { margin-bottom: 4px; color: var(--bm-muted); font-size: 12.5px; font-weight: 600; line-height: 1.2; }
	.beward-mobile-contacts span i { margin-right: 4px; color: var(--bm-red); }
	.beward-mobile-contacts strong { font-size: 14px; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; white-space: nowrap; }
	.beward-mobile-contacts b { position: absolute; right: 7px; top: 50%; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(176,0,0,.1); border-radius: 50%; background: #fff; color: var(--bm-red); box-shadow: 0 5px 12px rgba(176,0,0,.12); transform: translateY(-50%); }
	.beward-mobile-contacts b svg { width: 15px; height: 15px; fill: currentColor; }
	.beward-mobile-all-contacts { display: block; margin: 9px 0 13px; padding: 10px; border: 1px solid var(--bm-line); border-radius: 12px; background: #fff; color: var(--bm-red); font-size: 11px; font-weight: 700; text-align: center; }
	.beward-mobile-all-contacts i { margin-left: 5px; font-size: 9px; }
	.beward-mobile-quick-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 10px; }
	.beward-mobile-quick-links a { position: relative; display: flex; min-height: 90px; padding: 13px 6px 11px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(10,25,55,.07); border-radius: 17px; background: linear-gradient(180deg,#fff 0%,#fffafa 100%); box-shadow: 0 9px 22px rgba(20,28,42,.07); color: var(--bm-ink); font-size: 11.5px; font-weight: 750; line-height: 1.25; text-align: center; overflow: hidden; }
	.beward-mobile-quick-links a:before { content: ''; position: absolute; top: 0; right: 22%; left: 22%; height: 2px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg,transparent,var(--bm-red),transparent); opacity: .65; }
	.beward-mobile-quick-links a:active { transform: translateY(1px) scale(.985); }
	.beward-mobile-quick-links i { display: none; }
	.beward-mobile-quick-links svg { width: 38px; height: 38px; margin-bottom: 8px; padding: 9px; border: 1px solid rgba(176,0,0,.08); border-radius: 13px; background: linear-gradient(145deg,#fff6f6,#ffecec); color: var(--bm-red); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 5px 12px rgba(176,0,0,.08); }
	#beward-mobile-home-intro h2 { margin: 26px 0 0; font-size: 18px; font-weight: 800; line-height: 1.3; }

	/* Main catalog: actual category imagery, no decorative icon tiles. */
	body.main #catalog-block { padding: 12px 14px 25px; background: var(--bm-bg); }
	body.main #catalog-block > .container { width: auto; padding: 0; }
	body.main #catalog-block > .container > .row { margin: 0; }
	body.main #catalog-block > .container > .row > div { float: none; width: 100%; padding: 0; }
	body.main #catalog-menu { height: auto; margin: 0; overflow: visible; background: transparent; }
	body.main #catalog-menu > .title { display: none; }
	body.main #catalog-menu > ul { display: grid; min-height: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
	body.main #catalog-menu > ul > li { position: relative; min-width: 0; border: 1px solid rgba(10,25,55,.08); border-radius: 18px; background: #fff; box-shadow: 0 8px 20px rgba(10,25,55,.06); overflow: hidden; }
	body.main #catalog-menu > ul > li > a { position: relative; display: flex; min-height: 228px; padding: 18px 14px 44px; flex-direction: column; color: var(--bm-ink); line-height: 1.22; }
	body.main #catalog-menu > ul > li > a:before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--bm-red), #df3027); }
	body.main #catalog-menu > ul > li:nth-child(even) > a:before { background: linear-gradient(90deg, #cf3a22, #ff7a00); }
	body.main #catalog-menu > ul > li > a .icon { display: none; }
	body.main #catalog-menu > ul > li > a .name { order: 1; min-height: 34px; font-size: 14px; font-weight: 700; }
	body.main .beward-mobile-category-photo { order: 2; display: flex; width: 100%; height: 140px; margin: 2px 0 4px; align-items: center; justify-content: center; overflow: hidden; border-radius: 16px; background: radial-gradient(65% 65% at 50% 45%, rgba(176,0,0,.08), transparent 72%); }
	body.main #catalog-menu > ul > li:nth-child(even) .beward-mobile-category-photo { background: radial-gradient(65% 65% at 50% 45%, rgba(255,122,0,.1), transparent 72%); }
	body.main .beward-mobile-category-photo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(10,25,55,.12)); mix-blend-mode: multiply; }
	body.main #catalog-menu > ul > li > a[aria-expanded]:after { content: '→'; position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--bm-red),#db2929); color: #fff; font: 700 16px/1 Arial,sans-serif; box-shadow: 0 6px 14px rgba(176,0,0,.3); }
	body.main #catalog-menu > ul > li.active { grid-column: 1 / -1; }
	body.main #catalog-menu > ul > li.active > a { min-height: 56px; padding: 13px 46px 11px 13px; }
	body.main #catalog-menu > ul > li.active > a .name { min-height: 0; font-size: 15px; }
	body.main #catalog-menu > ul > li.active > a .beward-mobile-category-photo { display: none; }
	body.main #catalog-menu > ul > li.active > a[aria-expanded]:after { content: '×'; bottom: 12px; }
	body.main #catalog-menu > ul > li > ul { position: static; display: none; width: auto; margin: 0; padding: 0 11px 11px; border: 0; border-radius: 0; background: #fff; box-shadow: none; opacity: 1; pointer-events: auto; }
	body.main #catalog-menu > ul > li.active > ul { display: block; }
	body.main #catalog-menu > ul > li > ul > li { width: 100%; border-top: 1px solid #edf0f4; }
	body.main #catalog-menu > ul > li > ul > li > a { display: block; min-height: 43px; padding: 11px 5px; color: #3f495a; font-size: 12px; line-height: 1.35; }
	body.main #catalog-menu > ul > li > ul .icon { display: none; }
	body.main #main-slider,
	body.main #main-links,
	body.main #main-catalog-links { display: none !important; }

	/* Product sections remain functional but become compact. */
	section.screen { padding: 24px 14px; }
	section.screen h2 { padding-right: 0; font-size: 21px; }
	section.screen .more { position: static; display: inline-flex; margin-top: 8px; }
	body.main .home-new-products__list.product-list.line,
	body.main .home-new-products__list.product-list.grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px; margin: 0 !important; }
	body.main .home-new-products__list.product-list.line .item,
	body.main .home-new-products__list.product-list.grid .item { display: flex !important; float: none !important; width: 100% !important; min-width: 0 !important; max-width: none !important; height: auto !important; margin: 0 !important; padding: 10px !important; flex-direction: column; border-radius: 15px; }
	body.main .home-new-products__list .item > .image { display: flex !important; width: 100% !important; height: 118px !important; margin: 0 0 8px !important; align-items: center; justify-content: center; }
	body.main .home-new-products__list .item > .image img { max-width: 100% !important; max-height: 110px !important; }
	body.main .home-new-products__list .item .area { width: 100% !important; height: auto !important; min-height: 86px !important; padding: 0 !important; border: 0; border-radius: 0; box-shadow: none; }
	body.main .home-new-products__list .item .name { display: block !important; min-height: 32px !important; margin: 0 !important; font-size: 12px !important; line-height: 1.3; }
	body.main .home-new-products__list .item .text,
	body.main .home-new-products__list .item .description { display: none !important; }
	body.main .home-new-products__list .item .price-block { width: 100% !important; margin-top: auto !important; padding: 9px 0 0 !important; border-top: 1px solid #ededed !important; border-left: 0 !important; position: static !important; }
	body.main .home-new-products__list .item .prices { display: block !important; }
	body.main .home-new-products__list .item .price { display: none !important; }
	body.main .home-new-products__list .item .price-3 { display: block !important; }
	body.main .home-new-products__list .item .price-3 .num { font-size: 17px !important; }
	body.main .home-new-products__list .item .quantity { margin-top: 8px !important; }
}

@media (max-width: 374px) {
	.beward-mobile-contacts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
	.beward-mobile-contacts a { min-height: 58px; padding-right: 39px; }
	.beward-mobile-contacts strong { font-size: 12px; }
	body.main #catalog-menu > ul { gap: 8px; }
	body.main #catalog-menu > ul > li > a { min-height: 174px; }
}
