/*
 * Floritual — страница «Каталог» (/shop/): сетка разделов по макету (2026-06-11).
 * Заголовок с орнаментом, подзаголовок, 8 вертикальных карточек 4×2
 * и 2 широкие горизонтальные. Подключается из functions.php.
 */

/* ---------- Шапка: заголовок по центру, орнамент, подзаголовок ---------- */

.woocommerce-shop .shop-loop-head.floritual-sections-head {
	display: block;
	text-align: center;
	margin-bottom: 40px;
}

.floritual-sections-head .woocommerce-breadcrumb {
	text-align: left;
}

.floritual-sections-head h1.floritual-shop-archive-title {
	text-align: center;
	margin: 18px 0 12px;
}

.floritual-sections-ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: #c49a4d;
	font-size: 18px;
	line-height: 1;
	margin-bottom: 18px;
}

.floritual-sections-ornament:before,
.floritual-sections-ornament:after {
	content: '';
	width: 70px;
	height: 1px;
	background: linear-gradient(90deg, rgba(196, 154, 77, 0), rgba(196, 154, 77, 0.6));
}

.floritual-sections-ornament:after {
	background: linear-gradient(90deg, rgba(196, 154, 77, 0.6), rgba(196, 154, 77, 0));
}

.floritual-sections-subtitle {
	color: #9a9a9a;
	font-size: 14px;
	line-height: 1.7;
	margin: 0 auto;
	max-width: 560px;
}

/* ---------- Сетка ---------- */

.floritual-sections-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 26px;
	margin-bottom: 50px;
}

/* ---------- Карточка раздела ---------- */

.floritual-section-card {
	display: flex;
	flex-direction: column;
	padding: 16px 16px 24px;
	border: 1px solid rgba(196, 154, 77, 0.35);
	border-radius: 14px;
	background-color: #0c0b09;
	text-align: center;
	transition: border-color 0.25s ease;
}

.floritual-section-card:hover {
	border-color: rgba(196, 154, 77, 0.7);
	text-decoration: none;
}

.floritual-section-thumb {
	display: block;
	border-radius: 10px;
	overflow: hidden;
}

.floritual-section-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.floritual-section-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-grow: 1;
}

.floritual-section-ornament {
	display: block;
	color: #b57b00;
	font-size: 13px;
	line-height: 1;
	margin: 16px 0 10px;
}

.floritual-section-name {
	display: block;
	font-family: 'Lora', Georgia, serif;
	font-size: 19px;
	line-height: 1.35;
	color: #fff;
}

.floritual-section-card:hover .floritual-section-name {
	color: #fbbc34;
}

.floritual-section-count {
	display: block;
	color: #9a9a9a;
	font-size: 13px;
	margin-top: 6px;
}

.floritual-section-btn {
	display: inline-block;
	margin-top: auto;
	padding: 10px 22px;
	border: 1px solid rgba(196, 154, 77, 0.6);
	border-radius: 8px;
	color: #dcb56a;
	font-size: 13px;
	line-height: 1.2;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.floritual-section-body .floritual-section-count {
	margin-bottom: 18px;
}

.floritual-section-card:hover .floritual-section-btn {
	color: #fbbc34;
	border-color: #fbbc34;
	background-color: rgba(196, 154, 77, 0.08);
}

/* ---------- Широкие карточки (последний ряд) ---------- */

.floritual-section-card--wide {
	grid-column: span 2;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	padding: 16px;
}

.floritual-section-card--wide .floritual-section-thumb {
	flex: 0 0 44%;
}

.floritual-section-card--wide .floritual-section-body {
	flex: 1 1 auto;
	padding-right: 12px;
}

.floritual-section-card--wide .floritual-section-ornament {
	margin-top: 0;
}

.floritual-section-card--wide .floritual-section-count {
	margin-bottom: 20px;
}

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

@media (max-width: 1024px) {
	.floritual-sections-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 18px;
	}
}

@media (max-width: 767px) {
	.floritual-sections-grid {
		gap: 12px;
	}

	.floritual-section-card {
		padding: 10px 10px 16px;
		border-radius: 10px;
	}

	.floritual-section-name {
		font-size: 15px;
	}

	.floritual-section-count {
		font-size: 12px;
	}

	.floritual-section-btn {
		padding: 8px 14px;
		font-size: 11px;
	}

	.floritual-section-card--wide {
		grid-column: span 2;
		gap: 12px;
		padding: 10px;
	}

	.floritual-section-card--wide .floritual-section-thumb {
		flex-basis: 38%;
	}

	.floritual-sections-head h1.floritual-shop-archive-title {
		font-size: 28px;
	}
}

/* ---------- Корзина: таблица товаров и «Сумма корзины» в одну строку ---------- */
/* Тема по умолчанию ставит .cart_totals ПОД таблицей (float:right; width:48%).
   :has(.cart-collaterals) — чтобы не зацепить пустую корзину. */

@media (min-width: 992px) {
	.woocommerce-cart .entry-content > .woocommerce:has(.cart-collaterals) {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 0 40px;
	}

	.woocommerce-cart .entry-content > .woocommerce > .woocommerce-notices-wrapper {
		flex: 0 0 100%;
	}

	.woocommerce-cart .entry-content > .woocommerce > form.woocommerce-cart-form {
		flex: 1 1 0;
		min-width: 0;
	}

	.woocommerce-cart .entry-content > .woocommerce > .cart-collaterals {
		flex: 0 0 380px;
		width: 380px;
	}

	.woocommerce-cart .cart-collaterals .cart_totals {
		float: none;
		width: 100%;
	}

	.woocommerce-cart .woocommerce-cart-form :is(td.product-price, td.product-subtotal) {
		white-space: nowrap;
	}
}
