/*
Theme Name: Makart
Theme URI: https://makart.su
Author: Makart
Description: Тема мастерской Makart — авторские кожаные сумки без подкладки. Сумки добавляются в разделе «Сумки», тексты, фото и контакты — во «Внешний вид → Настроить → Makart».
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: makart
*/

:root {
	--suede: #D8C6AC;
	--ink: #241911;
	--tobacco: #3B2618;
	--thread: #F1E8DA;
	--zip: #A8291F;
	--muted: #5C4634;
	--on-dark-muted: #CDBBA3;
	--line: rgba(36, 25, 17, .25);
	--display: 'Oranienbaum', 'Times New Roman', serif;
	--text: 'Golos Text', system-ui, sans-serif;
	--pad: clamp(20px, 4vw, 64px);
	--mono: grayscale(1) sepia(.28) contrast(1.06) brightness(.92);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 24px; }
body {
	margin: 0;
	background: var(--suede);
	color: var(--ink);
	font-family: var(--text);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--zip); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--zip); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--ink); color: var(--thread); padding: 12px 16px; }

.h-xl { font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.u-link { font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { padding: 0 var(--pad); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; min-height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand svg { height: 34px; width: auto; }
.brand__name { font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: .02em; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 15px; }
.header-cta { font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--ink); padding: 6px 0; }
.menu-toggle { display: none; }

@media (max-width: 760px) {
	.site-header__inner { min-height: 64px; flex-wrap: nowrap; }
	.brand svg { height: 28px; }
	.brand__name { font-size: 26px; }
	.header-cta { display: none; }
	.menu-toggle {
		display: flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 4px;
		border: 0; background: none; color: var(--ink); font: 15px var(--text); cursor: pointer;
	}
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; z-index: 40; background: var(--suede); padding: 8px 20px 28px; border-bottom: 1px solid var(--ink); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { font-family: var(--display); font-size: 34px; line-height: 1.5; }
	.site-header { position: relative; }
}

/* ---------- Hero: outside / inside ---------- */
.hero { padding: 0 var(--pad); }
.hero__frame { position: relative; height: clamp(520px, 86vh, 920px); overflow: hidden; background: #3A2416; }
.hero__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__inside { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos, 50%)); }
.hero__range {
	position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 3;
	-webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize;
}
.hero__range::-webkit-slider-thumb { -webkit-appearance: none; width: 72px; height: 100vh; background: transparent; }
.hero__range::-moz-range-thumb { width: 72px; height: 100vh; background: transparent; border: 0; }
.hero__range:focus-visible { outline: none; }
.hero__seam { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 0; z-index: 2; pointer-events: none; }
.hero__seam::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; border-left: 2px dashed var(--thread); opacity: .9; }
.hero__knob {
	position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
	width: 52px; height: 52px; border-radius: 50%; background: var(--thread); color: var(--ink);
	display: flex; align-items: center; justify-content: center;
}
.hero__range:focus-visible ~ .hero__seam .hero__knob { outline: 2px solid var(--thread); outline-offset: 4px; }
.hero__title {
	position: absolute; left: clamp(20px, 4vw, 56px); bottom: clamp(24px, 5vw, 64px); right: 20px; z-index: 2; pointer-events: none;
	color: var(--thread); font-size: clamp(50px, 9vw, 148px); line-height: .92; letter-spacing: -.01em; max-width: 9.5em;
	text-shadow: 0 2px 30px rgba(36, 25, 17, .35);
}
.hero__hint { position: absolute; right: clamp(20px, 4vw, 56px); top: clamp(20px, 3vw, 40px); z-index: 2; pointer-events: none; color: var(--thread); font-size: 14px; text-align: right; max-width: 220px; line-height: 1.45; }
.hero__hint-mobile { display: none; }
@media (max-width: 760px) {
	.hero { padding: 0 12px; }
	.hero__frame { height: 560px; }
	.hero__knob { top: 42%; width: 48px; height: 48px; }
	.hero__hint { display: none; }
	.hero__hint-mobile { display: block; margin: 12px 8px 0; font-size: 14px; color: var(--muted); }
}

/* ---------- Intro ---------- */
.intro { padding: clamp(64px, 10vw, 144px) var(--pad); display: flex; flex-wrap: wrap; gap: 24px 80px; align-items: flex-start; }
.intro__lead { flex: 3 1 560px; font-family: var(--display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.18; max-width: 24ch; }
.intro__side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 20px; padding-top: 10px; max-width: 380px; }
.intro__side .u-link { align-self: flex-start; }
@media (max-width: 760px) { .intro { padding-top: 56px; padding-bottom: 56px; } .intro__lead { flex-basis: 100%; } }

