:root {
  --bg: #eef3f8;
  --card-bg: #ffffff;
  --primary: #2e9bff;
  --secondary: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #c62828;
  --warning: #f59e0b;
  --success: #2e7d32;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}


body {
  font-family: 'Inter', 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--secondary);
}

/* ===============================
   HEADER STOKIRA – PREMIUM
================================ */

.app-header {
  background: linear-gradient(135deg, #0f172a, #020617);
  padding: 22px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-img {
  width: 54px;
  height: 54px;
  /*background: radial-gradient(circle at top left, #38bdf8, #0284c7);*/
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  /*box-shadow: 0 8px 20px rgba(56,189,248,.35);*/
}

.avatar-img img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-text h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #f8fafc;
}

.brand-text span {
  font-size: 13px;
  color: #94a3b8;
  letter-spacing: .4px;
}

main {
  padding-top: 40px;
}



/* CONTENEDOR GENERAL */
.productos-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

/* GRID RESPONSIVE */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  max-width: 1200px;
  width: 100%;
}

/* CARD */
.producto {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

/* IMAGEN (SIN ZOOM) */
.box-img {
  width: 130px;
  height: 130px;
  background: #f8fafc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.box-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* INFO */
.info p {
  margin: 4px 0;
  font-size: 14px;
}

.info p:first-child {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.info strong {
  font-weight: 600;
}

/* UBICACIÓN */
.info .ubicacion {
  margin-top: 8px;
  padding: 6px 10px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
}

.precio-fecha {
  font-size: 12px;
  color: var(--muted);
  margin-top: -2px;
}


/* ESTADOS */
.estado {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.estado.alerta {
  background: #fee2e2;
  color: var(--danger);
}

.estado.pedir {
  background: #fef3c7;
  color: #92400e;
}

.estado.pedido {
  background: #dcfce7;
  color: var(--success);
}

/* MOBILE */
@media (max-width: 480px) {
  .producto {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .box-img {
    margin: 0 auto;
  }
}


/* ===============================
   MAIN
================================ */

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ===============================
   SEARCH
================================ */

.search-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 15px 40px rgba(0,0,0,.08);
  margin-bottom: 40px;
}

.search-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.search-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #64748b;
}

/* Input + botón */
.search-box {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box input {
  flex: 1;
  min-width: 220px;
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  outline: none;
  transition: border .2s, box-shadow .2s;
}

.search-box input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56,189,248,.25);
}

/* Botón */
.search-box button {
  height: 46px;
  padding: 0 26px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2,132,199,.35);
}

/* Mensajes */
.search-messages {
  margin-top: 14px;
}

.loading {
  font-size: 13px;
  color: #0369a1;
  font-weight: 600;
}

.no-results {
  font-size: 13px;
  color: #b91c1c;
  font-weight: 600;
}

/* ===============================
   RESULTADOS
================================ */

.results-section {
  display: block;
}

/* ===============================
   HEADER
================================ */

.app-header {
  background: linear-gradient(135deg, #020617, #0f172a);
  padding: 28px 24px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-img img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.header-text h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 1px;
}

.header-text p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

/* ===============================
   SPINNER
================================ */

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #0369a1;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #cbd5f5;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===============================
   BOTÓN ENTER EFECTO
================================ */

.btn-press {
  transform: scale(.95);
  box-shadow: 0 0 0 rgba(0,0,0,0) !important;
}

/* ===============================
   HISTORIAL
================================ */

.search-history {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-history button {
  background: #e2e8f0;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: background .2s;
}

.search-history button:hover {
  background: #cbd5f5;
}

/* ===============================
   HEADER LAYOUT
================================ */

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===============================
   BOTÓN LOGIN
================================ */

.btn-login {
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 8px 18px rgba(2,132,199,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(2,132,199,.45);
}


/* ============================================================
   BOTÓN MODO OSCURO / CLARO
   ============================================================ */

.btn-theme {
  margin-right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 16px;
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
  transition: transform .15s ease, background .2s;
}

.btn-theme:hover {
  transform: scale(1.05);
}

/* ============================================================
   MODO OSCURO
   ============================================================ */

body.dark-mode {
  --bg: #000000;
  --card-bg: #000105;
  --secondary: #e5e7eb;
  --muted: #94a3b8;
  --border: #1e293b;
}

body.dark-mode {
  background: var(--bg);
  color: var(--secondary);
}

body.dark-mode .search-section,
body.dark-mode .producto {
  background: #282828;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}

body.dark-mode input,
body.dark-mode .search-box button {
  background: #000000;
  color: #e5e7eb;
  border-color: #1e293b;
}

body.dark-mode .search-history button {
  background: #1e293b;
  color: #e5e7eb;
}

body.dark-mode .search-history button:hover {
  background: #334155;
}

/* UBICACIÓN */
.info .ubicacion {
  background: #334155;
  color: #e5e7eb;
}

/* ===============================
   HEADER MOBILE
================================ */
@media (max-width: 768px) {

  .header-content {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .header-left {
    flex-direction: column;
    gap: 8px;
  }

  .header-text h1 {
    font-size: 22px;
  }

  .header-text p {
    font-size: 12px;
  }

  .header-right {
    display: flex;
    gap: 10px;
  }
}
/* ===============================
   SEARCH MOBILE
================================ */
@media (max-width: 480px) {

  .search-section {
    padding: 22px;
  }

  .search-title {
    font-size: 20px;
  }

  .search-box {
    flex-direction: column;
  }

  /*.search-box input,
  .search-box button {
    width: 100%;
  }*/
}
@media (max-width: 480px) {

  .producto {
    padding: 16px;
  }

  .info p {
    font-size: 13px;
  }

  .info p:first-child {
    font-size: 15px;
  }

  .estado {
    margin: 10px auto 0;
  }

  /* CONTENEDOR GENERAL */
.productos-wrapper {
 
  padding: 0px 0px;
}
.app-main {
 padding: 0px 0px 0px;
}
}

@media (max-width: 480px) {

  .producto {
    padding: 16px;
  }

  .info p {
    font-size: 13px;
  }

  .info p:first-child {
    font-size: 15px;
  }

  .estado {
    margin: 10px auto 0;
  }
}

@media (max-width: 480px) {

  .info {
    text-align: center;
  }

  .info .ubicacion {
    display: inline-block;
  }
}
