* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #c4b5a0;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.app-container {
  width: 100%;
  margin: 0 auto;
  background-color: #c4b5a0;
  min-height: 100vh;
  overflow-x: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  /* Actualizando a la nueva imagen de fondo de cafetería dibujada a mano */
  background: linear-gradient(to bottom, rgba(196, 181, 160, 0.3), rgba(196, 181, 160, 0.4)),
    url("https://hebbkx1anhila5yf.public.blob.vercel-storage.com/fondo-cafeteria-dibujado-mano_23-2150849907-AtlwxpUodAjOQDMSruk4CMmhUFip4b.avif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  /* Eliminando el fondo de color para que los íconos queden sobre el fondo de pantalla */
  background-color: transparent;
}

.top-nav h1 {
  font-size: 1.5rem;
  /* Cambiando color del título a blanco con sombra para mejor legibilidad sobre el fondo */
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* Manteniendo íconos amarillo oscuro con sombra para visibilidad */
.nav-icon svg {
  fill: #d4a574;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.5));
  transition: fill 0.3s;
}

.nav-icon:hover svg {
  fill: #c49565;
}

/* Agregando estilos para agrupar los íconos de usuario y logout */
.top-nav-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem;
  /* Eliminando el fondo de color de la barra inferior */
  background-color: transparent;
  margin-top: auto;
}

.bottom-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s;
}

.bottom-nav-btn svg {
  /* Cambiando color de #7c4f34 a #d4a574 para coincidir con los íconos superiores */
  fill: #d4a574;
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.5));
  transition: fill 0.3s;
}

.bottom-nav-btn:hover svg {
  fill: #c49565;
}

.bottom-nav-btn:hover {
  transform: scale(1.1);
}

.bottom-nav-btn.active svg {
  /* Actualizando el color activo también para mantener consistencia */
  fill: #c49565;
}

/* Auth Screen */
.auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.logo-section {
  margin-bottom: 2rem;
}

/* Estilos para asegurar que el logo se vea correctamente */
.logo-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 0.25rem;
}

.tab {
  flex: 1;
  padding: 0.75rem 2rem;
  background: transparent;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  /* Cambiando color del tab inactivo a dorado claro para REGISTRARSE */
  color: white;
  background-color: #d4a574;
  transition: all 0.3s;
}

/* Tab activo con marrón oscuro para LOGEARSE */
.tab.active {
  background-color: #7c4f34;
  color: white;
}

.auth-content {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 2rem;
}

.form-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1.25rem;
}

.form-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-container input {
  padding: 1rem;
  border: none;
  border-radius: 15px;
  background-color: #f5f5f5;
  font-size: 1rem;
}