/* ---------- Collection ---------- */
.collection { padding: 0 var(--pad) clamp(72px, 10vw, 144px); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; border-top: 1px solid var(--ink); padding-top: 24px; margin-bottom: clamp(24px, 4vw, 56px); }
.sec-head p { color: var(--muted); font-size: 15px; max-width: 380px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px 24px; }
.card { display: flex; flex-direction: column; gap: 4px; padding-bottom: 40px; }
.card__img { aspect-ratio: 1 / 1; margin: 0 -4%; }
.card__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.card__img--photo { margin: 0 0 6px; overflow: hidden; }
.card__img--photo img { object-fit: cover; }
.card:hover .card__img--photo img { transform: scale(1.03); }
.card:hover .card__img img { transform: translateY(-6px); }
@media (prefers-reduced-motion: reduce) { .card__img img { transition: none; } }
.card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.card__name { font-family: var(--display); font-size: 32px; line-height: 1.05; }
.card__price { font-size: 16px; white-space: nowrap; }
.card__desc { font-size: 15px; color: var(--muted); }
.card:hover .card__name { color: var(--zip); }
@media (max-width: 760px) {
	.collection { padding-left: 0; padding-right: 0; }
	.collection .sec-head { margin: 0 20px 0; }
	.shelf { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 20px 8px; scroll-padding: 0 20px; scrollbar-width: none; }
	.shelf::-webkit-scrollbar { display: none; }
	.shelf .card { flex: 0 0 300px; scroll-snap-align: start; }
	.shelf .card__img { margin: 0; height: 300px; aspect-ratio: auto; }
	.shelf .card__img--photo { margin-bottom: 6px; }
}
.swipe-hint { display: none; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .swipe-hint { display: inline; } }

