:root {
	--transition-duration: 0.3s;
	--transition-timing  : ease-in-out;
}

/* Transiciones suaves para la mayoría de elementos */
*,
*::before,
*::after {
	transition: background-color var(--transition-duration) var(--transition-timing),
		color var(--transition-duration) var(--transition-timing),
		border-color var(--transition-duration) var(--transition-timing),
		box-shadow var(--transition-duration) var(--transition-timing),
		transform var(--transition-duration) var(--transition-timing);
}

/* Animación de aparición suave */
@keyframes fadeInUp {
	from {
		opacity  : 0;
		transform: translateY(20px);
	}

	to {
		opacity  : 1;
		transform: translateY(0);
	}
}

/* Aplicar animación de aparición a contenedores principales */
.split-container,
.productos-container,
.carrito-container {
	animation: fadeInUp 0.5s ease forwards;
}

/* Botones y productos con efecto hover animado */
button,
.producto-btn {
	cursor     : pointer;
	will-change: transform, background-color;
}

button:hover,
.producto-btn:hover {
	transform : scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Inputs con transición en foco */
input[type="text"],
.codigo-form input {
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
.codigo-form input:focus {
	border-color: var(--color-acento, #0094C6);
	box-shadow  : 0 0 8px var(--color-acento, #0094C6);
	outline     : none;
}

/* Animación para botones de control en carrito */
#tabla-carrito li .controles button {
	transition: background-color 0.3s ease, transform 0.2s ease;
}

#tabla-carrito li .controles button:hover {
	transform: scale(1.1);
}

/* Animación pulsante para el botón pagar */
@keyframes pulse {

	0%,
	100% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.05);
	}
}

.acciones button#pagar {
	animation: pulse 2s infinite ease-in-out;
}

@keyframes pulseAdd {
	0% {
		transform       : scale(1);
		background-color: transparent;
	}

	50% {
		transform       : scale(1.1);
		background-color: rgba(0, 148, 198, 0.2);
	}

	100% {
		transform       : scale(1);
		background-color: transparent;
	}
}

.animar-agregado {
	animation: pulseAdd 0.6s ease forwards;
}

@keyframes parpadeo {
	0% {
		opacity: 0;
	}

	50% {
		opacity: 1;
	}

	100% {
		opacity: 0;
	}
}



img {
	pointer-events: none;
}








@font-face {
	font-family: 'KT Kiyosuna';
	src        : url('Objetos/KiyosunaSans-B.otf') format('opentype');
}
@font-face {
	font-family: 'Exo 2';
	src        : url('Objetos/Exo2-VariableFont_wght.ttf') format('opentype');
}
@font-face {
	font-family: 'Canada';
	src        : url('Objetos/canada.otf') format('opentype');
}
@font-face {
	font-family: 'Boba Milky';
	src        : url('Objetos/Boba\ Milky.ttf') format('opentype');
}

*{
	font-family: 'KT Kiyosuna';	
}

body {
	margin     : 0;
	padding    : 0;
	height     : 100vh;
	background : #f5f5f5;
	overflow   : hidden;

  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  user-select: none;
  /* Estándar */
}

.split-container {
	display : flex;
	height  : 100vh;
	overflow: hidden;
}

.productos-container {
	flex      : 4;
	padding   : 15px;
	background: #ffffff;
	overflow-y: auto;
}

.carrito-container {
	flex          : 1;
	min-width     : 35%;
	max-width     : 45%;
	padding       : 1.5%;
	background    : #e9e9e9;
	display       : flex;
	flex-direction: column;
	overflow      : hidden;
	position      : relative;
}

.productos-grid {
	display              : grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap                  : 15px;
	margin-top           : 15px;
	width                : 100%;
}

.categoria{
	width: fit-content;
	background   : #00bcfb;
	color        : white;
	padding      : 1% 5%;
	border-radius: 5em;
	font-size    : 18px;
	font-weight  : bold;
}