/* Cambiando color del botón primario a #d4a574 (dorado claro) para REGISTRARSE */
.btn-primary {
  padding: 1rem;
  background-color: #d4a574;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Actualizando hover para el nuevo color dorado */
.btn-primary:hover {
  background-color: #c49565;
}

.btn-secondary {
  padding: 1rem;
  background-color: #8b6f47;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: #6f5638;
}

.forgot-password {
  text-align: center;
  color: #666;
  text-decoration: none;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.hidden {
  display: none;
}

/* Menu Screen */
.menu-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Agregando estilos para el sidebar desplegable */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.sidebar-header h2 {
  color: #8b6f47;
  font-size: 1.5rem;
  margin: 0;
}

.close-sidebar {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.sidebar-menu {
  padding: 1rem;
}

.sidebar-item {
  width: 100%;
  padding: 1rem 1.5rem;
  background-color: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  text-align: left;
  transition: all 0.3s;
  margin-bottom: 0.5rem;
}

.sidebar-item:hover {
  background-color: #8b6f47;
  color: white;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: white;
  border-radius: 50px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
}

/* Eliminando estilos de category-tabs ya que ahora están en el sidebar */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  background-color: #f5f5f5;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.price {
  color: #8b6f47;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Cart Screen */
.cart-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 800px;
  margin: 0 auto;
}

.cart-item-large {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.cart-item-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  background-color: #f5f5f5;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-large h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.section-title {
  /* Cambiando color del título AÑADIR de rosa a marrón tierra */
  color: #7c4f34;
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.add-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.add-item {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s;
}

.add-item:hover {
  transform: scale(1.05);
}

.add-item-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  background-color: #f5f5f5;
}

.add-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-item p {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cart-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.btn-icon {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 15px;
  padding: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-icon:hover {
  background-color: #f5f5f5;
}

/* Summary Screen */
.summary-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 700px;
  margin: 0 auto;
}

.summary-section {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.summary-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.summary-item-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #f5f5f5;
}

.summary-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.total-section {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.total-section h3 {
  margin-bottom: 1rem;
  color: #333;
}

.total-price {
  font-size: 2rem;
  font-weight: 700;
  color: #8b6f47;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Payment Screen */
.payment-content {
  flex: 1;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-methods {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
}

.payment-methods h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
}

.payment-method {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: white;
  border: none;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.payment-method:hover {
  background-color: #8b6f47;
  color: white;
}

/* Send Payment Screen */
.send-payment-content {
  flex: 1;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-form {
  background-color: white;
  border-radius: 30px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 15px;
  background-color: #f5f5f5;
  font-size: 1rem;
  font-family: inherit;
}

.form-group svg {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.payment-instruction {
  /* Cambiando color de instrucción de pago de rosa a marrón tierra */
  color: #7c4f34;
  text-align: center;
  margin: 1.5rem 0;
  font-weight: 500;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

/* Eliminando el color rosa del SVG en payment-option */
.payment-option svg rect {
  fill: #7c4f34;
}

/* Invoice Screen */
.invoice-content {
  flex: 1;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invoice-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.invoice-card h2 {
  margin-bottom: 2rem;
  color: #333;
}

.invoice-items {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.invoice-items p {
  margin-bottom: 0.5rem;
}

.invoice-total {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.invoice-total h3 {
  margin-bottom: 0.5rem;
}

.invoice-price {
  font-size: 2rem;
  font-weight: 700;
  color: #8b6f47;
}

.invoice-card .btn-primary {
  margin-bottom: 2rem;
}

.barcode {
  background-color: white;
  border-radius: 15px;
  padding: 1rem;
  display: flex;
  justify-content: center;
}

/* Profile Screen */
.profile-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 600px;
  margin: 0 auto;
}

.profile-avatar {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-info {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.info-field {
  margin-bottom: 1.5rem;
}

.info-field label {
  display: block;
  margin-bottom: 0.5rem;
  color: #666;
  font-size: 0.9rem;
}

.info-field input {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 15px;
  background-color: #f5f5f5;
  font-size: 1rem;
}

.profile-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-actions .btn-secondary {
  flex: 1;
  min-width: 200px;
}

/* Notifications Screen */
.notifications-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 700px;
  margin: 0 auto;
}

.notification-item {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.notification-date {
  color: #999;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.notification-text {
  color: #333;
  font-size: 1rem;
}

.btn-clear {
  margin: 2rem auto 0;
  display: flex;
  width: auto;
  padding: 1rem 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .add-items-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button {
    width: 100%;
  }

  .profile-actions {
    flex-direction: column;
  }

  .profile-actions .btn-secondary {
    width: 100%;
  }
}

/* Product Detail Screen */
.product-detail-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.product-detail-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 2rem;
  background-color: #f5f5f5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-card h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
}

.product-description {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.product-description h3 {
  color: #8b6f47;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.product-description p {
  color: #666;
  line-height: 1.6;
}

.product-price-section {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.product-price-section h3 {
  color: #8b6f47;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.product-detail-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #7c4f34;
}

/* Agregando estilos para la sección de cantidad en detalles del producto */
.product-quantity-section {
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.product-quantity-section h3 {
  color: #8b6f47;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.quantity-controls-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.quantity-controls-large button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #8b6f47;
  background-color: white;
  color: #8b6f47;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-controls-large button:hover {
  background-color: #8b6f47;
  color: white;
  transform: scale(1.1);
}

.quantity-controls-large span {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  min-width: 60px;
  text-align: center;
}

.product-actions {
  margin-top: 2rem;
}

.product-actions .btn-primary {
  width: 100%;
  padding: 1.25rem;
  font-size: 1.1rem;
}

/* Empty Cart Message */
.empty-cart {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  margin: 2rem auto;
}

.empty-cart svg {
  margin-bottom: 1.5rem;
}

.empty-cart h2 {
  color: #8b6f47;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.empty-cart p {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.empty-cart .btn-primary {
  width: auto;
  padding: 1rem 2rem;
}

/* Cart Items Container */
#cart-items-container {
  margin-bottom: 2rem;
}

/* Quantity Controls */
.add-item-with-quantity {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.quantity-controls button {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid #8b6f47;
  background-color: white;
  color: #8b6f47;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-controls button:hover {
  background-color: #8b6f47;
  color: white;
}

.quantity-controls span {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  min-width: 30px;
  text-align: center;
}

/* Agregando estilos para mostrar la cantidad en los items del carrito y resumen */
.item-quantity {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Agregando estilos para el botón de eliminar en items del carrito */
.btn-remove {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: #d9534f;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-remove:hover {
  background-color: #c9302c;
}

/* Agregando estilos para la notificación de producto agregado */
.cart-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background-color: #d4a574;
  color: white;
  padding: 1rem 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
}
.cart-notification.show {
  opacity: 1;
}
