:root {
	--kyocera-red: #E31A2F;
	--kyocera-black: #231F20;
}

body {
	font-family: "Roboto", Arial, sans-serif;
	background: #f7f7f7;
	margin: 0;
	padding: 0;
}

.container {
	width: 95%;
	max-width: 1200px;
	margin: 16px auto;
	background: #fff;
	padding: 56px 24px 32px;
	border-radius: 16px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
	position: relative;
}

.cantidad-wrapper {
	flex-shrink: 0;
}

.cantidad-row {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.acciones-derecha {
	margin-left: auto;
	display: flex;
	gap: 8px;
}

.md-headline {
	text-align: center;
	font-size: 2.5rem;
	font-weight: 500;
	margin-top: 0;
	margin-bottom: 32px;
	color: var(--kyocera-black);
}

.md-form-group {
	margin-bottom: 24px;
}

.md-label {
	font-size: 1.1em;
	color: #555;
	margin: 0;
	display: inline-block;
	line-height: 48px;
}

.md-input-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	align-items: center;
}

.md-input {
	flex: 1;
	min-width: 0;
	padding: 12px;
	font-size: 1.2em;
	border: 1px solid #bdbdbd;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s;
	height: 48px;
	box-sizing: border-box;
}

.md-input-descripcion {
	flex: 1;
	min-width: 0;
	padding: 12px;
	font-size: 1.2em;
	border: 1px solid #bdbdbd;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s;
	height: 48px;
	box-sizing: border-box;
	width: 100%;
}

.md-input-cantidad {
	flex: 0 0 auto;
	min-width: 0;
	padding: 12px;
	font-size: 1.2em;
	border: 1px solid #bdbdbd;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s;
	height: 48px;
	box-sizing: border-box;
}

.md-input:focus {
	border-color: var(--kyocera-red);
}

.md-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 10px 18px;
	font-size: 1.1em;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s;
	font-weight: 500;
	height: 48px;
	box-sizing: border-box;
	flex-shrink: 0;
	white-space: nowrap;
}

.md-btn-primary {
	background: var(--kyocera-red);
	color: #fff;
}

.md-btn-primary:hover {
	background: #c71b27;
}

.md-btn-secondary {
	background: #e0e0e0;
	color: #333;
}

.md-btn-secondary:hover {
	background: #bdbdbd;
}

.md-btn-success {
	background: rgb(255, 255, 128);
	color: rgb(0, 0, 0);
}

.md-btn-success:hover {
	background: rgb(255, 255, 0);
}

.md-list-item {
	border-bottom: 2px solid rgb(178, 178, 178);
	padding-bottom: 12px;
}

.md-list-item:last-child {
	border-bottom: none;
}

.eliminar-item-modal {
	cursor: pointer;
}

#resultado {
	font-size: 2.5rem;
	padding: 32px;
	background: #fff4f3;
	border: 2px solid var(--kyocera-red);
	border-radius: 16px;
	margin-top: 32px;
	margin-bottom: 16px;
	font-weight: 500;
}

#resultado strong {
	font-size: 3rem;
	color: var(--kyocera-red);
	margin-bottom: 12px;
}

/* Enlace al administrador */
.link-admin-home {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: 50%;
	opacity: 0.82;
	background: rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
	transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.link-admin-icon {
	display: block;
	width: 36px;
	height: 36px;
	background-image: url('../icons/admin-access-32.png');
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
}

.link-admin-home:hover {
	opacity: 1;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.link-admin-home:focus-visible {
	outline: 2px solid var(--kyocera-red);
	outline-offset: 2px;
	border-radius: 6px;
	opacity: 1;
}

.btn-logout-home {
	position: absolute;
	top: 16px;
	left: 64px;
	z-index: 2200;
	height: 40px;
	padding: 8px 12px;
	width: auto;
	min-width: 0;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.btn-logout-label {
	font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
	.container {
		padding: 52px 12px 16px;
	}

	.md-headline {
		font-size: 1.8rem;
		margin-bottom: 16px;
		padding-right: 96px; /* Espacio para botón carrito */
	}

	.cantidad-row {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.acciones-derecha {
		margin-left: 0;
		width: 100%;
		flex-direction: column;
		gap: 8px;
	}

	.acciones-derecha .md-btn {
		width: 100%;
		justify-content: center;
	}

	#btnAgregar {
		width: 100%;
		justify-content: center;
	}

	.md-input-row {
		flex-wrap: wrap;
	}

	.md-btn {
		min-width: 0;
		padding: 10px 12px;
		font-size: 1rem;
	}

	#resultado {
		font-size: 1.8rem;
		padding: 16px;
	}

	#resultado strong {
		font-size: 2rem;
	}

	.precio {
		min-width: 150px;
		font-size: 0.9rem;
		padding: 6px 12px;
	}

	.link-admin-home {
		left: 12px;
		width: 34px;
		height: 34px;
	}

	.btn-logout-home {
		top: 16px;
		left: 52px;
		height: 34px;
		padding: 6px 10px;
		width: auto;
	}

	.btn-logout-label {
		display: none;
	}

	.link-admin-icon {
		width: 30px;
		height: 30px;
		background-size: contain;
		background-position: center;
	}
}

@media (max-width: 500px) {
	.md-input-row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.md-btn {
		width: 100%;
		justify-content: center;
	}

	.btn-logout-home {
		width: auto;
	}

	.md-headline {
		font-size: 1.5rem;
	}

	#resultado {
		font-size: 1.5rem;
		padding: 12px;
	}

	#resultado strong {
		font-size: 1.8rem;
	}
}

@media (max-width: 600px) {
	#resultado {
		font-size: 3rem;
	}
	#resultado strong {
		font-size: 3.5rem;
	}
}

.precio {
	display: inline-block;
	font-weight: bold;
	color: rgb(255, 255, 255);
	background: rgb(0, 0, 0);
	padding: 8px 16px;
	border: 2px solid var(--kyocera-red);
	border-radius: 12px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	margin-top: 2px;
	margin-bottom: 12px;
	min-width: 180px;
	text-align: right;
}