/*
 * Floritual — карточки товара в каталоге по макету (2026-06-10).
 * Тёмная карточка с золотой рамкой, круглые иконки избранного/быстрого
 * просмотра, serif-заголовок и цена, кнопка-аутлайн со стрелкой.
 * Подключается из functions.php (floritual_cards_styles).
 */

:root {
	--flo-gold: #b57b00;
	--flo-gold-bright: #fbbc34;
	--flo-gold-soft: #c49a4d;
	--flo-border: rgba(196, 154, 77, 0.35);
	--flo-border-strong: rgba(196, 154, 77, 0.6);
	--flo-card-bg: #0c0b09;
	--flo-text-dim: #9a9a9a;
}

/* ---------- Сетка: ровные ряды одинаковой высоты (masonry выключен) ---------- */

.products.elements-grid {
	display: flex;
	flex-wrap: wrap;
}

/* clearfix-помощники бутстрапа и .clear не нужны во flex-сетке */
.products.elements-grid:before,
.products.elements-grid:after,
.products.elements-grid > .clear {
	display: none;
}

.products.elements-grid > .product-grid-item {
	display: flex;
	float: none;
}

.products.elements-grid > .product-grid-item > .floritual-card {
	width: 100%;
}

/* Кнопка прижата к низу карточки, ряды ровные */
.floritual-card .btn-add {
	margin-top: auto;
	padding-top: 16px;
}

/* ---------- Карточка ---------- */

.product-grid-item .floritual-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 16px 16px 20px;
	border: 1px solid var(--flo-border);
	border-radius: 14px;
	background-color: var(--flo-card-bg);
	text-align: left;
	transition: border-color 0.25s ease;
}

.product-grid-item .floritual-card:hover {
	border-color: var(--flo-border-strong);
}

.floritual-card .product-element-top {
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 0;
}

/* ---------- Иконки: избранное и быстрый просмотр ---------- */

.floritual-card .basel-buttons {
	top: 12px;
	right: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Перебивает скрытие кнопок до ховера из woo-product-loop-general */
.product-grid-item .floritual-card .basel-buttons .quick-view,
.product-grid-item .floritual-card .basel-buttons .product-compare-button,
.product-grid-item .floritual-card .basel-buttons .basel-wishlist-btn {
	visibility: visible;
	opacity: 1;
	transform: none;
	margin-bottom: 0;
}

.floritual-card .basel-buttons > div > a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	background-color: rgba(12, 11, 9, 0.55);
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.floritual-card .basel-buttons > div > a:hover {
	border-color: var(--flo-gold-bright);
	background-color: rgba(12, 11, 9, 0.8);
}

/* Иконки рисуем SVG-масками вместо глифов icon-font, чтобы совпасть с макетом */
.floritual-card .basel-buttons > div > a:before {
	content: '' !important; /* перебивает content из icon-font темы */
	display: block;
	width: 20px;
	height: 20px;
	background-color: #fff;
	-webkit-mask: var(--flo-icon) center / contain no-repeat;
	mask: var(--flo-icon) center / contain no-repeat;
	border: none;
	animation: none;
}

.floritual-card .basel-wishlist-btn > a {
	--flo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}

.floritual-card .quick-view > a {
	--flo-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* Товар уже в избранном — золотое сердце */
.floritual-card .basel-wishlist-btn > a.added:before {
	background-color: var(--flo-gold-bright);
}

/* ---------- Заголовок ---------- */

.product-grid-item .floritual-card .product-title {
	margin: 18px 0 0;
	text-align: left;
	line-height: 1.35;
}

.product-grid-item .floritual-card .product-title a {
	font-family: 'Lora', Georgia, serif;
	font-size: 18px;
	font-weight: 400;
	color: #fff;
}

.product-grid-item .floritual-card .product-title a:hover {
	color: var(--flo-gold-bright);
}

/* ---------- Разделитель с точкой ---------- */

.floritual-card-divider {
	position: relative;
	height: 1px;
	margin: 14px 0 16px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.18) 12%, rgba(255, 255, 255, 0.18) 88%, rgba(255, 255, 255, 0) 100%);
}

