/*
 * Lays out the (now up to 3) footer menu columns side by side. The theme's
 * own .mbf-footer__nav uses a CSS grid designed for one flat list of many
 * links; with the links split into separate menus/columns instead, each
 * individual list should stack vertically within its own column.
 */
.amless-footer-nav-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	width: 100%;
}

.amless-footer-nav-menu__col {
	flex: 1 1 160px;
}

.amless-footer-nav-menu__col .mbf-footer__nav {
	display: block;
}

.amless-footer-nav-menu__col .mbf-footer__nav > li {
	margin-bottom: 8px;
}

/* Column headings + links sized like the rest of the footer (the theme's
   links are ~17px, which made the columns look oversized next to the
   14px contact block and the copyright text). */
.amless-footer-nav-menu__title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mbf-color-secondary, #79787f);
}

.amless-footer-nav-menu__col .mbf-footer__nav > li > a {
	font-size: 14px;
	line-height: 1.4;
}

@media (min-width: 992px) {
	.amless-footer-nav-menu {
		flex-wrap: nowrap;
		gap: 40px;
	}

	.amless-footer-nav-menu__col {
		flex: 1 1 0;
		min-width: 0;
	}
}

/* Accepted payment methods (pluggable mbf_footer_promo_image()): logo cards. */
.amless-pay-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amless-pay-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid var(--mbf-color-border, #d9d7dd);
	border-radius: 6px;
	background: #fff;
}

.amless-pay-badges .amless-pay-badge img { /* beats .woocommerce-page img (height:auto), which loads later on shop pages */
	display: block;
	width: auto;
	height: 20px;
	max-width: 110px;
	object-fit: contain;
}

/* ---------- Phones & tablets (< 992px, where the theme stacks the footer) ----------
   Was ~970px tall on an iPhone: copyright on top, three long link lists,
   payment cards in two ragged rows. Now: brand + contact, the three menus
   as accordions (footer-menus.js; without JS they stay open), payment
   methods in one even row, copyright last. The theme's wrappers become
   display:contents so the pieces can be re-ordered. */
@media (max-width: 991px) {
	.mbf-footer .mbf-footer__item-inner {
		padding-top: 40px;
		padding-bottom: 28px;
	}

	.mbf-footer .mbf-footer__col,
	.mbf-footer .mbf-footer__col-inner,
	.mbf-footer .mbf-footer__info {
		display: contents !important;
	}

	.mbf-footer .mbf-logo { order: 1; }
	.mbf-footer .mbf-footer__desc { order: 2; }
	.mbf-footer .amless-footer-nav-menu { order: 3; }
	.mbf-footer .mbf-footer__info-promo { order: 4; }
	.mbf-footer .mbf-footer__copyright { order: 5; }

	.mbf-footer .mbf-footer__col > * {
		margin: 0 !important;
	}

	.mbf-footer .mbf-footer__desc {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px 16px;
		max-width: none;
		margin: 10px 0 24px !important;
		font-size: 14px;
	}

	.mbf-footer .mbf-footer__desc p {
		margin: 0;
	}

	.mbf-footer .mbf-footer__desc a {
		color: var(--mbf-color-primary);
		font-weight: 600;
	}

	/* Accordions. */
	.amless-footer-nav-menu {
		display: block;
		border-top: 1px solid var(--mbf-color-border, #e2e0e5);
	}

	.amless-footer-nav-menu__col {
		border-bottom: 1px solid var(--mbf-color-border, #e2e0e5);
	}

	.amless-footer-nav-menu__title {
		margin: 0;
		font-size: 15px;
		font-weight: 600;
		letter-spacing: 0;
		text-transform: none;
		color: var(--mbf-color-primary, #202025);
	}

	.amless-footer-nav-menu__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 56px;
		padding: 0;
		border: 0;
		background: none;
		color: inherit;
		font: inherit;
		text-align: left;
		cursor: pointer;
	}

	.amless-footer-nav-menu__toggle::after {
		content: "";
		width: 8px;
		height: 8px;
		margin-right: 4px;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: translateY(-2px) rotate(45deg);
		transition: transform 0.2s ease;
	}

	.amless-footer-nav-menu__col.is-open .amless-footer-nav-menu__toggle::after {
		transform: translateY(2px) rotate(-135deg);
	}

	.amless-footer-js .amless-footer-nav-menu__col:not(.is-open) .mbf-footer__nav {
		display: none;
	}

	.amless-footer-nav-menu__col .mbf-footer__nav {
		padding-bottom: 12px;
	}

	.amless-footer-nav-menu__col .mbf-footer__nav > li {
		margin: 0;
	}

	.amless-footer-nav-menu__col .mbf-footer__nav > li > a {
		display: block;
		padding: 9px 0;
		background: none;
		font-size: 14px;
		color: var(--mbf-color-secondary, #6b6a71);
	}

	/* Payment methods: even rows of four. */
	.mbf-footer .mbf-footer__info-promo {
		margin-top: 24px !important;
		padding: 0;
	}

	.amless-pay-badges {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 6px;
	}

	.amless-pay-badge {
		height: 34px;
		padding: 0 6px;
	}

	.amless-pay-badges .amless-pay-badge img {
		max-width: 100%;
		height: 16px;
	}

	.mbf-footer .mbf-footer__copyright {
		margin-top: 20px !important;
		font-size: 11px;
		line-height: 1.5;
	}
}

/* "Promoções válidas até …" (span in the footer_copyright theme mod, moved
   by FooterMenus::promo_bar()): a full-width strip closing the footer, one
   centred line on desktop, separated from the columns by a hairline. */
.amless-promo-bar {
	background-color: var(--mbf-color-footer-background, var(--mbf-layout-background));
}

.amless-promo-bar__text {
	border-top: 1px solid rgba(32, 32, 37, 0.1); /* On the text, not the container: lines up with the footer columns. */
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 18px 0 22px;
	color: #55545b;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

.amless-promo-bar__text::before {
	content: "";
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355545b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L3 13V3h10l7.6 7.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

.amless-promo-bar__text strong {
	color: #202025;
	font-weight: 600;
}

/* Phones: two short lines, icon at the start of the first. */
@media (max-width: 991.98px) {
	.amless-promo-bar__text {
		align-items: flex-start;
		justify-content: flex-start;
		padding: 16px 0 20px;
		font-size: 12px;
		text-align: left;
	}

	.amless-promo-bar__text::before {
		margin-top: 2px;
	}
}

/* Desktop: the accordion button reads as the plain column heading. */
@media (min-width: 992px) {
	.amless-footer-nav-menu__toggle {
		padding: 0;
		border: 0;
		background: none;
		color: inherit;
		font: inherit;
		letter-spacing: inherit;
		text-transform: inherit;
		pointer-events: none;
	}
}

/* The theme paints every <button> dark on hover/focus/active. */
.amless-footer-nav-menu .amless-footer-nav-menu__toggle,
.amless-footer-nav-menu .amless-footer-nav-menu__toggle:hover,
.amless-footer-nav-menu .amless-footer-nav-menu__toggle:focus,
.amless-footer-nav-menu .amless-footer-nav-menu__toggle:active {
	background: none !important;
	color: inherit !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

.amless-footer-nav-menu .amless-footer-nav-menu__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