.producto-btn {
	position      : relative;
	display       : flex;
	flex-direction: column;
	align-items   : center;
	background    : #fff;
	border        : 1px solid #ddd;
	border-radius : 8px;
	padding       : 10px;
	padding-top:3em;
	cursor        : pointer;
	transition    : background 0.2s;
	width         : 100%;
	box-sizing    : border-box;
	/* min-height    : 180px; */
}

.producto-btn:hover {
	background: #f0f0f0;
}

.producto-btn img {
	width        : 80px;
	height       : 80px;
	object-fit   : cover;
	margin-bottom: 8px;
}

.producto-btn .precio {
	position     : absolute;
	top          : 10px;
	right        : 10px;
	background   : #4CAF50;
	color        : white;
	padding      : 2px 8px;
	border-radius: 12px;
	font-size    : 14px;
	font-weight  : bold;
}

.producto-btn span {
	font-size : 14px;
	text-align: center;
}

.producto-id {
	display: none;
}

.carrito-header {
	display: flex;
}

.carrito-header .botones{
	display: flex;
	align-items: center;
	width: 100%;
	flex-direction: row-reverse;
}

.carrito-header button img {
	display: flex;
	width  : 32px;
}

.carrito-body {
	flex-grow    : 1;
	overflow-y   : auto;
	margin-bottom: 60px;
	/* Espacio para el total flotante */
}

#tabla-carrito {
	list-style: none;
	padding   : 0;
	margin    : 0;
}
/*
#tabla-carrito li {
	display        : flex;
	justify-content: space-between;
	background     : #fff;
	padding        : 18px 12px;
	margin-bottom  : 5px;
	border-radius  : 4px;
	border         : 1px solid #ddd;
	font-size      : 18px;
}
*/
#tabla-carrito li {
	display        : flex;
	justify-content: space-between;
	align-items    : center;
	padding        : 18px 12px;
	margin-bottom  : 5px;
	/* border-bottom  : 10px solid #555555; */
	font-size      : 18px;
}

.total-carrito {
	position  : absolute;
	bottom    : 120px;
	left      : 0;
	right     : 0;
	background: #f8f8f8;
	padding   : 10px 15px;
	border-top: 1px solid #ddd;
	text-align: right;
	font-size : 18px;
}

.total-carrito strong {
	font-size: 20px;
}

.teclado-numerico {
	display              : grid;
	grid-template-columns: repeat(3, 1fr);
	gap                  : 10px;
	margin               : 10px 0;
}

.numero {
	padding      : 18px;
	font-size    : 20px;
	background   : #fff;
	border       : 1px solid #ddd;
	border-radius: 4px;
	cursor       : pointer;
}

.numero:hover {
	background: #f0f0f0;
}

.codigo-form {
	display      : flex;
	gap          : 10px;
	margin-bottom: 10px;
}

.codigo-form input {
	flex-grow    : 1;
	padding      : 10px;
	font-size    : 16px;
	border       : 1px solid #ddd;
	border-radius: 4px;
}

.codigo-form button {
	padding      : 10px 20px;
	background   : #4CAF50;
	color        : white;
	border       : none;
	border-radius: 4px;
	cursor       : pointer;
}

.acciones {
	display   : flex;
	gap       : 10px;
	margin-top: 10px;
}

.acciones button {
	padding      : 10px 20px;
	background   : #2196F3;
	color        : white;
	border       : none;
	border-radius: 4px;
	cursor       : pointer;
}

.acciones button#eliminar {
	background: #f44336;
}

.acciones button#pagar {
	background: #FF9800;
}

.acciones button#panel {
	background: #9C27B0;
}

/* Responsive */
@media (max-width: 768px) {

.carrito-body{display:none;}

	.split-container {
		flex-direction: column;
		height        : auto;
	}

	.productos-container,
	.carrito-container {
		flex      : none;
		padding:3%;
		width     : 94%;
		max-width : 94%;
		min-height: 50vh;
	}

	.carrito-container {
		/*order: -1; */
	}
}
/*
#tabla-carrito li {
	display        : flex;
	justify-content: space-between;
	align-items    : center;
	background     : #fff;
	padding        : 18px 12px;
	margin-bottom  : 5px;
	border-radius  : 4px;
	border         : 1px solid #ddd;
	font-size      : 18px;
}*/

