/**
 * Shanelle Footer Layout
 *
 * Compact multi-column footer. Design tokens only.
 * Desktop: Brand | Useful Links | Customer Service | Engage
 * Engage = compact newsletter + social icons.
 * Contact sits under Brand.
 * Policies / legal links live in the bottom bar (pipe-separated).
 * Colors and typography unchanged — layout only.
 */

.footer {
	position: relative;
	margin-top: auto;
	border-top: 1px solid rgb(232 122 158 / 12%);
	background-color: var(--color-brand-100);
	color: var(--color-text);
}

.footer__main {
	padding: var(--space-10) 0 var(--space-8);
}

.footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	column-gap: var(--space-8);
	row-gap: var(--space-8);
}

/* -------------------------------------------------------------------------
   Shared column heading baseline (label-style across all columns)
   ------------------------------------------------------------------------- */
.footer-links__title,
.footer__contact-title,
.footer__menu-title,
.footer__newsletter-title,
.footer__newsletter-title.text-h3 {
	margin: 0 0 var(--space-4);
	color: var(--color-text);
	font-family: var(--font-family-base);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: var(--line-height-snug);
	min-height: calc(var(--font-size-sm) * var(--line-height-snug));
}

/* -------------------------------------------------------------------------
   Optional extra menus (e.g. Nosotros)
   ------------------------------------------------------------------------- */
.footer__menus {
	display: grid;
	gap: var(--space-3);
}

.footer__menu {
	border-top: 1px solid rgb(232 122 158 / 18%);
}

.footer__menu-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 2.75rem;
	padding: var(--space-4) 0;
	border: none;
	background: transparent;
	color: var(--color-text);
	text-align: left;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.footer__menu-toggle:focus-visible {
	outline: 2px solid var(--color-border-focus);
	outline-offset: 2px;
}

.footer__menu-toggle::after {
	content: "+";
	font-size: var(--font-size-lg);
	line-height: 1;
	color: var(--color-text-secondary);
}

.footer__menu.is-open .footer__menu-toggle::after {
	content: "−";
}

.footer__menu-panel {
	padding-bottom: var(--space-4);
}

.footer__menu-panel[hidden] {
	display: none;
}

.footer__menu-title {
	display: none;
}

.footer__menu-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-3-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer__menu-list a {
	color: var(--color-text-secondary);
	text-decoration: none;
	font-size: var(--font-size-sm);
	transition: var(--transition-colors);
}

.footer__menu-list a:hover,
.footer__menu-list a:focus-visible {
	color: var(--color-text-link);
}

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
.footer__contact {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.footer__contact-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	font-size: var(--font-size-sm);
	line-height: var(--line-height-relaxed);
	color: var(--color-text-secondary);
}

.footer__contact-icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.1rem;
	color: var(--color-text);
}

.footer__contact-link,
.footer__contact-text {
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.footer__contact-link:hover,
.footer__contact-link:focus-visible {
	color: var(--color-text-link);
}

/* -------------------------------------------------------------------------
   Engage cluster — compact newsletter + social
   ------------------------------------------------------------------------- */
.footer__engage {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-4);
	width: 100%;
}

.footer__engage:not(:has(.footer__newsletter)):not(:has(.footer-brand__social)) {
	display: none;
}

.footer__newsletter {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	width: 100%;
	max-width: 22rem;
	padding: 0;
	border: none;
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
	box-sizing: border-box;
}

.footer__newsletter-description {
	margin: 0;
	font-size: var(--font-size-sm);
	line-height: var(--line-height-relaxed);
}

.footer__newsletter-embed {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	width: 100%;
}

.footer__newsletter-embed :where(form) {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin: 0;
}

.footer__newsletter-embed :where(input[type="email"], input[type="text"], input:not([type])) {
	width: 100%;
	min-height: var(--input-height);
	box-sizing: border-box;
}

.footer__newsletter-embed :where(label) {
	margin: 0;
}

.footer__newsletter-embed :where(p) {
	margin: 0;
}

.footer__engage .footer-brand__social {
	justify-content: center;
}

/* -------------------------------------------------------------------------
   Bottom bar — copyright + pipe-separated legal links | payments
   ------------------------------------------------------------------------- */
.footer__bottom {
	padding: var(--space-4) 0;
	border-top: 1px solid var(--color-border-subtle);
	background-color: var(--color-surface);
}

.footer__bottom-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
	text-align: center;
	min-height: 3rem;
}

.footer__legal {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
	max-width: 100%;
}

.footer__copyright {
	margin: 0;
	color: var(--color-text-secondary);
	line-height: var(--line-height-snug);
	display: flex;
	align-items: center;
	font-size: var(--font-size-xs);
}

.footer__copyright a {
	color: inherit;
	text-decoration: none;
}

.footer__payments {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer__payment-item {
	margin: 0;
	display: flex;
	align-items: center;
}

.footer__payment-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 1.75rem;
	padding: var(--space-0-5) var(--space-1);
	border: 1px solid var(--color-border-subtle);
	border-radius: var(--radius-sm);
	background-color: var(--color-background-subtle);
	color: var(--color-text-secondary);
}

.footer__payment-badge svg {
	display: block;
}

/* -------------------------------------------------------------------------
   Floating controls (below MiniCart drawer --z-drawer)
   ------------------------------------------------------------------------- */
