/* Variables con colores del logo */
:root {
  --rojo: #C41E3A;
  --amarillo: #F4C430;
  --azul: #00BFFF;
  --negro: #1a1a1a;
  --negro-claro: #2a2a2a;
  --blanco: #ffffff;
  --gris: #888888;
  --gris-claro: #f5f5f5;
  --verde: #28a745;
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--negro);
  color: var(--blanco);
  min-height: 100vh;
  padding-bottom: 100px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--negro) 0%, var(--negro-claro) 100%);
  padding: 20px;
  text-align: center;
  border-bottom: 3px solid var(--rojo);
}

.header-content {
  max-width: 600px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--amarillo);
}

.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--amarillo);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  letter-spacing: 3px;
}

.tagline {
  color: var(--azul);
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.address {
  color: var(--gris);
  font-size: 0.9rem;
}

.coverage {
  color: var(--verde);
  font-size: 0.85rem;
  margin-top: 5px;
}

.estado-tienda-banner {
  background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  margin: 15px auto 10px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  animation: pulse-banner 2s infinite;
}

@keyframes pulse-banner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.track-order-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: var(--azul);
  color: var(--negro);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.track-order-btn:hover {
  background: var(--amarillo);
  transform: scale(1.05);
}

/* Navegación de categorías */
.category-nav {
  display: flex;
  overflow-x: auto;
  background: var(--negro-claro);
  padding: 10px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-btn {
  background: transparent;
  border: 2px solid var(--rojo);
  color: var(--blanco);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
  background: var(--rojo);
  color: var(--blanco);
}

/* Menú */
.menu-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.category-section {
  margin-bottom: 30px;
}

.category-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--amarillo);
  border-bottom: 2px solid var(--rojo);
  padding-bottom: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-icon {
  font-size: 1.5rem;
}

/* Productos */
.product-card {
  background: var(--negro-claro);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #333;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--azul);
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--blanco);
}

.product-description {
  font-size: 0.8rem;
  color: var(--gris);
  line-height: 1.4;
}

.product-price {
  color: var(--amarillo);
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 15px;
}

.add-btn {
  background: var(--rojo);
  color: var(--blanco);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-btn:hover {
  background: #a01830;
}

/* Carrito flotante */
.cart-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--rojo);
  color: var(--blanco);
  border: none;
  border-radius: 50px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.cart-button:hover {
  transform: scale(1.05);
}

.cart-icon {
  font-size: 1.3rem;
}

.cart-count {
  background: var(--amarillo);
  color: var(--negro);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.cart-total {
  font-weight: 700;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--negro-claro);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.modal-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--amarillo);
}

.close-btn {
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 2rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #333;
  display: flex;
  gap: 10px;
}

/* Items del carrito */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #333;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 3px;
}

.cart-item-price {
  color: var(--gris);
  font-size: 0.9rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  background: var(--negro);
  color: var(--blanco);
  border: 1px solid #444;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.qty-btn:hover {
  border-color: var(--azul);
}

.cart-item-qty {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-total {
  color: var(--amarillo);
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}

.cart-item-nota {
  width: 100%;
  padding: 5px 0 10px;
  border-bottom: 1px solid #333;
  margin-bottom: 10px;
}

.cart-item-nota input {
  transition: border-color 0.3s;
}

.cart-item-nota input:focus {
  border-color: var(--amarillo) !important;
  outline: none;
}

.cart-summary {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid var(--rojo);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-row.total {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--amarillo);
}

/* Botones */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--rojo);
  color: var(--blanco);
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  background: #a01830;
}

.btn-primary:disabled {
  background: #666;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--blanco);
  border: 1px solid #444;
}

.btn-secondary:hover {
  border-color: var(--azul);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--azul);
  color: var(--azul);
}

.btn-outline:hover {
  background: var(--azul);
  color: var(--negro);
}

.btn-block {
  width: 100%;
}

/* Formularios */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gris);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  background: var(--negro);
  border: 1px solid #444;
  border-radius: 8px;
  color: var(--blanco);
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--azul);
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: var(--azul);
  font-size: 0.85rem;
}

/* Checkout */
.checkout-step {
  animation: fadeIn 0.3s ease;
}

.checkout-step.hidden {
  display: none;
}

.checkout-step h3 {
  color: var(--amarillo);
  margin-bottom: 20px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.payment-option {
  display: block;
  cursor: pointer;
}

.payment-option input {
  display: none;
}

.payment-label {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--negro);
  border: 2px solid #444;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.payment-option input:checked + .payment-label {
  border-color: var(--azul);
  background: rgba(0, 191, 255, 0.1);
}

