@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f4f4f4;
  color: #333;
}

/* === APP CONTAINER === */
.app-container {
  max-width: 500px;
  margin: 0 auto;
  background: rgb(255, 255, 255);
  min-height: 100vh;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  overflow: visible; /* ← clave: no cortar el overflow */
  position: relative;
}

/* === HEADER MEJORADO === */
.app-header {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  padding: 30px 20px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.app-header p {
  font-size: 1rem;
  opacity: 0.9;
}

/* === BÚSQUEDA CON ICONO === */
.search-box {
  padding: 15px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  background: #f0f0f0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.search-box input:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #999;
}

/* === CATEGORÍAS CON SCROLL SUAVE === */
.categories {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  background: #e0e0e0;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  color: #555;
}

.cat-btn.active {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.cat-btn:hover {
  background: #128C7E;
  color: white;
}

/* === PRODUCTOS CON SOMBRAS MEJORADAS === */
.products-grid {
  padding: 12px 16px 80px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card h3 {
  padding: 15px 15px 5px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
    width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-card h2 {
  padding: 15px 15px 5px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  
}

.price {
  color: #25D366;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 0 15px 5px;
}

.desc1 {
  padding: 0 15px 15px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
 

}
.desc {
  padding: 0 15px 15px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
 width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  
}


.btn-wsp {
  background: #25D366;
  color: white;
  border: none;
  width: 100%;
  padding: 15px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-wsp:hover {
  background: #128C7E;
}

/* === CARRITO FLOTANTE MEJORADO === */
.cart-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.3s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

#cartCount {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff5722;
  color: white;
  font-size: 0.8rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* === PANEL DEL CARRITO CON SCROLL === */
.cart-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 70vh;
  background: white;
  border-radius: 20px 0 0 20px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 101;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #25D366;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
}

.cart-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #fafafa;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px dashed #eee;
  font-size: 1rem;
}

.cart-item strong {
  font-size: 1.1rem;
}

.cart-item button {
  background: #e74c3c;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.quantity-controls button {
  background: #25D366;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.quantity-controls button:hover {
  background: #128C7E;
}

.quantity-controls span {
  font-weight: 600;
}

.cart-footer {
  padding: 20px;
  background: white;
  border-top: 1px solid #eee;
}

.btn-wsp-full {
  background: #25D366;
  color: white;
  border: none;
  width: 100%;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s ease;
}

.btn-wsp-full:hover {
  background: #128C7E;
}

.btn-wsp-full::before {
  content: "💬";
}

/* === MENÚ DEL CLIENTE === */
.client-actions {
  padding: 12px 16px;
  text-align: center;
  position: relative;
  z-index: 90;
}

.btn-client {
  background: #666;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  border-radius: 22px;
  cursor: pointer;
  width: 85%;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  z-index: 90;
  position: relative;
  touch-action: manipulation;
  transition: background 0.3s ease;
}

.btn-client:hover {
  background: #555;
}

.client-menu {
  position: fixed;
  bottom: 0;
  left: 15px;
  width: calc(100% - 30px);
  max-width: 470px;
  background: white;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 110;
  overflow: hidden;
  display: none;
}

.client-menu.open {
  display: block;
  transform: translateY(0);
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  background: #555;
  color: white;
  font-weight: 600;
}

.client-form {
  padding: 20px;
}

.client-form input,
.client-form textarea {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  transition: border 0.2s;
}

.client-form input:focus,
.client-form textarea:focus {
  border-color: #25D366;
  outline: none;
}

.client-form textarea {
  height: 80px;
  resize: vertical;
}
.tabbar{position:sticky; bottom:0; z-index:40;   background: linear-gradient(185deg, #25D366, #128C7E);}
.tabbar .inner{display:flex; justify-content:space-around; align-items:center; padding:10px 6px}
.tab{display:flex; flex-direction:column; align-items:center; gap:6px; font-size:12px; padding:6px 10px; border-radius:14px}
.tab.active{font-weight:800}
.footer{background:#E1AA36; padding:24px; text-align:center; color:#e5e7eb; border-top:1px solid #eee}
.form input, .form select, .form textarea{width:100%; padding:12px 14px; border:1px solid #e5e7eb; border-radius:14px; background:#fff}
.form .row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.table{width:100%; border-collapse:collapse; background:#fff; border-radius:14px; overflow:hidden; box-shadow:var(--shadow)}
.table th,.table td{padding:10px 12px; border-bottom:1px solid #f0f0f0; text-align:left}
.alert{background:#ecfccb; padding:12px; border-left:4px solid #47A992; border-radius:10px; margin:10px 0}
.err{background:#fee2e2; border-left:4px solid #ef4444}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* === FOOTER === */
/* === FOOTER === */
.app-footer {
  text-align: center;
  padding: 10px 0;
  background: #fff;
  border-top: 1px solid #eee;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.footer-buttons {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
}

.footer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-btn span {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.footer-btn:hover {
  color: #25D366;
}


/* === BOTONES DE USUARIO === */
.client-actions {
  padding: 12px 16px;
  text-align: center;
}

.btn-client {
  background: #666;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  border-radius: 22px;
  cursor: pointer;
  width: 85%;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.btn-client::before {
  content: "👤";
}

.call-btn {
  display: block;
  text-align: center;
  margin: 12px 16px;
  padding: 14px;
  background: #0077B6;
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.call-btn::before {
  content: "📞";
}

/* === MODAL OVERLAY === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: none;
  backdrop-filter: blur(2px);
}

.overlay.active {
  display: block;
}

/* === RESPONSIVE === */
@media (max-width: 520px) {
  .app-container {
    border-radius: 0;
    max-width: 100%;
    height: 100vh;
  }
  .cart-panel,
  .client-menu {
    width: 100%;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 16px 16px 0 0;
  }
}
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #27ae60;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* Nueva sección para el modal y carrusel */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.product-modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 10px;
  padding: 20px;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  text-align: center;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  cursor: pointer;
}

.carousel {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.carousel-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5rem;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.category {
  font-size: 0.8rem;
  color: #666;
  margin-top: 5px;
}

/* Responsividad para el modal */
@media (max-width: 480px) {
  .modal-content {
    max-width: 90%;
    padding: 10px;
  }

  .carousel-btn {
    padding: 5px;
    font-size: 1.2rem;
  }
}