/* Страница товара «на заказ» (woocommerce/content-single-product-na-zakaz.php) */
/* Сетка: инфо | форма | остальное. Десктоп — форма справа на всю высоту страницы и липнет. */
.mto{display:grid;gap:var(--space-6);margin-top:var(--space-5);align-items:start}
.mto__rest{min-width:0;display:flex;flex-direction:column}
@media (min-width:1024px){
	.mto{grid-template-columns:minmax(0,1fr) 380px;grid-template-rows:auto 1fr;column-gap:var(--space-10);row-gap:0}
	.mto__info{grid-column:1;grid-row:1}
	.mto__rest{grid-column:1;grid-row:2;padding-top:var(--space-8)}
	.mto__form{grid-column:2;grid-row:1/span 2;align-self:start}
}
.mto__info{display:flex;flex-direction:column;gap:var(--space-4);min-width:0}
.mto__price{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;padding:8px 14px;border-radius:var(--radius-pill);background:var(--success-soft);color:var(--success);font-weight:700;font-size:16px}
.mto__price svg{width:18px;height:18px}
.mto__lead{font-size:16px;line-height:1.6}

.mto__form{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-xl);padding:var(--space-6)}
@media (min-width:1024px){.mto__form{position:sticky;top:calc(var(--header-h) + var(--space-4))}}
.mto-form{gap:var(--space-4)}
.mto-form__title{margin:0}
.mto-form .small{margin:-8px 0 0}
.mto-form textarea{font:inherit}
.mto-file__input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.mto-file__btn{display:flex;align-items:center;gap:var(--space-2);min-height:48px;padding:10px var(--space-4);border:1.5px dashed var(--line-control);border-radius:var(--radius-md);background:var(--bg);cursor:pointer;font-weight:500;overflow-wrap:anywhere}
.mto-file__btn:hover{border-color:var(--ink)}
.mto-file__btn svg{width:18px;height:18px;flex:none}
.mto-file:focus-within .mto-file__btn{outline:2px solid var(--ink);outline-offset:2px}
.mto-file .hint{font-size:13px;color:var(--ink-muted)}

.mto-works .prose .wp-block-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:768px){.mto-works .prose .wp-block-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
.mto-works .prose .wp-block-gallery img{border-radius:var(--radius-md)}
.mto-works figcaption{font-size:14px;color:var(--ink-muted);margin-top:6px}

.mto-steps__list{list-style:none;margin:var(--space-5) 0 var(--space-6);padding:0;display:grid;gap:var(--space-4);counter-reset:none}
@media (min-width:768px){.mto-steps__list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1280px){.mto-steps__list{grid-template-columns:repeat(3,minmax(0,1fr))}}
.mto-step{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-5);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg)}
.mto-step__n{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--cta);color:var(--on-cta);font-weight:700}
.mto-step__t{font-size:16px}
.mto-step__d{font-size:14px;color:var(--ink-muted);line-height:1.5}
.mto-steps>.btn{align-self:flex-start}