.payment-icon {
  font-size: 1.5rem;
}

.payment-info {
  margin-top: 20px;
}

.payment-info.hidden {
  display: none;
}

.nequi-box {
  background: var(--negro);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.nequi-box p {
  margin-bottom: 15px;
}

.qr-code {
  max-width: 200px;
  margin: 15px auto;
  display: block;
  border-radius: 10px;
}

.nequi-note {
  color: var(--gris);
  font-size: 0.85rem;
  margin-top: 15px;
}

.step-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.step-buttons .btn {
  flex: 1;
}

/* Footer */
.footer {
  background: var(--negro-claro);
  padding: 30px 20px;
  text-align: center;
  border-top: 3px solid var(--rojo);
  margin-top: 40px;
}

.footer a {
  color: var(--azul);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer p {
  margin-bottom: 10px;
}

.copyright {
  color: var(--gris);
  font-size: 0.85rem;
  margin-top: 15px;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

/* ===================== */
/* ESTILOS ADMIN */
/* ===================== */

.admin-body {
  background: #121212;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: var(--negro-claro);
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  width: 100%;
  max-width: 350px;
}

.login-box h1 {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--amarillo);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.login-box h2 {
  color: var(--gris);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 30px;
}

.error-msg {
  color: var(--rojo);
  margin-top: 15px;
  font-size: 0.9rem;
}

/* Admin Panel */
.admin-panel {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--rojo);
}

.admin-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--amarillo);
  font-size: 1.8rem;
}

/* Stats */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--negro-claro);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #333;
}

.stat-card.pendiente {
  border-color: var(--amarillo);
}

.stat-card.preparando {
  border-color: var(--azul);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--amarillo);
  margin-bottom: 5px;
}

.stat-label {
  color: var(--gris);
  font-size: 0.85rem;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--gris);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--blanco);
}

.tab-btn.active {
  color: var(--amarillo);
  border-bottom: 2px solid var(--amarillo);
  margin-bottom: -11px;
}

.tab-content.hidden {
  display: none;
}

/* Pedidos Admin */
.pedido-card {
  background: var(--negro-claro);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  border: 1px solid #333;
}

.pedido-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.pedido-id {
  font-weight: 700;
  color: var(--amarillo);
}

.pedido-time {
  color: var(--gris);
  font-size: 0.85rem;
}

.pedido-estado {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pedido-estado.pendiente {
  background: var(--amarillo);
  color: var(--negro);
}

.pedido-estado.preparando {
  background: var(--azul);
  color: var(--negro);
}

.pedido-estado.enviado {
  background: var(--verde);
  color: var(--blanco);
}

.pedido-estado.entregado {
  background: #666;
  color: var(--blanco);
}

.pedido-cliente {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.pedido-cliente p {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.pedido-cliente strong {
  color: var(--azul);
}

.pedido-items {
  margin-bottom: 15px;
}

.pedido-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.9rem;
}

.pedido-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #333;
  font-weight: 700;
  color: var(--amarillo);
}

.pedido-pago {
  margin-top: 10px;
  color: var(--gris);
  font-size: 0.85rem;
}

.pedido-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.pedido-actions select {
  flex: 1;
  padding: 10px;
  background: var(--negro);
  border: 1px solid #444;
  color: var(--blanco);
  border-radius: 5px;
}

/* Clientes Admin */
.cliente-card {
  background: var(--negro-claro);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  border: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cliente-info h3 {
  color: var(--blanco);
  margin-bottom: 5px;
}

.cliente-info p {
  color: var(--gris);
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.cliente-stats {
  text-align: right;
}

.cliente-stats .pedidos-count {
  color: var(--azul);
  font-weight: 600;
}

.cliente-stats .total-gastado {
  color: var(--amarillo);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Productos Admin */
.producto-admin-card {
  background: var(--negro-claro);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
  border: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.producto-admin-card.no-disponible {
  opacity: 0.5;
}

.producto-admin-info {
  flex: 1;
}

.producto-admin-info h4 {
  margin-bottom: 3px;
}

.producto-admin-info .categoria {
  color: var(--azul);
  font-size: 0.8rem;
}

.producto-admin-info .precio {
  color: var(--amarillo);
  font-weight: 600;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 480px) {
  .brand-name {
    font-size: 2.2rem;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .product-card {
    flex-wrap: wrap;
  }

  .product-price {
    margin-right: 10px;
  }

  .cart-button {
    bottom: 15px;
    right: 15px;
    padding: 12px 15px;
  }

  .modal-content {
    max-height: 95vh;
    border-radius: 15px 15px 0 0;
  }

  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }
}
