/* ==========================================================================
   Футер сайта — компактная мобильная версия (до 781px, где Gutenberg
   складывает колонки в одну). Десктоп не трогаем.
   Футер собран в редакторе, поэтому селекторы опираются на его структуру:
   1) тёмная секция .is-style-section-6 (контакты + приложения)
   2) колонки .is-style-columns-first-wide (лого · Catalog · Account · Contact info)
   3) строка оплаты (группа с картинками по центру)
   4) копирайт (последняя группа)
   ========================================================================== */

@media (max-width: 781px) {
	/* 1. Тёмная секция */
	footer.wp-block-template-part .is-style-section-6 { padding-top: 28px !important; padding-bottom: 28px !important; }
	footer.wp-block-template-part .is-style-section-6 .wp-block-columns { gap: 22px !important; }
	footer.wp-block-template-part .is-style-section-6 h4 { font-size: 19px !important; line-height: 1.3 !important; margin-bottom: 4px !important; }
	footer.wp-block-template-part .is-style-section-6 p { font-size: 13px !important; line-height: 1.5 !important; margin-top: 0 !important; }
	footer.wp-block-template-part .is-style-section-6 h6 { font-size: 15px !important; }
	footer.wp-block-template-part .is-style-section-6 .wp-block-group.is-vertical { gap: 10px !important; margin-top: 12px !important; }
	footer.wp-block-template-part .is-style-section-6 .wp-block-group > * + * { margin-block-start: 10px; }
	footer.wp-block-template-part .is-style-section-6 .is-style-icon-aware-1 img { width: 18px !important; height: 18px !important; }
	footer.wp-block-template-part .is-style-section-6 .wp-block-column:last-child a img { height: 36px !important; width: auto !important; }

	/* 2. Лого по центру, Catalog и Account — в две колонки, Contact info — на всю ширину */
	footer.wp-block-template-part .is-style-columns-first-wide { display: grid !important; grid-template-columns: 1fr 1fr; gap: 22px 16px !important; }
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column { margin: 0 !important; min-width: 0; }
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column > * { margin-top: 0 !important; }
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column:first-child,
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column:nth-child(4) { grid-column: 1 / -1; }
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column:first-child { display: flex; flex-direction: column; align-items: center; text-align: center; }
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column:first-child figure { margin: 0 auto !important; }
	footer.wp-block-template-part .is-style-columns-first-wide > .wp-block-column:first-child figure img { width: 150px !important; height: auto !important; }
	footer.wp-block-template-part .is-style-columns-first-wide h4 { font-size: 13px !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px !important; }
	footer.wp-block-template-part .is-style-columns-first-wide .wp-block-navigation { margin-top: 0 !important; }
	footer.wp-block-template-part .is-style-columns-first-wide .wp-block-navigation__container { gap: 0 !important; }
	footer.wp-block-template-part .is-style-columns-first-wide .wp-block-navigation-item a { display: block; padding: 5px 0 !important; font-size: 14px !important; line-height: 1.35; }

	/* 3. Оплата: подпись сверху, иконки в ряд по центру */
	footer.wp-block-template-part .is-content-justification-center:has(> figure.wp-block-image) { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center; gap: 10px 14px !important; padding-top: 16px !important; padding-bottom: 16px !important; }
	footer.wp-block-template-part .is-content-justification-center:has(> figure.wp-block-image) > p { flex-basis: 100%; margin: 0 !important; text-align: center; font-size: 13px !important; }
	footer.wp-block-template-part .is-content-justification-center:has(> figure.wp-block-image) > figure { margin: 0 !important; }
	footer.wp-block-template-part .is-content-justification-center:has(> figure.wp-block-image) img { height: 30px !important; width: auto !important; }

	/* 4. Копирайт */
	footer.wp-block-template-part > .wp-block-group > .wp-block-group:last-child { padding-top: 14px !important; padding-bottom: 20px !important; text-align: center; }
	footer.wp-block-template-part > .wp-block-group > .wp-block-group:last-child * { justify-content: center !important; text-align: center !important; font-size: 12px !important; }
}