/* ---------- Irina ---------- */
.irina { background: var(--tobacco); color: var(--thread); display: flex; flex-wrap: wrap; align-items: stretch; }
.irina__photo { flex: 1 1 520px; min-height: clamp(420px, 60vw, 780px); position: relative; overflow: hidden; }
.irina__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 38%; filter: var(--mono); }
.irina__text { flex: 1 1 480px; padding: clamp(40px, 7vw, 112px) var(--pad); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.irina__quote { font-family: var(--display); font-size: clamp(32px, 3.6vw, 54px); line-height: 1.12; max-width: 17ch; }
.irina__name { font-size: 20px; font-weight: 500; display: block; margin-bottom: 12px; }
.irina__about { color: var(--on-dark-muted); max-width: 440px; }
@media (max-width: 760px) { .irina__photo { min-height: 420px; flex-basis: 100%; } }

/* ---------- Process ---------- */
.process { padding: clamp(64px, 10vw, 144px) var(--pad); }
.process h2 { margin-bottom: clamp(28px, 4vw, 56px); }
.steps-img { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px 24px; }
.steps-img li { display: flex; flex-direction: column; gap: 18px; }
.steps-img__img { aspect-ratio: 4 / 5; overflow: hidden; }
.steps-img__img img { width: 100%; height: 100%; object-fit: cover; filter: var(--mono); }
.steps-img__cap { display: flex; gap: 16px; align-items: baseline; }
.steps-img__n { font-family: var(--display); font-size: 28px; color: var(--zip); }
.steps-img__t { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; }
.steps-img__d { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) {
	.steps-img { gap: 20px; }
	.steps-img li { flex-direction: row; gap: 16px; align-items: flex-start; }
	.steps-img__img { flex: 0 0 112px; height: 112px; aspect-ratio: auto; }
	.steps-img__t { font-size: 26px; }
}

/* ---------- Order ---------- */
.order { padding: 0 var(--pad) clamp(72px, 10vw, 144px); }
.order__inner { border-top: 1px solid var(--ink); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 24px 80px; }
.order__inner h2 { flex: 1 1 320px; }
.order__steps { flex: 2 1 560px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px 32px; padding-top: 12px; }
.order__steps strong { font-weight: 500; display: block; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--thread); padding: clamp(56px, 8vw, 120px) var(--pad) 40px; }
.site-footer a { color: var(--thread); }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px 48px; }
.site-footer__call { font-family: var(--display); font-size: clamp(44px, 6.5vw, 104px); line-height: .98; max-width: 11ch; }
.contacts { display: flex; flex-direction: column; gap: 12px; min-width: min(100%, 320px); }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 0 24px; border: 1px solid #6E5440; }
.contact:hover { border-color: var(--thread); color: var(--thread); }
.contact--main { background: var(--zip); border-color: var(--zip); color: #FFF6EC !important; font-weight: 500; }
.contact--main:hover { background: #8E2018; }
.contact span:last-child { font-weight: 400; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: clamp(48px, 8vw, 112px); padding-top: 24px; border-top: 1px solid #4A3626; font-size: 14px; color: #B9A68E; }
.site-footer__bottom .brand { color: var(--thread); }
.site-footer__bottom .brand svg { height: 22px; }
.site-footer__bottom .brand__name { font-size: 22px; }

.sticky-cta { display: none; }
@media (max-width: 760px) {
	.sticky-cta { display: block; position: sticky; bottom: 0; z-index: 30; padding: 10px 12px 14px; background: linear-gradient(rgba(216, 198, 172, 0), var(--suede) 40%); }
	.sticky-cta a { display: flex; justify-content: center; align-items: center; min-height: 52px; background: var(--ink); color: var(--thread); font-weight: 500; }
}

/* ---------- Single bag ---------- */
.product { padding: 16px var(--pad) clamp(72px, 10vw, 144px); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.product__grid { display: flex; flex-wrap: wrap; gap: 32px clamp(32px, 5vw, 96px); align-items: flex-start; }
.gallery { flex: 999 1 560px; min-width: 0; }
.gallery__track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery__item { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.gallery__item img { width: 100%; height: 100%; object-fit: contain; }
.gallery__item--photo img { object-fit: cover; }
.product__info { flex: 1 1 360px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 24px; }
.product__kind { color: var(--muted); font-size: 15px; }
.product__title { font-size: clamp(56px, 6vw, 96px); line-height: .95; }
.product__price { font-size: 22px; margin-top: 12px; }
.product__desc { color: var(--ink); }
.product__desc > * + * { margin-top: 1em; }
.specs { margin: 0; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.btn { display: flex; justify-content: center; align-items: center; min-height: 56px; padding: 0 24px; font-weight: 500; border: 1px solid var(--ink); }
.btn--main { background: var(--zip); border-color: var(--zip); color: #FFF6EC; }
.btn--main:hover { background: #8E2018; color: #FFF6EC; }
.btn:hover { color: var(--zip); }
.product__actions { display: flex; flex-direction: column; gap: 10px; }
.product__note { font-size: 14px; color: var(--muted); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; min-height: 52px; padding: 14px 0; display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 18px; color: var(--muted); }
.related { margin-top: clamp(72px, 10vw, 144px); }
@media (max-width: 960px) { .product__info { position: static; } }
@media (max-width: 760px) {
	.product { padding-left: 0; padding-right: 0; }
	.crumbs, .product__info, .related .sec-head { margin-left: 20px; margin-right: 20px; }
	.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 0 20px; scrollbar-width: none; }
	.gallery__track::-webkit-scrollbar { display: none; }
	.gallery__item, .gallery__item:first-child { flex: 0 0 86%; aspect-ratio: 1 / 1; scroll-snap-align: center; }
	.related .shelf { padding-top: 16px; }
}

/* ---------- Order form ---------- */
.order-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.sizes { border: 0; margin: 0; padding: 0; min-width: 0; }
.sizes legend, .field__label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.sizes__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.size { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-height: 44px; border: 1px solid var(--line); cursor: pointer; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size__name { font-family: var(--display); font-size: 24px; line-height: 1; }
.size__dims, .size__price { font-size: 14px; color: var(--muted); }
.size:has(input:checked) { border: 2px solid var(--ink); padding: 11px 13px; }
.size:has(input:focus-visible) { outline: 2px solid var(--zip); outline-offset: 3px; }
.field input, .field textarea {
	width: 100%; font: 16px var(--text); color: var(--ink); background: rgba(255, 255, 255, .35);
	border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; min-height: 48px;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7A6553; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: rgba(255, 255, 255, .55); }
button.btn { font: 500 17px var(--text); background: none; color: var(--ink); cursor: pointer; width: 100%; }

body.single-bag .sticky-cta { display: none; }

/* ---------- Pages ---------- */
.page-content { padding: 48px var(--pad) 112px; }
.page-content__inner { max-width: 720px; }
.page-content h1 { font-size: clamp(44px, 5vw, 72px); line-height: 1; margin-bottom: 32px; }
.entry > * + * { margin-top: 1.1em; }
.entry a { text-decoration: underline; }
.archive-head { padding: 32px var(--pad) 0; }
.pagination { margin-top: 40px; display: flex; gap: 8px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.pagination .current { background: var(--ink); color: var(--thread); }
