:root {
	--pink-900: #b40067;
	--pink-700: #e40b7a;
	--pink-500: #ff3ca0;
	--pink-200: #ffd3e9;
	--bg: #fff7fb;
	--text: #2a1530;
	--muted: #7a5a74;
	--card: #ffffff;
	--shadow: 0 12px 30px rgba(180, 0, 103, 0.12);
	--radius: 16px;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	color: var(--text);
	background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	padding: 14px 22px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--pink-200);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.brand-logo {
	width: 54px;
	height: 54px;
	border-radius: 12px;
	object-fit: cover;
	box-shadow: var(--shadow);
	background: #fff;
}

.brand-text h1 {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.15;
}

.brand-text p {
	margin: 3px 0 0;
	color: var(--muted);
	font-size: 0.86rem;
}

.actions {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 320px;
}

.auth-btn,
.account-shortcut-btn,
.cart-btn {
	border-radius: 999px;
	padding: 10px 14px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.auth-btn,
.account-shortcut-btn {
	border: 1px solid #ffc4e1;
	background: #fff;
	color: var(--pink-900);
}

.auth-btn:hover,
.account-shortcut-btn:hover {
	background: #ffe8f4;
}

.cart-btn {
	border: 0;
	color: #fff;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
	box-shadow: var(--shadow);
}

.search-wrap {
	position: relative;
	min-width: 280px;
	flex: 1;
}

.search-wrap input {
	width: 100%;
	border: 1px solid #ffc4e1;
	border-radius: 999px;
	padding: 10px 14px;
	font-size: 0.95rem;
	outline: none;
	background: #fff;
}

.search-wrap input:focus {
	border-color: var(--pink-500);
	box-shadow: 0 0 0 3px rgba(255, 60, 160, 0.18);
}

#resultados {
	position: absolute;
	inset: calc(100% + 8px) 0 auto;
	display: none;
	max-height: 300px;
	overflow-y: auto;
	border: 1px solid var(--pink-200);
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--shadow);
	z-index: 50;
}

#resultados.is-visible {
	display: grid;
	gap: 6px;
	padding: 8px;
}

.resultado-item {
	width: 100%;
	border: 0;
	border-radius: 10px;
	padding: 10px 12px;
	background: #fff;
	color: var(--text);
	text-align: left;
	display: flex;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
}

.resultado-item:hover {
	background: #fff0f8;
}

.resultado-meta {
	color: var(--pink-900);
	font-weight: 700;
}

.resultado-empty {
	color: var(--muted);
	padding: 10px;
}

.hero {
	margin: 14px 22px 0;
	border-radius: 22px;
	border: 1px solid var(--pink-200);
	background: linear-gradient(125deg, #ffffff 0%, #ffe7f4 58%, #ffd5ea 100%);
	padding: clamp(18px, 4vw, 32px);
}

.hero-content h2 {
	margin: 0;
	font-size: clamp(1.4rem, 3vw, 2rem);
}

.hero-content p {
	margin: 8px 0 0;
	color: #5f4662;
}

.hero-cta {
	margin-top: 12px;
	display: inline-flex;
	border-radius: 999px;
	padding: 10px 16px;
	text-decoration: none;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
}

.container {
	padding: 18px 22px 24px;
}

.products-section {
	border-radius: 20px;
	border: 1px solid #ffd6eb;
	background: #fff;
	box-shadow: var(--shadow);
	padding: 18px;
}

.section-head h3 {
	margin: 0 0 12px;
	font-size: 1.3rem;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	align-items: stretch;
	gap: 14px;
}

.product-card {
	border: 1px solid #ffd6eb;
	border-radius: var(--radius);
	background: var(--card);
	box-shadow: var(--shadow);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
}

.product-media {
	width: 100%;
	height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 16px 14px rgba(30, 10, 35, 0.26));
}