.floritual-card-divider:after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: var(--flo-gold);
	transform: translate(-50%, -50%);
	box-shadow: 0 0 0 4px var(--flo-card-bg);
}

/* ---------- Цена ---------- */

.floritual-card .floritual-price-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 10px;
	min-height: 34px;
}

.product-grid-item .floritual-card .price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0;
	text-align: left;
	font-family: 'Lora', Georgia, serif;
	font-size: 27px;
	font-weight: 500;
	line-height: 1.15;
}

.basel-hover-standard .floritual-card .price,
.basel-hover-standard .floritual-card .amount {
	color: #fff;
}

.product-grid-item .floritual-card .price del,
.product-grid-item .floritual-card .price del .amount {
	color: #7d7d7d;
	font-size: 16px;
	font-weight: 400;
}

.floritual-card .floritual-price-from {
	font-family: 'Lora', Georgia, serif;
	font-size: 16px;
	color: var(--flo-text-dim);
}

.floritual-card .floritual-sale-badge {
	align-self: center;
	margin-left: auto;
	padding: 4px 10px;
	border-radius: 6px;
	background-color: #c79a3b;
	color: #15110a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

/* Бейдж распродажи на самой картинке не нужен — скидка показана у цены */
.floritual-card .product-element-top .onsale {
	display: none;
}

/* ---------- Кнопка ---------- */

.basel-hover-standard .floritual-card .btn-add > a {
	position: relative;
	display: block;
	width: 100%;
	padding: 17px 44px 17px 24px;
	border: 1px solid var(--flo-border-strong);
	border-width: 1px;
	border-radius: 8px;
	background-color: transparent;
	color: #dcb56a;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-align: center;
	line-height: 16px;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.basel-hover-standard .floritual-card .btn-add > a:hover {
	opacity: 1;
	color: var(--flo-gold-bright);
	border-color: var(--flo-gold-bright);
	background-color: rgba(196, 154, 77, 0.08);
}

/* Стрелка справа; :after занят спиннером загрузки темы */
.floritual-card .btn-add > a:before {
	content: '\2192';
	position: absolute;
	top: 50%;
	right: 18px;
	transform: translateY(-50%);
	font-size: 17px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1;
}

.floritual-card .btn-add > a.loading:before {
	opacity: 0;
}

/* ---------- Шапка каталога: крошки, заголовок, счётчик, сортировка ---------- */

/* Раскладка как в макете: слева крошки/заголовок/счётчик, справа сортировка и фильтр */
@media (min-width: 768px) {
	.shop-loop-head {
		display: grid;
		grid-template-columns: 1fr auto auto;
		gap: 0 12px;
		align-items: center;
	}

	.shop-loop-head .woocommerce-breadcrumb {
		grid-column: 1 / -1;
		grid-row: 1;
		justify-self: start;
		float: none;
		text-align: left;
	}

	.shop-loop-head h1.floritual-shop-archive-title {
		grid-column: 1;
		grid-row: 2;
		margin: 12px 0 4px;
		text-align: left;
	}

	.shop-loop-head .woocommerce-result-count {
		grid-column: 1;
		grid-row: 3;
		margin: 0;
		text-align: left;
	}

	.shop-loop-head .woocommerce-ordering {
		grid-column: 2;
		grid-row: 2;
	}

	.shop-loop-head .basel-show-sidebar-btn {
		grid-column: 3;
		grid-row: 2;
	}

	.shop-loop-head .woocommerce-notices-wrapper,
	.shop-loop-head .basel-active-filters {
		grid-column: 1 / -1;
	}
}

.shop-loop-head .woocommerce-breadcrumb,
.shop-loop-head .woocommerce-breadcrumb a {
	color: var(--flo-text-dim);
	font-size: 13px;
}

.shop-loop-head .woocommerce-breadcrumb a:hover {
	color: var(--flo-gold-bright);
}

.shop-loop-head .woocommerce-breadcrumb .breadcrumb-last {
	color: var(--flo-gold-soft);
}

.shop-loop-head .woocommerce-breadcrumb a:first-child:before {
	content: '';
	display: inline-block;
	vertical-align: -2px;
	width: 14px;
	height: 14px;
	margin-right: 7px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E") center / contain no-repeat;
}

h1.floritual-shop-archive-title {
	font-family: 'Lora', Georgia, serif;
	color: #fff;
	text-align: left;
	float: none;
}

/* На телефоне у темы свой компактный переключатель сортировки — метка и рамка не нужны */
@media (max-width: 767px) {
	.shop-loop-head .floritual-orderby-label {
		display: none;
	}

	.shop-loop-head .woocommerce-ordering {
		border: none;
		padding: 0;
		border-radius: 0;
	}
}

.shop-loop-head .woocommerce-result-count {
	color: var(--flo-text-dim);
	font-size: 13px;
}

.shop-loop-head .woocommerce-ordering {
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 4px;
	padding: 4px 14px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
}

.shop-loop-head .floritual-orderby-label {
	color: var(--flo-text-dim);
	font-size: 13px;
	white-space: nowrap;
}

.shop-loop-head .woocommerce-ordering select.orderby {
	width: auto;
	flex: 0 0 auto;
	margin: 0;
	border: none;
	background-color: transparent;
	color: #fff;
}

/* Кнопка фильтров — квадратная иконка, как в макете */
.shop-loop-head .basel-show-sidebar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	margin: 0;
}

.shop-loop-head .basel-show-sidebar-btn span:not(.basel-side-bar-icon) {
	font-size: 0; /* подпись остаётся для скринридеров, видна только иконка */
}

/* ---------- Адаптив ---------- */

/* Планшет: 3 колонки уже, карточка компактнее */
@media (min-width: 768px) and (max-width: 1024px) {
	.product-grid-item .floritual-card {
		padding: 12px 12px 16px;
	}

	.product-grid-item .floritual-card .product-title a {
		font-size: 15px;
	}

	.product-grid-item .floritual-card .price {
		font-size: 21px;
	}

	.product-grid-item .floritual-card .price del,
	.product-grid-item .floritual-card .price del .amount {
		font-size: 13px;
	}

	.basel-hover-standard .floritual-card .btn-add > a {
		padding: 13px 34px 13px 16px;
		font-size: 11px;
		letter-spacing: 0.1em;
	}

	.floritual-card .btn-add > a:before {
		right: 12px;
		font-size: 15px;
	}

	.floritual-card .basel-buttons > div > a {
		width: 38px;
		height: 38px;
	}

	.floritual-card .basel-buttons > div > a:before {
		width: 17px;
		height: 17px;
	}
}

/* Телефон: 2 колонки */
@media (max-width: 767px) {
	.product-grid-item .floritual-card {
		padding: 10px 10px 14px;
		border-radius: 10px;
	}

	.floritual-card .product-element-top {
		border-radius: 7px;
	}

	.floritual-card .basel-buttons {
		top: 8px;
		right: 8px;
		gap: 7px;
	}

	.floritual-card .basel-buttons > div > a {
		width: 34px;
		height: 34px;
	}

	.floritual-card .basel-buttons > div > a:before {
		width: 15px;
		height: 15px;
	}

	.product-grid-item .floritual-card .product-title {
		margin-top: 12px;
	}

	.product-grid-item .floritual-card .product-title a {
		font-size: 13px;
	}

	.floritual-card-divider {
		margin: 10px 0 12px;
	}

	.floritual-card .floritual-price-row {
		min-height: 0;
	}

	.product-grid-item .floritual-card .price {
		font-size: 17px;
	}

	.product-grid-item .floritual-card .price del,
	.product-grid-item .floritual-card .price del .amount {
		font-size: 12px;
	}

	.floritual-card .floritual-price-from {
		font-size: 12px;
	}

	.floritual-card .floritual-sale-badge {
		padding: 3px 7px;
		font-size: 11px;
	}

	.floritual-card .btn-add {
		padding-top: 12px;
	}

	.basel-hover-standard .floritual-card .btn-add > a {
		padding: 11px 26px 11px 10px;
		font-size: 10px;
		letter-spacing: 0.05em;
		line-height: 14px;
	}

	.floritual-card .btn-add > a:before {
		right: 8px;
		font-size: 13px;
	}
}
