/*
 * The shop's footer (include/footer/footer.php): the strip of what every
 * customer gets, the footer proper on the shop's dark ground, and the company
 * line. The red is the navigation bar's.
 */

.lunettes-perks,
.lunettes-footer,
.lunettes-footer-bottom {
	--lunettes-red: #8a1214;
	--lunettes-ink: #1d1716;
	--lunettes-ink-deep: #151110;
	--lunettes-muted: #b9aeaa;
	--lunettes-text: #e4dcd9;
}

/* No weight of its own, so the components' rules below win. */
:where(.lunettes-perks, .lunettes-footer, .lunettes-footer-bottom) ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ─── The strip ─────────────────────────────────────────────────────────── */

.lunettes-perks {
	margin-top: 40px;
	border-top: 1px solid #ebe4e1;
	background: #f7f3f1;
}

.lunettes-perks__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px 24px;
	padding: 26px 0;
}

.lunettes-perks__item {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--lunettes-ink);
	text-decoration: none;
}

.lunettes-perks__item > svg {
	flex: none;
	width: 34px;
	height: 34px;
	color: var(--lunettes-red);
}

.lunettes-perks__item strong {
	display: block;
	font-size: 15px;
	line-height: 1.3;
}

.lunettes-perks__item strong + span {
	display: block;
	font-size: 13px;
	line-height: 1.4;
	opacity: 0.72;
}

a.lunettes-perks__item:hover strong {
	color: var(--lunettes-red);
}

/* ─── The footer proper ─────────────────────────────────────────────────── */

.lunettes-footer {
	padding: 56px 0 44px;
	background: var(--lunettes-ink);
	color: var(--lunettes-text);
	font-size: 14px;
	line-height: 1.5;
}

/*
 * The contact column takes the width of its longest line, the e-mail address
 * or the street, so it never overflows; the rest share what is left.
 */
.lunettes-footer__grid {
	display: grid;
	grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) auto;
	gap: 40px;
}

/* One line, so the lists start level; a long one may reach into the gap. */
.lunettes-footer h2 {
	margin: 0 0 16px;
	white-space: nowrap;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.lunettes-footer li {
	margin: 0 0 9px;
}

.lunettes-footer a {
	color: var(--lunettes-text);
	text-decoration: none;
}

.lunettes-footer a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* The footer menu's items carry a blank description, which Shoptimizer wraps. */
.lunettes-footer .icon-wrapper {
	display: none;
}

.lunettes-footer__logo img {
	display: block;
	width: 180px;
	height: auto;
	margin-bottom: 18px;
}

.lunettes-footer__brand p {
	max-width: 280px;
	margin: 0;
	color: var(--lunettes-muted);
}

.lunettes-footer__social {
	display: flex;
	gap: 10px;
	margin-top: 22px;
}

.lunettes-footer__social li {
	margin: 0;
}

.lunettes-footer__social a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	transition: background-color 0.15s, border-color 0.15s;
}

.lunettes-footer__social a:hover {
	border-color: var(--lunettes-red);
	background: var(--lunettes-red);
}

.lunettes-footer__social svg {
	width: 20px;
	height: 20px;
}

.lunettes-footer__note {
	margin-left: 6px;
	color: var(--lunettes-muted);
	font-size: 12px;
}

.lunettes-footer__cta {
	display: inline-block;
	margin-top: 8px;
	color: #fff !important;
	font-weight: 600;
}

.lunettes-footer__cta::after {
	content: "\00a0\2192";
}

.lunettes-footer__contact a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.lunettes-footer__contact svg {
	flex: none;
	width: 18px;
	height: 18px;
	color: var(--lunettes-muted);
}

.lunettes-footer__contact .lunettes-footer__note {
	display: block;
	margin: 2px 0 0 28px;
}

.lunettes-footer address {
	margin: 18px 0 0;
	color: var(--lunettes-muted);
	font-size: 13px;
	font-style: normal;
}

