/* RM: карточки каталога — плитки размера, сегменты веса, количество и «В корзину» */

.rm-card {
	--rm-accent: #b13418;
	--rm-accent-hover: #8f2a13;
	--rm-line: rgba(255, 255, 255, .14);
	--rm-soft: rgba(255, 255, 255, .06);
	margin: 12px 0 0;
	width: 100%;
	min-width: 0;
}


/* расстояние между товарами в сетке */
ul.products,
.products {
	gap: 6px !important;
}

/* ---------- .glass ---------- */
.glass {
	background-color: rgba(0, 0, 0, .2);
	-webkit-backdrop-filter: blur(3px) saturate(150%);
	backdrop-filter: blur(3px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, .12);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .10);
}

/* карточка товара в стекле */
.wd-product.glass {
	border-radius: 12px;
	overflow: hidden;
	background-color: rgba(0, 0, 0, .2);
	box-shadow: 0 22px 48px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .10);
	transition: background-color .2s ease, box-shadow .2s ease;
}

/* прозрачность: снимаем непрозрачные подложки темы */
.wd-product.glass .wd-product-card-bg,
.wd-product.glass .wd-product-img-hover,
.wd-product.glass .wd-buttons,
.wd-product.glass .content-product-imagin,
.wd-product.glass .product-wrapper {
	background-color: transparent !important;
}


/* градиентная обводка карточки (как у выбора веса и размера) */
.wd-product.glass {
	position: relative;
}

.wd-product.glass::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(150deg,
		rgba(255, 255, 255, .78) 0%,
		rgba(255, 255, 255, .20) 28%,
		rgba(255, 255, 255, .06) 58%,
		rgba(255, 255, 255, .34) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
}

/* карточка: при наведении плотнее */
.wd-product.glass:hover {
	background-color: rgba(0, 0, 0, .4);
}

/* селекторы веса и размера — тот же стек, но мягче */
.rm-card .rm-seg.glass,
.rm-card .rm-tiles.glass {
	background-color: rgba(255, 255, 255, .05);
	box-shadow: 0 8px 22px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .10);
}

.rm-card .rm-seg.glass .rm-seg-btn.is-active {
	box-shadow: 0 6px 18px rgba(0, 0, 0, .30);
}

/* прячем штатные цену/кнопку/количество только там, где стоит наш блок */
.wd-product:has(.rm-card) .product-element-bottom .wrap-price,
.wd-product:has(.rm-card) .product-element-bottom .price,
.wd-product:has(.rm-card) .product-element-bottom a.add_to_cart_button,
.wd-product:has(.rm-card) .product-element-bottom .wd-add-btn,
.wd-product:has(.rm-card) .product-element-bottom .added_to_cart,
.wd-product:has(.rm-card) .product-element-bottom .quantity,
.wd-product:has(.rm-card) .product-element-bottom .wd-quantity,
.wd-product.rm-has-card .product-element-bottom .wrap-price,
.wd-product.rm-has-card .product-element-bottom .price,
.wd-product.rm-has-card .product-element-bottom a.add_to_cart_button,
.wd-product.rm-has-card .product-element-bottom .wd-add-btn,
.wd-product.rm-has-card .product-element-bottom .added_to_cart,
.wd-product.rm-has-card .product-element-bottom .quantity,
.wd-product.rm-has-card .product-element-bottom .wd-quantity {
	display: none !important;
}

.wd-product,
.wd-product-wrapper {
	min-width: 0;
}

/* подписи групп */
.rm-card .rm-group { margin: 0 0 12px; }

.rm-card .rm-group-label {
	font-size: 13px;
	line-height: 1.2;
	color: rgba(255, 255, 255, .6);
	margin: 0 0 6px;
}

/* сегменты веса */
.rm-card .rm-seg {
	position: relative;
	display: flex;
	width: 100%;
	max-width: none;
	gap: 2px;
	background: rgba(255, 255, 255, .05);
	border: 0;
	border-radius: 12px;
	padding: 4px;
}