#tabla-carrito button.btn-mas,
#tabla-carrito button.btn-menos {
	background-color: #2196F3;
	border          : none;
	color           : white;
	font-weight     : bold;
	font-size       : 16px;
	width           : 32px;
	height          : 32px;
	border-radius   : 4px;
	cursor          : pointer;
	user-select     : none;
	line-height     : 1;
	padding         : 0;
	justify-content : center;
	align-items     : center;
	transition      : background-color 0.2s;
}

#tabla-carrito button.btn-menos {
	background-color: #f44336;
}

#tabla-carrito button.btn-mas:hover {
	background-color: #00bcfb;
}

#tabla-carrito li button.btn-menos:hover {
	background-color: #d32f2f;
}

/* Barra superior productos */
.barra-superior {
	background: white;
	display       : flex;
	align-items   : center;
	padding-bottom: 10px;
	border-bottom : 1px solid #ddd;
	margin-bottom : 15px;
	position:sticky
	top:0;
	z-index: 9;
}

.logo {
	height: 40px;
	width : auto;
}

.elemento{
	margin-left: auto;
	display    : flex;
	align-items: center;
	font-size  : 18px;
	color      : #555;
	gap        : 6px;
}

/* Botón toggle teclado */
.carrito-header button {
	background   : transparent;
	border       : none;
	font-size    : 20px;
	cursor       : pointer;
	color        : #2196f3;
	padding      : 5px 8px;
	border-radius: 4px;
	transition   : background-color 0.2s;
}

.carrito-header button:hover {
	background-color: #e0f0ff;
}

/* Contenedor teclado y código */
#teclado-codigo-container {
	margin-top: 10px;
}

/* Acciones: solo dos botones */
.acciones {
	display   : flex;
	gap       : 10px;
	margin-top: 10px;
}

.acciones button#cancelar {
	flex            : 0 0 20%;
	background-color: #f44336;
	color           : white;
	font-weight     : bold;
	border          : none;
	border-radius   : 4px;
	cursor          : pointer;
	font-size       : 14px;
	padding         : 10px 0;
	transition      : background-color 0.3s;
}

.acciones button#cancelar:hover {
	background-color: #d32f2f;
}

.acciones button#pagar {
	flex            : 1 1 80%;
	background-color: #4caf50;
	color           : white;
	font-weight     : bold;
	border          : none;
	border-radius   : 4px;
	cursor          : pointer;
	font-size       : 20px;
	padding         : 10px 0;
	transition      : background-color 0.3s;
	display         : flex;
	justify-content : center;
	align-items     : center;
}

.acciones button#pagar:hover {
	background-color: #388e3c;
}

/* Ajustes generales para responsividad */
@media (max-width: 768px) {
	.split-container {
		flex-direction: column;
	}

	.productos-container,
	.carrito-container {
		padding:3%;
		max-width : 94%;
		min-height: auto;
	}

	.acciones button#cancelar {
		flex: 0 0 20%;
	}

	.acciones button#pagar {
		flex     : 1 1 80%;
		font-size: 18px;
	}
}


/* Modal código flotante */
.modal-codigo {
	position       : fixed;
	top            : 0;
	left           : 0;
	width          : 100vw;
	height         : 100vh;
	background     : rgba(0, 0, 0, 0.6);
	display        : flex;
	justify-content: center;
	align-items    : center;
	z-index        : 9999;
}

.hidden {
	display: none !important;
}

.form-codigo-flotante {
	background   : white;
	padding      : 30px 40px;
	border-radius: 12px;
	box-shadow   : 0 0 15px rgba(0, 0, 0, 0.3);
	display      : flex;
	gap          : 15px;
	align-items  : center;
	min-width    : 400px;
	max-width    : 90vw;
}

