/* Внутренние страницы: цены, каталог, оптом, контакты, доставка. */

/* --- Таблица прайса --- */
.price-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	overflow: hidden;
	margin-bottom: 56px;
}
.price-table thead th {
	font-family: var(--f-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--c-text-dim);
	text-align: left;
	font-weight: 500;
	padding: 14px 20px;
	border-bottom: 1px solid var(--c-border);
	background: var(--c-surface-alt);
}
.price-table td,
.price-table tbody th { padding: 20px; border-bottom: 1px solid var(--c-border); vertical-align: top; text-align: left; }
.price-table tbody tr:last-child td,
.price-table tbody tr:last-child th { border-bottom: 0; }
.price-table__name { font-family: var(--f-head); font-size: 21px; font-weight: 500; white-space: nowrap; }
.price-table__name .pill { margin-left: 8px; vertical-align: middle; }
.price-table__code { display: block; font-size: 11px; color: var(--c-text-dim); margin-top: 4px; font-weight: 400; }
.price-table__specs { font-size: 15px; color: var(--c-text-body); }
.price-table__price { font-family: var(--f-head); font-size: 22px; white-space: nowrap; }
.price-table__action { text-align: right; }

.price-extras__title { margin-bottom: 20px; }
.price-extras { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 1px; background: var(--c-border); border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; }
.price-extras__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
	gap: 20px;
	align-items: baseline;
	padding: 16px 20px;
	background: var(--c-surface);
}
.price-extras__item strong { font-size: 17px; font-weight: 600; }
.price-extras__item span { font-size: 15px; color: var(--c-text-muted); }
.price-extras__item em { font-style: normal; font-family: var(--f-mono); font-size: 13px; color: var(--c-accent); }

/* --- Старый прайс на странице «Цены» ---
   Модели в контенте обёрнуты в .catitem ещё старой темой: фото, подпись и таблица
   с размерами. Раньше они шли вертикальным столбиком во всю ширину — собираем
   их в сетку карточек, не трогая разметку в контенте. */
.legacy-models {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--gap);
	margin: 28px 0 56px;
}
.legacy-models .catitem {
	display: flex;
	flex-direction: column;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 18px;
}
.legacy-models .catitem p { margin: 0; }
.legacy-models .catitem img {
	width: 100%;
	max-width: none;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--r-sm);
	margin: 0 0 14px;
}
.legacy-models .item {
	font-family: var(--f-head);
	font-size: 19px;
	text-align: left !important;
	margin-bottom: 12px;
}
.legacy-models .item a { color: var(--c-text); }
.legacy-models .item a:hover { color: var(--c-accent); }

.legacy-models .monument-price-table {
	width: 100% !important;
	height: auto !important;
	border-collapse: collapse;
	margin-top: auto;
}
.legacy-models .monument-price-table td {
	border: 0;
	border-top: 1px solid var(--c-border);
	padding: 9px 0;
	font-size: 14px;
	color: var(--c-text-body);
	white-space: pre-line;
	vertical-align: middle;
}
.legacy-models .monument-price-table .momument-price {
	width: 1%;
	white-space: nowrap;
	text-align: right;
	font-family: var(--f-head);
	font-size: 18px;
	color: var(--c-text);
}
.legacy-models .monument-price-table .momument-price strong { font-weight: 500; }
.legacy-models .momument-price-action strong span { color: var(--c-accent) !important; }
.legacy-models .actionimage { width: auto !important; max-width: 54px; margin: 0 0 0 8px; }

/* Сноска про художественное оформление — мелким под таблицей. */
.legacy-models .catitem span[style*="font-size: 12px"] {
	display: block;
	margin-top: 10px;
	font-size: 12px !important;
	color: var(--c-text-dim);
}

/* --- Сетка изделий в разделе --- */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--gap);
	list-style: none;
	margin: 0 0 56px;
	padding: 0;
}
.product-card {
	display: flex;
	flex-direction: column;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	overflow: hidden;
}
.product-card__media { display: block; background: var(--c-surface-alt); }
.product-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.product-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__title { font-family: var(--f-body); font-size: 15px; font-weight: 600; margin: 0; line-height: 1.35; }
.product-card__price { font-family: var(--f-head); font-size: 20px; }
.product-card__price--muted { font-size: 16px; color: var(--c-text-muted); }
.product-card__order { margin-top: auto; align-self: flex-start; }

.type-card__count { display: block; font-size: 11px; color: var(--c-text-dim); margin-top: 2px; }