.rm-card .rm-seg::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(150deg,
		rgba(255, 255, 255, .78) 0%,
		rgba(255, 255, 255, .20) 28%,
		rgba(255, 255, 255, .06) 58%,
		rgba(255, 255, 255, .34) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
}

.rm-card .rm-seg-btn {
	flex: 1 1 0;
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 14px;
	line-height: 1;
	padding: 10px 4px;
	border-radius: 12px;
	cursor: pointer;
	transition: background .15s ease;
	white-space: nowrap;
}

.rm-card .rm-seg-btn:hover { background: rgba(255, 255, 255, .08); }

.rm-card .rm-seg-btn.is-active {
	background: var(--rm-accent);
	font-weight: 600;
}

.rm-card .rm-seg-btn.is-active:hover { background: var(--rm-accent); }

/* плитки размера */
.rm-card .rm-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.rm-card .rm-tile {
	position: relative;
	appearance: none;
	border: 0;
	background: rgba(255, 255, 255, .05);
	border-radius: 12px;
	padding: 8px 6px 7px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 3px;
	cursor: pointer;
	color: inherit;
	transition: background .15s ease, box-shadow .15s ease;
	min-width: 0;
	overflow: hidden;
}

/* градиентная обводка с бликом */
.rm-card .rm-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(150deg,
		rgba(255, 255, 255, .78) 0%,
		rgba(255, 255, 255, .20) 28%,
		rgba(255, 255, 255, .06) 58%,
		rgba(255, 255, 255, .34) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
}

/* верхний блик */
.rm-card .rm-tile::after {
	content: "";
	position: absolute;
	left: 10%;
	right: 10%;
	top: 0;
	height: 45%;
	border-radius: inherit;
	background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
	pointer-events: none;
}

.rm-card .rm-tile img {
	width: 66%;
	max-width: 84px;
	height: auto;
	display: block;
}

.rm-card .rm-tile:hover { background: rgba(255, 255, 255, .09); }

.rm-card .rm-tile.is-active {
	background: #b13418;
	box-shadow: 0 10px 24px rgba(177, 52, 24, .35);
}

.rm-card .rm-tile.is-active::before {
	background: linear-gradient(150deg,
		rgba(255, 255, 255, .85) 0%,
		rgba(255, 200, 175, .45) 40%,
		rgba(255, 255, 255, .22) 100%);
}

.rm-card .rm-tile-name {
	font-size: 14px;
	line-height: 1;
	position: relative;
	z-index: 1;
}

.rm-card .rm-tile-sub {
	font-size: 10px;
	line-height: 1.15;
	color: rgba(255, 255, 255, .62);
	text-align: center;
	position: relative;
	z-index: 1;
}

.rm-card .rm-tile.is-active .rm-tile-sub { color: rgba(255, 255, 255, .9); }

/* цена */
.rm-card .rm-price {
	font-size: 15px;
	line-height: 1.1;
	margin: 6px 0 10px;
}

.rm-card .rm-price-val {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -.3px;
}

/* количество */
.rm-card .rm-buy {
	display: flex;
	align-items: center;
	gap: 8px;
}

.rm-card .rm-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1px solid var(--rm-line);
	border-radius: 12px;
	height: 52px;
	flex: 0 0 auto;
}

.rm-card .rm-qty-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	width: 38px;
	height: 50px;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.rm-card .rm-qty-btn:hover { color: var(--rm-accent); }

.rm-card .rm-qty-input {
	width: 34px;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: center;
	font-size: 15px;
	height: 50px;
	padding: 0;
	-moz-appearance: textfield;
}