#input-codigo-flotante {
	flex-grow     : 1;
	font-size     : 24px;
	padding       : 12px 15px;
	border        : 2px solid #ddd;
	border-radius : 8px;
	outline-offset: 2px;
}

.form-codigo-flotante button {
	background     : #4CAF50;
	border         : none;
	color          : white;
	font-size      : 28px;
	padding        : 12px 18px;
	border-radius  : 8px;
	cursor         : pointer;
	display        : flex;
	align-items    : center;
	justify-content: center;
	transition     : background-color 0.3s;
}

.form-codigo-flotante button#btn-cerrar-modal {
	background: #f44336;
	font-size : 28px;
}

.form-codigo-flotante button:hover {
	background-color: #388e3c;
}

.form-codigo-flotante button#btn-cerrar-modal:hover {
	background-color: #d32f2f;
}


.tabla-carrito {
	width          : 100%;
	border-collapse: collapse;
	color          : var(--color-texto, #fff);
}

.tabla-carrito th,
.tabla-carrito td {
	/* border-bottom    : 3px solid var(--color-acento-oscuro, #005E7C); */
	padding   : 8px 0px;
	text-align: center;
	color: black;
}

.tabla-carrito th {
	font-weight     : bold;
	color: black;
	border-bottom: 3px solid var(--color-acento-oscuro, #005E7C);
}
.tabla-carrito tbody tr:last-child td {
	border-bottom: 0;
}

.tabla-carrito button {
	background-color: var(--color-acento);
	border          : none;
	color           : var(--color-texto);
	font-weight     : bold;
	font-size       : 16px;
	width           : 30px;
	height          : 30px;
	border-radius   : 4px;
	cursor          : pointer;
	margin          : 0 2px;
	transition      : background-color 0.3s;
}

.tabla-carrito button:hover {
	background-color: var(--color-acento-oscuro);
}


.resumen-carrito {
	padding         : 10px 15px;
	background-color: #dddddd;
	color           : black;
	font-size       : 16px;
	font-weight     : 600;
	display         : flex;
	justify-content : space-between;
	margin-bottom   : 8px;
	border-radius   : 6px;
}

.resumen-carrito * {
	min-width : 120px;
	text-align: center;
	margin:0;
}
.resumen-carrito .valor{
	font-size:1.5em;
}

#texto-pagar{
	font-size: 32px;
}

.acciones #cancelar img{
  filter: invert(100%);
}

.modal {
	position       : fixed;
	top            : 0;
	left           : 0;
	right          : 0;
	bottom         : 0;
	background     : rgba(0, 0, 0, 0.5);
	display        : flex;
	justify-content: center;
	align-items    : center;
	z-index        : 9999;
}

.modal.hidden {
	display: none;
}

.modal-content {
	background   : white;
	padding      : 25px 30px;
	border-radius: 8px;
	width        : 320px;
	text-align   : center;
	box-shadow   : 0 0 15px rgba(0, 0, 0, 0.3);
}

.btn-metodo,
.btn-accion,
.btn-cerrar {
	margin       : 10px 5px 0 5px;
	padding      : 10px 18px;
	font-size    : 16px;
	border       : none;
	border-radius: 6px;
	cursor       : pointer;
	transition   : background-color 0.3s;
}

.btn-metodo {
	background-color: #0094C6;
	color           : white;
}

.btn-metodo:hover {
	background-color: #005E7C;
}

.btn-accion {
	background-color: #28a745;
	color           : white;
}

.btn-accion:hover {
	background-color: #1e7e34;
}

.btn-cerrar {
	background-color: #dc3545;
	color           : white;
	margin-top      : 20px;
}

.btn-cerrar:hover {
	background-color: #a71d2a;
}

.icono{
	margin-left:1em;
}
.conectado{
	display: none;
	    filter: invert(1) sepia(1) saturate(10000%) hue-rotate(45deg) brightness(80%)
}
.desconectado{
	filter: invert(1) sepia(5) saturate(10000%) hue-rotate(110deg) brightness(100%) invert(1);
	animation: parpadeo 1s infinite;
}