/* ─── The company line ──────────────────────────────────────────────────── */

.lunettes-footer-bottom {
	padding: 16px 0;
	background: var(--lunettes-ink-deep);
	color: var(--lunettes-muted);
	font-size: 13px;
}

.lunettes-footer-bottom__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}

.lunettes-footer-bottom p {
	margin: 0;
}

.lunettes-footer-bottom__payments {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
	color: var(--lunettes-muted);
	text-decoration: none;
}

.lunettes-payments__marks,
.lunettes-payments__methods {
	display: flex;
	align-items: center;
}

.lunettes-payments__marks {
	gap: 20px;
}

/* The marks straight on the dark ground, each at the size its attributes give. */
.lunettes-payment img {
	display: block;
	max-width: none;
	height: auto;
}

.lunettes-payment--text {
	font-size: 12px;
	white-space: nowrap;
	transition: color 0.15s;
}

/* The written-out methods set off from the marks, and from each other by a dot. */
.lunettes-payments__marks + .lunettes-payments__methods {
	padding-left: 20px;
	border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.lunettes-payment--text + .lunettes-payment--text::before {
	content: "·";
	margin: 0 10px;
}

.lunettes-footer-bottom__payments:hover .lunettes-payment--text,
.lunettes-footer-bottom__payments:focus-visible .lunettes-payment--text {
	color: #fff;
}

.lunettes-footer-bottom__payments:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 4px;
}

/* ─── Narrower screens ──────────────────────────────────────────────────── */

/* Where Shoptimizer's menu turns into the mobile one. */
@media (max-width: 992px) {
	/*
	 * Two columns as wide as their items, centred together: the group sits in
	 * the middle and the icons still line up, which centring each item would
	 * not do, the texts being of different lengths.
	 */
	.lunettes-perks__list {
		grid-template-columns: repeat(2, auto);
		justify-content: center;
		column-gap: 56px;
	}

	.lunettes-footer__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 36px 24px;
	}

	.lunettes-footer__brand {
		display: flex;
		flex-direction: column;
		align-items: center;
		grid-column: 1 / -1;
		text-align: center;
	}

	.lunettes-footer__brand p {
		max-width: 420px;
	}

	.lunettes-footer__social {
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.lunettes-perks__list {
		grid-template-columns: auto;
		padding: 20px 12px;
	}

	.lunettes-footer {
		padding: 40px 0 32px;
	}

	/* Two by two, drawn in from the edges so the columns read as one block. */
	.lunettes-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 28px;
		padding: 0 12px;
	}

	/*
	 * The left-hand column ranged right, so both read inward to one spine. By
	 * position rather than by name: the brand is the first child and spans the
	 * row, so the even children are the ones on the left, whichever columns a
	 * shop has.
	 */
	.lunettes-footer__grid > :nth-child(even) {
		text-align: right;
	}

	/* A note such as "6 optik" goes ahead of its city there, so the names meet the spine. */
	.lunettes-footer__grid > :nth-child(even) li {
		display: flex;
		align-items: baseline;
		justify-content: flex-end;
	}

	.lunettes-footer__grid > :nth-child(even) .lunettes-footer__note {
		order: -1;
		margin: 0 6px 0 0;
	}

	.lunettes-footer__contact {
		font-size: 13px;
	}

	.lunettes-footer__contact a {
		gap: 8px;
	}

	.lunettes-footer__contact svg {
		width: 16px;
		height: 16px;
	}

	.lunettes-footer__contact .lunettes-footer__note {
		margin-left: 24px;
	}

	/* Centred like the brand: the company line, the marks, then the methods. */
	.lunettes-footer-bottom__inner {
		flex-direction: column;
		text-align: center;
	}

	.lunettes-footer-bottom__payments {
		flex-direction: column;
	}

	.lunettes-payments__marks + .lunettes-payments__methods {
		padding-left: 0;
		border-left: 0;
	}
}
