/* La Estación — Styles */

:root {
  --yellow: #FFD700;
  --black: #1A1A1A;
  --white: #fff;
  --gray: #888;
  --red: #E74C3C;
  --green: #2ECC71;
  --blue: #3498DB;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

/* ─── HEADER ─── */
#siteHeader {
  background: var(--black);
  border-bottom: 3px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 200;
}

.desktop-only {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.desktop-only .logo {
  height: 40px;
  border-radius: 6px;
}

.desktop-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--yellow);
  letter-spacing: 3px;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.desktop-nav a:hover { color: var(--yellow); }

.mobile-only {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.mobile-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--yellow);
  letter-spacing: 1px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px;
}

.cart-mobile {
  font-size: 1.3rem;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

.cart-mobile span {
  position: absolute;
  top: -5px;
  right: -7px;
  background: var(--red);
  color: white;
  font-size: 0.6rem;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── MOBILE NAV ─── */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--black);
  border-top: 2px solid var(--yellow);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 0.75rem 1.25rem;
  color: var(--white);
  text-decoration: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  border-bottom: 1px solid #2a2a2a;
}

.mobile-nav a:hover { background: #2a2a2a; color: var(--yellow); }

/* ─── HERO ─── */
.hero {
  background: var(--yellow);
  text-align: center;
  padding: 2.5rem 1rem;
}

.hero h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--black);
  letter-spacing: 2px;
}

.hero p {
  color: var(--black);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* ─── CATEGORIES ─── */
.categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cat-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  transition: background 0.2s;
}

.cat-btn:hover, .cat-btn.active {
  background: var(--yellow);
  color: var(--black);
}

/* ─── PRODUCTS GRID ─── */
.container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f5f5f5;
}

.product-card .info {
  padding: 1rem;
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.product-card .desc {
  color: var(--gray);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.product-card .precio {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.product-card button {
  background: var(--yellow);
  color: var(--black);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1px;
  width: 100%;
}

.product-card button:hover {
  background: #e6c200;
}

/* ─── CART TOGGLE ─── */
.cart-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  background: var(--black);
  color: var(--yellow);
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-toggle .count {
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── CART SIDEBAR ─── */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.3s;
}

.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 2px solid #eee;
}

.cart-header h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--black);
  letter-spacing: 1px;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item-info { flex: 1; }
.cart-item-info strong { display: block; font-size: 0.95rem; }
.cart-item-info small { color: var(--gray); font-size: 0.8rem; }

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  background: #eee;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 2px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.checkout-btn {
  background: var(--yellow);
  color: var(--black);
  border: none;
  width: 100%;
  padding: 0.9rem;
  border-radius: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
}

.checkout-btn:hover { background: #e6c200; }

/* ─── CHAT WIDGET ─── */
.chat-toggle {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  background: var(--black);
  color: var(--yellow);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 25px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}

.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.chat-window {
  display: none;
  width: 360px;
  height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  flex-direction: column;
  overflow: hidden;
}

.chat-window.open { display: flex; }

.chat-title {
  background: var(--black);
  color: var(--yellow);
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
}

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

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 85%;
}

.chat-msg.user {
  background: var(--yellow);
  color: var(--black);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.bot {
  background: #f0f0f0;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}

.chat-input-area input:focus {
  border-color: var(--yellow);
}

.chat-input-area button {
  background: var(--yellow);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ─── FOOTER ─── */
footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer p { margin-bottom: 0.4rem; font-size: 0.9rem; }

/* ─── FORMS ─── */
.form-box {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-box h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

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

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
  width: 100%;
}

.btn-primary:hover { background: #e6c200; }

/* ─── ALERTS ─── */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ─── ORDER CONFIRM ─── */
.order-confirm {
  text-align: center;
  padding: 3rem 2rem;
}

.order-confirm h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--green);
  letter-spacing: 2px;
  margin: 1rem 0;
}

.numero {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: var(--yellow);
  letter-spacing: 4px;
  background: var(--black);
  display: inline-block;
  padding: 0.5rem 2rem;
  border-radius: 12px;
  margin: 1rem 0;
}

/* ─── ADMIN ─── */
.admin-header {
  background: var(--black);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--yellow);
  font-size: 1.5rem;
  letter-spacing: 2px;
}

.admin-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.admin-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 1px;
}

.admin-nav a:hover { color: var(--yellow); }

.admin-section { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table th, .admin-table td {
  padding: 0.9rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--black);
  color: var(--yellow);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}

.admin-table tr:hover td { background: #fafafa; }

.admin-btn {
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}

.admin-btn.done { background: var(--green); color: white; }
.admin-btn.edit { background: var(--blue); color: white; }
.admin-btn.delete { background: var(--red); color: white; }

/* ─── MODAL ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray);
}

.modal h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

/* ─── BADGES ─── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pendiente { background: #fff3cd; color: #856404; }
.badge-pagado { background: #d1ecf1; color: #0c5460; }
.badge-listo { background: #d4edda; color: #155724; }
.badge-entregado { background: #e2e3e5; color: #383d41; }

/* ─── MP ALIAS ─── */
.mp-alias {
  background: #fffbe6;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  color: #333;
  text-align: center;
  letter-spacing: 1px;
}

/* ─── MEDIA QUERY: MOBILE ─── */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }

  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .product-card { border-radius: 8px; }
  .product-card img { height: 100px !important; }
  .product-card h3 { font-size: 0.8rem !important; margin: 0.2rem 0 !important; }
  .product-card .desc { display: none !important; }
  .product-card .precio { font-size: 0.85rem !important; }
  .product-card button { font-size: 0.7rem !important; padding: 0.35rem 0.4rem !important; }

  .hero h2 { font-size: 1.5rem !important; }
  .hero p { font-size: 0.85rem !important; }

  .cart-sidebar {
    width: 100vw !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    height: 80vh !important;
  }

  .chat-toggle {
    bottom: 5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
  }

  .chat-widget {
    right: 0.75rem;
  }

  .chat-window {
    width: calc(100vw - 1.5rem) !important;
    right: 0 !important;
    height: 70vh !important;
    bottom: 55px !important;
  }

  .cart-toggle {
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  .container { padding: 0 0.75rem !important; margin-top: 1rem !important; }

  .form-box { margin: 1rem !important; padding: 1.5rem 1rem !important; }

  footer { font-size: 0.8rem !important; }
}