.badge-producto-oferta {
	display: inline-flex;
	align-self: flex-start;
	border-radius: 999px;
	padding: 4px 10px;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	background: linear-gradient(135deg, #ff7a18, #ff3c78);
}

.product-title {
	margin: 0;
	font-size: 1.04rem;
	line-height: 1.25;
	min-height: 2.6em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-desc {
	margin: 0;
	color: var(--text);
	min-height: 4.2em;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-price {
	margin: 0;
	color: var(--pink-900);
	font-weight: 700;
	min-height: 76px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 4px;
}

.product-price .price-old {
	color: #8f7a90;
	font-size: 0.95rem;
	text-decoration: line-through;
}

.product-price .price-new {
	color: var(--pink-900);
	font-size: 1.9rem;
	line-height: 1;
}

.product-price.is-offer .price-new {
	color: #b24d1f;
}

.qty-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.qty-label {
	font-weight: 600;
}

.qty-input {
	width: 78px;
	border: 1px solid #ffc4e1;
	border-radius: 10px;
	padding: 6px 8px;
	text-align: center;
}

.add-btn {
	border: 0;
	border-radius: 10px;
	padding: 10px 12px;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
	margin-top: auto;
}

.benefits {
	margin-top: 16px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.benefits article {
	border: 1px solid #ffd6eb;
	border-radius: 14px;
	background: #fff;
	padding: 14px;
}

.benefits h4,
.benefits p {
	margin: 0;
}

.benefits p {
	margin-top: 6px;
	color: var(--muted);
}

.footer {
	padding: 12px 22px 20px;
	color: var(--muted);
}

.toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 90;
	padding: 10px 12px;
	border-radius: 10px;
	background: #2a1530;
	color: #fff;
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: 0.25s ease;
}

.toast.show {
	opacity: 1;
	transform: translateY(0);
}

.auth-overlay {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(33, 16, 37, 0.45);
}

.auth-overlay[hidden] {
	display: none;
}

.auth-modal {
	width: min(420px, 100%);
	border-radius: 18px;
	border: 1px solid #ffd2ea;
	background: #fff;
	box-shadow: 0 24px 40px rgba(30, 10, 35, 0.26);
	padding: 16px;
}

.auth-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.auth-header h3 {
	margin: 0;
	color: var(--pink-900);
}

.auth-close,
.auth-submit {
	border: 0;
	border-radius: 10px;
	padding: 9px 12px;
	cursor: pointer;
	font-weight: 700;
}

.auth-close,
.auth-submit {
	color: #fff;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
}

.auth-switch {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 10px;
}

.auth-mode-btn {
	border: 1px solid #ffc4e1;
	border-radius: 999px;
	background: #fff;
	color: var(--pink-900);
	font-weight: 700;
	padding: 8px 10px;
	cursor: pointer;
}

.auth-mode-btn.active {
	color: #fff;
	border-color: transparent;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
}

.auth-form {
	display: grid;
	gap: 10px;
}

.auth-group {
	display: grid;
	gap: 10px;
}

.auth-group[hidden] {
	display: none;
}

.auth-form label {
	font-size: 0.9rem;
	font-weight: 600;
}

.auth-form input {
	border: 1px solid #ffc4e1;
	border-radius: 10px;
	padding: 10px 12px;
}

.auth-status {
	min-height: 20px;
	margin: 0;
	color: var(--muted);
}

.auth-status.error {
	color: #b0005d;
}

.auth-status.success {
	color: #0f7a42;
}

.cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 80;
	background: radial-gradient(circle at 20% 20%, rgba(255, 119, 182, 0.18), transparent 45%), rgba(24, 10, 28, 0.56);
	backdrop-filter: blur(2px);
	display: grid;
	place-items: center;
	padding: 18px;
}

.cart-container {
	width: min(700px, 100%);
	max-height: 82vh;
	overflow: auto;
	border-radius: 24px;
	border: 1px solid #ffd6ea;
	background: linear-gradient(180deg, #fff 0%, #fff9fc 100%);
	box-shadow: 0 28px 52px rgba(24, 10, 28, 0.3);
	padding: 20px;
}

.cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.cart-header h3 {
	margin: 0;
	font-size: clamp(1.6rem, 2.4vw, 2.2rem);
	color: var(--pink-900);
}

.cart-close {
	border: 0;
	border-radius: 14px;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.4rem;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
}

.cart-items {
	display: grid;
	gap: 12px;
}

.cart-item {
	display: grid;
	grid-template-columns: 72px 1fr auto auto;
	align-items: center;
	gap: 14px;
	border: 1px solid #ffd9ed;
	border-radius: 16px;
	padding: 12px;
	background: #fff;
}

.cart-item img {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	object-fit: cover;
	background: #fff;
}

.cart-item p {
	margin: 0;
}

.cart-item span {
	color: #463247;
	font-weight: 600;
}

.cart-item .eliminar {
	border: 1px solid #ffc4e1;
	border-radius: 12px;
	background: #fff;
	color: var(--pink-900);
	padding: 8px 12px;
	cursor: pointer;
}

.cart-item .eliminar:hover {
	background: #ffe2f1;
}

.cart-total {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #ffd9ed;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.25rem;
}

.cart-total strong {
	color: var(--pink-900);
	font-size: clamp(1.8rem, 2.7vw, 2.4rem);
	line-height: 1;
}

.cart-actions {
	margin-top: 18px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.cart-actions button {
	border: 0;
	border-radius: 14px;
	cursor: pointer;
	font-weight: 800;
	letter-spacing: 0.2px;
	padding: 14px;
	min-height: 56px;
}

.cart-clear {
	border-radius: 0;
	min-height: auto;
	padding: 2px 0;
	background: transparent;
	color: var(--pink-900);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 4px;
}

.cart-buy {
	color: #fff;
	background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
}

.forgot-password-link {
	border: 0;
	background: transparent;
	color: var(--pink-700);
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 4px 0;
	text-decoration: underline;
	text-decoration-color: transparent;
	transition: text-decoration-color 0.2s ease;
}

.forgot-password-link:hover {
	text-decoration-color: var(--pink-700);
}

.reset-phase {
	display: grid;
	gap: 10px;
}

.reset-phase[hidden] {
	display: none;
}

.reset-instructions {
	margin: 0;
	padding: 12px;
	border-radius: 10px;
	background: #fef2f8;
	color: var(--text);
	font-size: 0.9rem;
	line-height: 1.5;
	border-left: 3px solid var(--pink-500);
}

.back-to-login-btn {
	border: 1px solid #ffc4e1;
	border-radius: 10px;
	background: #fff;
	color: var(--pink-900);
	padding: 10px 12px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
	transition: background 0.2s ease;
}

.back-to-login-btn:hover {
	background: #ffe8f4;
}

@media (max-width: 900px) {
	.actions {
		min-width: 0;
		flex-wrap: wrap;
	}

	.search-wrap {
		min-width: 0;
		width: 100%;
		order: 3;
	}

	.benefits {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.topbar {
		flex-direction: column;
		align-items: stretch;
		padding: 12px;
	}

	.actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.search-wrap {
		grid-column: 1 / -1;
		order: -1;
	}

	.auth-btn,
	.account-shortcut-btn,
	.cart-btn {
		width: 100%;
	}

	.container,
	.hero {
		margin-left: 10px;
		margin-right: 10px;
		padding-left: 12px;
		padding-right: 12px;
	}

	.product-grid {
		grid-template-columns: 1fr;
	}

	.cart-container {
		padding: 16px;
		border-radius: 18px;
	}

	.cart-item {
		grid-template-columns: 64px 1fr;
		gap: 10px;
	}

	.cart-item span,
	.cart-item .eliminar {
		grid-column: 2;
		justify-self: start;
	}
}
