/*
Theme Name: Аметист
Theme URI: https://ametist42.ru/
Author: МПК «Аметист»
Description: Лёгкая тема для сайта памятников МПК «Аметист»: каталог-витрина на WooCommerce, страницы услуг, акция, кнопки WhatsApp и MAX.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ametist
WC requires at least: 7.0
*/

:root {
	--bg: #F5F3EF;
	--ink: #1F1E1C;
	--ink-2: #3F3B36;
	--muted: #5F5B55;
	--line: #E4E0D8;
	--stone: #CFCAC1;
	--dark: #22211F;
	--dark-2: #3A3835;
	--on-dark: #F5F3EF;
	--on-dark-muted: #CFCAC2;
	--accent: #5B3F7A;
	--accent-dark: #3F2A57;
	--accent-btn: #6E4C96;
	--accent-soft: #EDE6F5;
	--accent-on-dark: #CDB9E6;
	--radius: 8px;
	--serif: "PT Serif", Georgia, serif;
	--sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
.stack > * + * { margin-top: 20px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 32px; }
.stack, .stack-sm, .stack-lg { display: block; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-sm > * + * { margin-top: 0; }
.muted { color: var(--muted); margin: 0; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 820px; margin: 0; }

.h1, .h2, .h3, .hero__title { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; }
.h1 { font-size: clamp(30px, 4.2vw, 44px); }
.h2 { font-size: clamp(26px, 3.2vw, 36px); }
.h3 { font-size: clamp(22px, 2.4vw, 28px); }

.section { padding: 72px 0 32px; }
.section--tight { padding: 32px 0; }
.page-wrap { padding-top: 28px; padding-bottom: 48px; }
.page-head { margin: 8px 0 24px; }
.page-head > * + * { margin-top: 12px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.link-more { font-weight: 600; text-decoration: none; }
.anchor { scroll-margin-top: 16px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 6px; font: 600 16px/1.2 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; text-align: center; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-lg { min-height: 54px; padding: 0 28px; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-accent { background: var(--accent-btn); color: #fff; }
.btn-accent:hover { background: var(--accent); color: #fff; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-ghost { border-color: #6E6A63; color: var(--on-dark); background: transparent; }
.btn-ghost:hover { border-color: var(--on-dark); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Шапка */
.promo { display: block; background: var(--accent); color: #fff; text-decoration: none; }
.promo:hover { color: #fff; background: var(--accent-dark); }
.promo__inner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; text-align: center; padding-top: 10px; padding-bottom: 10px; }
.promo__tag { background: #fff; color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; }
.promo__text { font-weight: 600; }
.promo__more { text-decoration: underline; font-size: 15px; }
.topbar { background: var(--dark); color: #E9E6E0; font-size: 13px; }
.topbar__inner { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header__main { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__img { max-height: 56px; width: auto; }
.logo__text { display: flex; flex-direction: column; }
.logo__name { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.1; }
.logo__sub { font-size: 12px; color: var(--muted); }
.nav { flex: 1 1 420px; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.nav__list a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav__list a:hover, .nav__list .current-menu-item > a { color: var(--accent); }
.header__contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.header__phone { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; padding: 10px 4px; }
.nav-toggle { display: none; margin-left: auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: 600 15px var(--sans); color: var(--ink); align-items: center; gap: 10px; cursor: pointer; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: ""; }
.nav-toggle__bar::before { position: absolute; top: -6px; }
.nav-toggle__bar::after { position: absolute; top: 6px; }

/* Первый экран */
.hero { background: var(--dark); color: var(--on-dark); }
.hero__inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero--compact .hero__inner { padding-top: 32px; padding-bottom: 56px; }
.hero__text { flex: 1 1 460px; }
.hero__media { flex: 1 1 420px; }
.hero__img { width: 100%; height: 440px; object-fit: cover; border-radius: var(--radius); }
.hero__placeholder { height: 360px; border-radius: var(--radius); background: var(--dark-2); color: var(--on-dark-muted); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 15px; }
.eyebrow { margin: 0; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-on-dark); }
.hero__title { font-size: clamp(32px, 5vw, 52px); }
.hero__lead { margin: 0; font-size: 19px; color: #D8D4CC; }
.hero .crumbs, .hero .crumbs a { color: var(--accent-on-dark); }
.hero__facts { border-top: 1px solid var(--dark-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact__num { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.fact__label { color: var(--on-dark-muted); font-size: 15px; }

/* Сетки и карточки */
.grid { display: grid; gap: 16px; }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--photos { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.card--link { text-decoration: none; min-height: 150px; transition: border-color .15s; }
.card--link:hover { border-color: var(--accent); color: var(--ink); }
.card__title { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.25; }
.card__text { font-size: 15px; line-height: 1.5; color: var(--muted); }
.card__more { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--accent); }
.rounded-img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.photo-tall { height: 320px; }
.gallery-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery-2 img { height: 200px; }
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.works-grid__item { display: block; border-radius: var(--radius); overflow: hidden; background: var(--stone); }
.works-grid__item img { width: 100%; height: 280px; object-fit: cover; transition: transform .25s; }
.works-grid__item:hover img { transform: scale(1.03); }
.jump { display: flex; flex-wrap: wrap; gap: 6px 10px; padding-top: 16px; padding-bottom: 16px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #6E6A63; border-radius: 22px; color: var(--on-dark); text-decoration: none; font-size: 15px; font-weight: 500; }
.jump a:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.office { margin: 0; }
.office img { height: 360px; }
.office figcaption { margin-top: 8px; font-size: 15px; }

.split { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.split__main { flex: 1 1 460px; min-width: 0; }
.split__side { flex: 1 1 400px; min-width: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: #fff; border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); }
.step__n { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1; }
.step__title { font-weight: 600; }
.step__text { font-size: 15px; color: var(--muted); }

.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.promo-card { background: var(--accent-soft); color: var(--ink-2); border-radius: var(--radius); padding: 30px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.promo-card > .stack-sm { flex: 1 1 420px; }
.promo-card__title { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent-dark); line-height: 1.25; }
.promo-card--dark { background: var(--dark); color: #D8D4CC; }
.promo-card--dark .promo-card__title { color: var(--on-dark); }

.band-dark { background: var(--dark); color: var(--on-dark); padding: 64px 0; margin-top: 40px; }
.lead-dark { margin: 0; color: #D8D4CC; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel-dark { background: var(--dark); color: #D8D4CC; border-radius: var(--radius); padding: 28px; }
.panel-dark .h3 { color: var(--on-dark); }
.panel-dark p { margin: 0; }

.map, .map iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); display: block; }
.map--link { background: var(--dark-2); color: var(--on-dark); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.panel .map--link, .split__side > .map--link { background: var(--stone); color: var(--ink); }
.map--link:hover { color: var(--accent-on-dark); }
.map__addr { font-weight: 400; font-size: 15px; opacity: .85; }

.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.faq + .faq { margin-top: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

.kv { display: flex; flex-direction: column; gap: 2px; }
.kv__k { font-size: 14px; color: var(--muted); }
.kv__v { font-weight: 600; }
.kv__phone { font-size: 22px; font-weight: 600; color: var(--ink); text-decoration: none; }
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; font-weight: 600; font-size: 18px; padding-bottom: 8px; }
.hours th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
.hours td { padding: 10px 0; border-top: 1px solid var(--line); }

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chips--sub { margin-top: -4px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 22px; background: #fff; border: 1px solid var(--stone); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips--sub .chip { min-height: 40px; font-size: 14px; background: transparent; }

.entry > * + * { margin-top: 1em; }
.entry h2 { font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.entry h3 { font-family: var(--serif); font-size: 22px; }
.entry table { border-collapse: collapse; width: 100%; background: #fff; }
.entry td, .entry th { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.seo-text { margin-top: 40px; color: var(--ink-2); }
.seo-text > * + * { margin-top: 12px; }

/* WooCommerce: витрина */
.woocommerce ul.products, ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
ul.products::before, ul.products::after { display: none; }
ul.products li.product, ul.products li.product-category { margin: 0; width: auto; float: none; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
ul.products li.product > a:first-child, ul.products li.product-category > a { display: flex; flex-direction: column; flex: 1; color: var(--ink); text-decoration: none; }
ul.products li.product img, ul.products li.product-category img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; margin: 0; border-bottom: 1px solid var(--line); }
ul.products li.product-category img { aspect-ratio: 1 / 1; object-fit: cover; }
.woocommerce-loop-product__title, .woocommerce-loop-category__title { font: 600 17px/1.35 var(--sans); margin: 14px 18px 4px; }
.woocommerce-loop-category__title .count { background: none; color: var(--muted); font-weight: 400; }
ul.products li.product-category .woocommerce-loop-category__title { margin-bottom: 16px; }
ul.products li.product .price { display: block; margin: 0 18px 12px; font-weight: 600; font-size: 18px; color: var(--accent); }
ul.products li.product .btn { margin: auto 18px 18px; width: auto; }
.price-request { color: var(--accent); font-weight: 600; }
.onsale { position: absolute; margin: 10px; background: var(--accent); color: #fff; border-radius: 4px; padding: 2px 8px; font-size: 13px; font-weight: 600; }
ul.products li.product { position: relative; }
.woocommerce-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 32px 0 0; }
.woocommerce-pagination a, .woocommerce-pagination span { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--stone); border-radius: 6px; text-decoration: none; background: #fff; color: var(--ink); }
.woocommerce-pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.woocommerce-info, .woocommerce-message { background: #fff; border: 1px solid var(--line); padding: 16px 20px; border-radius: var(--radius); list-style: none; }

/* Страница товара */
.single-product div.product { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.single-product div.product > .woocommerce-product-gallery { flex: 1 1 480px; min-width: 0; position: relative; }
.single-product div.product > .summary { flex: 1 1 400px; min-width: 0; }
.single-product div.product > .woocommerce-tabs, .single-product div.product > .related, .single-product div.product > .upsells { flex: 1 1 100%; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery img { width: 100%; border-radius: var(--radius); background: #fff; }
.woocommerce-product-gallery .flex-control-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.woocommerce-product-gallery .flex-control-thumbs img { cursor: pointer; opacity: .65; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 5; background: #fff; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.product_title { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 38px); line-height: 1.2; margin: 0 0 12px; }
.summary .price { font-size: 28px; font-weight: 600; color: var(--accent); margin: 0 0 6px; }
.product-note { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.summary .btn-row { margin-bottom: 24px; }
.product-extras__title { font-weight: 600; margin: 0 0 6px; }
.product-extras ul { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); }
.trust-inline { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; font-size: 15px; color: var(--ink-2); }
.trust-inline li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.woocommerce-tabs { margin-top: 24px; }
.woocommerce-tabs ul.tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.woocommerce-tabs ul.tabs a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 16px; border: 1px solid var(--stone); border-radius: 22px; text-decoration: none; color: var(--ink); }
.woocommerce-tabs ul.tabs li.active a { background: var(--accent); color: #fff; border-color: var(--accent); }
.woocommerce-tabs .panel h2 { font-family: var(--serif); font-size: 24px; margin-top: 0; }
.related > h2, .upsells > h2 { font-family: var(--serif); font-size: 30px; margin: 32px 0 20px; }
.woocommerce-product-attributes { border-collapse: collapse; width: 100%; }
.woocommerce-product-attributes th, .woocommerce-product-attributes td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }

/* Подвал */
.site-footer { background: #191817; color: #D8D4CC; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 32px; }
.site-footer a { color: #D8D4CC; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer__brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--on-dark); }
.footer__head { font-weight: 600; color: var(--on-dark); }
.footer__muted { margin: 0; color: #BDB8AF; }
.footer__strong { color: var(--on-dark) !important; font-weight: 600; }
.footer__links { display: flex; gap: 16px; }
.footer__links a { color: var(--accent-on-dark); }
.footer__bottom { border-top: 1px solid #33312E; }
.footer__bottom-inner { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; font-size: 13px; color: #A9A49B; }

/* Нижняя панель связи на телефоне */
.mobile-bar { display: none; }

@media (max-width: 860px) {
	body { font-size: 16px; padding-bottom: 64px; }
	.nav-toggle { display: inline-flex; }
	.nav { display: none; flex-basis: 100%; }
	.nav.is-open { display: block; }
	.nav__list { flex-direction: column; }
	.nav__list a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
	.header__contacts { flex-basis: 100%; }
	.topbar__inner span:last-child { display: none; }
	.hero__inner { padding-top: 36px; padding-bottom: 40px; gap: 28px; }
	.hero__img { height: 280px; }
	.section { padding: 48px 0 24px; }
	.mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--dark); border-top: 1px solid var(--dark-2); }
	.mobile-bar a { flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; text-decoration: none; }
	.mobile-bar a + a { border-left: 1px solid var(--dark-2); }
	.mobile-bar a:nth-child(2) { background: var(--accent); }
	ul.products, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.woocommerce-loop-product__title { font-size: 15px; margin: 10px 12px 2px; }
	ul.products li.product .price { margin: 0 12px 10px; font-size: 15px; }
	ul.products li.product .btn { margin: auto 12px 12px; min-height: 44px; padding: 0 8px; font-size: 14px; }
}
