/**
 * Header & footer layout variants, switched by a body class from Frontend\Layout.
 *
 * The template parts never change shape; these rules re-lay-out their existing
 * blocks. Everything is scoped under a body class so the default (standard
 * header, four-column footer) is the parts' own layout with no override.
 */

/* -- Header: centered ----------------------------------------------------- */
/* Logo, nav and actions stack and centre, instead of the space-between bar. */
.anps-header--centered .anps-header__bar {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.anps-header--centered .anps-header__nav,
.anps-header--centered .anps-header__actions {
	justify-content: center;
}

/* -- Header: minimal ------------------------------------------------------ */
/* Strip the bar back to logo · nav · cart · book — drop search and phone. */
.anps-header--minimal .anps-header__search,
.anps-header--minimal .anps-header__phone {
	display: none;
}

/* -- Footer: column count ------------------------------------------------- */
/* Drive the four authored columns into N equal tracks. Grid (not the block's
   flex) so the count is exact and the gap the block already sets carries. */
.anps-footer--cols-2 .anps-footer__columns,
.anps-footer--cols-3 .anps-footer__columns,
.anps-footer--cols-4 .anps-footer__columns {
	display: grid;
	align-items: start;
}

.anps-footer--cols-2 .anps-footer__columns {
	grid-template-columns: repeat( 2, 1fr );
}

.anps-footer--cols-3 .anps-footer__columns {
	grid-template-columns: repeat( 3, 1fr );
}

.anps-footer--cols-4 .anps-footer__columns {
	grid-template-columns: repeat( 4, 1fr );
}

/* wp:column ships flex-basis:0; grid ignores it, but reset so nothing fights
   the equal tracks. */
.anps-footer__columns > .wp-block-column {
	flex-basis: auto;
}

@media ( max-width: 781px ) {
	.anps-footer--cols-2 .anps-footer__columns,
	.anps-footer--cols-3 .anps-footer__columns,
	.anps-footer--cols-4 .anps-footer__columns {
		grid-template-columns: 1fr;
	}
}