.footer__scroll-top,
.footer__contact-fab {
	position: fixed;
	z-index: var(--z-fixed);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border-radius: var(--radius-full);
	box-shadow: var(--shadow-md);
	cursor: pointer;
	text-decoration: none;
	transition:
		opacity var(--duration-fast) var(--ease-out),
		visibility var(--duration-fast) var(--ease-out),
		transform var(--duration-fast) var(--ease-out),
		color var(--duration-fast) var(--ease-out),
		background-color var(--duration-fast) var(--ease-out),
		border-color var(--duration-fast) var(--ease-out),
		box-shadow var(--duration-fast) var(--ease-out);
}

.footer__scroll-top {
	right: var(--space-4);
	bottom: var(--space-4);
	border: 1px solid var(--color-border-subtle);
	background-color: var(--color-surface);
	color: var(--color-text);
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.5rem);
}

.footer__scroll-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.footer__scroll-top[hidden] {
	display: none;
}

.footer__scroll-top:hover,
.footer__scroll-top:focus-visible {
	border-color: var(--color-border-focus);
	color: var(--color-text-link);
	box-shadow: var(--shadow-focus);
}

.footer__scroll-top-icon,
.footer__contact-fab-icon {
	display: inline-flex;
}

.footer__contact-fab {
	left: var(--space-4);
	bottom: var(--space-4);
	border: 1px solid rgb(232 122 158 / 35%);
	background-color: var(--color-brand-600);
	color: var(--color-text-inverse);
}

.footer__contact-fab:hover,
.footer__contact-fab:focus-visible {
	background-color: var(--color-brand-700);
	box-shadow: var(--shadow-brand);
	color: var(--color-text-inverse);
}

@media (prefers-reduced-motion: reduce) {
	.footer__scroll-top,
	.footer__contact-fab,
	.footer__menu-list a {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
   Tablet — two-row grid
   Brand | Useful | Customer Service
   Contact | Engage | Engage
   ------------------------------------------------------------------------- */
@media (min-width: 48rem) {
	.footer__inner {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas:
			"brand useful service"
			"contact engage engage";
		column-gap: var(--space-6);
		row-gap: var(--space-8);
		align-items: start;
	}

	.footer-brand {
		grid-area: brand;
		max-width: none;
	}

	.footer__inner > [data-shanelle-footer-links] {
		grid-area: useful;
	}

	.footer__inner > [data-shanelle-footer-customer-service] {
		grid-area: service;
	}

	.footer__contact {
		grid-area: contact;
		margin-top: calc(var(--space-2) * -1);
	}

	.footer__engage {
		grid-area: engage;
		align-items: flex-start;
		max-width: 22rem;
		justify-self: stretch;
	}

	.footer__engage .footer-brand__social {
		justify-content: flex-start;
	}

	.footer__newsletter {
		max-width: none;
	}

	.footer__newsletter-embed :where(form) {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: stretch;
	}

	.footer__newsletter-embed :where(input[type="email"], input[type="text"], input:not([type])) {
		flex: 1;
		min-width: 0;
	}

	.footer__newsletter-embed :where(button, input[type="submit"]) {
		flex-shrink: 0;
	}

	.footer__menus {
		display: contents;
	}

	.footer__menu {
		border-top: none;
	}

	.footer__menu-toggle {
		display: none;
	}

	.footer__menu-panel {
		display: block !important;
		padding-bottom: 0;
	}

	.footer__menu-panel[hidden] {
		display: block !important;
	}

	.footer__menu-title {
		display: block;
	}

	.footer__bottom-inner {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: var(--space-6);
		text-align: left;
	}

	.footer__legal {
		align-items: flex-start;
		flex: 1 1 auto;
		min-width: 0;
	}

	.footer__payments {
		flex-shrink: 0;
		justify-content: flex-end;
		align-items: center;
		padding-top: 0.1rem;
	}

	.footer__scroll-top,
	.footer__contact-fab {
		bottom: var(--space-6);
	}

	.footer__scroll-top {
		right: var(--space-6);
	}

	.footer__contact-fab {
		left: var(--space-6);
	}
}

/* -------------------------------------------------------------------------
   Desktop — single-row compact grid
   Brand | Useful | CS | Engage (newsletter + social)
   Contact under Brand
   ------------------------------------------------------------------------- */
@media (min-width: 64rem) {
	.footer__inner {
		grid-template-columns:
			minmax(12rem, 1.25fr)
			minmax(0, 1fr)
			minmax(0, 1fr)
			minmax(14rem, 1.2fr);
		grid-template-areas:
			"brand useful service engage"
			"contact useful service engage";
		column-gap: var(--space-8);
		row-gap: var(--space-3);
		align-items: start;
	}

	.footer-brand {
		grid-area: brand;
		padding-bottom: 0;
	}

	.footer__inner > [data-shanelle-footer-links] {
		grid-area: useful;
	}

	.footer__inner > [data-shanelle-footer-customer-service] {
		grid-area: service;
	}

	.footer__engage {
		grid-area: engage;
		max-width: 22rem;
		width: 100%;
		justify-self: stretch;
	}

	.footer__contact {
		grid-area: contact;
		margin-top: 0;
		align-self: start;
	}
}