.mto-colors__note{margin:var(--space-2) 0 var(--space-5);font-size:14px}
.mto-pal{display:flex;flex-direction:column;gap:var(--space-4);margin-bottom:var(--space-8)}
.mto-pal__tabs{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.mto-pal__tab{border:1.5px solid var(--line);background:var(--bg);border-radius:var(--radius-pill);padding:8px 16px;font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.mto-pal__tab .muted{font-weight:400}
.mto-pal__tab[aria-selected=true]{border-color:var(--ink);background:var(--ink);color:var(--bg)}
.mto-pal__tab[aria-selected=true] .muted{color:inherit;opacity:.7}
.mto-swatches{display:grid;gap:var(--space-4) var(--space-3);grid-template-columns:repeat(auto-fill,minmax(96px,1fr));margin:0}
@media (min-width:768px){.mto-swatches{grid-template-columns:repeat(auto-fill,minmax(116px,1fr))}}
.mto-swatches[hidden]{display:none}
.mto-swatch{margin:0;min-width:0;display:flex;flex-direction:column;gap:6px}
.mto-swatch a{display:block;border-radius:var(--radius-md);overflow:hidden;border:1px solid var(--line)}
.mto-swatch img,.mto-swatch__color{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover}
.mto-swatch__color{border-radius:var(--radius-md);border:1px solid var(--line)}
.mto-swatch figcaption{font-size:13px;line-height:1.3;color:var(--ink)}

/* 2026-11-20: «Наши работы» — карточки работ (mebelef-core, тип записи mebelef_work) */
.mto-cases{display:grid;gap:var(--space-5);margin-top:var(--space-5)}
@media (min-width:768px){.mto-cases{grid-template-columns:repeat(2,minmax(0,1fr))}}
.mto-case{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;min-width:0}
.mto-case__photos{position:relative;display:block;margin:0}
.mto-case__photos a{display:block}
.mto-case__photos a[hidden]{display:none}
.mto-case__photos img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.mto-case__count{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:var(--radius-pill);background:rgba(0,0,0,.6);color:#fff;font-size:13px;font-weight:600;pointer-events:none}
.mto-case__count svg{width:16px;height:16px}
.mto-case__body{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-5)}
.mto-case__title{margin:0;font-size:18px;line-height:1.3}
.mto-case__task{margin:0;font-size:15px;line-height:1.5}
.mto-case__facts{margin:0}
.mto-case__facts div{display:flex;justify-content:space-between;gap:var(--space-4);align-items:baseline;padding:8px 0;border-bottom:1px dashed var(--line)}
.mto-case__facts div:last-child{border-bottom:0}
.mto-case__facts dt{font-size:14px;color:var(--ink-muted);flex:none}
.mto-case__facts dd{margin:0;font-size:14px;font-weight:600;text-align:right}

/* 2026-11-20: «От чего зависит цена» */
.mto-price__list{list-style:none;margin:var(--space-5) 0 var(--space-4);padding:0;display:grid;gap:var(--space-4)}
@media (min-width:768px){.mto-price__list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.mto-price__item{display:grid;grid-template-columns:auto 1fr;gap:4px var(--space-3);align-items:start;padding:var(--space-5);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg)}
.mto-price__item svg{grid-row:span 2;width:24px;height:24px;color:var(--success)}
.mto-price__item b{font-size:16px}
.mto-price__item span{font-size:14px;color:var(--ink-muted);line-height:1.5}
.mto-price__note{margin:0;font-size:15px}

/* 2026-11-20: «Вопросы и ответы» — те же аккордеоны, вопрос — h3 */
.mto-faq .accordions{margin-top:var(--space-4)}
.mto-faq .accordion summary{font-size:17px}
@media (min-width:768px){.mto-faq .accordion summary{font-size:18px}}
.mto-faq .accordion summary h3{margin:0;font:inherit;letter-spacing:inherit;color:inherit}

/* Отступ под блоками без своего нижнего поля (2026-11-20) */
.mto-works,.mto-steps,.mto-price{padding-bottom:var(--space-8)}

/* 2026-11-20: «Изготовим в вашем размере» — карточки каталога; кнопка заявки после вопросов (только <1024px) */
.mto-models{padding-bottom:var(--space-8);min-width:0}
.mto-models__note{margin:var(--space-2) 0 var(--space-4);font-size:14px}
.mto-cta{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2);margin-top:var(--space-6);padding:var(--space-5);background:var(--success-soft);border-radius:var(--radius-lg)}
.mto-cta .btn{margin-top:var(--space-2)}
@media (min-width:1024px){.mto-cta{display:none}}

/* 2026-11-21: общая страница «Мебель на заказ» (page-korpusnaya-mebel-na-zakaz.php) — та же сетка .mto */
.mto-hub .mto{margin-top:var(--space-4)}
.mto-hero{position:relative;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-6) var(--space-5);border-radius:var(--radius-xl);background:linear-gradient(135deg,var(--hero) 0%,#E2F2D4 60%,#CDEBB5 100%)}
.mto-hero::after{content:"";position:absolute;right:-110px;top:-110px;width:340px;height:340px;border-radius:50%;background:radial-gradient(circle,rgba(168,221,132,.5),rgba(168,221,132,0) 70%);pointer-events:none}
.mto-hero>*{position:relative;z-index:1}
.mto-hero .mto__price{background:var(--bg)}
.mto-hero__title{margin:0;font-size:30px;line-height:1.1;font-weight:800;letter-spacing:-.02em}
.mto-hero__lead{margin:0;max-width:640px;font-size:17px;line-height:1.55}
.mto-hero__stats{list-style:none;margin:var(--space-2) 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
.mto-hero__stats li{display:flex;flex-direction:column;gap:2px;padding:var(--space-4);border-radius:var(--radius-lg);background:rgba(255,255,255,.78);min-width:0}
.mto-hero__stats b{font-size:24px;line-height:1.1;font-weight:800;color:var(--success);white-space:nowrap}
.mto-hero__stats span{font-size:13px;line-height:1.35;color:var(--ink-muted)}
.mto-hero__delivery{display:flex;align-items:flex-start;gap:var(--space-2);margin:0;font-size:14px;line-height:1.5}
.mto-hero__delivery svg{width:20px;height:20px;flex:none;color:var(--success);margin-top:1px}
.mto-hero__btns{display:flex;flex-wrap:wrap;gap:var(--space-3)}
.mto-hero__btns .btn{flex:1 1 200px}
.mto-hero__btns .btn--cta{box-shadow:0 6px 18px rgba(61,106,31,.22)}
.mto-hero__btns .btn--outline{background:var(--bg)}
@media (min-width:768px){
	.mto-hero{padding:var(--space-10) var(--space-8)}
	.mto-hero__title{font-size:40px}
	.mto-hero__stats{grid-template-columns:repeat(4,minmax(0,1fr))}
	.mto-hero__btns .btn{flex:0 0 auto}
}
/* Форма справа видна всегда — на десктопе кнопка «Рассчитать» лишняя */
@media (min-width:1024px){.mto-hero__btns .btn--cta{display:none}}

/* «Что изготовим» — плитки товаров «на заказ» */
.mto-types{padding-bottom:var(--space-8)}
.mto-types__note{margin:var(--space-2) 0 var(--space-5);font-size:14px}
.mto-types__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
@media (min-width:768px){.mto-types__list{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-4)}}
.mto-types__list li{min-width:0;display:flex}
.mto-type{display:flex;flex-direction:column;width:100%;border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;background:var(--bg);color:inherit;text-decoration:none;transition:border-color .2s,box-shadow .2s,transform .2s}
.mto-type:hover{border-color:var(--cta);box-shadow:var(--shadow-float);transform:translateY(-2px)}
.mto-type__img{display:block;aspect-ratio:4/3;background:#fff;overflow:hidden}
.mto-type__img img{display:block;width:100%;height:100%;object-fit:contain;padding:var(--space-2);transition:transform .3s}
.mto-type:hover .mto-type__img img{transform:scale(1.04)}
.mto-type__body{display:flex;flex-direction:column;gap:var(--space-1);flex:1;padding:var(--space-3) var(--space-4) var(--space-4)}
.mto-type__t{font-size:16px;line-height:1.3}
.mto-type__d{font-size:13px;line-height:1.4;color:var(--ink-muted)}
.mto-type__more{display:inline-flex;align-items:center;gap:4px;margin-top:auto;padding-top:var(--space-2);font-size:14px;font-weight:600;color:var(--success)}
.mto-type__more svg{width:16px;height:16px}
.mto-type--other{background:var(--success-soft);border-color:transparent}
.mto-type--other .mto-type__img{display:grid;place-items:center;background:transparent;color:var(--success)}
.mto-type--other .mto-type__img svg{width:56px;height:56px}
@media (max-width:767px){.mto-type__t{font-size:15px}}

.mto-about{padding-bottom:var(--space-4)}
.mto-about .prose{margin-top:var(--space-4)}
