/* «Наши работы» — галерея интерьеров клиентов. Цвета и шрифты — как на сайте. */
.af-works { padding: 40px 0 56px; }
.af-works--main, .af-works--product, .af-works--more { padding: 32px 0 48px; }
.af-works__head { max-width: 860px; margin-bottom: 28px; }
.af-works__intro { margin-top: 12px; color: #5b575c; font-size: 16px; line-height: 1.55; }
.af-works__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.af-works__row .af-works__title { margin: 0; }
.af-works__all { flex: 0 0 auto; padding: 10px 22px; border-radius: 8px; font-size: 15px; }
.af-works__empty { color: #5b575c; font-size: 16px; padding: 24px 0; }

.af-works__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.af-works--list .af-works__grid, .af-works:not(.af-works--main):not(.af-works--product):not(.af-works--more) .af-works__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.af-work { display: flex; flex-direction: column; color: #211e22; text-decoration: none; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px #ece9ea; transition: box-shadow .2s, transform .2s; }
.af-work:hover { box-shadow: 0 10px 28px rgba(33, 30, 34, .12); transform: translateY(-2px); }
.af-work__img { position: relative; display: block; aspect-ratio: 4 / 3; background: #f4f1f0; overflow: hidden; }
.af-work__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.af-work:hover .af-work__img img { transform: scale(1.03); }
.af-work__count { position: absolute; right: 10px; bottom: 10px; background: rgba(33, 30, 34, .72); color: #fff; font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 20px; }
.af-work__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.af-work__title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.af-work__set { font-size: 14px; color: #f26241; }

.af-works__pages { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 32px; }
.af-works__pages a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid #e2dedf; color: #211e22; text-decoration: none; }
.af-works__pages a._active { background: #f26241; border-color: #f26241; color: #fff; }

/* Страница интерьера (v2: фото на всю высоту колонки, карточка комплекта внизу, анимации) */
.af-work-page { padding: 20px 0 56px; }
.af-work-page__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: stretch; }
.af-work-page__info { display: flex; flex-direction: column; min-width: 0; padding: 6px 0 0; }
.af-work-page__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #8a8489; margin-bottom: 14px; }
.af-ember { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #f26241; box-shadow: 0 0 0 0 rgba(242, 98, 65, .55); animation: af-ember 2.4s ease-out infinite; }
.af-work-page__title { margin: 0 0 26px; font-size: clamp(30px, 3vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -.01em; color: #211e22; }

.af-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.af-spec { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 18px; border-radius: 14px; background: #faf6f4; border: 1px solid #f1e9e5; transition: border-color .25s, transform .25s, box-shadow .25s; }
.af-spec:hover { border-color: #f6c3b5; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(242, 98, 65, .08); }
.af-spec__icon { grid-row: 1 / 3; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: #fff; fill: none; stroke: #f26241; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 2px 8px rgba(33, 30, 34, .06); }
.af-spec__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8a8489; }
.af-spec__value { font-size: 18px; font-weight: 600; color: #211e22; line-height: 1.25; }
.af-spec:not(:has(.af-spec__icon)) { grid-template-columns: 1fr; }

.af-work-page__desc { font-size: 16px; line-height: 1.65; color: #3a363b; margin-bottom: 24px; }

/* карточка «Комплект на фото» — прижата к низу колонки, вровень с низом фото */
.af-set { margin-top: 4px; padding: 22px; border-radius: 20px; background: linear-gradient(180deg, #fff 0%, #fffaf8 100%); border: 1px solid #efe9e7; box-shadow: 0 22px 48px -22px rgba(33, 30, 34, .25); }
.af-set__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.af-set__label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8a8489; }
.af-set__stock { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: #eefaf4; }
.af-set__stock svg { width: 16px; height: 16px; }
.af-set__main { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 20px; align-items: center; }
.af-set__img { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 62%, #fde3d9 0%, #f7f1ee 64%); }
.af-set__img::after { content: ''; position: absolute; left: 50%; top: 58%; width: 46%; height: 30%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 120, 60, .45), transparent); filter: blur(6px); animation: af-glow 3.2s ease-in-out infinite; pointer-events: none; }
.af-set__img img { font-size: 0; color: transparent; position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .25s; }
.af-set__img:hover img { transform: scale(1.06); }
.af-set__img img._swap { opacity: 0; transform: scale(.96); }
.af-set__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.af-set__name { font-size: 15px; line-height: 1.4; color: #211e22; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.af-set__name:hover { color: #f26241; }
.af-set__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.af-set__price ._now { font-size: 26px; font-weight: 700; color: #211e22; letter-spacing: -.01em; }
.af-set__price ._old { font-size: 14px; color: #a29ca1; text-decoration: line-through; }
.af-set__colors { display: flex; flex-direction: column; gap: 8px; }
.af-set__colors-label { font-size: 13px; color: #8a8489; }
.af-set__swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.af-set__swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 2px #fff, 0 0 0 3px transparent; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.af-set__swatch:hover { transform: scale(1.1); }
.af-set__swatch._active { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px #fff, 0 0 0 5px #f26241; }
.af-set__features { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px dashed #eadfdb; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.af-set__feature { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.3; color: #3a363b; animation: af-rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(500ms + var(--i, 0) * 70ms); }
.af-set__feature-icon { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #faf3f0; transition: background .25s, transform .25s; }
.af-set__feature:hover .af-set__feature-icon { background: #fde3d9; transform: rotate(-6deg) scale(1.06); }
.af-set__feature-icon img { width: 22px; height: 22px; object-fit: contain; }
.af-set__cta { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; min-height: 56px; border-radius: 12px; background: #f26241; color: #fff; font-size: 17px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(242, 98, 65, .8); transition: background .25s, box-shadow .25s, transform .25s; }
.af-set__cta:hover { background: #e4512f; color: #fff; transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(242, 98, 65, .9); }
.af-set__cta svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
.af-set__cta:hover svg { transform: translateX(5px); }
.af-set__cta::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: af-shine 4.5s ease-in-out 1.5s infinite; }

/* галерея: фото тянется на всю высоту правой колонки */
.af-gallery { display: flex; flex-direction: column; min-width: 0; }
.af-gallery__main { position: relative; flex: 1 1 auto; min-height: clamp(420px, 62vh, 760px); border-radius: 20px; overflow: hidden; background: #f4f1f0; box-shadow: 0 24px 50px -28px rgba(33, 30, 34, .35); }
.af-gallery__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; pointer-events: none; cursor: zoom-in; }
.af-gallery__slide._active { opacity: 1; pointer-events: auto; }
.af-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.06); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.af-gallery__slide._active img { transform: scale(1); animation: af-kenburns 18s ease-in-out 1.2s infinite alternate; }
.af-gallery__main::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to top, rgba(20, 16, 18, .35), transparent); pointer-events: none; z-index: 1; }
.af-gallery__nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 0, 0, .15); cursor: pointer; z-index: 2; opacity: 0; transition: opacity .3s, transform .3s, background .2s; }
.af-gallery__nav._prev { left: 16px; transform: translateX(-8px); }
.af-gallery__nav._next { right: 16px; transform: translateX(8px); }
.af-gallery__main:hover .af-gallery__nav { opacity: 1; transform: none; }
.af-gallery__nav:hover { background: #fff; }
.af-gallery__nav::before { content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-top: 2px solid #f26241; border-right: 2px solid #f26241; }
.af-gallery__nav._prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.af-gallery__nav._next::before { transform: translate(-70%, -50%) rotate(45deg); }
.af-gallery__counter { position: absolute; left: 16px; bottom: 16px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-size: 13px; letter-spacing: .06em; padding: 6px 12px; border-radius: 20px; z-index: 2; }
.af-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.af-gallery__thumb { flex: 0 0 96px; height: 70px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .6; transition: opacity .25s, border-color .25s, transform .25s; }
.af-gallery__thumb:hover { opacity: 1; transform: translateY(-2px); }
.af-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-gallery__thumb._active { border-color: #f26241; opacity: 1; }

/* появление блоков по очереди */
.af-rise { animation: af-rise .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 90ms + 60ms); }
@keyframes af-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes af-kenburns { from { transform: scale(1); } to { transform: scale(1.07) translate(-1%, -1%); } }
@keyframes af-ember { 0% { box-shadow: 0 0 0 0 rgba(242, 98, 65, .55); } 70% { box-shadow: 0 0 0 10px rgba(242, 98, 65, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 98, 65, 0); } }
@keyframes af-glow { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes af-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
	.af-rise, .af-set__feature, .af-gallery__slide._active img, .af-ember, .af-set__img::after, .af-set__cta::after { animation: none !important; }
	.af-gallery__slide img { transform: none; }
}

.af-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(15, 13, 16, .94); display: flex; align-items: center; justify-content: center; }
.af-lightbox[hidden] { display: none; }
.af-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.af-lightbox__close { position: absolute; top: 14px; right: 18px; font-size: 40px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }
.af-lightbox__nav { position: absolute; top: 50%; width: 54px; height: 54px; margin-top: -27px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); cursor: pointer; }
.af-lightbox__nav._prev { left: 16px; }
.af-lightbox__nav._next { right: 16px; }
.af-lightbox__nav::before { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; border-top: 2px solid #fff; border-right: 2px solid #fff; }
.af-lightbox__nav._prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.af-lightbox__nav._next::before { transform: translate(-70%, -50%) rotate(45deg); }

@media (max-width: 1199.98px) {
	.af-works__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
	.af-work-page__grid { grid-template-columns: 1fr; gap: 28px; }
	.af-gallery__main { min-height: 0; aspect-ratio: 4 / 3; }
	.af-set { margin-top: 8px; }
	.af-works__grid, .af-works:not(.af-works--main):not(.af-works--product):not(.af-works--more) .af-works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 575.98px) {
	.af-works { padding: 24px 0 36px; }
	.af-works__row { flex-wrap: wrap; margin-bottom: 16px; }
	.af-works__title._title { font-size: 24px; }
	.af-works__grid, .af-works:not(.af-works--main):not(.af-works--product):not(.af-works--more) .af-works__grid { gap: 12px; }
	.af-work__body { padding: 10px 12px 12px; }
	.af-work__title { font-size: 14px; }
	.af-work__set { font-size: 13px; }
	.af-work-page { padding: 12px 0 28px; }
	.af-work-page__title { font-size: 28px; margin-bottom: 18px; }
	.af-gallery__main { min-height: 0; aspect-ratio: 4 / 3; margin: 0 -20px; border-radius: 0; box-shadow: none; }
	.af-gallery__nav { opacity: 1; transform: none; }
	.af-set { padding: 16px; }
	.af-set__main { grid-template-columns: 40% 1fr; gap: 14px; }
	.af-set__price ._now { font-size: 21px; }
	.af-set__features { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
	.af-set__feature { font-size: 13px; }
	.af-gallery__nav { width: 38px; height: 38px; margin-top: -19px; }
	.af-gallery__thumb { flex-basis: 72px; height: 54px; }
	/* на телефоне — горизонтальная лента на главной и в карточке товара */
	.af-works--main .af-works__grid, .af-works--product .af-works__grid, .af-works--more .af-works__grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 2px 20px 8px; scrollbar-width: none; }
	.af-works--main .af-work, .af-works--product .af-work, .af-works--more .af-work { flex: 0 0 72%; scroll-snap-align: start; }
}
