/* ============================================================
   MÓDULO DESPENSA — estilos específicos
   ============================================================ */

.view { padding-bottom: 32px; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }

.modal {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  z-index: 401;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal.visible { transform: translateY(0); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}

.modal-head h3 {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field input,
.field select,
.field textarea {
  font-family: 'Epilogue', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modal-actions button { flex: 1; }

.btn-secondary {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 14px;
  cursor: pointer;
}

/* AUTOCOMPLETE */
.autocomplete {
  position: relative;
}

.ac-suggestions {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.ac-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--surface-2); }
.ac-item.create { color: var(--accent); font-weight: 500; }

/* STORE CARD (vista tiendas) */
.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 20px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 1024px) {
  .store-card { margin: 0 0 10px; }
}

.store-card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}

.store-card-info { flex: 1; min-width: 0; }

.store-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.store-card-cat {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.store-card-count {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

/* SUGGESTION ALERT */
.suggestion-alert {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.suggestion-alert .alert-icon {
  color: var(--accent);
  border-color: var(--accent);
}

@media (min-width: 1024px) {
  .suggestion-alert {
    border: 1px solid var(--accent);
    background: var(--surface);
    border-radius: 8px;
    margin: 16px 0 0;
  }
}