/* Заголовок «Другие наши работы» идёт сразу за сеткой разделов — без отступа
   он прилипал к карточкам. */
.type-grid + .section__title { margin-top: 56px; }
.product-grid--loose { margin-top: 24px; }

/* --- Оптом --- */
.terms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1px;
	background: var(--c-border);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	overflow: hidden;
	margin: 0 0 56px;
}
.terms__item { background: var(--c-surface); padding: 20px; }
.terms__item dd { margin: 8px 0 0; font-size: 16px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 56px; padding: 0; }
.chips__item {
	font-size: 15px;
	padding: 9px 16px;
	background: var(--c-surface);
	border: 1px solid var(--c-border-strong);
	border-radius: var(--r-pill);
}

/* --- Контакты --- */
.contacts { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.contacts__card {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: 28px;
}
.contacts__phones { list-style: none; margin: 12px 0 20px; padding: 0; display: grid; gap: 10px; }
.contacts__phones a { font-size: 22px; font-weight: 600; color: var(--c-text); }
.contacts__phones a:hover { color: var(--c-accent); }
.contacts__operator { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--c-text-dim); }
.contacts__line { font-size: 16px; margin: 0 0 10px; }
.contacts__frame { width: 100%; min-height: 420px; border: 0; border-radius: var(--r-md); display: block; }
.contacts__maplink { font-size: 14px; margin: 10px 0 0; }
.contacts__map .entry__content { margin-top: 20px; }

/* --- Доставка --- */
.delivery--page { margin-bottom: 56px; }
/* Раньше в две колонки уходил весь текст страницы вместе со списком вариантов
   доставки — читалось «в кучу». Колонки нужны только длинному перечню городов,
   который выводится карточками областей, поэтому здесь обычная колонка. */
.geo-text { max-width: none; }
.geo-text h2, .geo-text h3 { margin-top: 32px; }

@media (max-width: 1100px) {
	.contacts { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 767px) {
	.geo-text { columns: 1; }
	.price-table thead { display: none; }
	.price-table, .price-table tbody, .price-table tr, .price-table td, .price-table tbody th { display: block; width: 100%; }
	.price-table tr { border-bottom: 1px solid var(--c-border); padding: 8px 0; }
	.price-table td, .price-table tbody th { border: 0; padding: 6px 18px; }
	.price-table__action { text-align: left; padding-bottom: 16px; }
	.price-extras__item { grid-template-columns: 1fr; gap: 4px; }
}

/* --- Лайтбокс --- */
body.has-lightbox { overflow: hidden; }

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(26, 26, 25, 0.86); }

.lightbox__dialog {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas: 'prev figure next' 'panel panel panel';
	align-items: center;
	gap: 16px;
	max-width: 1100px;
	width: 100%;
	background: var(--c-surface);
	border-radius: var(--r-md);
	padding: 20px;
	max-height: 92vh;
}

.lightbox__figure { grid-area: figure; margin: 0; display: flex; justify-content: center; }
.lightbox__img { max-height: 68vh; width: auto; object-fit: contain; border-radius: var(--r-sm); }

.lightbox__nav {
	background: var(--c-surface-alt);
	border: 1px solid var(--c-border-strong);
	border-radius: var(--r-pill);
	width: 44px;
	height: 44px;
	font-size: 18px;
	cursor: pointer;
	color: var(--c-text);
}
.lightbox__nav:hover { border-color: var(--c-accent); }
.lightbox__nav--prev { grid-area: prev; }
.lightbox__nav--next { grid-area: next; }

.lightbox__close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: var(--c-surface);
	border: 1px solid var(--c-border-strong);
	border-radius: var(--r-pill);
	width: 36px;
	height: 36px;
	cursor: pointer;
	font-size: 15px;
	color: var(--c-text);
	z-index: 1;
}

.lightbox__panel {
	grid-area: panel;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding-top: 12px;
	border-top: 1px solid var(--c-border);
}
.lightbox__counter { font-size: 12px; color: var(--c-text-dim); }
.lightbox__title { font-size: 20px; margin: 0; flex: 1; min-width: 200px; }
.lightbox__price { font-family: var(--f-head); font-size: 22px; }

@media (max-width: 767px) {
	.lightbox { padding: 12px; }
	.lightbox__dialog {
		grid-template-columns: 1fr 1fr;
		grid-template-areas: 'figure figure' 'panel panel' 'prev next';
		padding: 14px;
	}
	.lightbox__nav { width: 100%; }
	.lightbox__img { max-height: 52vh; }
}