.rm-card .rm-qty-input::-webkit-outer-spin-button,
.rm-card .rm-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.rm-card .rm-add {
	flex: 1 1 auto;
	appearance: none;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(180deg, #8f8539 0%, #726a30 55%, #5a5322 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
	color: #fff;
	height: 52px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .4px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s ease;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	white-space: nowrap;
	min-width: 0;
}

.rm-card .rm-add .rm-cart {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}


.rm-card .rm-add,
.rm-card .rm-add:hover,
.rm-card .rm-add:focus,
.rm-card .rm-add:active,
.rm-card .rm-add:disabled {
	color: #fff !important;
}

.rm-card .rm-add:hover:not(:disabled) {
	background: linear-gradient(180deg, #645d28 0%, #504a22 55%, #3f3a18 100%);
}

.rm-card .rm-add:disabled {
	opacity: .55;
	cursor: default;
}

@media (max-width: 1024px) {
	.rm-card .rm-price-val { font-size: 24px; }
}

/* ---------- мобильная раскладка ---------- */
@media (max-width: 767px) {
	.rm-card { margin-top: 9px; }

	.rm-card .rm-group { margin-bottom: 9px; }

	.rm-card .rm-group-label {
		font-size: 11px;
		margin-bottom: 4px;
	}

	.rm-card .rm-seg { border-radius: 12px; padding: 3px; }

	.rm-card .rm-seg-btn {
		font-size: 11px;
		padding: 8px 2px;
		border-radius: 12px;
	}

	.rm-card .rm-tiles { gap: 5px; }

	.rm-card .rm-tile {
		border-radius: 12px;
		padding: 5px 2px 4px;
		gap: 1px;
	}

	.rm-card .rm-tile img { width: 68%; max-width: 34px; }

	.rm-card .rm-tile-name { font-size: 11px; }

	.rm-card .rm-tile-sub {
		display: block;
		font-size: 6.5px;
		line-height: 1.05;
		letter-spacing: -.1px;
		white-space: nowrap;
	}

	/* на странице товара плитки шире — подписи крупнее */
	.rm-card--single .rm-tile-sub {
		font-size: 10px;
		letter-spacing: 0;
	}

	.rm-card .rm-price { margin: 4px 0 7px; }

	.rm-card .rm-price-val { font-size: 18px; letter-spacing: 0; }

	.rm-card .rm-buy {
		flex-direction: column;
		align-items: stretch;
		gap: 7px;
	}

	.rm-card .rm-qty {
		width: 100%;
		height: 42px;
		border-radius: 12px;
	}

	.rm-card .rm-qty-btn {
		flex: 0 0 40px !important;
		width: 40px !important;
		height: 40px;
		font-size: 17px;
	}

	.rm-card .rm-qty-input {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
		height: 40px;
		font-size: 14px;
	}

	.rm-card .rm-add {
		width: 100%;
		height: 42px;
		font-size: 12px;
		border-radius: 12px;
		gap: 6px;
		padding: 0 8px;
	}

	.rm-card .rm-add .rm-cart { width: 16px; height: 16px; }
}

/* ---------- страница товара: селекторы, количество и кнопка как в карточке ---------- */
.single-product form.variations_form table.variations {
	display: none !important;
}

.single-product .rm-card--single {
	margin: 0 0 18px;
	max-width: 520px;
}

.single-product .woocommerce-variation-add-to-cart,
.single-product form.cart .variations_button {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.single-product form.cart .quantity {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px;
	height: 52px;
	min-width: 150px;
	margin: 0;
	background-color: rgba(0, 0, 0, .3);
	overflow: hidden;
}

.single-product form.cart .quantity .minus,
.single-product form.cart .quantity .plus {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	width: 44px;
	height: 50px;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.single-product form.cart .quantity .minus:hover,
.single-product form.cart .quantity .plus:hover {
	color: var(--rm-accent, #b13418);
}

.single-product form.cart .quantity .qty {
	border: 0;
	background: transparent;
	text-align: center;
	width: 60px;
	height: 50px;
	font-size: 15px;
	padding: 0;
	-moz-appearance: textfield;
}

.single-product form.cart .quantity .qty::-webkit-outer-spin-button,
.single-product form.cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.single-product .single_add_to_cart_button {
	background: linear-gradient(180deg, #8f8539 0%, #726a30 55%, #5a5322 100%) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
	color: #fff !important;
	border: 0 !important;
	border-radius: 12px !important;
	height: 52px;
	min-height: 52px;
	padding: 0 26px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-transform: uppercase;
	letter-spacing: .4px;
	font-weight: 600;
	font-size: 13px;
	transition: background .15s ease;
}

.single-product .single_add_to_cart_button:hover {
	background: linear-gradient(180deg, #645d28 0%, #504a22 55%, #3f3a18 100%) !important;
	color: #fff !important;
}

.single-product .single_add_to_cart_button .rm-cart {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

/* ---------- страница товара: количество и кнопка в две строки ---------- */
@media (max-width: 767px) {
	body.single-product .woocommerce-variation-add-to-cart,
	body.single-product form.cart .variations_button,
	body.single-product form.cart .wd-add-btn {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		width: 100%;
	}

	body.single-product .woocommerce-variation-add-to-cart .quantity,
	body.single-product form.cart .quantity {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		height: 48px;
		margin: 0;
		border-radius: var(--wd-form-brd-radius, 12px);
	}

	body.single-product .quantity .minus,
	body.single-product .quantity .plus {
		flex: 0 0 48px !important;
		width: 48px !important;
		height: 46px;
		font-size: 18px;
	}

	body.single-product .quantity .qty {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: 46px;
		text-align: center;
		font-size: 16px;
		border: 0 !important;
		background: transparent !important;
	}

	body.single-product .single_add_to_cart_button {
		width: 100%;
		height: 48px;
		font-size: 15px;
	}
}

/* ---------- зелёные уведомления -> оливковый градиент ---------- */
body,
:root {
	--notices-success-bg: #6f6832;
}

.woocommerce-message,
ul.woocommerce-message,
.wd-notice.wd-success,
.woocommerce-message.wd-notice {
	background: linear-gradient(180deg, #8f8539 0%, #726a30 55%, #5a5322 100%) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 12px !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.woocommerce-message::before,
.woocommerce-message a,
.woocommerce-message a.button,
.woocommerce-message .button,
.wd-notice.wd-success a,
.wd-notice.wd-success .button {
	color: #fff !important;
	border-color: rgba(255, 255, 255, .5) !important;
}

/* кнопка «Просмотр корзины» после добавления */
.added_to_cart,
a.added_to_cart {
	background: linear-gradient(180deg, #8f8539 0%, #726a30 55%, #5a5322 100%) !important;
	color: #fff !important;
	border-radius: 12px !important;
}

.added_to_cart:hover,
a.added_to_cart:hover {
	background: linear-gradient(180deg, #645d28 0%, #504a22 55%, #3f3a18 100%) !important;
	color: #fff !important;
}

/* ---------- звёзды рейтинга и отзывы отключены ---------- */
.star-rating,
.wd-star-rating,
.woocommerce-product-rating,
.woocommerce-review-link,
.wd-rating,
p.stars,
.rating,
.comment-form-rating,
#reviews,
.woocommerce-tabs li.reviews_tab,
.woocommerce-tabs #tab-title-reviews,
.woocommerce-Reviews,
.wd-reviews,
.woocommerce-product-rating + .wd-product-rating {
	display: none !important;
}

/* ---------- меню категорий с иконками ---------- */
.rm-cats {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	margin: 0 -16px 14px 0;
	padding: 2px 16px 6px 0;
	scrollbar-width: none;
}

.rm-cats::-webkit-scrollbar { display: none; }

.rm-cat {
	flex: 0 0 76px;
	width: 76px;
	height: 76px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	text-decoration: none;
	border: 1px solid rgba(241, 192, 128, .38);
	border-radius: 12px;
	background-color: rgba(0, 0, 0, .38);
	color: #F1C080;
	scroll-snap-align: start;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.rm-cat-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
}

.rm-cat-svg {
	width: 32px;
	height: 32px;
	display: block;
}

.rm-cat-label {
	font-size: 9.5px;
	line-height: 1.05;
	color: #fff;
	text-align: center;
	max-width: 70px;
	padding: 0 2px;
}

.rm-cat.is-active {
	border-color: #F1C080;
	background-color: rgba(241, 192, 128, .14);
}

.rm-cat:active {
	background-color: rgba(241, 192, 128, .16);
}

/* автоматическая версия (в каталоге) — только на мобиле */
@media (min-width: 768px) {
	.rm-cats--auto { display: none; }
}
