/* =========================================================================
   Discount Upholstery — gallery.css
   Страница «Gallery»: заголовок + сетка 4 колонки + пагинация + лайтбокс.
   Подключается автоматически по слагу (assets/css/gallery.css).
   ========================================================================= */

.gallery-page {
	padding-bottom: 110px;
}

@media (max-width: 768px) {
	.gallery-page {
		padding-bottom: 56px;
	}
}

/* -------------------------------------------------------------------------
   Прозрачная шапка поверх hero (как на главной) + убираем отступ под шапкой
   ------------------------------------------------------------------------- */
body.dz-hero-page .site-main {
	padding-top: 0;
}

body.dz-hero-page .site-header:not(.is-scrolled) {
	background-color: transparent;
	box-shadow: none;
}

/* -------------------------------------------------------------------------
   Hero (как на главной: только eyebrow / title / script / кнопка)
   ------------------------------------------------------------------------- */
.gallery-page .hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 760px;
	color: #fff;
	overflow: hidden;
}

@media (min-width: 1920px) {
	.gallery-page .hero { min-height: 864px; }
}

@media (max-width: 768px) {
	.gallery-page .hero { min-height: 620px; }
}

@media (max-width: 480px) {
	.gallery-page .hero { min-height: 540px; }
}

.gallery-page .hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.gallery-page .hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.gallery-page .hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.5) 0%,
		rgba(0, 0, 0, 0.12) 42%,
		rgba(0, 0, 0, 0.15) 70%,
		rgba(0, 0, 0, 0.55) 100%
	);
}

.gallery-page .hero__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding-block: 190px 90px;
	text-align: center;
}

@media (max-width: 1024px) {
	.gallery-page .hero__inner { padding-block: 150px 64px; }
}

@media (max-width: 600px) {
	.gallery-page .hero__inner { padding-block: 120px 48px; }
}

.gallery-page .hero__content {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.gallery-page .hero__eyebrow {
	margin: 0;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	text-indent: 0.3em;
	opacity: 0.85;
}

.gallery-page .hero__title {
	margin: 0.4em 0 0;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 120px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #fff;
}

.gallery-page .hero__script {
	display: block;
	margin-top: -0.32em;
	font-family: var(--font-script);
	font-weight: 400;
	font-size: 140px;
	line-height: 1;
	color: #e4d1ba;
}

/* Адаптив типографики hero */
@media (max-width: 1200px) {
	.gallery-page .hero__title { font-size: 92px; }
	.gallery-page .hero__script { font-size: 108px; }
}

@media (max-width: 768px) {
	.gallery-page .hero__eyebrow { font-size: 16px; }
	.gallery-page .hero__title { font-size: 64px; }
	.gallery-page .hero__script { font-size: 76px; }
}

@media (max-width: 480px) {
	.gallery-page .hero__eyebrow { font-size: 13px; }
	.gallery-page .hero__title { font-size: 44px; }
	.gallery-page .hero__script { font-size: 64px; }
}

.gallery-page .hero__cta {
	display: inline-block;
	margin-top: 32px;
	padding: 22px 52px;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #1a1a1a;
	background: linear-gradient(90deg, #e4d1ba 0%, #fff1e1 50%, #e4d1ba 100%);
	border-radius: 9999px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-page .hero__cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 38px rgba(0, 0, 0, 0.26);
}

@media (max-width: 600px) {
	.gallery-page .hero__cta {
		margin-top: 28px;
		padding: 18px 40px;
	}
}

/* Отступ между hero и сеткой галереи */
.gallery-page__body {
	padding-top: 96px;
}

@media (max-width: 768px) {
	.gallery-page__body {
		padding-top: 56px;
	}
}

/* Заголовок страницы (устаревший, оставлен на случай использования) */
.gallery-page__title {
	margin: 0 0 60px;                        /* нижний отступ до сетки */
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 120px;                        /* ~120px на 1440 */
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #3a3a53;
	text-align: center;
}

/* -------------------------------------------------------------------------
   Сетка галереи — 4 колонки на десктопе
   ------------------------------------------------------------------------- */
.gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.gallery__item {
	position: relative;
	display: block;
	min-width: 0;               /* колонки 1fr остаются равными (без распора картинкой) */
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	background-color: #f0ece7;
	cursor: zoom-in;
}

/* Картинка абсолютно заполняет плитку — её родной размер не влияет на сетку */
.gallery__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__img,
.gallery__item:focus-visible .gallery__img {
	transform: scale(1.05);
}

/* Ховер-подсветка */
.gallery__item::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(70, 68, 96, 0);
	transition: background-color 0.3s ease;
}

.gallery__item:hover::after {
	background-color: rgba(70, 68, 96, 0.08);
}

/* Скрытые страницей элементы */
.gallery__item[hidden] {
	display: none;
}

/* -------------------------------------------------------------------------
   Пагинация
   ------------------------------------------------------------------------- */
.gallery__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 56px;
}

.gallery__page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	color: #464460;
	background-color: transparent;
	border: 1px solid #e0dcd5;
	border-radius: 8px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery__page-btn:hover:not(:disabled):not(.is-active) {
	border-color: #c09570;
	color: #c09570;
}

.gallery__page-btn.is-active {
	color: #fff;
	background-color: #c09570;
	border-color: #c09570;
	cursor: default;
}

.gallery__page-btn--arrow {
	font-size: 20px;
}

.gallery__page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   Адаптив
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.gallery__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 680px) {
	.gallery__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 400px) {
	.gallery__grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
   lightGallery: защита от глобальных стилей темы (img { height:auto } и т.п.)
   ------------------------------------------------------------------------- */

/* Миниатюры снизу — одинаковые квадраты, обрезка по центру */
.lg-outer .lg-thumb-item {
	border-radius: 4px;
	overflow: hidden;
}

.lg-outer .lg-thumb-item img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

/* Основное изображение — lightGallery управляет размерами сам */
.lg-outer .lg-image {
	max-width: 100% !important;
	max-height: 100% !important;
}

/* Крестик закрытия и панель всегда поверх и видимы */
.lg-outer .lg-toolbar {
	z-index: 1082;
}

.lg-outer .lg-toolbar .lg-close {
	display: inline-block;
	opacity: 1;
	visibility: visible;
}
